- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have as source a firewire cam and I want a deinterlaced (edge detect) live stream.
As input a get a YUY2 buffer (Y0 U0 Y1 V0) with the size of 829440 bytes (720 * 576 * 2).
The output buffer has to be 768 * 576, so the ROI is 720 * 576.
When i use the ippiDeinterlaceEdgeDetect_8u_C1R function, the colors are wrong. I think its because of the input have to be RGB(?).
So I want to convert the input with ippiYUV422ToRGB_8u_C2C3R, then use the deinterlacing function and then re-convert.
Here is my Code (Delphi):
I'm quite sure there is something wrong with the rio size or/and the steps. Its a little bit confusing for me.
Can anyone see the failure???
I have as source a firewire cam and I want a deinterlaced (edge detect) live stream.
As input a get a YUY2 buffer (Y0 U0 Y1 V0) with the size of 829440 bytes (720 * 576 * 2).
The output buffer has to be 768 * 576, so the ROI is 720 * 576.
When i use the ippiDeinterlaceEdgeDetect_8u_C1R function, the colors are wrong. I think its because of the input have to be RGB(?).
So I want to convert the input with ippiYUV422ToRGB_8u_C2C3R, then use the deinterlacing function and then re-convert.
Here is my Code (Delphi):
[delphi]// Get pointerThe program crashes in the deinterlacing function: access voilation at adress 0x....
pSrc := PIpp8u(pDataI); // 720 * 576
pDst := PIpp8u(pDataO) // 768 * 576
// GetMem pTemp1 := ippiMalloc_8u_C3(720, 576, @tempStep1 ); pTemp1 := ippiMalloc_8u_C3(720, 576, @tempStep2 ); // Convert YUY2 -> RGB
roiSize.height:=576; roiSize.width:=720; ippiYUV422ToRGB_8u_C2C3R(pSrc,720*2,pTemp1,tempStep1,roiSize); // Deinterlace
roiSize.width:=720*3; res:=ippiDeinterlaceEdgeDetect_8u_C1R(pTemp1,tempStep1, pTemp2,tempStep2, roiSize,1, 1); // Convert RGB -> YUY2
roiSize.width:=720; ippiRGBToYUV422_8u_C3C2R(pTemp2,tempStep2,pDst,768*2,roiSize); // FreeMem
ippiFree(pTemp1); ippiFree(pTemp2);[/delphi]
I'm quite sure there is something wrong with the rio size or/and the steps. Its a little bit confusing for me.
Can anyone see the failure???
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please note that C1 in the name of IPP function mean single channel image. This function work on one color plane (for example Y plane). You need to split your image to planesbefore call this function for each plane.
Vladimir
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, I have a Copy&Paste failure in line 7. No It runs.
But the color are wrong.
Attachments:
1.jpg: how it is now
2.jpg: how i has to be
//Edit
I have replaced the deinterlacing funnction with the copy funktion
ippiCopy_8u_C1R(pTemp1, tempStep1, pTemp2, tempStep2, roiSize);
and now the colors are right.
So the new question is:
What color format need ippiDeinterlaceEdgeDetect_8u_C1R?
But the color are wrong.
Attachments:
1.jpg: how it is now
2.jpg: how i has to be
//Edit
I have replaced the deinterlacing funnction with the copy funktion
ippiCopy_8u_C1R(pTemp1, tempStep1, pTemp2, tempStep2, roiSize);
and now the colors are right.
So the new question is:
What color format need ippiDeinterlaceEdgeDetect_8u_C1R?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please note that C1 in the name of IPP function mean single channel image. This function work on one color plane (for example Y plane). You need to split your image to planesbefore call this function for each plane.
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works. Thank you!
I tought it doesn't matter, because the other deinterlacing functions worked without splitting.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page