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: 20   Last Post: Apr 3, 2014 1:29 AM

Advanced Search

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

Posts: 34
Registered: 11/1/11
Re: DIVIDING AN IMAGE INTO SUB BLOCKS
Posted: Feb 21, 2012 11:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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.



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

[Privacy Policy] [Terms of Use]

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