avatar
一道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.
avatar
c*p
2
==2.0的时候直接右移吧,省了double型乘法了

function

【在 c*i 的大作中提到】
: 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

avatar
f*y
3
用金字塔算法?

function

【在 c*i 的大作中提到】
: 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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。