Quote:
Originally Posted by zee944
LaTo, judging from the images this is genius. Does it work only by using the histograms? No pixel-pixel comparing at all?
|
Really it isn't genius, here is the code:
Code:
int temp[2][256] = {{0}};
unsigned char curve[256] = {0};
for (int h = 0 ; h < height ; h++) {
for (int w = 0 ; w < width ; w++) {
temp[0][src1[(h*pitch)+w]] += src2[(h*pitch)+w];
temp[1][src1[(h*pitch)+w]] += 1;
}
}
for(int i = 0 ; i < 256 ; i++) {
if( temp[1][i] != 0 )
curve[i] = temp[0][i] / temp[1][i];
else
curve[i] = i;
}
Now you have your curve, curve[input] = output.
Quote:
Originally Posted by zee944
Isn't the plugin broken? It's 15,360 bytes and AviSynth [2.5.8] tells me "unable to load MatchHistogram.dll". I couldn't find out why yet.
|
It works on my PC... Try to re-download it!