I want to Segment highlighted round area from given below image using matlab code. Can anyone Help ?
Show older comments
Answers (2)
Akira Agata
on 1 Nov 2017
Edited: Akira Agata
on 1 Nov 2017
Checking the gray-scale level of the bright area, it was found to be >~224, as shown below.

So, by extracting the area where gray-scale level > 224, the highlighted area will be extracted, as below.
% Read the image
I = imread('Screenshot.png');
I = rgb2gray(I);
% Extract I > 224
BW = I > 224;
% Show the result
imshowpair(I,BW,'montage')

5 Comments
Kartik Thakkar
on 2 Nov 2017
Edited: Kartik Thakkar
on 2 Nov 2017
Image Analyst
on 2 Nov 2017
To get the region outside the circle, simply invert the mask:
outerRegion = ~BW;
Kimo Kalip
on 26 Jun 2018
How did you create that gray-scale level representation? (That allows you to see the level and whatnot?) Also, as an aside, is it rude to comment on older posts? If so, I'll stick to creating new questions.
Image Analyst
on 27 Jun 2018
I don't know for sure but the gray level image he started with looked like it was arrived at with a morphological closing with much too large of a kernel.
It's not rude to comment on old posts, though be aware that the original poster may be long gone and never respond. Kartik's post was almost 8 months ago and he may not answer. You may get more help just starting your own thread and posting a link to an earlier thread of another person if you think that could help people give an answer to your post.
Kimo Kalip
on 27 Jun 2018
Got it, thanks! Wondering if I can see gray levels on an image itself maybe. Recently I've just been playing with thresholds to get a feel of what tends to disappear and what stays when manipulating the numbers and the < and > signs. I'll open my own thread if I have more questions, thanks!
Image Analyst
on 1 Nov 2017
0 votes
See my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc It goes over that plus more.
Categories
Find more on Image Arithmetic 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!
