Hi everyone
What function can I use to extract each of the YUV components: Y, U, and V ?
I need to extract from the raw source, no conversions to something else and then.
I know about the Greyscale() function, rec709 and rec601, but that will not give me what I actaully need. It basically blends channels and gives you no other user options.
ShowRED, GREEN, and BLUE, are basically same as above, they blend channels or in this case, will give me an r, g, or b component, which is not what I am after.
I did a quick look up and did not see any ShowY, ShowU and ShowV.
If it helps, here are some examples I made with the ShowRED, ... functions, which is not what I'm looking for:
* original image -> showRED converted
* original image -> showGREEN converted
* original image -> showBLUE converted
Thank you.
-vhelp 5306
+ Reply to Thread
Results 1 to 5 of 5
-
-
Maybe some of these avisynth functions can be useful:
http://avisynth.org.ru/docs/english/corefilters/swap.htm
UtoY() would make a greyscale clip of the U channel.
VtoY() would make a greyscale clip of the V channel. -
For YUY2 video:
Code:src=DirectShowSource("YUY2Video.avi") Y=ColorYUV(src,off_u=-256, off_v=-256).ColorYUV(off_u=128, off_v=128) U=UtoY(src) V=VtoY(src) StackHorizontal(Y, U, V)
For YV12 video:
Code:src=DirectShowSource("YV12Video.avi") Y=ColorYUV(src,off_u=-256, off_v=-256).ColorYUV(off_u=128, off_v=128) U=UtoY(src) V=VtoY(src) StackHorizontal(Y, StackVertical(U, V))
-
While I do appreciate the tips on manipulating clip to show gray levels through ColorYUV and U/VtoY it does not seem to be what I'm looking for. This method leaves me wondering or doubting what my sources Y and U, V true value are. This is assuming from an analog capture project where I capture raw and no codec.
I will continue searching through google for the answers. I know I've seen the answer on a forum board somewhere, but can't remember. But its looking like I may have to create the methods (the hard way) myself. Again, thank you for the above tips.
-vhelp 5309 -
UtoY() and VtoY() simply copy the values from the U or V planes to the Y plane. The values you then see in the Y plane are then exactly the same values they had before being copied there.
Setting U and V to 128 leaves you with perfect gray scale. The values in Y are untouched.
These are exactly analogous to your ShowRed, ShowGreen, and ShowBlue where the individual primaries are converted to grayscale by copying one primary to the other two.
If your frame is YV12 you can export as a binary file. You will then have three planes of data Y, U, and V. Remember that the U and V planes are half the resolution (both axis) of the Y plane.
Similar Threads
-
Trying to update ffmpeg components
By doodlebuggy in forum ffmpegX general discussionReplies: 2Last Post: 20th Jul 2011, 21:57 -
Solved: Different computers, same components. Same performance?
By vid83 in forum ComputerReplies: 8Last Post: 14th Feb 2009, 19:12 -
Can not install mpeg components
By franks65 in forum ffmpegX general discussionReplies: 2Last Post: 9th Aug 2008, 09:57 -
Separation of YUV and RGB video components
By Dave1024 in forum ProgrammingReplies: 0Last Post: 24th Jun 2008, 04:19 -
Installing the open source encoding components
By three-cushion in forum MacReplies: 3Last Post: 25th Nov 2007, 21:07