https://de.mathworks.com/help/images/ref/bwconvhull.html
bwconvhull - Generate convex hull image from binary image - MATLAB
This MATLAB function computes the convex hull of all objects in BW and returns CH, a binary convex hull image.
convex hullgenerateimagebinarymatlab