Just to clarify what you would like to do: you would like to get bounding boxes on objects extracted from an image, but you only want the object itself and not what is in the background? For example, in the image you provided, you would like to extract bounding boxes around each of the four coins?
MATLAB: How to extract only object with white background using bounding box in MatLab
active contoursbackground removalbounding boxbwareaopencroppingImage Processing Toolboximage segmentationregionprops
Best Answer