Image segmentation - Specify an area of interest
Show older comments
Hi guys,
I have two images ('A' and 'B'). On the first image 'A' there are circle-shaped objects e.g. those chips. What I did so far is to identify those objects with their information about coordinates and radii. Here is the toy-code for the first part:
rgb = imread('coloredChips.png');
figure
imshow(rgb)
d = imdistline;
delete(d);
gray_image = rgb2gray(rgb);
imshow(gray_image);
[centers, radii] = imfindcircles(rgb,[20 25],'ObjectPolarity','dark')
[centers, radii] = imfindcircles(rgb,[20 25],'ObjectPolarity','dark', ...
'Sensitivity',0.9)
imshow(rgb);
h = viscircles(centers,radii);
Based on the information about the position and radii in 'A', I want to run a second edge detection algorithm on image 'B' to identify there a circle-shaped object, that lies somewhere within the object of the first picture 'A'. Both images has the same dimension.
Objective: Get the coordinates and radii of the objects in image 'A' and the same for image 'B'.
My thoughts: My idea was to draw rectangles around the main object in 'image' B and make the background black. This is not the best solution but it would reduce the running time.
Do you have any hints for me, how to solve this problem?
Thanks a lot.
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

