maple_boundary_test 10-Feb-2019 18:28:58 maple_boundary_test MATLAB version. Test maple_boundary. MAPLE_BOUNDARY: Extract a polygonal boundary between a black exterior and a white interior, from an image of a maple leaf. Apply im=imread ( maple_bw.png ) to extract image data from file size(im) = 387 rows by 391 columns using 3 colors. im=im2bw(im,0.5) converts image to black and white (1 color). im=imcomplement(im) converts image to black around white. Exact relative area = 0.423264 imshow(im) displays the image. bcell=bwboundaries(im) traces ALL the boundaries. b=bcell{1} extracts the first (and only, we hope) boundary. Polygonal boundary involves 1776 vertices. b(:,1)=387+1- b(:,1)) corrects reflected X coordinates. MAPLE_BOUNDARY_PLOT Display a plot of the boundary of the maple leaf. Boundary plot saved as "maple_boundary.png" MAPLE_BOUNDARY_VERTEX_PLOT Plot the boundary vertices of the maple leaf. Boundary vertex plot saved as "maple_boundary_vertex.png" Boundary vertices written to file "maple_boundary.txt" maple_boundary_test Normal end of execution. 10-Feb-2019 18:29:03 diary off