Manual thresholding cropping [image processing]
이전 댓글 표시
Hi. May i know if manual thresholding allows autocropping? where i set T a value, bw = im2bw(J,T);
because usually auto thresholding was done with autocropping. but i was told me to set a value for my image instead of using graythresh.
답변 (1개)
Image Analyst
2012년 11월 8일
0 개 추천
Cropping and thresholding are two totally separate and independent operations. One operation does not need, depend on, allow, or enable the other operation at all. I would not say that autothresholding is usually done with autocropping - not in general, though it may be in some specific situation you maybe referring to, like your co-worker's program. You can use graythresh() if you want to determine a threshold value, though in my experience it seldom selects the best threshold. It seems to work best for high contrast situations where foreground and background are well separated in the histogram (i.e., they have vastly different intensities).
댓글 수: 4
Esther
2012년 11월 8일
Image Analyst
2012년 11월 8일
graythresh() determines a threshold from the image using the famous Otsu method. It's not a gray level but a normalized gray level in the range 0-1. im2bw() also wants a threshold in the range 0-1. If you have a gray level that's uint8, you have to divide it by 255 to get it into the 0-1 range.
I have no idea what you mean by autocropping. Did you use imcrop() or some other method to do autocropping? What is "auto" about it?
Image Analyst
2012년 11월 8일
You mean like
submatrix = fullMatrix(row1:row2, col1:col2);
? What about this threw an exception?
카테고리
도움말 센터 및 File Exchange에서 Image Thresholding에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!