一道image processing题# JobHunting - 待字闺中
c*i
1 楼
To be completed in any language
Write a function called enlargeImage which takes as parameters an array of
unsigned 8-bit integers, a width, a height and a scaling ratio. The function
should return an array of unsigned 8-bit integers. In C, the function
signature would look as follows:
unsigned char *enlargeImage(const unsigned char *pixels, const int width,
const int height, const float scalingRatio);
The input and output arrays contain the pixel values for the Y plane of a
YUV image.
The function should enlarge the image by a factor scalingRatio, using
whatever techniques you would like to use to generate the highest quality
output image. You may assume scalingRatio is >= 1.0 and scalingRatio <= 2.0.
If scalingRatio is 1.0, your output should match your input. Aside from the
1.0 case, your function should be optimized to run fastest when
scalingRatio == 2.0.
Write a function called enlargeImage which takes as parameters an array of
unsigned 8-bit integers, a width, a height and a scaling ratio. The function
should return an array of unsigned 8-bit integers. In C, the function
signature would look as follows:
unsigned char *enlargeImage(const unsigned char *pixels, const int width,
const int height, const float scalingRatio);
The input and output arrays contain the pixel values for the Y plane of a
YUV image.
The function should enlarge the image by a factor scalingRatio, using
whatever techniques you would like to use to generate the highest quality
output image. You may assume scalingRatio is >= 1.0 and scalingRatio <= 2.0.
If scalingRatio is 1.0, your output should match your input. Aside from the
1.0 case, your function should be optimized to run fastest when
scalingRatio == 2.0.