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

Resizing an image without smoothing

alexmelo
초급자
1,427 조회수
Hello, I'm trying to reize an image, similar to the function of ippiResizeSqrPixel but without any smoothing. I want to basically scale each pixel by a specified amount. Is there a function in IPP for this? Thanks.
0 포인트
7 응답
Chao_Y_Intel
중재자
1,427 조회수

Hello,

Can you check new the IPP 7.1 interfaces on the resize function, and see how it works for you?

http://software.intel.com/en-us/articles/intel-ipp-71-resize-changes/

For scale the image pixel, I think you may call a separated function after the resize.

Thanks,
Chao

0 포인트
SergeyKostrov
소중한 기여자 II
1,427 조회수
Hi Alex,

Quoting alexmelo
Hello, I'm trying to reize an image, similar to the function of ippiResizeSqrPixel but without any smoothing. I want to basically scale each pixel by a specified amount. Is there a function in IPP for this? Thanks.


Did you try to use a Linear Interpolation ( IPPI_INTER_LINEAR )?

0 포인트
alexmelo
초급자
1,427 조회수
Yes, linear still gives me interpolated pixels. Does anyone know if IppiScale is appropriate here? the docs make me think its for converting between bit depths rather than pixel scaling. Any other ideas? Or should I just do it manually? Thanks.
0 포인트
alexmelo
초급자
1,427 조회수
Thanks Chao but the new version doesn't mention scaling without interpolation. I think it must either be a different function than resize or not supported.
0 포인트
Jeffrey_M_Intel1
1,427 조회수

You are right about ippiScale -- it is for converting individual pixel values to different bit depths. For example, ippiScale_8u32f_C1R with vmin of 0.0 and vmax of 1.0wouldconvert the 0-255(integer) data from the single channel image to floating point values between 0 and 1.

There are many choices for interpolation mode since there are tradeoffs between quality and speed. Since you specifically don't want interpolation, I wonder if nearest neighbor interpolation mode might be closer to what you want. (IPPI_INTER_NN for ippiResizeSqrPixel.) The idea behind this algorithm sounds very close to your description, and at least in my tests I'm not seeing interpolated values using this mode.

Best regards,

Jeff

0 포인트
alexmelo
초급자
1,427 조회수
Yes - Nearest neighbor is what I wanted, I can't beleive I didn't see it. Thanks for you help.
0 포인트
SergeyKostrov
소중한 기여자 II
1,427 조회수
Quoting alexmelo
Yes - Nearest neighbor is what I wanted, I can't beleive I didn't see it. Thanks for you help.


This is a Feature Request and please consider two additional modes:

IPPI_NOINTER_UPSAMPLE ( scale factors: 2x, 4x, etc )
IPPI_NOINTER_DOWNSAMPLE ( scale factors: 0.5x, 0.25x, etc )

Best regards,
Sergey

0 포인트
응답