Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

remove this error for adaptive thresholding

Asked by sonu on 25 May 2013

HI i want to used adaptive thresholding on to the image but i have get some error can any one help me to remove this error I = imread('C:\Users\sonu\Desktop\oooooo.png'); figure, imshow(I), title('Original Image'); function y = adapt_thresh(x) y = im2bw(x,graythresh(x)); I_thresh = blkproc(I,[10 10],@adapt_thresh);

ERROR ??? Subscripted assignment dimension mismatch.

Error in ==> blkproc at 89 aa(border(1)+(1:ma),border(2)+(1:na)) = a;

Error in ==> adapt at 7 I_thresh = blkproc(I,[10 10],@adapt_thresh);

0 Comments

sonu

1 Answer

Answer by Image Analyst on 25 May 2013
Edited by Image Analyst on 25 May 2013
Accepted answer

You are aware that there is a built in function to do this (CLAHE) called adapthisteq(), don't you? You don't have to reinvent a version of it (that lacks the contrast limiting benefits of it).

2 Comments

sonu on 25 May 2013

can u plz tell me adapthisteq() is also used for adaptive thresholding

Image Analyst on 25 May 2013

Yes it is. I thought my first response said that.

Image Analyst

Contact us