Labeling an Image (houghcircle)
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a code that takes an image of coins and draws the respective hough circles around them as well as gives me the circle's radius in a resulting vector. I want to take the radiuses generated in the vector and place them on the respective circle that they align with and I am hvaing an issue doing so. I have tried plotting the values; however, it gives me a different graph. I want the image with the hough circles to have the corresponsing values on that graph as well.Thanks!
Code:
clear all
clc
%Show Image in GrayScale
I = imread('1.png');
imshow(I)
BWI = im2gray(I);
figure
imshow(BWI)
%%Increase Sensitivity if the coins/circles are not found, Make sure radius is correct and includes entire range
[centers,radii] = imfindcircles(BWI,[10 74],'ObjectPolarity','bright', 'Sensitivity',0.93);
viscircles(centers,radii,'color','r')
length(centers)
0 Commenti
Risposte (1)
Maik
il 7 Nov 2022
% Code:
clear all
clc
%Show Image in GrayScale
I = imread('coins.png');
imshow(I)
BWI = im2gray(I);
figure
imshow(BWI)
%%Increase Sensitivity if the coins/circles are not found, Make sure radius is correct and includes entire range
[centers,radii] = imfindcircles(BWI,[8 74],'ObjectPolarity','bright', 'Sensitivity',0.93);
viscircles(centers,radii,'color','r')
length(centers)
% Draw Radius Function
for i = 1:size(centers,1)
line([centers(i,1) centers(i,1)],[centers(i,2) centers(i,2)+radii(i,1)], 'color', 'b' );
end
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Segmentation and Analysis in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!