Hi,how can I remove red circle places

Réponses (2)

Image Analyst
Image Analyst le 28 Oct 2015

0 votes

You could use imfreehand() and then poly2mask() and then erase them. If you knew what distinguishes them from the other blob and parts of blobs, then you might be able to do it automatically but it looks like your segmentation is probably not good. Can you post the original image that you got this from and point out what parts you want to segment out?

2 commentaires

zeynep yilmaz
zeynep yilmaz le 28 Oct 2015
Image Analyst
Image Analyst le 28 Oct 2015
As I suspected, your segmentation algorithm is no good, or only partially complete. The wall and the trees should not be in there. You will have to improve/finish your segmentation algorithm, like, look for certain textures or colors, or colors surrounded by other colors (gray for sidewalk), etc. It's not going to be an easy task. Even if you solved it for this one image, it may not be robust to other images with other problems like pedestrians in the way, rain and the reflections that might cause, leaves and/or shadows covering the walkway, etc. It's certainly a ton more work than I can do for you here. Good luck though.

Connectez-vous pour commenter.

Thorsten
Thorsten le 28 Oct 2015
You can specify the coordinates of a rectangle that covers the part you want to remove and set it to 0, e.g., for the upper left something like
B(1:150,1:200) = 0; % numbers 1,150 and 1,200 to be adapted for your region

Community Treasure Hunt

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

Start Hunting!

Translated by