26-Sep-2024 16:55:05 maple_boundary_test(): MATLAB/Octave version 6.4.0 maple_boundary() determines the boundary of the image of a maple leaf. 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). 387 391 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. Graphics saved as "maple_boundary.png" maple_boundary_vertex_plot(): Plot the boundary vertices of the maple leaf. Graphics saved as "maple_boundary_vertex.png" Boundary vertices written to file "maple_boundary.txt" maple_boundary_test(): Normal end of execution. 26-Sep-2024 16:55:06