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 ;)