Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

Trouble with the Canny operator

bmeeder
Beginner
572 Views
Hi,
I am having difficulties getting the canny operator to work correctly for me. I am trying to do edge detection in the hue part of an RGB image. I am extracting the hue correctly and am using the following code to compute the edges:
Note: HSVPanes[0] contains the hue values.
IppiSize image = {buf->w(), buf->h()};

ippiCannyGetSize(image, &numBytesRequired);
Ipp8u *tempBuf = (Ipp8u*)malloc(sizeof(unsigned char)*numBytesRequired*1);
Ipp16s *derivX = ippiMalloc_16s_C1(buf->w(), buf->h(), &derivStep);
Ipp16s *derivY = ippiMalloc_16s_C1(buf->w(), buf->h(), &derivStep);
Ipp8u *t3 = ippiMalloc_8u_C1(buf->w(), buf->h(), &paneSB);
ippiSobel3x3_Dy_8u16s_C1R(HSVPanes[0], paneSB, derivY, derivStep, IPCV_ORIGIN_TL, image);
ippiSobel3x3_Dx_8u16s_C1R(HSVPanes[0], paneSB, derivX, derivStep, image);
ippiCanny_16s8u_C1R(derivX, derivStep, derivY, derivStep, t3, paneSB, WHOLE, 0, 10, tempBuf)

The problem is that the t3 buffer doesn't even change. If I set it to a particular value, it returns from the Canny function call without even changing.

I am confused as to what is going wrong.

Thank you for any assistance.

Brendan

0 Kudos
1 Reply
Intel_C_Intel
Employee
572 Views

Hi,

It is possiblethat one of functions (rather Canny) returns the bad status

Please check is it zero:

IppStatus status = ippiCanny_16s8u_C1R(derivX, derivStep, derivY, derivStep, t3, paneSB, WHOLE, 0, 10, tempBuf)

What is WHOLE in this example?

Are low and high tresholds 0 an? 10 correctly converted to float?

Regards,
Vladimir
0 Kudos
Reply