From: Jakob on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <htgqvc$1ds$1(a)fred.mathworks.com>...
> ==================
>
> If you need to do this repeatedly on blocks extracted from the same image, it might be helpful to use (in a somewhat non-standard way) my Indexbale Function class
>
> http://www.mathworks.com/matlabcentral/fileexchange/26570-direct-indexing-of-function-calls-oop-exercise
>
> For you this would be
>
> A=IndexableFunction(A);
> VarianceOf1Block = var(A{75:125, 75:125}(:)); %repeat for other blocks

Thank you for the link. Unfortunately I don't really need to do it repeatedly on the same image, just once or twice one the same image (although there is alot if images...).
But I'll keep the link, maybe I'll have use for it later on.

/Jakob
From: Matt J on
"Jakob " <jakob.spang(a)gmail.com> wrote in message <htj6uk$c6u$1(a)fred.mathworks.com>...

> Thank you for the link. Unfortunately I don't really need to do it repeatedly on the same image, just once or twice one the same image (although there is alot if images...).
========

I see. Well, just bear in mind also that if you're using imread() or something to import these images, you can write a wrapper myimread() that will include the transformation A=IndexableFunction(A). Then in your main file you can use the syntax
var(A{...}(:)) with no extra keystrokes.