代写C代码 代做C程序 C辅导 C家教

远程写代码 Debug 讲解答疑 不是中介,本人直接写

微信: ittutor QQ: 14061936 Email: ittutor@qq.com

导航

Q.1(30 marks) Programming
Write a program that reads a grayscale image in raw format from a file; resize the image to a specifiedresolution using the single point resampling method; and save the new image into a new file in rawformat. Test your program with the following data:
a) Input image filename:“rose.rawFormat: grayscale
Original resolution:256x2560
New resolution:500x500b) Input image filename:“rose.raw'
Format: grayscale
Original resolution:256x256
New resolution:1000x1000
c) Inputimage filename: “museum.raw
Format: grayscale
Original resolution:1280x9600
New resolution:640x480
d)Input image filename:“museum.raw
Format: grayscale
Original resolution: 1280x960
New resolution:320x240
e) Inputimage filename:“museum.raw
Format: grayscale
Original resolution:1280x960New resolution:160x120
Q.2(30 marks) Programming
Repeat Q.1, but using the weighted average resampling method.
Q.3(30 marks) Programming
Write a program that reads "rose.raw" as the input image; change the intensity quantization level; andsave the new image into a new file in raw format. The original image uses 8 bits per pixel, thus having256 intensity levels. Test your program by converting intensity level to the following 4 new levelsrespectivfely:
128 levels (by setting the least significant bit of each pixel to 0)e.g. if a pixel's original value in binary is 10110101, the new value will be 101101002.64 levels (by setting the two least significant bits of each pixel to 0's)432 levels (by setting the three least significant bits of each pixel to 0's)416 levels (by setting the four least significant bits of each pixel to 0's)

相关推荐