<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Canny example? in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891117#M11501</link>
    <description>&lt;FONT color="#008000"&gt;Why you suggest to pass the pointer of image (&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;img+1)&lt;/FONT&gt;&lt;FONT color="#008000"&gt;for the Horizontal Sobel filter and (&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;img+&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;imgStep&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;)&lt;/FONT&gt;&lt;FONT color="#008000"&gt;for the Vertical one?&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Sorry.. I accidentally mistook the vertical sobel filter for a 1x3 filter and the horizontal sobel filter for a 3x1 kernel. Actually, both filters are 3x3... My mistake.&lt;BR /&gt;&lt;BR /&gt;You need to offset your input image (&lt;FONT face="Courier New"&gt;img&lt;/FONT&gt;) in the following manner:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;int imgStep;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;Ipp8u *img = ippiMalloc_8u_C1(1024, 768, &amp;amp;imgStep);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;int sobelStep;&lt;BR /&gt;Ipp16s *sobel = ippiMalloc_16s_C1(1024 - 2, 768 - 2, &amp;amp;sobelStep);&lt;BR /&gt;&lt;BR /&gt;Ipp8u *imgOffset = img + imgStep + 1;&lt;BR /&gt;&lt;BR /&gt;IppiSize dstRoiSize = {1024 - 2, 768 - 2};&lt;BR /&gt;&lt;BR /&gt;ippiFilterSobelVert_8u16s_C1R(imgOffset, imgStep, sobel, sobelStep, dstRoiSize, IppiMaskSize3x3);&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#000000"&gt;The reason you need this offset, is &lt;/FONT&gt;&lt;FONT color="#000000"&gt;because the 3x3 sobel filters uses a 3x3 kernel, which needs a margin of 1 pixel on each of it four sides in order to work. If you just pass the &lt;FONT face="Courier New"&gt;img &lt;FONT face="Times New Roman"&gt;pointer to the sobel filter function, it will attempt to access pixels outside your allocated area (starting in point (-1,-1) and ending in (1025, 769)) which ofcourse is bad...&lt;BR /&gt;&lt;BR /&gt;Note also, that the valid output of the sobel filter is is 2 pixel smaller on each side (1022x766 in this case). This is due to the same phenomenon.&lt;BR /&gt;&lt;BR /&gt;In general 3x3 filters need a 1 pixel margin, 5x5 filters need a 2 pixel margin, 7x7 filters need a 3 pixel margin, etc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;It is possible to store the images &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;imageSobel_1&lt;/FONT&gt;&lt;FONT color="#008000"&gt; and &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;imageSobel_2 &lt;/FONT&gt;&lt;FONT color="#008000"&gt;at
first and then use always this memory (maybe I must reallocate or
simple clean the buffer) for all images that I want to process?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Yes! It most certainly is... You should always try to minimize your memory allocation/deallocation as much as possible, since this is a relatively time-consuming process which can lead to memory fragmentation, and other bad things.&lt;BR /&gt;Allocate your imagebuffers outside your processing function (with &lt;FONT face="Courier New"&gt;ippiMalloc&lt;FONT face="Times New Roman"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;, and pass the pointers to the your processing function.&lt;BR /&gt;It is not necessary to clean the output buffers before each call to the sobel functions, since they will be overwritten by the function.&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Times New Roman"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;But it doesn't work?&lt;BR /&gt;Have you any idea?&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;I will look into this later today... I will post my results here...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Thomas&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
    <pubDate>Tue, 09 Jan 2007 05:41:54 GMT</pubDate>
    <dc:creator>tld</dc:creator>
    <dc:date>2007-01-09T05:41:54Z</dc:date>
    <item>
      <title>Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891114#M11498</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;/P&gt;I am using the IPP 5.0 for linux on a 32-bit running Suse 10.1.&lt;BR /&gt;In the past I have used the IPP 4.1 with the following code:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;#include "ippi.h"&lt;BR /&gt;#include "ippcv.h"&lt;/P&gt;&lt;P&gt;unsigned char img[1024*768*1];&lt;BR /&gt;unsigned char output[1024*768*1];&lt;BR /&gt;const int low_thr = 50;&lt;BR /&gt;const int high_thr = 140;&lt;BR /&gt;IppiSize size;  size.width = 1024;  size.height = 768;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Ipp16s imageSobel_1[1024*768*10];&lt;BR /&gt;Ipp16s *imageSobel_2 = &amp;amp;imageSobel_1[1024*768];&lt;BR /&gt;Ipp16s *imageSobel_3 = &amp;amp;imageSobel_1[1024*768*2];&lt;BR /&gt;ippiSobel3x3_Dx_8u16s_C1R( img , 1024, imageSobel_1, 2048, size);&lt;BR /&gt;ippiSobel3x3_Dy_8u16s_C1R( img , 1024, imageSobel_2, 2048, IPCV_ORIGIN_BL , size);&lt;BR /&gt;ippiCanny_16s8u_C1R(imageSobel_1, 2048, imageSobel_2, 2048, output, 1024, size, low_thr, high_thr, imageSobel_3);&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;This code (maybe is NOT the best one) works fine.&lt;/P&gt;&lt;P&gt;Now with the IPP5.0 I've tried to modify the code in this way:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;#include "ippi.h"&lt;BR /&gt;
#include "ippcv.h"&lt;/P&gt;
&lt;P&gt;unsigned char img[1024*768*1];&lt;BR /&gt;
unsigned char output[1024*768*1];&lt;BR /&gt;
const int low_thr = 50;&lt;BR /&gt;
const int high_thr = 140;&lt;BR /&gt;
IppiSize size;  size.width = 1024;  size.height = 768;&lt;BR /&gt;
&lt;/P&gt;
&lt;P&gt;Ipp16s imageSobel_1[1024*768*10];&lt;BR /&gt;Ipp16s *imageSobel_2 = &amp;amp;imageSobel_1[1024*768];&lt;BR /&gt;Ipp8u imageCanny[1024*768*2];&lt;BR /&gt;&lt;/P&gt;ippiFilterSobelHoriz_8u16s_C1R( img, 1024, imageSobel_1, 2048, size, ippMskSize3x3);&lt;BR /&gt;ippiFilterSobelVert_8u16s_C1R( img, 1024, imageSobel_2, 2048, size, ippMskSize3x3);&lt;BR /&gt;ippiCanny_16s8u_C1R(imageSobel_1, 2048, imageSobel_2, 2048, ouput, 1024, size, low_thr, high_thr, imageCanny);&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;but my program exit with a Segmentation Fault at this point.&lt;BR /&gt;Someone could help me or send me a simple program to apply the ippiCanny function?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2007 23:20:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891114#M11498</guid>
      <dc:creator>ferrofrancescoen</dc:creator>
      <dc:date>2007-01-04T23:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891115#M11499</link>
      <description>I think there's a couple of potential issues here...&lt;BR /&gt;&lt;BR /&gt;First of all: Buffer allocation... Its a lot of memory to put on the stack(!)... Also, when you do allocation like this, the memory will probably not be 32-byte aligned which is required by IPP. Im actually suprised to hear that it worked with IPP4.1...&lt;BR /&gt;&lt;BR /&gt;Instead you need to use the &lt;I&gt;ippiMalloc/ippiFree&lt;/I&gt; functions when allocating your image buffers. &lt;BR /&gt;&lt;BR /&gt;Another issue could be your calls to the sobel filtering functions... You need to provide a proper margin around your image, in order to accomedate the sobel filter kernel (3x3)... &lt;BR /&gt;&lt;BR /&gt;Try something like this... (untested)&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;#include "ippi.h"&lt;BR /&gt;#include "ippcv.h"&lt;BR /&gt;&lt;BR /&gt;int imgStep;&lt;BR /&gt;Ipp8u *img = ippiMalloc_8u_C1R(1024, 768, &amp;amp;imgStep);&lt;BR /&gt;&lt;BR /&gt;int outputStep;&lt;BR /&gt;Ipp8u *output = ippiMalloc_8u_C1R(1024, 768, &amp;amp;outputStep);&lt;BR /&gt;&lt;BR /&gt;const int low_thr = 50;&lt;BR /&gt;const int high_thr = 140;&lt;BR /&gt;&lt;BR /&gt;int imageSobel1Step;&lt;BR /&gt;Ipp16s *imageSobel_1 = ippiMalloc_16s_C1R(1024, 768, &amp;amp;imageSobel1Step);&lt;BR /&gt;&lt;BR /&gt;int imageSobel2Step;&lt;BR /&gt;
Ipp16s *imageSobel_2 = ippiMalloc_16s_C1R(1024, 768, &amp;amp;imageSobel2Step);&lt;BR /&gt;&lt;BR /&gt;IppiSize sobel1Size = { 1024 - 3, 768 };&lt;BR /&gt;ippiFilterSobelHoriz_8u16s_C1R( img + 1, imgStep, imageSobel_1 + 1, imageSobel1Step, sobel1Size, ippMskSize3x3 );&lt;BR /&gt;&lt;BR /&gt;IppiSize sobel2Size = {1024, 768 - 3 };&lt;BR /&gt;ippiFilterSobelVert_8u16s_C1R( img + imgStep, imgStep, imageSobel_2, imageSobel2Step, sobel2Size, ippMskSize3x3);&lt;BR /&gt;&lt;BR /&gt;...&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Thomas Lund Dideriksen&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jan 2007 04:50:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891115#M11499</guid>
      <dc:creator>tld</dc:creator>
      <dc:date>2007-01-05T04:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891116#M11500</link>
      <description>Hi Thomas,&lt;BR /&gt;you're right for the dimension of the stack in my old program, but at same time I need a fast time of execution of the algorithm.&lt;BR /&gt;I've tried your code and the code of Andreas that I've found in this forum, but I don't understand very well the necessary step of the algorithm.&lt;BR /&gt;&lt;BR /&gt;The ippiman.pdf said:&lt;BR /&gt;IppStatus ippiFilterSobelVert_8u16s_C1R( const Ipp&lt;SRCDATATYPE&gt;* pSrc, int srcStep, Ipp&lt;DSTDATATYPE&gt;* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Why you suggest to pass the pointer of image (&lt;FONT face="Courier New"&gt;img+1)&lt;/FONT&gt;for the Horizontal Sobel filter and (&lt;FONT face="Courier New"&gt;img+&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;imgStep&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;)&lt;/FONT&gt;for the Vertical one?&lt;BR /&gt;It is possible to store the images &lt;FONT face="Courier New"&gt;imageSobel_1&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;imageSobel_2 &lt;/FONT&gt;at first and then use always this memory (maybe I must reallocate or simple clean the buffer) for all images that I want to process?&lt;BR /&gt;&lt;BR /&gt;Then to apply the Canny algorithm I've tried this code:&lt;BR /&gt;&lt;BR /&gt;IppiSize size = {1024, 768};&lt;BR /&gt;
const int lowThresh = 50;&lt;BR /&gt;
const int highThresh = 140;&lt;BR /&gt;
int cannyBufferSize;&lt;BR /&gt;Ipp8u *cannyBuffer;&lt;BR /&gt;&lt;BR /&gt;// Get the buffers to apply CANNY algorithm&lt;BR /&gt;ippiCannyGetSize(size, &amp;amp;cannyBufferSize);&lt;BR /&gt;cannyBuffer = ippsMalloc_8u(cannyBufferSize);&lt;BR /&gt;&lt;BR /&gt;.......... your code .......&lt;BR /&gt;&lt;BR /&gt;ippiCanny_16s8u_C1R( imageSobel_1, imageSobel1Step, imageSobel_2, imageSobel2Step, imgOutCanny, 1024, size, lowThresh, highThresh, cannyBuffer);&lt;BR /&gt;&lt;BR /&gt;But it doesn't work?&lt;BR /&gt;Have you any idea?&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;Francesco&lt;BR /&gt;&lt;/DSTDATATYPE&gt;&lt;/SRCDATATYPE&gt;</description>
      <pubDate>Tue, 09 Jan 2007 02:10:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891116#M11500</guid>
      <dc:creator>ferrofrancescoen</dc:creator>
      <dc:date>2007-01-09T02:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891117#M11501</link>
      <description>&lt;FONT color="#008000"&gt;Why you suggest to pass the pointer of image (&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;img+1)&lt;/FONT&gt;&lt;FONT color="#008000"&gt;for the Horizontal Sobel filter and (&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;img+&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;imgStep&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;)&lt;/FONT&gt;&lt;FONT color="#008000"&gt;for the Vertical one?&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Sorry.. I accidentally mistook the vertical sobel filter for a 1x3 filter and the horizontal sobel filter for a 3x1 kernel. Actually, both filters are 3x3... My mistake.&lt;BR /&gt;&lt;BR /&gt;You need to offset your input image (&lt;FONT face="Courier New"&gt;img&lt;/FONT&gt;) in the following manner:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;int imgStep;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;Ipp8u *img = ippiMalloc_8u_C1(1024, 768, &amp;amp;imgStep);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;int sobelStep;&lt;BR /&gt;Ipp16s *sobel = ippiMalloc_16s_C1(1024 - 2, 768 - 2, &amp;amp;sobelStep);&lt;BR /&gt;&lt;BR /&gt;Ipp8u *imgOffset = img + imgStep + 1;&lt;BR /&gt;&lt;BR /&gt;IppiSize dstRoiSize = {1024 - 2, 768 - 2};&lt;BR /&gt;&lt;BR /&gt;ippiFilterSobelVert_8u16s_C1R(imgOffset, imgStep, sobel, sobelStep, dstRoiSize, IppiMaskSize3x3);&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#000000"&gt;The reason you need this offset, is &lt;/FONT&gt;&lt;FONT color="#000000"&gt;because the 3x3 sobel filters uses a 3x3 kernel, which needs a margin of 1 pixel on each of it four sides in order to work. If you just pass the &lt;FONT face="Courier New"&gt;img &lt;FONT face="Times New Roman"&gt;pointer to the sobel filter function, it will attempt to access pixels outside your allocated area (starting in point (-1,-1) and ending in (1025, 769)) which ofcourse is bad...&lt;BR /&gt;&lt;BR /&gt;Note also, that the valid output of the sobel filter is is 2 pixel smaller on each side (1022x766 in this case). This is due to the same phenomenon.&lt;BR /&gt;&lt;BR /&gt;In general 3x3 filters need a 1 pixel margin, 5x5 filters need a 2 pixel margin, 7x7 filters need a 3 pixel margin, etc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;It is possible to store the images &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;imageSobel_1&lt;/FONT&gt;&lt;FONT color="#008000"&gt; and &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;imageSobel_2 &lt;/FONT&gt;&lt;FONT color="#008000"&gt;at
first and then use always this memory (maybe I must reallocate or
simple clean the buffer) for all images that I want to process?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Yes! It most certainly is... You should always try to minimize your memory allocation/deallocation as much as possible, since this is a relatively time-consuming process which can lead to memory fragmentation, and other bad things.&lt;BR /&gt;Allocate your imagebuffers outside your processing function (with &lt;FONT face="Courier New"&gt;ippiMalloc&lt;FONT face="Times New Roman"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;, and pass the pointers to the your processing function.&lt;BR /&gt;It is not necessary to clean the output buffers before each call to the sobel functions, since they will be overwritten by the function.&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Times New Roman"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;But it doesn't work?&lt;BR /&gt;Have you any idea?&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;I will look into this later today... I will post my results here...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Thomas&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 09 Jan 2007 05:41:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891117#M11501</guid>
      <dc:creator>tld</dc:creator>
      <dc:date>2007-01-09T05:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891118#M11502</link>
      <description>&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Times New Roman" size="3"&gt;This is tested... also with real image data. This works... Enjoy!&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Times New Roman" size="3"&gt;-Thomas&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Input image size&lt;/FONT&gt;&lt;BR /&gt;int width = 1024;&lt;BR /&gt;int height = 768;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Allocate space for input image&lt;/FONT&gt;&lt;BR /&gt;int imageStep;&lt;BR /&gt;Ipp8u *image = ippiMalloc_8u_C1(width, height, &amp;amp;imageStep);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Offset into input image&lt;/FONT&gt;&lt;BR /&gt;Ipp8u *imageOffset = image + imageStep + 1;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Allocate space for horizontal sobel filter response&lt;/FONT&gt;&lt;BR /&gt;int sobelHorizStep;&lt;BR /&gt;Ipp16s *sobelHoriz = ippiMalloc_16s_C1(width-2, height-2, &amp;amp;sobelHorizStep);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Allocate space for vertical sobel filter response&lt;/FONT&gt;&lt;BR /&gt;int sobelVertStep;&lt;BR /&gt;Ipp16s *sobelVert = ippiMalloc_16s_C1(width-2, height-2, &amp;amp;sobelVertStep);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Allocate space for result &lt;/FONT&gt;&lt;BR /&gt;int outputStep;&lt;BR /&gt;Ipp8u *output = ippiMalloc_8u_C1(width-2, height-2, &amp;amp;outputStep);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Define roi-size&lt;/FONT&gt;&lt;BR /&gt;IppiSize roiSize = {width-2, height-2};&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Do vertical and horizontal sobel filtering&lt;/FONT&gt;&lt;BR /&gt;ippiFilterSobelVert_8u16s_C1R(imageOffset, imageStep, sobelVert, sobelVertStep, roiSize, ippMskSize3x3);&lt;BR /&gt;ippiFilterSobelHoriz_8u16s_C1R(imageOffset, imageStep, sobelHoriz, sobelHorizStep, roiSize, ippMskSize3x3);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Get size of canny buffer&lt;/FONT&gt;&lt;BR /&gt;int bufferSize;&lt;BR /&gt;ippiCannyGetSize(roiSize, &amp;amp;bufferSize);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Allocate canny buffer&lt;/FONT&gt;&lt;BR /&gt;Ipp8u *buffer = ippsMalloc_8u(bufferSize);&lt;BR /&gt; &lt;BR /&gt;&lt;FONT color="#006400"&gt;// Do canny edge detection&lt;/FONT&gt;&lt;BR /&gt;float lowThresh = 50.0f;&lt;BR /&gt;float highThresh = 140.0f;&lt;BR /&gt;ippiCanny_16s8u_C1R(sobelVert, sobelVertStep, sobelHoriz, sobelHorizStep, output, outputStep, roiSize, lowThresh, highThresh, buffer);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#006400"&gt;// Memory cleanup&lt;/FONT&gt;&lt;BR /&gt;ippiFree(output);&lt;BR /&gt;ippiFree(image);&lt;BR /&gt;ippiFree(sobelHoriz);&lt;BR /&gt;ippiFree(sobelVert);&lt;BR /&gt;ippsFree(buffer);&lt;/FONT&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jan 2007 06:19:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891118#M11502</guid>
      <dc:creator>tld</dc:creator>
      <dc:date>2007-01-09T06:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891119#M11503</link>
      <description>Thank you very much,&lt;BR /&gt;Francesco&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jan 2007 19:56:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891119#M11503</guid>
      <dc:creator>ferrofrancescoen</dc:creator>
      <dc:date>2007-01-09T19:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891120#M11504</link>
      <description>&lt;P&gt;Thank you Thomas, for helping with this question. It is really nice to see that IPP community work and so, not every question should processed by me:)&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2007 03:39:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891120#M11504</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2007-01-12T03:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Canny example?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891121#M11505</link>
      <description>&lt;P&gt;Another method without border outside the image (height*width array for the image). SobelNegVertBorder because SobelVert calculates -dx:&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; IppStatus sts; &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; Ipp32f low=50.0f, high=140.0f;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; int size, size1, srcStep, dxStep, dyStep, dstStep;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; IppiSize roi;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; Ipp8u *src, *dst, *buffer;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; Ipp16s *dx, *dy;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; sts = ippiFilterSobelNegVertGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &amp;amp;size);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; sts = ippiFilterSobelHorizGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &amp;amp;size1);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; if (size&lt;SIZE1&gt;&lt;/SIZE1&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; ippiCannyGetSize(roi, &amp;amp;size1);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; if (size&lt;SIZE1&gt;&lt;/SIZE1&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; buffer = ippsMalloc_8u(size);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; sts = ippiFilterSobelNegVertBorder_8u16s_C1R (src, srcStep, dx, dxStep, roi, ippMskSize3x3, ippBorderRepl, 0, buffer);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; sts = ippiFilterSobelHorizBorder_8u16s_C1R(src, srcStep, dy, dyStep, roi, ippMskS
ize3x3, ippBorderRepl, 0, buffer);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; sts = ippiCanny_16s8u_C1R(dx, dxStep, dy, dyStep, dst, dstStep, roi, low, high, buffer);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Courier New" color="blue" size="1"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; ippsFree(buffer);&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2007 02:22:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Canny-example/m-p/891121#M11505</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2007-01-18T02:22:44Z</dc:date>
    </item>
  </channel>
</rss>

