Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: DIVIDING AN IMAGE INTO SUB BLOCKS
Replies: 19   Last Post: May 2, 2012 3:02 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
baran

Posts: 6
Registered: 4/30/12
Re: DIVIDING AN IMAGE INTO SUB BLOCKS
Posted: May 2, 2012 3:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <0bc34147-dd8c-44bb-ad0a-aacfefac0ebf@g27g2000yqa.googlegroups.com>...
> On Feb 10, 12:44 pm, "sanyukta " <sanyuktacheti...@gmail.com> wrote:
> > Thanks..I have used mat2cell function and got a total of p=25 blocks.So each block has q=100x100 elements.Next,I want to concatenate all the elements of the block to give a vector to represent one block resulting in a matrix x=[x1,x2,....xp]of size qxp.How to do?
>
> ----------------------------------------------------------------------------------------------
> If I understand you correctly you want to take one particular block
> and concatenate all the elements of that block go give a 1D vector.
> To do that you just do:
>
> m = rand(500,500); % Sample data 500x500
> divisions = [100 100 100 100 100];
> % Chop up into 100x100 cells.
> mCell = mat2cell(m, divisions, divisions)
> % Pull out one particular cell - it will be a 100x100 array.
> thisBlock = mCell{2,4}; % Or whatever indexes you want.
> % Concatenate into vector 10000 elements long.
> columnVector = thisBlock(:);


-------------------------------------------------------------------------------------------
how it is possible to find out in the image which blocks are similar to each other? if one block is copied and pasted in another place in same image.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.