Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: DIVIDING AN IMAGE INTO SUB BLOCKS
Replies: 20   Last Post: Apr 3, 2014 1:29 AM

 Messages: [ Previous | Next ]
 sanyukta Posts: 34 Registered: 11/1/11
Re: DIVIDING AN IMAGE INTO SUB BLOCKS
Posted: Feb 21, 2012 11:23 AM

"Matt J" wrote in message <jhoqge\$k4e\$1@newscl01ah.mathworks.com>...
> "sanyukta " <sanyuktachetia01@gmail.com> wrote in message <jhofn4\$jcq\$1@newscl01ah.mathworks.com>...
> >
> > > Maybe if you explained what a "self-organizing map" is.
> > It is a technique in artificial neural network to convert a high dimensional data to a low dimensional data.This technique is called an unsupervised technique as the learning is based only upon the input data and is independent of the desired output data.Like in feedforward network,which is a supervised technique,we provide both the input and the target and then train the network but in case of self organizing map(SOM),we provide only the input but the output is decided by the network itself and hence it is called a unsupervised technique.
> ==================
>
> Alright, I take it back. Explaining what a self-organizing map is isn't going to help at all.
>
> Look, you've been shown how to take a 500x500 numeric array and split it up into a 5x5 cell array of 100x100 blocks. Explain to us what you want next in two steps:
>
> (1) How do you want each of the 100x100 blocks processed? Do you want them straightened out into row vectors? Into column vectors? You can do either one using cellfun
>
>
> EachCellColumn = cellfun(@(c) c(:), a2,'uni',0);
> EachCellRow = cellfun(@(c) c(:).', a2,'uni',0);
>
>
>
>
> (2) Once you've transformed each of the 100x100 blocks, how do you want them consolidated back into a numeric array?. Do you want them stitched together as is, e.g.
>
> cell2mat(EachCellRow)
> cell2mat(EachCellColumn)
>
> or do you want them stacked in some way,e.g.,
>
> cell2mat(EachCellRow(:))
> cell2mat(EachCellColumn(:))
>
> Note that the final option is equivalent simply to a2(:).

I have used
EachCellColumn = cellfun(@(c) c(:), a2,'uni',0);
and I got the result as

<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>

<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>

<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>

<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>

<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>
<10000x1 uint8>

but I want it to be 10000x25.

Date Subject Author
2/10/12 sanyukta
2/10/12 Steven Lord
2/10/12 sanyukta
2/10/12 Matt J
2/10/12 ImageAnalyst
2/11/12 sanyukta
2/11/12 Matt J
2/17/12 sanyukta
2/18/12 Matt J
2/18/12 sanyukta
2/18/12 Matt J
2/20/12 sanyukta
2/21/12 Steven Lord
2/21/12 sanyukta
2/21/12 Matt J
2/22/12 sanyukta
2/22/12 Matt J
2/24/12 sanyukta
5/2/12 baran
2/10/12 Matt J