Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

Remove image background in Matlab

Date: 2022-12-05 10:51:49

In this example of edge detection:

http://www.mathworks.com/help/images/edge-detection.html#buh9ylp-13

How would I remove the gray background in the grayscale image at the beginning?

 Answer: 

Removing the background befor you apply an edge detector makes no sense as the more or less homogeneous low frequency background will result in a zero gradient anyway. It won't improve the results of your edgedetection.

If you only want to cut out the coins to put them on a different background simply apply a global threshold

original image

threshold

Remove thos tiny speckles with some morphological operators and blur the mask so you won't have fringed coin edges

cleanup

Apply some logical operations to mask the original image

masked image


Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com