I don't understand why when trying to access the pixel values of this image i get different values using impixel() vs accessing the matrix of the bianrized and thinned image which is a logical matrix. The impixel() values are the correct ones while the normal matrix accessing gives me the wrong values different from both the impixel() method and viewing the imagematrix in the matlab workspace. I cannot use impixel() in my code because it slows down the code considerably, can anyone give me a workaround to get the correct pixel values without using impixel(). By the way i used imbinarize() for binarization and bwmorph() for thinning with the method set to thin.
This is the thinned image and this is the code
thinImg(372:374, 207:209)impixel(thinImg, 372:374, 207:209)
Assuming the image is called thinImg. Please help, I have tried everything and reserched everywhere but no results.
Thanks.
Best Answer