Prev: LEVMAR with MEX
Next: Plot data and dates
From: adaa 4girls on 3 Aug 2010 12:09 hi, I am a computer science student. I'm learning matlab and I'm a beginner in matlab. I want to extract the objects from the sample image. I have outlined the image with the pixel value of 50 and I want the object to be stored in an array as a original image. I need to extract the image without converting the image to binary or index. I want the exact rbg image extracted automatically. Please help me with the code. Thanks in advance.
From: Walter Roberson on 3 Aug 2010 12:19 adaa 4girls wrote: > I am a computer science student. I'm learning matlab and I'm a > beginner in matlab. > I want to extract the objects from the sample image. I have outlined the > image with the pixel value of 50 and I want the object to be stored in > an array as a original image. I need to extract the image without > converting the image to binary or index. I want the exact rbg image > extracted automatically. Please help me with the code. Thanks in advance. Suppose you have a 2D array of logical values, "Mask", with false indicating a pixel you are not interested in, and true indicating a pixel that you are interested in. Then Mask3d = repmat(Mask,1,1,3); would expand that 2D mask into the corresponding 3D mask that you would use to index the original rgb array, ColorImage(Mask3d) Getting from the "outline" to a filled-in mask would be necessary before you did this, but the method of doing that would depend upon how your outline is represented.
|
Pages: 1 Prev: LEVMAR with MEX Next: Plot data and dates |