extract image from segmentation and overlay it

i have to extract the person from the image(mask_crop.png) and overlay it to the other pgm(sample.zip) image. i have already tried thresholding based extraction and intensity based overlay. The results were not that good. Please find the two images attached.

 Respuesta aceptada

Image Analyst
Image Analyst el 7 de Jul. de 2017

0 votos

4 comentarios

prashant singh
prashant singh el 9 de Jul. de 2017
Thanks for the answer @ImageAnalyst ... Although i have still issue with how can i extract certain portion of the image without manually cropping it. I have a logical segmented mask image and i want to crop that portion of the image where the value is 1.
Image Analyst
Image Analyst el 9 de Jul. de 2017
I don't know what you mean. You already have a person segmented (extracted) out. It's 1 where the person is and 0 where the person is not. And the image is not cropped to the bounding box of that person. So to me it seems like it already is extracted without cropping, but it seems you have a different definition. What is it? Post an image of what you want. By the way, cropping is not really even needed.
Aisha
Aisha el 6 de Oct. de 2017
Editada: Image Analyst el 6 de Oct. de 2017
I have the same issue. Here is the sample image, which we want as result:
I have a binary prediction map, which I want to overlay on original image with transparency to see how good the segmentation results are. I have looked into alpha property and also tried imoverlay function. The alpha property method does not work, and imoverlay() overlay maps the binary image as a solid color, thus hiding the original image at pixels positions where the binary map is 1.
Image Analyst
Image Analyst el 6 de Oct. de 2017
Please post your binary image and your original RGB image, preferably as a new question with you as the original poster. The alpha method should work. Not sure what you did but if you post your images, we'll get it working.

Iniciar sesión para comentar.

Más respuestas (1)

Sanjana
Sanjana el 11 de Feb. de 2024
Editada: Walter Roberson el 19 de Feb. de 2024
Hi I have totally opposite doubt, Actually Im working with this code which overlays the sematic segmented image over the original image. But i want to extract only the sematic image. How can i do so?
C = semanticseg(I,net);
cmap = camvidColorMap;
B = labeloverlay(I,C,'Colormap',cmap,'Transparency',0.4);
figure
imshow(B)
pixelLabelColorbar(cmap, classes);

1 comentario

Save I and C to a .mat file and attach the file here with the paperclip icon.
save('Sanjana.mat', 'I', 'C');

Iniciar sesión para comentar.

Preguntada:

el 7 de Jul. de 2017

Comentada:

el 19 de Feb. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by