Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 (60 points) Write a MIPS program (which must be named as hw4_prob2.s) that will 1) read in an image name (gray level image

image text in transcribedProblem 2 (60 points) Write a MIPS program (which must be named as hw4_prob2.s) that will 1) read in an image name (gray level image in binary format), the number of rows and the number of columns, 2) read in the image (must be implemented using a function), 3) compute its histogram (must be implemented using a function), and 4) then output the histogram (must be implemented using a function). You can use the provided program (test_histogram.s on the class web site) for 1) and 2). You can assume the image size is no larger than 500x500. Then you need to test your program using three different cases and include the results in the pdf file you need to submit. You can use the three images that can be found on the class web site at http://www.cs.fsu.edu/~liux/courses/cda3100/assignments/seminoles_tiny.bin, http://www.cs.fsu.edu/~liux/courses/cda3100/assignments/seminoles.bin, and http://www.cs.fsu.edu/~liux/courses/cda3100/assignments/lena.bin. Additional information: The histogram of an image is widely used to characterize the image in content-based retrieval and other applications. It counts the number of occurrences of all the pixel values (0 255 in this case). The following C/C++ function computes the histogram of the input image.

/* Here image is the starting address of image. which has nrow rows and ncol column h is the histogram of the image. s. int histogram (unsigned char Himage, int nrow, int ncol, int *h) int i. j. k: unsigned char *p: for (i:0; i 256; i++) p image ; for (i:0; i nrow; i++) { j++) for (j=0; j ncol; { return k

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions