Orange Color isolate from the image

13 views (last 30 days)
Arch Man
Arch Man on 9 Oct 2016
Commented: Image Analyst on 10 Oct 2016
Hello I am new in Image process can you help me please hoe can I isolate the orange color from the picture and show the orange component?

Answers (3)

Walter Roberson
Walter Roberson on 9 Oct 2016
Image Analyst
Image Analyst on 10 Oct 2016
Here is a site you'll find interesting.
It lets you click on a color in a palette and gives you the various names for it in different languages. Or you can type in the name and see the color and other names for it in other languages:

Sign in to comment.

Jakub Rysanek
Jakub Rysanek on 9 Oct 2016
You can define a set of RGB codes that define "orange" color and then apply image thresholding like this:
% Load image from a file
img = imread('photo.jpg');
red_layer = img(:,:,1);
green_layer = img(:,:,2);
blue_layer = img(:,:,3);
% Define RGB code range for orange color
threshold_red = 255;
threshold_green = [130 165];
threshold_blue = 0;
% Apply thresholds
orange_pos = red_layer==threshold_red & ...
green_layer>=threshold_green(1) & ...
green_layer<=threshold_green(2) & ...
orange_pos gives you 0/1 indication of orange color per pixel.
Walter Roberson
Walter Roberson on 10 Oct 2016
Jakub's definition of "orange" relies upon Red exactly 255 and Blue exactly 0, and Green between 130 and 165. If the "orange" in Izziddin Banimenah's images happened to have Red 254 or Blue 1, then Jakub's code would not find those regions. This is not a bug in Jakub's code: it is a problem with the meaning of "orange" not being specified by Izziddin Banimenah.

Sign in to comment.

Image Analyst
Image Analyst on 9 Oct 2016
Try the color thresholder app on the Apps tab of the tool ribbon. Or else see my File Exchange for color segmentation demos.


Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!