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: Assign different grey scale value to different objects
Replies: 8   Last Post: Jul 2, 2012 8:17 AM

Advanced Search

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

Posts: 107
Registered: 2/27/10
Re: Assign different grey scale value to different objects
Posted: Jun 20, 2012 2:19 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"user mat" wrote in message <jrsrha$cp1$1@newscl01ah.mathworks.com>...
> Hi,
>
> %%%%%%%%%%%%%%
> input--> two binary images
> output--> assign different grey scale value to different objects but the values that have assigned in case 1(first binary image) for different object should be similar in case 2 (second binary image)
> %%%%%%%%%%%%%%
>
> case 1:
> for first sequence(bin image) i use bwlabel command to label and count the separate objects in the scene. Let say bwlabel count 3 objects in my scene , and assign value respectively e.g result: (object1--> labe1=1; object2--> label 2 = 2 , object3--> label 3 =3) ,
>
> case2:
> for second binary image i use the same process as in case 1 let say in my second bin image, one of the object detected in case 1 is missing , and now the values are assigned in this way e.g result: (object2--> labe1=1; object3--> label 2 =2).
> Now in case 2 object 1 and object 3 will have different grey scale values as compared to grey scale values in case 1
>
> What i am trying to do here is that detected objects in case 2 should preserve the same grey scale values as in case 1,
> forexample object 2 should have the value 2 (as in case 1 but not the value 1)and object 3 should have the grey scale value 3 (not 2) e.g result: (e.g object2--> labe2=2; object3--> label 3 =3) which is not the case here ?
>
> Any suggestions how can i get the require output ? thanks in advance


I _think_ what you want is imreconstruct. This is assuming that the objects have the same/similar XY coordinates between the two images...and that I'm understanding your question.



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.