Resizing an image without smoothing

Resizing an image without smoothing

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.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Hi Alex,

Quoting alexmeloHello, 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 )?

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.

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.

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

Yes - Nearest neighbor is what I wanted, I can't beleive I didn't see it. Thanks for you help.

Quoting alexmeloYes - 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

Leave a Comment

Please sign in to add a comment. Not a member? Join today