VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. 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.
    Last edited by rcoltrane; 5th Feb 2025 at 10:30.
    Quote Quote  
  2. 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)
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    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)
    Thank you, it works!

    And is there any way to do the opposite? Remove the luma and leave the chroma only, separating it from the image?
    Last edited by rcoltrane; 5th Feb 2025 at 12:09.
    Quote Quote  
  4. If you digitized from a composite output removing the chroma may still have some noise from the chroma carrier in the luma channel.

    Originally Posted by rcoltrane View Post
    And is there any way to do the opposite? Remove the luma and leave the chroma only, separating it from the image?
    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).
    Quote Quote  
  5. 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
    Quote Quote  
  6. 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)?
    Quote Quote  
  7. Originally Posted by rcoltrane View Post
    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
    Quote Quote  
  8. Originally Posted by rcoltrane View Post
    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)?
    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"))
    Quote Quote  
  9. 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.
    Quote Quote  
  10. Originally Posted by rcoltrane View Post
    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)?
    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]"
    As has been said before U and V (on the bottom row) are not real colors, nor do they visualize any chroma subsampling.

    Image
    [Attachment 85325 - Click to enlarge]
    Last edited by Sharc; 5th Feb 2025 at 17:41.
    Quote Quote  
  11. 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).
    Quote Quote  
  12. 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)
    Quote Quote  
  13. Here's Sharc's image with my technique from post #8:

    Image
    [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")))
    Quote Quote  
  14. 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.
    Quote Quote  
  15. 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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!