Hi Raza,
I was stuck on the same problem as you however, mine was the opposite. Instead you can try [0 1] which would make sense for a scalar quantity. The array that you defined for your pixel labels is an RGB triplet value which is what I should have done and it works for me. So if anyone else is having the same error as you, they just need to define each label's absolute scalar value as [x x] while if someone is having the opposite problem, they can try [x y z; x y z], where x y and z are the RGB absolute values.
4 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_743881
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_743881
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_744263
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_744263
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_745097
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_745097
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_745467
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/478979-labelling-image-but-getting-error-during-overlay#comment_745467
Sign in to comment.