Opencv how to make edges more visible

It’s almost perfect but when I set threshold to get clear gummies the rest of them with close distance will merge. (in next image)