Trouble with the Canny operator

Trouble with the Canny operator

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

2 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

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

发表评论

登录添加评论。还不是成员?立即加入