add a field to structure

2 vues (au cours des 30 derniers jours)
Peyman Obeidy
Peyman Obeidy le 12 Oct 2017
Commenté : Peyman Obeidy le 12 Oct 2017
Sat1=regionprops(MaskIm, {'Area', 'Eccentricity', 'EulerNumber', 'MajorAxisLength', 'MinorAxisLength', 'Orientation', 'Perimeter'});
How to divide MajorAxisLength with MinorAxisLength and then add it to Sat1 structure under 'AspectRatio' name?

Réponse acceptée

KSSV
KSSV le 12 Oct 2017
MaskIm = imread('text.png');
Sat1=regionprops(MaskIm, {'Area', 'Eccentricity', 'EulerNumber', 'MajorAxisLength', 'MinorAxisLength', 'Orientation', 'Perimeter'});
AR = [Sat1.MajorAxisLength]./[Sat1.MinorAxisLength] ;
[Sat1.AspectRatio] = deal(AR) ;
  6 commentaires
Peyman Obeidy
Peyman Obeidy le 12 Oct 2017
I am trying to filter out noise (scanning pattern) on my negative control image (attached).

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by