Which algorithm or tool to use for object detection and extraction? I will collect a dataset consisting of blackberries with and without defects. For this purpose, before I venture into this business I want to make sure that I can detect and extract blackberries from an image.
So I have this image

With the otsu method, morphology opening and closing I'm able to obtain a masked version of the image:

Now I want to obtain a bounding box or extract every blackberry from the image. What tool should I use? A trained neural network? Are there other non neural network technique for this purupose?
Results:Thanks to Kevin M
 

In Python, there's a function called regionprops under the sci-kit learn package. You first have to use skimage.measure.label  on your image before inputting it into regionprops. The result after regionprops contains a list of regions and bounding box coordinates for each region in your image (after using .bbox).
Example (taken and edited from reginoprops documentation):
from skimage import data, util
from skimage.measure import label, regionprops
img = util.img_as_ubyte(data.coins()) > 110
label_img = label(img, connectivity=img.ndim)
props = regionprops(label_img)
props[0].bbox

>>> (0, 0, 102, 376)

regionprops also exists in MATLAB, though there's some slight differences. There are many different versions of the regionprops algorithm. Hope this helps!
