- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo,
I don't understand the way behind ippiResize_32f_C1R IPPI_INTER_LINEAR (IPP 5.1 or 7).
e.g. I have 2x2 image and resize to 1x1
0 0 = > 1
0 1
1 0 = > 0
0 0
0 1 = > 0
0 0
0 0 = > 0
1 0
normally I expact in all cases
1 0 = > 0.25
0 0
The call is:
CSignal_2d_float src(2,2);
CSignal_2d_float dst(1,1);
src.GetAdr()[0] = 1;
src.GetAdr()[1] = 0;
src.GetAdr()[2] = 0;
src.GetAdr()[3] = 0;
IppiSize s = {src.Sizex(),src.Sizey()};
IppiRect sr = {0,0,src.Sizex(),src.Sizey()};
IppiSize d = {dst.Sizex(),dst.Sizey()};
IppStatus res = ippiResize_32f_C1R(
src.GetAdr(),
s,
src.Sizex()*sizeof(float),
sr,
dst.GetAdr(),
dst.Sizex()*sizeof(float),
d,
0.5,
0.5 ,
IPPI_INTER_LINEAR);
Thank youe
Andre Betz
I don't understand the way behind ippiResize_32f_C1R IPPI_INTER_LINEAR (IPP 5.1 or 7).
e.g. I have 2x2 image and resize to 1x1
0 0 = > 1
0 1
1 0 = > 0
0 0
0 1 = > 0
0 0
0 0 = > 0
1 0
normally I expact in all cases
1 0 = > 0.25
0 0
The call is:
CSignal_2d_float src(2,2);
CSignal_2d_float dst(1,1);
src.GetAdr()[0] = 1;
src.GetAdr()[1] = 0;
src.GetAdr()[2] = 0;
src.GetAdr()[3] = 0;
IppiSize s = {src.Sizex(),src.Sizey()};
IppiRect sr = {0,0,src.Sizex(),src.Sizey()};
IppiSize d = {dst.Sizex(),dst.Sizey()};
IppStatus res = ippiResize_32f_C1R(
src.GetAdr(),
s,
src.Sizex()*sizeof(float),
sr,
dst.GetAdr(),
dst.Sizex()*sizeof(float),
d,
0.5,
0.5 ,
IPPI_INTER_LINEAR);
Thank youe
Andre Betz
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some time ago I did atest...
Source Image ( 12x12 / floats ):
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
0.0 1.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0
0.0 1.0 2.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0
0.0 1.0 2.0 3.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0
0.0 1.0 2.0 3.0 4.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 6.0 6.0 6.0 6.0 6.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 7.0 7.0 7.0 7.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 8.0 8.0 8.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 9.0 9.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 10.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0
Output Image ( 6x6 / floats ):
0.25 0.50 0.50 0.50 0.50 0.50
0.50 2.25 2.50 2.50 2.50 2.50
0.50 2.50 4.25 4.50 4.50 4.50
0.50 2.50 4.50 6.25 6.50 6.50
0.50 2.50 4.50 6.50 8.25 8.50
0.50 2.50 4.50 6.50 8.50 11.25 <- ??.??
and I also have a question:
How does'ippiResize_32f_C1R' functioncalculate a right-bottom corner value?
Best regards,
Sergey
Source Image ( 12x12 / floats ):
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
0.0 1.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0
0.0 1.0 2.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0
0.0 1.0 2.0 3.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0
0.0 1.0 2.0 3.0 4.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 6.0 6.0 6.0 6.0 6.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 7.0 7.0 7.0 7.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 8.0 8.0 8.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 9.0 9.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 10.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0
Output Image ( 6x6 / floats ):
0.25 0.50 0.50 0.50 0.50 0.50
0.50 2.25 2.50 2.50 2.50 2.50
0.50 2.50 4.25 4.50 4.50 4.50
0.50 2.50 4.50 6.25 6.50 6.50
0.50 2.50 4.50 6.50 8.25 8.50
0.50 2.50 4.50 6.50 8.50 11.25 <- ??.??
and I also have a question:
How does'ippiResize_32f_C1R' functioncalculate a right-bottom corner value?
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
ippiResize_ functionsare deprecated in IPP 7.0, please use ippiResizeSqrPixel_32f_C1R function instead of ippiResize_32f_C1R.
Best regards,
Valentin
ippiResize_
Best regards,
Valentin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Valentin,
I expected such a response.Two software developers had indentical problems and their questions were
related to analgorithm that 'ippiResize_...' uses and how it calculates corner values, especially for the case with 2x2 pixelsimage.
The questions arestill not answered.
Best regards,
Sergey
I expected such a response.Two software developers had indentical problems and their questions were
related to analgorithm that 'ippiResize_...' uses and how it calculates corner values, especially for the case with 2x2 pixelsimage.
The questions arestill not answered.
Best regards,
Sergey

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