Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How can I run a loop buy using IF statment on the picture to change the selected pixel to different color?

Subject: How can I run a loop buy using IF statment on the picture to change the selected pixel to different color?

From: Shama1983

Date: 21 Jan, 2013 16:09:09

Message: 1 of 2


Develop a simple algorithm; using MATLAB or any other acceptable SW, to classify the different landscapes within the provided image:

• The algorithm requires first to read the image.
• Then gives a unique pseudo color to areas IF they fall within a similar range to one of the pointed areas in Figure1.
• Finally a one short paragraph short paragraph should be included; with the final result
• Please find the image attached…
The following are some pointers that you might find useful:
1. All colored images consist of three basic layers (colors) è Red, Green and Blue (RGB).
2. All colored images readings doesn’t go below zero (black) è Red = 0, Green=0 and Blue=0.
3. All colored images readings doesn’t go above 255 (white) è Red=255, Green=255 and blue=255.
4. Colors within an image are a combination to a certain degree between red, green and blue.
So what you have to do is make a for loop that runs through the whole image (layer by layer), then make an if condition to assign a new value to the points (pixels) that have the same RGB values as the points pointed out in the image (red arrows).

ð 1 for loop + 4 if conditions
(image + algorithm), about the different classification techniques the recruit should be able to explain one of these techniques.

<<http://im33.gulfup.com/pGca1.jpg>>

Subject: How can I run a loop buy using IF statment on the picture to change the selected pixel to different color?

From: Steven_Lord

Date: 22 Jan, 2013 04:56:33

Message: 2 of 2



"Shama1983 " <shaima.belshalat@gmail.com> wrote in message
news:kdjp75$cmh$1@newscl01ah.mathworks.com...
>
> Develop a simple algorithm; using MATLAB or any other acceptable SW, to
> classify the different landscapes within the provided image:

*snip*

This sounds like a homework question and in general this newsgroup requires
people posting homework questions (or questions that sound like they're
homework, even if they're not) to show what they've done to try to solve the
problem and to ask a SPECIFIC question before the readers will offer any
suggestions. Post the code you've written to try to solve this question and
indicate where EXACTLY you're stuck and someone may offer some assistance.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us