Kindly, help me to understand the given MIPS programming problem

In summary, the task is to recognize the food type in a given BMP image by calculating the mode of a specific color component and comparing it with previously computed constant mode values. The purpose of the given table is unclear and further clarification from the instructor is recommended.
  • #1
user366312
Gold Member
89
3
Homework Statement
I am given a project of MIPS assembly programming. But, I am not being able to understand what it says.
Relevant Equations
Histogram, and Mode.
The input BMP image (24-bit RGB) contains one of three food types from the given set
(Table 1). Your task is to recognize the food and print in the console window its three-
character code given in Table 1.
The recognition should be performed in two three steps:
1. Preparation of the histogram of given color component (table 1). The histogram
contains number of pixels for each value of given color component.
2. Based on the histogram the mode should be calculated. Mode of a set of data values
is the value that appears most often.
3. Mode ranges of images belonging to different food types are different. So, you can
make decision which food type the image should be assigned to.
243397

I don't think I understood the problem clearly.

What I understood is this:
1. Each food item has a specific major color-component (and, hence, a fixed mode-value of that specific color component). First, I need to calculate all mode values, and use them as constants in my program.
2. When I am given a sample image as an input, 1st I need to see which component is major (based on its mode-value).
3. Then, I need to compare that mode-value with previously computed constant mode values.
4. Closest one matches the food.

Am I correct?

If that is so, what is the purpose of that table with 12 rows? What is it given for?

Especially, take a look at 11th row of the table where all pictures are red, but says green-component.
 

Attachments

  • mips_projects.pdf
    272.2 KB · Views: 261
Last edited:
Physics news on Phys.org
  • #2
Problem doesn't seem to be clearly stated to me. What I get from the description (in the PDF) is that you are given an image file of 200px across by (up to) 200px down. Part of the file is the image data, which shows the colors used in each pixel, in 24 bits. I'm guessing that your program needs to find the image data, and then go through it pixel by pixel, figuring out what is the major color component.

I don't know what the purpose of the table is, nor do I know why the 11th says green component, but possibly the green component is the strongest and it's mixed with some amounts of red and blue.

I would advise you to get clarification from your instructor.
 

1. What is MIPS programming?

MIPS (Microprocessor without Interlocked Pipeline Stages) is a type of computer architecture that is commonly used in embedded systems and microcontrollers. It is also used in some personal computers and gaming consoles.

2. How does MIPS programming differ from other programming languages?

MIPS programming is a low-level language that is specific to the MIPS architecture. It uses a simplified instruction set and is designed to be efficient and fast. Other programming languages, such as Java or Python, are high-level languages that are more abstract and can be used on different types of computer architectures.

3. What are the benefits of using MIPS programming?

MIPS programming allows for direct access to hardware resources, making it ideal for applications that require precise timing or low-level control. It is also relatively easy to learn and has a smaller instruction set compared to other assembly languages.

4. How do I approach a MIPS programming problem?

To solve a MIPS programming problem, it is important to understand the problem statement and the desired outcome. Then, break down the problem into smaller, manageable steps and use the MIPS instruction set to write code that will achieve the desired outcome.

5. What resources are available for learning MIPS programming?

There are many online tutorials, books, and courses available for learning MIPS programming. Additionally, most MIPS processors come with a user manual that includes information on the instruction set and programming examples. It can also be helpful to join online communities or forums where you can ask for help and learn from others' experiences.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
13K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
6
Views
485
  • Engineering and Comp Sci Homework Help
Replies
1
Views
575
  • Engineering and Comp Sci Homework Help
Replies
3
Views
4K
Back
Top