Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
20th March 2016, 16:10 | #1 | Link |
Registered User
Join Date: Feb 2009
Posts: 19
|
AvisynthNoob : remapping YUV to RGB
Hello
I have a video (dnxhd 422) that has been recorded using a BMD shuttle with the hdmi input. A computer wes the source (hdmi RGB) Sadly, the recorder only took hdmi YUV. So I have a green picture. Is there way to remap the YUV to RGB using a NLE or avisynth or whatnot ? Thank you so much for helping me ! |
23rd March 2016, 11:38 | #3 | Link |
Registered User
Join Date: Feb 2009
Posts: 19
|
Hello
Oh there are definitely things recorded. I can see the pictures, but with a heavy green tint. Here is a sample : https://www.wetransfer.com/downloads...3103519/1d17c9 Thank you so much ! |
23rd March 2016, 14:18 | #5 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Here are some tests you can make for yourself, which may come in handy:
XXSource("Capture Ecran Info2.mov.mp4") UtoY ...returns a black screen. So does VtoY. ColorYUV(analyze=true) ...confirms both U and V channels are flat color @ 16 the vectorscope Histogram("color") ...shows a single spot of color at the top left (ie, yellowish-green) |
24th March 2016, 22:18 | #6 | Link |
Registered User
Join Date: Feb 2009
Posts: 19
|
OK. I understand that it's probably doomed(9) to retrieve the data.
But so that I can understand, is it not normal that UtoY would return a black picture, since Y is grayscale only ? Wouldn' I need is a YtoR, UtoG and VtoB instead, to recolor the 3 B&W pictures ? I managed to get the greyscale with after effects. There is a way to swapped channel but in the same colorspace, so I had pinkish pictures as a choice... Thanks anyway for taking the time... |
24th March 2016, 23:54 | #7 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
|
UtoY is for displaying the color channel "U" directly, as if it was luma data. It is only used a way of testing to see if there is any image data in the color plane; if UtoY gives a flat image the U channel is flat and contains no image data. If you actually wanted to use the U and V data, along with Y, to generate an RGB image you would use ConvertToRGB.
Y is not the R data, it takes a mixture of Y, U, and V to convert to R, G, and B. Converting Y into R, U into G, and V into B would give you a Black and Red version of your image instead of a Black and White one. Without valid U and V data there really is no color data recorded, the green tint is an artifact of near zero U and V values. Code:
R = Y + 1.4075 * (V - 128) G = Y - 0.3455 * (U - 128) - (0.7169 * (V - 128)) B = Y + 1.7790 * (U - 128)
__________________
madVR options explained |
25th March 2016, 22:13 | #8 | Link |
Registered User
Join Date: Feb 2009
Posts: 19
|
Hi Asmodian
thank you very much for your reply Usually it is not. But in this very case, I recorded a RGB hdmi image to a YUV only capable recorder. So chances are that to recover the right colors, Y is carrying the Red data. And U the Green and V the blue ? If I had used a simple hdmi to sdi converter (which would have change rgb colorspace to yuv), I would have been fine. I still cannot wrap my head around why the matricing cannot be undone... |
|
|