View Full Version : Video too redish
bairradino
30th August 2008, 17:21
My Panasonic DV camera acentuates the red color (it's not colorcast! When shooting red subjects this color is too bright).
How can I correct this?
Nightshiver
30th August 2008, 17:22
Turn the contrast down on your camera? Or lower the color levels?
bairradino
30th August 2008, 18:29
The video is already shooted......
thetoof
30th August 2008, 18:44
You can apply color correction with coloryuv() by using negative values of gain_v or off_v
or
Play with Tweak() (http://avisynth.org/mediawiki/Tweak) to lower the saturation of the reddish areas of the image.
Comatose
30th August 2008, 20:57
I'd go with Tweak and using hue to select the red areas then reduce saturation only for them, since it does sound like oversaturation :E
Nightshiver
30th August 2008, 22:16
I would have suggested tweak but I didn't think that his problem was on an already captured video. My mistake. But I agree, Tweak would work very well in this case.
sidewinder711
31st August 2008, 02:17
1. FixChromaBleeding
Some time ago I found a script from A. Jordan. He has a website (http://www.geocities.com/alex_j_jordan/index.htm) as well giving you a good example how it works. For me it worked perfectly on oversaturated blue and red parts of the footage.
LoadPlugin("ChromaShift.dll")
AVISource("movie.avi")
ConvertToYV12
FixChromaBleeding
Function FixChromaBleeding (clip input) {
# prepare to work on the V channel and reduce to speed up and filter noise
area = input.tweak(sat=4.0).VtoY.ReduceBy2
# select and normalize both extremes of the scale
red = area.Levels(255,1.0,255,255,0)
blue = area.Levels(0,1.0,0,0,255)
# merge both masks
mask = MergeLuma(red, blue, 0.5).Levels(250,1.0,250,255,0)
# expand to cover beyond the bleeding areas and shift to compensate the resizing
mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12
# back to full size and binarize (also a trick to expand)
mask = mask.BilinearResize(Width(input),Height(input)).Levels(10,1.0,10,0,255)
# prepare a version of the image that has its chroma shifted and less saturated
input_c = input.ChromaShift(C=-4).tweak(sat=0.8)
# combine both images using the mask
return input.overlay(input_c,mask=mask,mode="blend",opacity=1)
}
Regarding optimizing the mask part (using masktools instead of GeneralConvolusion), here in the forum the following was suggested:
# expand to cover beyond the bleeding areas and shift to compensate the resizing
#mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12
#with (using MaskTools v1.5.x)
mask = mask.DEdgeMask(0,255,0,255,"0 0 0 1 0 0 0 0 0").DEdgeMask(0,255,0,255,"1 1 1 1 1 1 0 0 0")
2. TweakColor
Another possibility is using TweakColor (http://forum.doom9.org/showthread.php?s=&threadid=74334) created by Trevlac. You can try to reduce the saturation of red highs with:
TweakColor(sat=0.75,startHue=80,endHue=140,maxSat=115,minSat=75)
Greetz
bairradino
31st August 2008, 09:42
Thank you guys.
You are great!
Gavino
31st August 2008, 10:20
Another possibility is using TweakColor (http://forum.doom9.org/showthread.php?s=&threadid=74334) created by Trevlac. You can try to reduce the saturation of red highs with:
TweakColor(sat=0.75,startHue=80,endHue=140,maxSat=115,minSat=75)
If using Avisynth 2.58, this functionality is now included in the standard Tweak.
bairradino
31st August 2008, 15:00
@gavino
Yes.
But it seems that VirtualBub doesn't "like" Avisynth 2.58
Wilbert
31st August 2008, 15:35
Yes.
But it seems that VirtualBub doesn't "like" Avisynth 2.58
What do you mean?
bairradino
31st August 2008, 18:52
I installed "AviSynth_080622.exe", and when I load an Avisynth script in VirtualDub v1.8.5 it's window disappear.
I had to reinstall Avisynth 2.57
It happened only me?
Wilbert
31st August 2008, 19:22
I installed "AviSynth_080622.exe", and when I load an Avisynth script in VirtualDub v1.8.5 it's window disappear.
Post your script and empty your plugin folder before trying it again.
bairradino
31st August 2008, 21:27
@wilbert
You're right.
After your suggestion I remebered one time that happened the same because of a wrong function.
So, I cleaned the plugins folder, than copy functions and plugins, 4 each time, and proved VirtualDub with Avisynth 2.58.
I discovered the problem; I had (don't know how) the library avisynth.dll (version 2.57). That's why it worked with version 2.57 and was in conflit with version 2.58
Thanks for your help... and your knowledge.
srigopaldaliya
9th December 2008, 22:35
I read the above suggestion for reducing the red color....
In one of my case, the Video is very blueish... What should i do to bring back it to normal colors?
thetoof
10th December 2008, 06:06
Same thing with Tweak(), but with a different hue range.
With ColorYUV(), use negative values for gain_u or off_u.
2Bdecided
10th December 2008, 15:38
If using Avisynth 2.58, this functionality is now included in the standard Tweak.I'd missed that - that's really cool.
Cheers,
David.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.