When interpolating on a given data set, convhull is used to set the boundaries of the interpolation area. Because convhull only minimizes the outline length, there might be interpolation lines which are unwanted (see figure).
hullfit tries to minimze the polygon area instead resulting in a hull line fitting sharper to the given data.
Hey, great script. I found a small bug though, which I was able to fix by changing the two "find" calls from "find(X)" to "find(X, 1, 'first')". Otherwise errors get thrown or results are poor for certain images.
Perfect - much better than convhull.
good, seems to work as advertised.
View the winning live scripts from faculty and students who participated in the recent challenge.Learn more
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.