Identify and refill dark spots on the leopard with neighboring pixels
조회 수: 8 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Image Analyst
2025년 9월 23일
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
raulz
2025년 9월 24일
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
2025년 10월 1일 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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!