Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Error with regionprops, Expected input number 1, PROPERTIES, to match one of these values:

2 visualizzazioni (ultimi 30 giorni)
Hello, i'm trying to get the MinorAxisLength from a serie of images via regionprops function with a for loop and i'm getting a bunch of errors that i dont know how to solve.
Section of my code:
for z = 1: 4
Image_stats(z).Bloque3 = regionprops (Image_thr(z).Bloque2, 'MinorAxisLenght');
end
This are the errors i get from Matlab:
Error using regionprops>getPropsFromInput (line 1447)
Expected input number 1, PROPERTIES, to match one of these values:
'LabelName', 'Area', ...
The input, 'MinorAxisLenght', did not match any of the valid values.
Error in regionprops>ParseInputs (line 1412)
reqStats = getPropsFromInput(startIdxForProp, ...
Error in regionprops (line 248)
[I,requestedStats,officialStats] = ParseInputs(imageSize, argOffset, args{:});
Error in script_detectar_desgaste (line 53)
Image_stats(z).Bloque3 = regionprops (Image_thr(z).Bloque2, 'MinorAxisLenght');
I have to say that before trying to get the values this way, i used the following code and worked, but i wanted to make it more efficient with a loop:
Image_stats1 = regionprops (Image_thr1, 'MinorAxisLength');
Image_stats2 = regionprops (Image_thr2, 'MinorAxisLength');
Image_stats3 = regionprops (Image_thr3, 'MinorAxisLength');
Image_stats4 = regionprops (Image_thr4, 'MinorAxisLength');
Thanks for reading and sorry if my english is a little bad. Grettings from Spain ;)
  1 Commento
Alvar Fuente Castrillo
Alvar Fuente Castrillo il 19 Ott 2021
Modificato: Alvar Fuente Castrillo il 20 Ott 2021
Already answered my self, sorry to to bother you guys, MinorAxisLength was spelled wrong hahahha
The little errors are the ones that kill me :)

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by