Log in

View Full Version : separating YUV planes


yaz
18th March 2004, 12:38
@all
this is a 2in1 quest.
- i'd like to separate the YUV planes. i've found some ways but which one do u suggest as the quickest (& safest) ?
- i'd like to visualize the planes. i mean, i want to see them as they are (Y in grey, U&V colorized)
thx
y

mf
18th March 2004, 12:45
1) UToY() and VToY()
2) UToY().ConvertToRGB().VD_Colorize()
- or -
MergeLuma(BlankClip(last, color=$808080)
- or -
colr = last
clu = colr.UToY()
clv = colr.VToY()
Overlay(clu, clv, opacity=0.5, mode="hardlight")
PointResize(colr.width, colr.height)
MergeChroma(colr)

VD_Colorize can be found here (http://www.avisynth.org/index.php?page=VirtualDub_I). I wouldn't know how to get the VDub filter though, with neuron2.net being down.

yaz
19th March 2004, 09:51
@mf
thx for the trix but none of them is xactly what i want. (i was too loose on quests, as usual:-) so. i want to see the planes separately (1by1).
- for Y i use 'greyscale', but i don't know how much color-info is 'blended' on the transformation.
- for U (& V) : U(V)toY separates the plane(s) but it gives back a gray clip, so i can't see the colors. so as to get it i use YtoUV with a fake grey clip & U (or V). it works but i can't see where is 'grey' on the chroma plane.
my real problem is that i don't know whether grey is a color or is it 'just' dark(er)-white/light(er)-black. so, it's 'just' a luma trick.
- for whole chroma : iir, YtoUV(UtoY(last),VtoY(last)) gives it, but i'm not sure that using 'last' this way is correct.

thx
y

stickboy
19th March 2004, 11:00
Originally posted by yaz
- for Y i use 'greyscale', but i don't know how much color-info is 'blended' on the transformation.
AFAICT, calling Greyscale on a YUV clip should give you the luma channel, unaltered.

sh0dan
19th March 2004, 11:08
Originally posted by stickboy
AFAICT, calling Greyscale on a YUV clip should give you the luma channel, unaltered.
Correct!

@yaz: YtoUV(UtoY(last),VtoY(last)) is a good way to show chroma. An alternative could be:

MergeLuma(blankclip(last, color=$808080))

The speed difference shouldn't be noticeable.

mf
19th March 2004, 12:25
Originally posted by sh0dan
MergeLuma(blankclip(last, color=$808080))

The speed difference shouldn't be noticeable.
Which is what I proposed. Is it just for me to feel ignored? :rolleyes:

yaz
19th March 2004, 16:12
thx u all for the answers so far!
- does any of u have an ide for visualizing U or V plane individually. at the moment i have for U :
YtoUV(UtoY(last),VtoY(BlankClip(last,color=$808080))
& the counterpart for V. is that ok (seems a bit threatening:-), or is anything better ?
thx
y

Si
19th March 2004, 21:27
I wrote a YUV thingy (http://www.geocities.com/siwalters_uk/excmyuv.html) for VirtualDub a long long time ago.

Might be useful to you - might not :)

regards
Simon