As a simple start, you can use a simple threshold that you set manually based on the histogram.
imhist(image) threshold = 120 binaryImage = image>threshold imshow(binaryImage)
next find the boundary of the binary image using some function such as bwtraceboundary
. Finally, combine the original image and the boundary image to produce the final image.
I think the hardest part would be the threshold.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.