They're everywhere in this one clip inside this room, in the other footage I have from the camera it's nowhere near as bad as this or I haven't even noticed it, over here it's in your face with yellow spots; everybody looks like they have an infection. I don't know if it's the lighting or something, the camera was dusty...but yeah.
The script I'm using:
A fix in Avisynth would be preferred, but I can try dabbling in Vdub filters if that'd be better.Code:AssumeTFF() ConvertToYV12(interlaced=true, matrix="pc.601") QTGMC() Tweak(hue=0.0, sat=1.6, bright=4, cont=0.9, coring=True, sse=False, startHue=0, endHue=360, maxSat=150, minSat=0, interp=16) Spline36Resize(854,480)
+ Reply to Thread
Results 1 to 30 of 33
-
-
Chroma Noise (could be exacerbated by lower light levels & bad sensitivity in cam & miscalibration in cam) + Chroma upsizing error, are probably the main contributors.
Scott -
Try VirtualDub's Camcorder Color Denoiser filter. It can be called from within AviSynth with:
Code:LoadVirtualDubPlugin("C:\Program files\VirtualDub\plugins\Camcorder_Color_Denoise_sse2.vdf","ccd") ConvertToRGB32() ccd(100,1) # threshold (0-100), multithreading (0=off. 1=on) ConvertToYV12() # or back to whatever you started with
-
This is working nicely, thanks! I had to download it from here since I didn't have it, but it should be the same thing as what you have. It ended up being ccd.vdf and not the long file name you have, is your version an improved one?
I also set it to 100 but there is still some lingering yellow spots in some frames. How much is too much, I'm entering 1000 into there and it's still possible. At what point do you end up "damaging" it or ruining it? Is 100 too much, over 100, 300, etc?
Edit: I also took out my MT Mode .dll, does multithreading still work if I'm not using MT Mode anymore? Should I keep that to 0 off? -
For chroma noise, I find that the old VirtualDub CNR2 plugin works pretty well. The values shown here are the starting point that I use for VHS footage.
Code:LoadPlugin("Cnr2.dll") Cnr2("oxx",8,16,191,100,255,32,255,false)
-
-
You should provide a clip closer to your source. AVC encoding has baked the problem into the video, making it much harder to clean up.
This is a little better...Last edited by jagabo; 6th May 2016 at 22:33.
-
-
Try something like this:
Code:Mpeg2Source("yellow.d2v", CPU2="ooooxx", Info=3) SeparateFields() // white balance darks=ColorYUV(off_u=0, off_v=0) brights=ColorYUV(off_u=16, off_v=-3) Overlay(darks, brights, mask=ColorYUV(cont_y=100, gamma_y=100, off_y=0)) // levels adjustment and increase saturation ColorYUV(gain_y=-20, gamma_y=50, off_y=-15, cont_u=50, cont_v=50) // chroma noise reduction LoadVirtualDubPlugin("C:\Program files\VirtualDub\plugins\Camcorder_Color_Denoise_sse2.vdf","ccd") Y = last ConvertToRGB32() U = ccd(100,0).ccd(100,0).ConvertToYV12().UtoY() V = ccd(100,0).ConvertToYV12().VtoY() YtoUV(U, V, Y) Weave() QTGMC(preset="fast")
The video is pretty pale so a little more saturation might be in order.Last edited by jagabo; 7th May 2016 at 09:51.
-
Wow, thank you. Okay, here's what I came up with, let me know if it all looks good please:
Code:AVISource("k:\chreve.avi") AssumeTFF() ConvertToYV12(interlaced=true, matrix="pc.601") SeparateFields() darks=ColorYUV(off_u=0, off_v=0) brights=ColorYUV(off_u=16, off_v=-3) Overlay(darks, brights, mask=ColorYUV(cont_y=100, gamma_y=100, off_y=0)) ColorYUV(gain_y=-20, gamma_y=50, off_y=-15, cont_u=50, cont_v=50) LoadVirtualDubPlugin("C:\Users\CZ\Desktop\Video Capture\VirtualDub-1.10.4\plugins32\ccd.vdf","ccd") Y = last ConvertToRGB32() U = ccd(100,0).ccd(100,0).ConvertToYV12().UtoY() V = ccd(100,0).ConvertToYV12().VtoY() YtoUV(U, V, Y) Weave() QTGMC(preset="fast",Sharpen(0.08, MMX=True)) Tweak(hue=0.0, sat=1.8, bright=8, cont=1.0, coring=True, sse=False, startHue=0, endHue=360, maxSat=150, minSat=0, interp=16) Spline36Resize(854,480) Histogram("classic") trim(11797,12454)
What do you think? -
I think you've overdone the saturation.
With the Histogram() default (really a waveform monitor) you want to keep your video in the black area. You don't want parts of the video you care about extending into the brown areas (super blacks on the left, super brights on the right). Not every shot has to cover the full range. Use your own judgement on what looks right in the picture.
I prefer a horizontal waveform monitor. You can get that with the third party VideoScope() filter or with the sequence:
Code:TurnRight().Histogram().TurnLeft()
The levels view is really a histogram. The top part is the luma channel, the greyscale component of the picture. Again, you want to keep parts of the picture you care about in the black area, out of the super black and super bright areas. Below that are the U and V histograms. A black and white video would have only a peak right at the center. The more saturated the picture is the more the U/V histograms will spread out. You definitely want to keep the U/V histograms out of the bars at the edges. But even those bars are misleading. Many combinations of Y, U, and V are illegal even if all the components are within their individual legal ranges. I wrote a quick (fairly accurate) filter that checks for illegal YUV combinations and highlights them in red (or whatever color you choose):
https://forum.videohelp.com/threads/360935-Capturing-Correct-Chroma-and-Hue-Levels-From...=1#post2289672
If you use that filter you'll see that the shirt and face of the boy on the right contain illegal YUV values in your script. Even in my script there were some illegal values where the shirt was overblown.
Earlier in that thread Gavino posted a more accurate test for illegal YUV combinations but it takes a long time (a minute or two) to load.
Most devices these days handle illegal YUV combinations fairly gracefully but some older devices would show very wrong colors. For example, the overly bright shoulder might show up as black instead of white. -
Thanks.
If you use that filter you'll see that the shirt and face of the boy on the right contain illegal YUV values in your script. Even in my script there were some illegal values where the shirt was overblown.
Do you think I should alter the hue in any way to the left or to the right? It's currently set at 0. Any benefits in doing so, is it better to go one way slightly than to stay at 0?
I also set the saturation to the clip at 1.2 from the 1.8, file attached. Is this one good and ready to go...or would you still change stuff?
Edit: Also attached now a new version with,
Code:Tweak(hue=0.0, sat=1.1, bright=8, cont=0.9, coring=True, sse=False, startHue=0, endHue=360, maxSat=150, minSat=0, interp=16)
And then 4 and 5 are different clips but with this recent tweak as well.Last edited by CZbwoi; 8th May 2016 at 02:51.
-
Did you call the function in addition to just adding it to your script? For example, add HighlightBadRGB() at the end of your script. Other possible reasons you didn't see any red was because you already clamped the illegal colors by converting to RGB, or using Tweak (which will clamp some illegal colors).
I think a hue shift of about 5 to 10 looks more natural -- skin tones are less yellow, more pink. But use your own judgement.Last edited by jagabo; 8th May 2016 at 12:11.
-
Did you call the function in addition to just adding it to your script? For example, add HighlightBadRGB() at the end of your script.
I think a hue shift of about 5 to 10 looks more natural -- skin tones are less yellow, more pink. But use your own judgement. -
It depends on the lighting conditions as well as the auto gain and auto white balance on your camera. There really is no one size fits all adjustment.
-
You adjust everything as needed and desired. The original lighting, the camera that shot the video, the settings on the camera, the playback device, the capture device... all those things effect how the video looks. Then there's the issue of how YOU want it to look. Do you want natural daylight colors? The actual colors under which the video was shot? Some other colors to set a mood?
-
Yeah, but I was just referring to this current camera's footage. Shouldn't it be applied to everything else from it if that yellow look was present here, or was that maybe solely indicative of the lighting?
I sometimes don't know what I should do. Would you change the hue on this? Both are from the same event, hue set at 0:
Then these 4 are from night/outside:
And should I add the camcorderdenoise to all the videos from this camcorder since it showed me problems with the indoor footage?
edit: and I noticed you didn't put the ConvertToYV12() you said to put after the ccd is over in post #3, should I put that in after ccd, "YtoUV(U, V, Y)" or "weave()"?Last edited by CZbwoi; 9th May 2016 at 21:37.
-
I don't think a hue=10 adjustment would be appropriate for most of those shots. The yellow cast on the earlier shot may have been from the lighting conditions. Typically incandescent lights give a yellow/red cast, fluorescent lights a blue/green cast.
ConvertToYV12() was used on the U= and V= lines.
Only use filters when you need them. -
So it turns out those recent screenshots aren't what they naturally were, I forgot I had added everything you sent me into everything else as I thought it was all part of the CCD effect and wasn't aware this part of your code changed the mood/tone:
Code:darks=ColorYUV(off_u=0, off_v=0) brights=ColorYUV(off_u=16, off_v=-3) Overlay(darks, brights, mask=ColorYUV(cont_y=100, gamma_y=100, off_y=0)) ColorYUV(gain_y=-20, gamma_y=50, off_y=-15, cont_u=50, cont_v=50)
On one hand the original looks like it's exhibiting the right colors...on the other hand the right side looks like it's more natural. But I don't know if that's just because your code seemed to make everything cooler and bluer.
Which brings me back to what you said:
You adjust everything as needed and desired. The original lighting, the camera that shot the video, the settings on the camera, the playback device, the capture device... all those things effect how the video looks. Then there's the issue of how YOU want it to look. Do you want natural daylight colors? The actual colors under which the video was shot? Some other colors to set a mood?
Then there's the question if this is applicable to the videos filmed with this camera outside in the daylight, in the night, in another type of room...should this be used for daylight scenes too or how do I get the "natural daylight colors"? Is there a resource somewhere with codes like the one you provided for basic camcorder video 'fixes'? Or codes for like "natural daylight colors", "mood colors", etc. Trying to decipher this puzzle is a nightmare when you don't know what half of this means, all I'm doing is copying and pasting what you're giving me but I don't know other variations or what is supposed to be right...like those white clothes and piano in the first picture. On the left they look white...-tan. On the right they still look white...yet pretty blue...but still sort of normal? They both look correct though, that's the mind-numbing part. I'm going mad over here, I must have inserted these codes, taken out, altered, previewed, encoded for hours, erased, over and over 100 times. -
You're looking for a technical answer to an aesthetic question. How you think it should look is extremely subjective. Your "before" and "after" pictures above are well within the range of acceptable. Some people may prefer the warmer, some may prefer the cooler -- but neither is wrong. If you look at the color of most Hollywood films these days they are wildly outside the range of "natural."
Your best option, if you want your colors "correct" is to use a white card and set the white balance on your camera whenever the lighting changes. -
If you're looking for more natural colors, in the second image I used
Code:darks=ColorYUV(off_u=2, off_v=1) # dark white balance brights=ColorYUV(off_u=15, off_v=-8) # bright white balance Overlay(darks, brights, mask=ColorYUV(cont_y=100, gamma_y=50, off_y=0)) # merge the two ColorYUV(gain_y=0, gamma_y=0, off_y=-5, cont_u=20, cont_v=20) # a little darker and more saturation
I assumed the woman in the foreground was wearing black and the piano should be white. I think those settings looked acceptable (though a little over saturated?) for the first image too:
-
You're looking for a technical answer to an aesthetic question. How you think it should look is extremely subjective. Your "before" and "after" pictures above are well within the range of acceptable. Some people may prefer the warmer, some may prefer the cooler -- but neither is wrong. If you look at the color of most Hollywood films these days they are wildly outside the range of "natural."
Your best option, if you want your colors "correct" is to use a white card and set the white balance on your camera whenever the lighting changes.
If you're looking for more natural colors, in the second image I used
Code:darks=ColorYUV(off_u=2, off_v=1) # dark white balance brights=ColorYUV(off_u=15, off_v=-8) # bright white balance Overlay(darks, brights, mask=ColorYUV(cont_y=100, gamma_y=50, off_y=0)) # merge the two ColorYUV(gain_y=0, gamma_y=0, off_y=-5, cont_u=20, cont_v=20) # a little darker and more saturation
I think those settings looked acceptable (though a little over saturated?) for the first image too:Last edited by CZbwoi; 11th May 2016 at 02:17.
-
No, it's specific to that shot and others like it. It doesn't work well for the outside/night shots.
It doesn't necessarily mean the colors of everything else is correct. There are many ways the white balance could be off. The method I used to "fix" it may not have been right. Or maybe the piano and the rear walls weren't white. We don't know exactly what color anything is supposed to be -- except maybe a range for the skin tones. That said, overall the colors don't look too unrealistic after the given white balance and minor black level and saturation adjustment.
I didn't use Tweak at all. I started with your "before" images and applied the filters I listed. ColorYUV(cont_u=20, cont_v=20) is about the same as Tweak(sat=1.08). -
There is no such thing!
Every reproduction scheme has its own "look." The best example from the old days are the film emulsions Kodak provided. If you shot something on Kodachrome, it most definitely had a certain look. For many people it captured what they remembered, but in no way would the projected image of that slide look exactly like the original scene. Ektachrome had a completely different look, but many preferred it.
The last phrase "preferred it" is key to the discussion. As already mentioned color balance is a matter of preference, and it is totally a subjective decision. This is why you will see the phrase "color timing" in lots of movie credits: there is a person whose job it is to match all the colors from different scenes when the film is cut. Each scene must be adjusted separately. And here's the key thing: none of those scenes, in any movie, ever looks like the original scene looked to those who were actually on the set.
Finally, just to drive home the point further, every device on which you display an image has its own "gamut." When used in this way, that word refers to the ability of any device to display all colors. And here's the dirty little secret, in case you didn't know it: no device can display all the colors of the rainbow. Not even close. For instance, try to get a true representation of "fire engine red." Most displays won't be able to nail it.
I met Efi Arazi, the founder of EFI imaging. Their business was producing hardware and software to try to approximately match colors as you moved from the capture device to the display device to the printer (or, these days, the device on which the final result will be viewed). Each one has different capabilities of displaying different colors, and not only are none of them capable of displaying all the colors in the rainbow, but each one has different "holes" in its capabilities. What EFI (both the man and the company) did was to provide software that would best map the software capabilities of one part of the reproduction process to the next step, so that the loss from the original capture to the final display was both minimal and acceptable. The EFI software produced an "out of gamut alarm" when a color match you'd achieved on your display would not be viewable on the device downstream that was going to have to display it.
While the problems are worse when trying to match the original to the gamut of colors a printing press can produce (reflected color has a much narrower gamut than transmitted color), the same problems exist with LCD displays.
So, in summary, you are chasing a dream if you think you can match real-life color. Yes, you can match what you remember that color to be, but as soon as you realize that is what you are doing, you will then understand that you are making an artistic decision -- your artistic decision -- as to what you think best represents the original color.Last edited by johnmeyer; 11th May 2016 at 10:41. Reason: Added link for EFI
-
No, it's specific to that shot and others like it.
It doesn't work well for the outside/night shots.
Or maybe the piano and the rear walls weren't white.But it's safe to say it's white.
I didn't use Tweak at all. I started with your "before" images and applied the filters I listed. ColorYUV(cont_u=20, cont_v=20) is about the same as Tweak(sat=1.08).
So, in summary, you are chasing a dream if you think you can match real-life color. Yes, you can match what you remember that color to be, but as soon as you realize that is what you are doing, you will then understand that you are making an artistic decision -- your artistic decision -- as to what you think best represents the original color.
Then in terms of common codes (or how to make them) for natural daylight/night colors, different moods, etc. which hearkens back what I was just asking, is there somewhere that has a list of common ones so I can plug in to see what works best? I like the two that jagabo provided, but for other situations are they available somewhere for simpleton beginners like me? I don't know what I need to alter for daytime natural colors like you guys can do at will, for night time looks, different variations for all of those. If I have the options available to me, then I'll make the artistic decision on my own after inserting them one by one, but I don't know how to create these options for different looks/feels/naturalism other than the two jagabo posted here. -
There's no such thing because the colors problems differ because of what I said in post number 16.
Find something that you think should be white. Adjust the colors to make that object is white. Using an RGB histogram will help. Let's start with your 2.png image in post #19 (cropped to just the left half) and assume the piano should be white. Crop a small portion of the image so you only have the piano: Crop(618,208,32,32). Then use HistogramRGBLevels() to view an RGB Histogram:
At the top left is the little patch of the piano, on the right are the RGB histograms. As you can see, reds are brighter than the greens, and blues are darker. So apply the RGBAdjust() filter, decreasing the reds, and increasing the blues RGBAdjust(r=0.93, b=1.14). Now the RGB histogram looks like:
Now remove the cropping and look at the rest of the image:
It's not always this easy but that's a start. You can now adjust brightness, contrast, hue and saturation as necessary. -
Everything you did is not happening for me, whatever I try to adjust in RGBAdjust() changes the hue of the entire thing including the HistogramRGBLevels() diagram. The level meters do no move at all...
I also had to open it up in a new script because I don't know where to insert it into my current script, I get errors if I place them both after converttoRGB32, it points to the YtoUV line (video width ratio does not match any internal colorspace)...which leaves me having to erase everything that comes after it. I don't want to erase everything I have there so I had to paste it somewhere else for the time being. -
RGBAdjust needs to come before HistogramRGBLevels, not after.
-
What's the script you're using now? If it's like the script in post #9 the RGBAdjust is meant to replace the darks=, brights=, overlay sequence. But the video is YV12 at that point so it needs to be converted to RGB. You're converting to RGB later for the ccd filter and you want to avoid multiple YUV/RGB conversions. So I'd try changing this sequence:
Code:SeparateFields() darks=ColorYUV(off_u=0, off_v=0) brights=ColorYUV(off_u=16, off_v=-3) Overlay(darks, brights, mask=ColorYUV(cont_y=100, gamma_y=100, off_y=0)) ColorYUV(gain_y=-20, gamma_y=50, off_y=-15, cont_u=50, cont_v=50) LoadVirtualDubPlugin("C:\Users\CZ\Desktop\Video Capture\VirtualDub-1.10.4\plugins32\ccd.vdf","ccd") Y = last ConvertToRGB32() U = ccd(100,0).ccd(100,0).ConvertToYV12().UtoY() V = ccd(100,0).ConvertToYV12().VtoY() YtoUV(U, V, Y) Weave()
Code:SeparateFields() ConvertToRGB32() RGBAdjust(r=0.93, b=1.14) ccd(100,0).ccd(100,0) ConvertToYV12() Weave()
Last edited by jagabo; 15th May 2016 at 16:56.
-
RGBAdjust needs to come before HistogramRGBLevels, not after.
jagabo:
- Alright, I did so but now it looks different/worse than the original version you had with the darks/brights, it's more bland. I'd increase the saturation tweak it's at now of 1.3 to even more, but I don't want to make people look orange anymore. Is the original method you did in YUV better than this RGBAdjust way?
- When I want to crop only a small part of the screen that could be white, how do I so do so without mindlessly guessing random dimensions? I don't know how you could've gotten the numbers Crop(618,208,32,32) of the piano unless you were able to rectangular marquee it somehow and it generates the numbers for you...
- If I run into a video with no definitive white parts I can work with, and I can't "fix the white color balance", what's the next cause of action to fixing the colors to get it all right? Another specific color I jump to try to guess and alter? Using RGBAdjust or some other way?
- You always alter the red and blue part of the RGB, no green. Is this generally how it is and I shouldn't mess with the green?
- In your post, you moved the red and blue levels to line up exactly with the green one, the goal is to always have them lined up straight, correct?
- For my night scenes, like the last couple pics in that list of pics I provided, you said I'd have to do something different other than finding a white balance like I'm doing here in these indoor rooms. What would I need to do or look for to fix in those clips to obtain the natural colors I want?
Similar Threads
-
How can I remove these yellow stains?
By TeNSoR in forum Newbie / General discussionsReplies: 4Last Post: 8th Jul 2014, 11:36 -
How can I remove the yellow spots from the video?
By TeNSoR in forum Newbie / General discussionsReplies: 6Last Post: 6th Jun 2014, 08:00 -
How can I remove the dirt and green spots from this video?
By TeNSoR in forum Newbie / General discussionsReplies: 6Last Post: 23rd May 2014, 09:14 -
How to remove scratches and spots in video
By arun28 in forum EditingReplies: 8Last Post: 24th Feb 2013, 09:25 -
Remove white spots?
By jwbrasil2 in forum RestorationReplies: 4Last Post: 27th Nov 2011, 01:23