Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

find angle frome centroid area output not true

2 vues (au cours des 30 derniers jours)
Adisorn Phanukthong
Adisorn Phanukthong le 21 Fév 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
im = imcrop(BW,[min(columns),min(rows),width,height]);
[r,c] = find(im,1,'first');
theta = atan2(cen(1,1)-c,cen(1,2)-r);
theta = radtodeg(theta);
hold on
plot(cen(:,1),cen(:,2),'b*')
line ([cen(:,1) r],[cen(:,2) c]);
%find center
[y, x] = ndgrid(1:size(BW, 1), 1:size(BW, 2));
cen = mean([x(logical(BW)), y(logical(BW))]);
I use this code find angle use find white area first but some picture has output of angle is 30 not true help me
  1 commentaire
KSSV
KSSV le 21 Fév 2017
If the angle result, is not true; check whether your cen exactly is center or not.

Réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by