Ask Your Question

StudentFeM's profile - activity

2018-05-01 15:48:22 -0600 received badge  Popular Question (source)
2017-11-29 08:48:53 -0600 received badge  Famous Question (source)
2016-08-13 11:18:48 -0600 received badge  Notable Question (source)
2015-11-13 18:11:30 -0600 received badge  Popular Question (source)
2014-05-13 02:30:18 -0600 asked a question HowTo split YCrCb into Y, Cr and Cb?

Hi,

I've created an Mat Object and split it into three channels:


vector<mat> bgr_planes;
split(frame, bgr_planes);
The content in the Mat frame is:

frame = {Cr0, Y0, Cb0, Y1, Cr2, Y3, Cb2, Y4, Cr4, Y5, Cr4, ...}
How can I separate the Y, Cb and Cr component?

Is there a function?

Best regards, Michael

2014-05-12 08:23:45 -0600 received badge  Editor (source)
2014-05-12 04:23:07 -0600 asked a question Mat using YUV 422 Video

Hello,

I'd like to write a single videoline, which is stored on DDR-RAM, in a Mat Object.

I have initialized an int-Array and convert it to a Mat Object:


int *Video_Line = (int *) calloc(1920, sizeof(int));
Mat videoline = Mat(1, 1920, CV_8UC3, Video_Line); 
Now the write function:

for(int i=0; i <= 1920; i++)
{
    unsigned long val = getData((DPRAM_START+i));
    Video_Line[i] = val;
}

The output is:


Mat = {99, bc, 12, bc, 99, bc, ...}
That correspond to:

Mat = [Y0, Cr0, Y1, Cb1, Y2, Cr2, ...]
How can I explain MAT, that the data are in YUV 422?

That is important to calculate a histogram.

Best regards,

Michael

2014-03-20 08:22:31 -0600 commented question Draw Waveform from Mat

That works, thank you very much!

2014-03-20 05:26:58 -0600 asked a question Draw Waveform from Mat

Hi,

I'd like to draw a waveform Diagram from cv:Mat.
So I use the line()-Function with Point(int x, int y) inside.

I try it with:

Code:

line(waveY,Point(bin_w * (i - 1),wave_h) ,Point(bin_w * (i), ycrcb_planes[0].row(i).col(0)), Scalar(128, 128, 128), 2, 8, 0);

The Problem is, that cv Point need int x and int y. So I have to convert every single "Pixel" from
Matrix into an int value.

I need something like that:

Code:

 int value = (int) ycrcb_planes[0].row(i).col(0)

Does anyone knows a solution for that?
I would be very happy :-)