- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I wrote a small peice of code which works well on Windows and fails on Linux.
I am using IPP 7.1, Linux Ubuntu 12.04.
In the code I am trying to use the canny filter and receive an error ippStsBadArgErr. I double checked and my lower threshold is lower than the high threshold.
The source code is:
#include "ippi.h"
#include <stdio.h>
Ipp8u SRC[1280*720];
Ipp8u DST[1280*720];
short dyy[1920*1920],dxx[1920*1920];
int main()
{
Ipp8u *src= SRC;
Ipp8u *dst= DST;
Ipp8u *buffer;
Ipp16s *dx= dxx;
Ipp16s *dy= dyy;
float low_edge_thresh= 0.1;
float high_edge_thresh= 1;
int width= 1280;
int height= 720;
IppStatus sts;
int size, size1, srcStep, dxStep, dyStep, dstStep;
IppiSize roi= {width,height};
srcStep= dstStep= width;
dxStep= dyStep= 2*width;
// read source frame
FILE *f= fopen("Fame_1280x720.yuv", "rb");
fread(src, 1, 1280*720, f);
fclose(f);
sts = ippiFilterSobelNegVertGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size);
sts = ippiFilterSobelHorizGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size1);
if (size<size1) size=size1;
ippiCannyGetSize(roi, &size1);
if (size<size1) size=size1;
buffer = malloc(size);
sts = ippiFilterSobelNegVertBorder_8u16s_C1R (src, srcStep, dx, dxStep, roi, ippMskSize3x3, ippBorderRepl, 0, buffer);
printf("sts=%d\n", sts);
sts = ippiFilterSobelHorizBorder_8u16s_C1R(src, srcStep, dy, dyStep, roi, ippMskSize3x3, ippBorderRepl, 0, buffer);
printf("sts=%d\n", sts);
sts = ippiCanny_16s8u_C1R(dx, dxStep, dy, dyStep, dst, dstStep, roi, low_edge_thresh, high_edge_thresh, buffer);
printf("sts=%d\n", sts);
}
Thank you
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page