Is there any way to deinterlace a U-matic video and completely remove the chroma (colors) from it, leaving only the luma?
The idea here is to completely remove any color noise from the footage when deinterlacing. I want to extract frames in pure black and white, with no signs of chroma anywhere.
I'm using Avisynth+ with Vdub2 and AVSpmod scripts.
+ Reply to Thread
Results 1 to 15 of 15
-
Last edited by rcoltrane; 5th Feb 2025 at 10:30.
-
ExtractY() if you want only the Y channel - this will give you a Y8 pixel format video (or Y10 for 10bit video), and discard the chroma channels
Greyscale() if you want to keep the chroma channels, but set them to 128 (for 8bit, or 512 for 10bit) -
Last edited by rcoltrane; 5th Feb 2025 at 12:09.
-
If you digitized from a composite output removing the chroma may still have some noise from the chroma carrier in the luma channel.
UtoY() and VtoY() will give you 8 bit greyscale representations of those channels. You can also flatten the Y channel with something ColorYUV(cont_y=-256). -
Yes, you can extract and filter/manipulate any channel, re-combine or mix them with combineplanes
Another way besides UtoY, VtoY is ExtractU for the U channel, ExtractV for the V channel
http://avisynth.nl/index.php/Extract
http://avisynth.nl/index.php/CombinePlanes
The difference between the methods is ExtractU/ExtractV will extract the U or V channel only as a Y plane representation only. The UtoY/VtoY method will do the same, but keep the same pixel type with "fake" or "dummy" U/V channels -
WOW! Thank you guys for the quick replies. Just one more thing: I would like the chroma U/V channels extraction to be in color, not b/w. What would I have to change in these parameters to achieve that (if possible of course)?
-
It's not possible to express an indivudual U or V channel as "real" color. A "real" color can only be derived when you have all 3 YUV channels - ie. each pixel value has a Y,U,V value triplet to describe a YUV "color." ( Or converted from all 3 channels to something like RGB).
You can maybe do something like fake colorize, but it will look very weird -
I knew that question was coming. Poisondeathray is right. The chroma represents colors that are added or subtracted from Y. So without Y you can't "see" them. What you might do is eliminate V to visualize how U contributes to the color, and eliminate U to see how V contributes to the color:
Code:StackHorizontal(last.Subtitle("Y+U+V"), ColorYUV(cont_v=-256).Subtitle("Y+U"), ColorYUV(cont_u=-256).Subtitle("Y+V"))
-
If you wanted to capture just luma, you could use the dub output if your player has it or just tap the Y signal before it gets mixed with chroma into composite and capture that as composite. You might need a proc amp to actually get to the correct levels depending your player. It's still technically possible to get certain patterns that will still register as color though if say alternating black lines of fine patterns look close enough to a sine wave. However, if you capture with a component capture card and plug that into the Green/Y input I don't think any color values will get assigned when digitized. The other thing you could look into would be a low pass filters, or just pass it through a proc amp and turn the chroma to zero and that might also do it.
Many players also have an "RF off tape" which is supposedly the luma part of the RF stored on the tape. If you were to hook that up to VHS_decode, I believe you would get a luma only RF capture if I understand things correctly.
Those are all just ideas, could be wrong, and not particularly useful if you want to get color back later. -
If all you want is to view the 3 planes (Y,U,V) you can use the ffmpeg commandline:
Code:ffplay "your_source" -vf "format=pix_fmts=yuv444p,split=4[split1][split2][split3][split4];[split2]extractplanes=planes='y'[y]; [split3]extractplanes=planes='u',eq=gamma_b=1.5[u];[split4]extractplanes=planes='v',eq=gamma_r=1.5[v];[split1][y][v][u]xstack=inputs=4:grid='2x2'[out]" -vf "extractplanes=planes='y',format=pix_fmts=yuv444p[out]" -vf "extractplanes=planes='u',format=pix_fmts=yuv444p,eq=gamma_r=1.5[out]" -vf "extractplanes=planes='v',format=pix_fmts=yuv444p,eq=gamma_b=1.5[out]"
[Attachment 85325 - Click to enlarge]Last edited by Sharc; 5th Feb 2025 at 17:41.
-
Sharc is right - use colorization to create false color impression (can be LUT based where chroma signal has attributed i.e. proper color values - i.e. color visible on screen for no Y and complementary chroma differential signal - i.e. YCbCr >> RGB image with for example Cr=Cr, Y=0, Cb=128 - can be done).
-
Thank you all people for all the extremely useful replies!! With that Jagabo code, I found what I was looking for:
Code:
ColorYUV(cont_y=-256,cont_v=0,cont_u=0) -
Here's Sharc's image with my technique from post #8:
[Attachment 85344 - Click to enlarge]
Code:ImageSource("Screenshot 2025-02-06 000518.png", start=0, end=23, fps=23.976) Crop(0, 0, width/2, height/2) ConvertToYV24() StackVertical(StackHorizontal(last, GreyScale().Subtitle("Y")), StackHorizontal(ColorYUV(cont_v=-256).Subtitle("Y+U"), ColorYUV(cont_u=-256).Subtitle("Y+V")))
-
Interesting choices. Depends on what one intends to do. For analysis purposes the classic "ugly gray" UtoY() and VtoY() method is still most relevant I think, like
- visualizing the effect of color subsampling (represented by dimension of the picture)
- inspection of the chroma noise and visualizing the effect of filters on the chroma
- evaluation of chroma sharpening methods
- analyzing the correct (or flawed) handling of the chroma motion (e.g. for interlaced YV12)
etc. -
I usually use UtoY() and VtoY() -- often with increased saturation to make the chroma channels more visible. Histogram(mode="color2") is very helpful when color matching.
Similar Threads
-
U-Matic music video transfers better than YouTube? +Some DUB logistical Qs
By aramkolt in forum Newbie / General discussionsReplies: 13Last Post: 6th Feb 2025, 12:36 -
Disable chroma or luma while deinterlacing a video file?
By rcoltrane in forum Newbie / General discussionsReplies: 0Last Post: 12th Dec 2023, 12:06 -
Why does deinterlacing my u-matic 1 hour video take so long? Vdub2+Avisynth
By rcoltrane in forum Newbie / General discussionsReplies: 7Last Post: 25th Jul 2023, 15:13 -
Help to download this nondrm and completely free video
By helloImNoob in forum Video Streaming DownloadingReplies: 7Last Post: 13th Oct 2022, 11:34 -
Trying to sync video and audio from 2 completely different sources...
By ThaKarra in forum Newbie / General discussionsReplies: 3Last Post: 2nd Jul 2021, 03:59