<?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 Igor, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133646#M25857</link>
    <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;The first error in my code was&amp;nbsp; kernel construction. I was experimenting with some fixed kernel values and got completely green image (BR channels were 0). So, I've concluded that kernel is actually 1D-array of the form {B0,G0,R0,B1,G1,R1,...}. So kernel should be:&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;Ipp32f *kernel = new Ipp32f[kernelSize*kernelSize*3];&lt;/PRE&gt;

&lt;P&gt;I still don't know is such kernel construction OK, but it gives reasonable results. Regarding Wiener filter, it works well, but I want to try DeconvLR. I still don't know the range of threshold parameter? Should it be in the range [0,255], or in the range [0, 1]?&lt;/P&gt;
&lt;P&gt;Regards, Siniša&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2019 20:24:18 GMT</pubDate>
    <dc:creator>Petric__Sinisa</dc:creator>
    <dc:date>2019-01-15T20:24:18Z</dc:date>
    <item>
      <title>DeconvLR</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133644#M25855</link>
      <description>Hi,

I've checked forum posts regarding Lucy-Richardson deconvolution, but I still can acquire "reasonable" results.
An input image is 3-channels RGB image (output image is the same with same dimensions), so I must first convert input image
to 32f, run deconvolution and then convert resultant 32f image to 8u output image.
Here is the code that I use to perform LR Deconvolution: 

---------------------------------------------------------
int ippProcess::DeconvolveLR(ippImage&lt;IPPRGB&gt; *srcImage, ippImage&lt;IPPRGB&gt; *dstImage, TRect *roiRect,
                                           int kernelSize, float threshold, int numIter)
{
// calculate srcStep/dstStep/roiSize with respect to roiRect
prepareData(srcImage, dstImage, roiRect);
IppStatus status;
Ipp32f thr = threshold /255.0;
IppiSize maxRoi;
maxRoi.width  = roiSize.width  + kernelSize;
maxRoi.height = roiSize.height + kernelSize;
IppiDeconvLR_32f_C3R *pDeconvLR = 0;
int pSize;
status = ippiDeconvLRGetSize_32f(3, kernelSize, maxRoi, &amp;amp;pSize);
if (status)
   return status;
pDeconvLR = (IppiDeconvLR_32f_C3R *)ippsMalloc_32f(pSize);
Ipp32f *kernel = new Ipp32f[kernelSize*kernelSize];
// fill the PSF with ones
for (int i = 0; i &amp;lt; kernelSize*kernelSize; i++)
	kernel&lt;I&gt; = 1;
status = ippiDeconvLRInit_32f_C3R(pDeconvLR, kernel, kernelSize, maxRoi, thr);
if (status)
   {
   delete []kernel;
   ippsFree(pDeconvLR);
   return status;
   }
int interStepIn, interStepOut;
Ipp32f *interImageIn  = ippiMalloc_32f_C3(maxRoi.width, maxRoi.height, &amp;amp;interStepIn);
Ipp32f *interImageOut = ippiMalloc_32f_C3(roiSize.width, roiSize.height, &amp;amp;interStepOut);
//
status = ippiConvert_8u32f_C3R(pSrc, srcStep, interImageIn, interStepIn, roiSize);          // convert forward
status = ippiDeconvLR_32f_C3R(interImageIn, interStepIn, interImageOut, interStepOut, roiSize, numIter, pDeconvLR);
if (!status)
   ippiConvert_32f8u_C3R(interImageOut, interStepOut, pDst, dstStep, roiSize, ippRndNear);  // convert backward
ippsFree(pDeconvLR);
ippiFree(interImageIn);
ippiFree(interImageOut);
delete []kernel;
return status;
}
---------------------------------------------

However, resulting image has some strange artifacts on the image border. Also, for larger kernel sizes and larger iterations number (&amp;gt;= 5)
output image looks embossed and the effect of color channels shifting arises.  
From the documentation, it's not clear does DeconvLR operate on scaled f32 images (I've tried scaling as well),  what is the range of threshold parameter and how the input image should be "placed" inside maxRoi. 

If someone can detect the error in my code, it would be helpful.
TIA&lt;/I&gt;&lt;/IPPRGB&gt;&lt;/IPPRGB&gt;</description>
      <pubDate>Tue, 15 Jan 2019 12:32:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133644#M25855</guid>
      <dc:creator>Petric__Sinisa</dc:creator>
      <dc:date>2019-01-15T12:32:24Z</dc:date>
    </item>
    <item>
      <title>Hi Petric,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133645#M25856</link>
      <description>&lt;P&gt;Hi Petric,&lt;/P&gt;&lt;P&gt;as it's mentioned in the manual - "border pixels of a source image are restored before deconvolution." In IPP these border pixels are considered as "replicated", that may&amp;nbsp;lead to some artifacts in the border area. The "true" deconvolved area is only "valid" area (Matlab notation: image.width-kernel.width+1; image.height-kernel.height+1). You don't need to scale (f32) your image, the meaning of threshold parameter is the same as for Matlab or OpenCV (for example&amp;nbsp;http://onsignalandimageprocessing.blogspot.com/2017/02/lucy-richardson-deconvolution.html ). The place of image is the top-left corner. You also can try ippiFilterWiener for de-blurring purpose.&lt;/P&gt;&lt;P&gt;regards, Igor&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133645#M25856</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2019-01-15T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Hi Igor,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133646#M25857</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;The first error in my code was&amp;nbsp; kernel construction. I was experimenting with some fixed kernel values and got completely green image (BR channels were 0). So, I've concluded that kernel is actually 1D-array of the form {B0,G0,R0,B1,G1,R1,...}. So kernel should be:&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;Ipp32f *kernel = new Ipp32f[kernelSize*kernelSize*3];&lt;/PRE&gt;

&lt;P&gt;I still don't know is such kernel construction OK, but it gives reasonable results. Regarding Wiener filter, it works well, but I want to try DeconvLR. I still don't know the range of threshold parameter? Should it be in the range [0,255], or in the range [0, 1]?&lt;/P&gt;
&lt;P&gt;Regards, Siniša&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 20:24:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133646#M25857</guid>
      <dc:creator>Petric__Sinisa</dc:creator>
      <dc:date>2019-01-15T20:24:18Z</dc:date>
    </item>
    <item>
      <title>&gt; The first error in my code</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133647#M25858</link>
      <description>&lt;P&gt;&amp;gt; The first error in my code was&amp;nbsp; kernel construction. I was experimenting with some fixed kernel values and got completely green image (BR channels were 0). So, I've concluded that kernel is actually 1D-array of the form {B0,G0,R0,B1,G1,R1,...}.&lt;/P&gt;&lt;P&gt;Is that true ? ?&lt;/P&gt;&lt;P&gt;You could also try ippiDeconvFFT.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Adriaan van Os&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 15:47:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/DeconvLR/m-p/1133647#M25858</guid>
      <dc:creator>Adriaan_van_Os</dc:creator>
      <dc:date>2019-01-16T15:47:44Z</dc:date>
    </item>
  </channel>
</rss>

