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: connected components in a grey scale image
Replies: 13   Last Post: May 15, 2008 11:01 AM

Advanced Search

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

Posts: 50
Registered: 2/13/08
Re: connected components in a grey scale image
Posted: May 15, 2008 11:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"us " <us@neurol.unizh.ch> wrote in message <g0hf2r$an4
$1@fred.mathworks.com>...
> "Deo ":
> <SNIP flip-flopping with every new post...
>
> you should THINK before you waste CSSMers time...
> and, why don't you start playing with what we showed you
>
> % the data
> m=[
> 0.09 0.09 0.09
> 0.01 8.00 0.07
> 0.01 9.00 0.06
> 0.09 0.01 7.00 % <- value 1 has changed
> ];
> % the engine
> [mu,mx,mx]=unique(m);
> r=reshape(mx,size(m));
> % the result
> % - note: <mu> contains the unique abs value(s)
> disp(r);
> %{
> 4.00 4.00 4.00 % re-indexed mat
> 1.00 6.00 3.00
> 1.00 7.00 2.00
> 4.00 1.00 5.00 % value 1 is now a 4
> %}
> % -now-
> lab4=bwlabel(r==4)
> % -or-
> labx=bwlabel(r==1|r==4)
> %{
> lab4=
> 1 1 1 % <- connected 4s
> 0 0 0
> 0 0 0
> 2 0 0 % <- another 4
> labx=
> 1 1 1
> 1 0 0
> 1 0 0
> 1 1 0
> %}
>
> us

Dude am very sorry for having wasted your time. But thanks
alot for your help, I have then made the code that finds
and labels connected components in grey scale image.




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.