Several methods are available to improve the workflow for edge detection, which may require improvisation based on the following options:
- Instead of using imgaussfilt, consider utilizing imbilatfilt, an edge-preserving Gaussian bilateral filter.
- The imdiffusefilt function can be employed to smooth out the edges of the image.
In both cases, strel can be used to clean up and connect edges after detection in the following way
s = strel('disk', 2);
imclose(edge ,s)
For more information regarding these functions, refer to the following documentation: