Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Copy and extend border for Ipp32f image

jaonary
Beginner
343 Views
Hi all,
I'd like to extend an image in order to filter it. IPP already have three functions that may do this (ippiConstCopyBorder, ReplicateBorder,WrapBorder). The problem is that, those function seem to not accept Ipp32f image but only (8u,16s,32) so how can I do to extend my Ipp32f image ?

Thank you for your help,

Jaonary
0 Kudos
3 Replies
Chao_Y_Intel
Moderator
343 Views

Hi,

Could you use 32s functions as an workaround? They expect to be working for 32f image.

Regards,

Chao

0 Kudos
jaonary
Beginner
343 Views
Hi,
Here is the code of what I'm trying to do :

 Ipp32f* image0,*image1,*res;
 int p_step0,p_step1;

int w0 = 10;
 int w1 = 12;
 int h0 = 10;
 int h1 = 10;

image0 = ippiMalloc_32f_C1(w0,h0,&p_step0);
 image1 = ippiMalloc_32f_C1(w1,h1,&p_step1);

 for(int i=0;i=0.5;

IppiSize size0 = {w0,h0};
 IppiSize size1 = {w1,h1};

IppStatus stat;

stat = ippiCopyConstBorder_32s_C1R(image0,p_step0,size0,
          image1,p_step1,size1,
          0,1,0);


With this code I get a compilation error. In fact, the function

ippiCopyConstBorder_32s_C1R

exptects an Ipp32s* as input. If I do a static cast like this :

ippiCopyConstBorder_32s_C1R( (Ipp32s*)image0,p_step0,size0,
       (Ipp32s*)image1,p_step1,size1,
          0,1,0);


The compilation goes well but the resul is wrong : the first row is correct but the others are not set correctly. So it seems that if we want to handle Ipp32f datas with 32s functions there's something more to do. But I just can't figure it out.

Regards,

Jaonary
0 Kudos
Vladimir_Dudnik
Employee
343 Views
you probably meant h1 = 12 (instead of 10)?
0 Kudos
Reply