<?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 Hi Ladislav, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103161#M25199</link>
    <description>&lt;P&gt;Hi Ladislav,&lt;/P&gt;

&lt;P&gt;Unfortunately there is no any standard that describes operations like Sobel operator. So Wikipedia shows one formula &lt;A href="https://en.wikipedia.org/wiki/Sobel_operator,&amp;nbsp;" target="_blank"&gt;https://en.wikipedia.org/wiki/Sobel_operator,&amp;nbsp;&lt;/A&gt;;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+1&amp;nbsp; 0&amp;nbsp; -1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +1 &amp;nbsp;+2 +1&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Gx = +2&amp;nbsp; 0&amp;nbsp; -2 &amp;nbsp; &amp;nbsp;Gy = &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+1&amp;nbsp; 0&amp;nbsp; -1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -1 &amp;nbsp; -2 &amp;nbsp; -1&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;OpenCV documentation gives another formula &lt;A href="http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html" target="_blank"&gt;http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html&lt;/A&gt;, &lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1 &amp;nbsp; -2 &amp;nbsp; -1&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Gx = -2&amp;nbsp; 0&amp;nbsp; +2 &amp;nbsp; &amp;nbsp;Gy = &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +1 &amp;nbsp;+2 +1&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;IPP implements the third formula &lt;A href="https://software.intel.com/en-us/node/504474" target="_blank"&gt;https://software.intel.com/en-us/node/504474&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +1 &amp;nbsp;+2 +1&lt;/SPAN&gt;&lt;BR style="font-size: 13.008px;" /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Gx = -2&amp;nbsp; 0&amp;nbsp; +2 &amp;nbsp; &amp;nbsp;Gy = &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1 &amp;nbsp; -2 &amp;nbsp; -1&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;All the formulas are correct in terms of math.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Valentin&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2017 14:49:24 GMT</pubDate>
    <dc:creator>Valentin_K_Intel</dc:creator>
    <dc:date>2017-05-11T14:49:24Z</dc:date>
    <item>
      <title>Documentation for GradientVectorSobel and GradientVectorPrewitt</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103160#M25198</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
	there is documented GradientVectorSobel function for example on &lt;A href="https://software.intel.com/en-us/node/504474" target="_blank"&gt;https://software.intel.com/en-us/node/504474&lt;/A&gt; and there is mentioned Gx kernel.&lt;BR /&gt;
	I am not sure if it is correct documented, IMO it should be :&lt;BR /&gt;
	+1&amp;nbsp; 0&amp;nbsp; -1&lt;BR /&gt;
	+2&amp;nbsp; 0&amp;nbsp; -2&lt;BR /&gt;
	+1&amp;nbsp; 0&amp;nbsp; -1&lt;BR /&gt;
	It seems to me that this kernel is used in reality by GradientVectorSobel as stated also for example on &lt;A href="https://en.wikipedia.org/wiki/Sobel_operator" target="_blank"&gt;https://en.wikipedia.org/wiki/Sobel_operator&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 13:14:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103160#M25198</guid>
      <dc:creator>Ladislav_K_</dc:creator>
      <dc:date>2017-05-10T13:14:37Z</dc:date>
    </item>
    <item>
      <title>Hi Ladislav,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103161#M25199</link>
      <description>&lt;P&gt;Hi Ladislav,&lt;/P&gt;

&lt;P&gt;Unfortunately there is no any standard that describes operations like Sobel operator. So Wikipedia shows one formula &lt;A href="https://en.wikipedia.org/wiki/Sobel_operator,&amp;nbsp;" target="_blank"&gt;https://en.wikipedia.org/wiki/Sobel_operator,&amp;nbsp;&lt;/A&gt;;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+1&amp;nbsp; 0&amp;nbsp; -1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +1 &amp;nbsp;+2 +1&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Gx = +2&amp;nbsp; 0&amp;nbsp; -2 &amp;nbsp; &amp;nbsp;Gy = &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+1&amp;nbsp; 0&amp;nbsp; -1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -1 &amp;nbsp; -2 &amp;nbsp; -1&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;OpenCV documentation gives another formula &lt;A href="http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html" target="_blank"&gt;http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html&lt;/A&gt;, &lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1 &amp;nbsp; -2 &amp;nbsp; -1&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Gx = -2&amp;nbsp; 0&amp;nbsp; +2 &amp;nbsp; &amp;nbsp;Gy = &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +1 &amp;nbsp;+2 +1&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;IPP implements the third formula &lt;A href="https://software.intel.com/en-us/node/504474" target="_blank"&gt;https://software.intel.com/en-us/node/504474&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +1 &amp;nbsp;+2 +1&lt;/SPAN&gt;&lt;BR style="font-size: 13.008px;" /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Gx = -2&amp;nbsp; 0&amp;nbsp; +2 &amp;nbsp; &amp;nbsp;Gy = &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1 &amp;nbsp; -2 &amp;nbsp; -1&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;All the formulas are correct in terms of math.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Valentin&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 14:49:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103161#M25199</guid>
      <dc:creator>Valentin_K_Intel</dc:creator>
      <dc:date>2017-05-11T14:49:24Z</dc:date>
    </item>
    <item>
      <title>Hi Valentin,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103162#M25200</link>
      <description>&lt;P&gt;Hi Valentin,&lt;BR /&gt;
	thank you for response. Try this example:&lt;BR /&gt;
	Initialize for example image 8u 8x8 with these values:&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;BR /&gt;
	0 1 2 3 4 5 6 7&lt;/P&gt;

&lt;P&gt;Then compute ippiGradientVectorSobel_8u16s_C1R, result will be:&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;BR /&gt;
	-4 -8 -8 -8 -8 -8 -8 -4&lt;/P&gt;

&lt;P&gt;Which IMO corresponds to kernel Gx:&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+1&amp;nbsp; 0&amp;nbsp; -1&lt;BR /&gt;
	Gx = +2&amp;nbsp;&amp;nbsp; 0&amp;nbsp; -2&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; +1&amp;nbsp; 0&amp;nbsp; -1&lt;BR /&gt;
	Not as documented on &lt;A href="https://software.intel.com/en-us/node/504474"&gt;https://software.intel.com/en-us/node/504474&lt;/A&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1&lt;BR /&gt;
	Gx = -2&amp;nbsp; 0&amp;nbsp; +2&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1&amp;nbsp; 0&amp;nbsp; +1&lt;/P&gt;

&lt;P&gt;So there is inconsistence AFAIU, does not ?&lt;BR /&gt;
	Second question is what angle will be calculated if various kernels are used ? IMO different sign will lead to different angle, does not ? So used kernel matters!&lt;/P&gt;

&lt;P&gt;I have used this test program (is in Pascal, but no problem to understand):&lt;BR /&gt;
	&amp;nbsp;for j:=0 to 7 do&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; for i:=0 to 7 do&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b[i+8*j] := i;&lt;BR /&gt;
	&amp;nbsp; ippiGradientVectorGetBufferSize(roiSize, ippMskSize3x3, ippDT8u, 1, bufSize);&lt;BR /&gt;
	&amp;nbsp; buf := ippsMalloc_8u(bufSize);&lt;BR /&gt;
	&amp;nbsp; ippiGradientVectorSobel_8u16s_C1R( @b[0], roiSize.Width, @g[0], roiSize.Width*2, nil, 0, nil, 0, nil, 0,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; roiSize, ippMskSize3x3, ippNormL2, ippBorderRepl, 0, buf);&lt;BR /&gt;
	&amp;nbsp; ippsFree(buf);&lt;BR /&gt;
	&amp;nbsp; for j:=0 to 7 do begin&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; writeln;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; for i:=0 to 7 do&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(g[i+8*j], ' ');&lt;BR /&gt;
	&amp;nbsp; end;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 05:42:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103162#M25200</guid>
      <dc:creator>Ladislav_K_</dc:creator>
      <dc:date>2017-05-12T05:42:18Z</dc:date>
    </item>
    <item>
      <title>Ladislav,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103163#M25201</link>
      <description>&lt;P&gt;Ladislav,&lt;/P&gt;

&lt;P&gt;Thank you for the question. The formulas from &lt;A href="https://software.intel.com/en-us/node/504474&amp;nbsp;describe" target="_blank"&gt;https://software.intel.com/en-us/node/504474&amp;nbsp;describe&lt;/A&gt; two-dimensional convolution, where a kernel is applied to the image in reverse order. So the function implementation corresponds to the documentation.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Valentin&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:34:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103163#M25201</guid>
      <dc:creator>Valentin_K_Intel</dc:creator>
      <dc:date>2017-05-12T14:34:48Z</dc:date>
    </item>
    <item>
      <title>Yes, now I understand it.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103164#M25202</link>
      <description>&lt;P&gt;Yes, now I understand it. Rows and columns of kernal are flipped and then applied to image.&lt;BR /&gt;
	It is not very intuitive IMO but also from wikipedia POV: &lt;A href="https://en.wikipedia.org/wiki/Sobel_operator" target="_blank"&gt;https://en.wikipedia.org/wiki/Sobel_operator&lt;/A&gt; :&lt;BR /&gt;
	"Applying convolution &lt;I&gt;K&lt;/I&gt; to pixel group &lt;I&gt;P&lt;/I&gt; can be represented in pseudocode as:&lt;BR /&gt;
	&amp;nbsp; N(x,y) = Sum of { K(i,j).P(x-i,y-j)}, for i,j running from -1 to 1.&lt;BR /&gt;
	N(x,y) represents the new matrix resulted after applying the Convolution &lt;I&gt;K&lt;/I&gt; to &lt;I&gt;P&lt;/I&gt;, where &lt;I&gt;P&lt;/I&gt; is pixel matrix."&lt;/P&gt;

&lt;P&gt;and &lt;A href="https://en.wikipedia.org/wiki/Kernel_(image_processing)#Convolution" target="_blank"&gt;https://en.wikipedia.org/wiki/Kernel_(image_processing)#Convolution&lt;/A&gt;&lt;BR /&gt;
	Describes your approach ...&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 11:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Documentation-for-GradientVectorSobel-and-GradientVectorPrewitt/m-p/1103164#M25202</guid>
      <dc:creator>Ladislav_K_</dc:creator>
      <dc:date>2017-05-15T11:30:00Z</dc:date>
    </item>
  </channel>
</rss>

