Identify and refill dark spots on the leopard with neighboring pixels

8 visualizaciones (últimos 30 días)
Venkata Ram Simha
Venkata Ram Simha el 23 de Sept. de 2025
Comentada: Image Analyst el 1 de Oct. de 2025 a las 11:34
Remove the dark spots on the leopard.
i tried converting the color image into grayscale.Applied ostu thresholding to create binary image.
using the morophological operations i was able to create a mask, used mask to refilll the black spots on the color image. i did not get the desired result.
what other steps i can implement to achieve an image with no black spots

Respuestas (1)

Image Analyst
Image Analyst el 23 de Sept. de 2025
That algorithm could be close but the problem is leopard spots are not closed. After you have a binary image use either bwconvhull or imclose to try to close the spots boundaries. Then use imfill to fill them. Then use the mask to make the insides black or the gray level of the rings. You might also look at regionfill. if you want to "smear" in the boundary to the middle of the spot. Of course first of all you have to segment out the leopard from the background. There are functions to help you find the foreground in the Computer Vision Toolbox.
If you have any more questions, then attach your image and code to read it in with the paperclip icon after you read this:
  2 comentarios
raulz
raulz el 24 de Sept. de 2025
Hello Image Analyst,I’m a beginner in image processing and I would like some help.How can I create a binary classification image of objects in shape of a circle?which approach should I follow ?
"homework""Assignement"
Image Analyst
Image Analyst el 1 de Oct. de 2025 a las 11:34
You can try thresholding. If the blobs are not perfectly circular and you want to replace them with perfect circles of the same area and centroid, then it will take some extra steps. Use regionprops
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
This looks like a homework problem. If you have any questions ask your instructor or read the link below to get started:
Obviously, if it is homework, we can't give you the full solution because you're not allowed to turn in our code as your own.
Another resource that MathWorks Central offers is the AI Chat Playground (on the blue banner above). You can paste your problem text into there and get code. However to be ethical you need to make sure that your professor is willing to accept AI generated code as your own. If he/she is against that and wants you to create your own code, and you submit code from AI or other people, you could be running a risk.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by