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

 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

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

Date Subject Author
6/20/12 qureshi 497
6/20/12 Jeff
6/21/12 qureshi 497
6/22/12 qureshi 497
6/24/12 ImageAnalyst
6/26/12 qureshi 497
6/27/12 ImageAnalyst
6/28/12 qureshi 497
7/2/12 qureshi 497