"user mat" wrote in message <email@example.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.