Log in

View Full Version : Can these pictures be made to look almost the same?


zerowalker
29th January 2016, 21:39
Hi,

I wonder if it's possible without too much of a hassle to make these to pictures look almost the same (Contrast, Colors etc).

It's purely out of interest.
IT's just that one of the images has the wrong colors and the other don't,
and just for fun i tried to see if i could figure out how to fix it in Avisynth.

However i couldn't, i played around with Tweak while looking at Histogram.

But as you need to change it both ways and not just screw it towards one direction i couldn't make much of a progress.

So i thought i could post it here to see if anyone has any thoughts on it;)

http://abload.de/img/haloce_2016_01_29_21_9hsdy.png
http://abload.de/img/haloce_2016_01_29_21_pns7a.png

EDIT 9:43 PM:

Okay i figures out how to do it, it was just a colormatrix error... well that was embarrassing;P

wonkey_monkey
29th January 2016, 22:59
However i couldn't, i played around with Tweak while looking at Histogram.

I guess the graphs would have made it look like you needed a shear, whereas Tweak only offers scaling and translation?

For what it's worth, ColourLike (http://forum.doom9.org/showthread.php?t=96308) may have helped if a matrix mix up hadn't been the problem.

StainlessS
30th January 2016, 01:52
ColourLike[/url] may have helped if

If I remember correctly, the author Mg262 said something like "I do not like results".

EDIT:
David, I'm quite convinced that YOU could do better, prove me wrong if you will ! (Is totally beyond me)

wonkey_monkey
30th January 2016, 10:57
David, I'm quite convinced that YOU could do better

Dammit. You know I'm a sucker for flattery.

I've got an idea, but it may be some time before I can try it (my laptop is comatose), and it's pretty complicated.

StainlessS
30th January 2016, 16:32
You can lead a horse to water, but flattery will get you everywhere :)

raffriff42
30th January 2016, 16:34
I would attack the problem this way: Interleave the two clips or images. Frame jog to flip between them.
Try to recognize a TV-levels vs. PC-levels issue (visible as a slight contrast change)
Try to recognize a Rec.601 vs. Rec.709 issue (visible as a slight red/green saturation shift)
Try to determine if the difference is more in the YUV domain or the RGB domain. This may take trial and error.


For RGB differences, try the following, adjusting the three Levels filters as needed:A=
B=
Interleave(A.Subtitle("A"),
\ MergeRGB(
\ B.ShowRed("YV12") .Levels(0, 1.0, 255, 0, 255, coring=false),
\ B.ShowGreen("YV12") .Levels(0, 1.0, 255, 0, 255, coring=false),
\ B.ShowBlue("YV12") .Levels(0, 1.0, 255, 0, 255, coring=false)
\ )
\ )
# "Histograms in RGB & CMY" by -vit-
# http://forum.doom9.org/showthread.php?p=1570968#post1570968
return HistogramRGBParade.BicubicResize(Width, Height)


For YUV differences, try the following, adjusting the ColorYUV and Tweak filters as needed: A=
B=
Interleave(A.Subtitle("A"),
\ B.ColorYUV(
\ off_y=0, gain_y=f2c(1.0), gamma_y=f2c(1.0),
\ off_u=0, cont_u=f2c(1.0),
\ off_v=0, cont_v=f2c(1.0)
\ ).Tweak(sat=1.0, hue=0, coring=false)
\ )

## your clip must be at least this high: 512px
return StackHorizontal(
\ Last,
\ StackVertical(
\ Histogram("levels", 0.5).Crop(Width, 0, 256, 256).AddBorders(0, 0, 0, Height/2-256),
\ Histogram("color2" ).Crop(Width, 0, 256, 256).AddBorders(0, 0, 0, Height/2-256)
\ )
\ ).BicubicResize(Width, Height)

## rescale "Tweak-like" arguments for ColorYUV
function f2c(float f) {
return (f - 1.0) * 256.0
}

ChiDragon
31st January 2016, 18:11
^ coring=false for Levels but not for Tweak?

raffriff42
31st January 2016, 21:53
Whoops, both should be false, thanks.