the following code is used by me
y=imread('index.jpg');
b=blkproc(y,[2 2],@(x)min(min(x)));
whos b
It reports An error:
??? Subscripted assignment dimension mismatch.
Error in ==> blkproc at 89
aa(border(1)+(1:ma),border(2)+(1:na)) = a;
Error in ==> prog1 at 3
b=blkproc(y,[2 2],@(x)min(min(x)));
I am unable to get rid of that error.. PLS help me

 채택된 답변

Walter Roberson
Walter Roberson 2012년 2월 12일

1 개 추천

Please check whether your "y" is 2 dimensional (a grayscale image) or 3 dimensional (a truecolor image).
JPEG files cannot store indexed images so we know that y cannot be 2 dimensional representing color.
If y is 3 dimensional then your min(min()) is going to return a vector rather than a scalar.

댓글 수: 3

Jagadeesh p
Jagadeesh p 2012년 2월 13일
Thank u so much.It is working for gray images but i have considered rgb image ie "index.jog"..it is showing error which i mentioned above. Can u pls help me out
Jagadeesh p
Jagadeesh p 2012년 2월 13일
***'index.jpg'
Walter Roberson
Walter Roberson 2012년 2월 13일
b=blkproc(y,[2 2],@(x)min(x(:));

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by