Error in blkproc function

3 Ansichten (letzte 30 Tage)
Jagadeesh p
Jagadeesh p am 12 Feb. 2012
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Feb. 2012
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 Kommentare
Jagadeesh p
Jagadeesh p am 13 Feb. 2012
***'index.jpg'
Walter Roberson
Walter Roberson am 13 Feb. 2012
b=blkproc(y,[2 2],@(x)min(x(:));

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by