Options[connectTheDots]={ImageSize300,PlotTheme"Minimal","Quantity"99,"ShowSolution"False};connectTheDots[image_:Graphics[Disk[]],OptionsPattern[]]:=Block[{data,datafunction,g,opts,order,pts,quantity,show,size,theme,vertex},{size,quantity,theme,show}={OptionValue[ImageSize],OptionValue["Quantity"],OptionValue[PlotTheme],OptionValue["ShowSolution"]};pts=#[[1]]&/@(MeshPrimitives[ImageMesh[Blur[ImageResize[image,10*quantity]]],0][[5;;-1]]);order=FindShortestTour[pts][[-1]];data=Part[pts,order];datafunction=Interpolation[Transpose[{Subdivide[Length[data]-1],data}]];vertex=Table[datafunction[i],{i,0,1-1/(quantity),1/(quantity)}];opts={VertexCoordinatesvertex,VertexLabelStyleDirective[If[MemberQ[{"Minimal","Marketing","Scientific"},theme],White,{}],8],VertexLabelsPlaced["Index",Center],VertexSize{"Scaled",Switch[theme,"Business",2/size,"Minimal"|"Marketing"|"Web",4/size,_,8/size]},ImagePadding10,ImageSizesize,PlotThemetheme};g=Graph[Join[Table[nn+1,{n,Length[vertex]-1}],{Length[vertex]1}],opts];If[show,Graph[EdgeList[g],VertexLabelsNone,VertexSize0,opts],Graph[EdgeList[g],EdgeStyleOpacity[0],opts]]]