- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
i'm trying to use ipp to convert rgb image to grayscale one.
following code:
gray_frame = Mat(color_frame.size().width, color_frame.size().height, CV_8UC1); IppiSize roi; roi.width = color_frame.size().width; roi.height = color_frame.size().height; Ipp8u* ippRGBPtr = (Ipp8u*)&color_frame.data[0]; // Get pointer to the data int ipprgbStep = color_frame.step; // get step value in bytes Ipp8u* ippGrayPtr = (Ipp8u*)&gray_frame.data[0]; // Get pointer to the data int ippGrayStep = gray_frame.step; // get step value in bytes ippiRGBToGray_8u_C3C1R(ippRGBPtr, ipprgbStep, ippGrayPtr, ippGrayStep, roi); // do the color conversion
the problem i'm facing is that the image i now fully procced,
when i cv::imshow(gray_frame) i see half of the image.
what can be the problem?
thank you!
- Tags:
- Development Tools
- General Support
- Intel® Integrated Performance Primitives
- Parallel Computing
- Vectorization
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dahan Dor.
I've reproduced your issue.
Swap please width and height in this line
gray_frame = Mat(color_frame.size().width, color_frame.size().height, CV_8UC1)
with
gray_frame = Mat(color_frame.size().height, color_frame.size().width, CV_8UC1)
Thanks.

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