- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to use IPP libraries for 1-d interpolation, as mentioned in some of the post in forum to use ippresize for sinle row to get the 1-d interpolation.
my code is as follows,
I am trying to use IPP libraries for 1-d interpolation, as mentioned in some of the post in forum to use ippresize for sinle row to get the 1-d interpolation.
my code is as follows,
[bash]Ipp32f image_temp[] = { 1 ,2 ,3,4,5,6,7,8,9,10,11,12}; rows = 1;cols=12; newrows = 1;newcols = 34; size.width = cols; size.height = rows; roi.x=0; roi.y=0; roi.width=cols; roi.height=rows; step = cols*sizeof(float); newstep = newcols*sizeof(float); newsize.width=newcols; newsize.height=newrows; image_new=(float *) calloc(newrows*newcols, sizeof(float)); if(image_new == NULL){printf("Unable to allocate memory for image_new \n"); exit(1);} xfactor=(float)newcols/cols; yfactor=(float)newrows/rows; status= ippiResize_32f_C1R((float*)image_temp, size, step, roi, (float*)image_new, newstep, newsize, xfactor, yfactor,IPPI_INTER_CUBIC); if ( status != ippStsNoErr ) { exit(1); }
The results are,1.0000 1.0000 1.0000 2.0000 2.0000 2.0000 3.0000 3.0000 4.0000 4.0000 4.0000 5.0000 5.0000 5.0000 6.0000 6.0000
6.0000 7.0000 7.0000 8.0000 8.0000 9.0000 9.0000 9.0000 10.0000 10.0000 10.0000 11.0000 11.0000 12.0000 12.0000 0.0000
Which somehow are truncated ??
Thanks ,
Suresh
[/bash]
Link Copied
0 Replies

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