I have an outline which I have extracted from an image, which may well not entirely closed, for instance:
I now want to fill the inside of this, as another image, using the convex hull if it is not closed.
img = Import["https://i.stack.imgur.com/yC9ym.png"]; ConvexHullMesh[PixelValuePositions[img, 1]]
is the right shape, but is a mesh rather than an image and now in a different coordinate system.
FillingTransform doesn't seem to work, presumably because the outline is not complete.
ComponentMeasurements[img, "ConvexVertices"] gives me the points that make up the convex hull, but I can't manage to fill in the middle in an easy (and ideally fast way).
ConvexHullMesh has been suggested in the comments, but that doesn't appear to work for me, as the
ConvexHullMesh zooms into the image.
HighlightImage[Rasterize[ConvexHullMesh[PixelValuePositions[img, 1]], RasterSize -> ImageDimensions[img]], img]
$Version (* "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)" *)