由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 一道image processing题
相关主题
帮我看看这两个题目回答这个题有什么好办法。(找出 5^1234566789893943的从底位开始
再发两道F电面题问一个Random Number 问题
二维数组参数怎么传好?问一个有关c++ strcmp的问题
atoi overflow怎么办?看一道面试题
一个C语言概念题问一个关于xor的题
我的几个面试算法解答。C++ question, square root
被鄙视了的C语言题目,找工作真难啊大家看看这几道亚麻面试题怎么做?
GOOGLE 第二轮电面看到一个c的面试题,求教。
相关话题的讨论汇总
话题: function话题: unsigned话题: image话题: const
进入JobHunting版参与讨论
1 (共1页)
c*i
发帖数: 348
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.
c****p
发帖数: 6474
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

f*******y
发帖数: 1148
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

1 (共1页)
进入JobHunting版参与讨论
相关主题
看到一个c的面试题,求教。一个C语言概念题
C++ Q79: What is the size of a pointer? and why?我的几个面试算法解答。
Divide Two Integers被鄙视了的C语言题目,找工作真难啊
probably XOR problemGOOGLE 第二轮电面
帮我看看这两个题目回答这个题有什么好办法。(找出 5^1234566789893943的从底位开始
再发两道F电面题问一个Random Number 问题
二维数组参数怎么传好?问一个有关c++ strcmp的问题
atoi overflow怎么办?看一道面试题
相关话题的讨论汇总
话题: function话题: unsigned话题: image话题: const