程序代写代做代考 mips 作业 Minecraft-Texturen

作业 Minecraft-Texturen

在本次作业中,您将开发一个 MIPS 汇编程序,包含降低分辨率和降低数字图像

的色彩深度。

程序框架见 vorgabe.s

图像见 Ha01 文件夹

作业 1: Load and save images (7 分)

提示

1. An image can be stored in the memory as an array by continuously storing the

individual lines with image points one behind the other.

2. At the beginning of the image there is also a header, which contains the width,

height and color depth, which is the number of colors.

要求

1. Your program should be able to read and write image files in the PGM format (binary, P5).

a) 提示:To read and write files, QtSPIM, similar, or other operating system, provides

different syscalls. You must calculate the value of the number from a string of digits.

To do this You need an ASCII table.

2. Implement a routine load_img that loads an image and processes the header

3. Also implement a routine store_img that gets the Arguments height and width of the

image and a point from the user data and then generates an image file

作业 2 降低图像分辨率 (7 分)

提示

1. Resolution in each dimension changes by a factor of two, you can calculate a new pixel

from 4 neighboring pixels. For example, the image a0 with a resolution of 2 × 2 pixels can

be calculated from the image a with a resolution of 4 × 4 pixels.

2. Keep in mind that the resolution must also change color values.

要求

1. Implement an routine interpolate2 that reduces the resolution of an image by a factor

of two. The routine receives as arguments

a) the memory address

b) height and width of the image.

2. Implement a routine interpolate that reduces the resolution of an image by a factor of

作业 3 减少颜色深度 (3 分)

提示

1. The given pictures have a Color depth of 8 bits. The reduction in color depth should also

be in 2 的幂 (8 bits, 4 bits, 2 bits,1 bit). 这意味要用

2 的 4 次方 来替换 2 的八次方 Grayscale

要求

1. Implement a routine quantize takes as arguments

a) the memory address of the image,

b) the width / height of the image,

c) and a quantization factor.

作业 4 对比 降低图像分辨率 和 减少颜色深度 解答题

(3 分)

提示:

1. If you want to reduce the resolution as well as the color depth in an image, there are two

possibilities: either first reduce the resolution and then the color depth or otherwise.

问题:中文

1. 尝试两种方式,并说明结果

2. 有区别吗?为什么呢?根据您的程序说明结果。

作业 Minecraft-Texturen
在本次作业中,您将开发一个MIPS汇编程序,包含降低分辨率和降低数字图像的色彩深度。
程序框架见 vorgabe.s
图像见Ha01 文件夹
作业1: Load and save images (7分)
提示
要求
作业2 降低图像分辨率 (7分)
提示
要求
作业3 减少颜色深度 (3分)
提示
要求
作业 4 对比 降低图像分辨率 和 减少颜色深度 解答题 (3分)
提示:
问题:中文