Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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 个评论
Alvar Fuente Castrillo
编辑:Alvar Fuente Castrillo 2021-10-20
Already answered my self, sorry to to bother you guys, MinorAxisLength was spelled wrong hahahha
The little errors are the ones that kill me :)

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by