Skip to content

Instantly share code, notes, and snippets.

@Thomas-Rosenkrans-Vestergaard
Created April 24, 2019 18:48
Show Gist options
  • Save Thomas-Rosenkrans-Vestergaard/a573ee6cb93eb79c342b9378d3dc6a6f to your computer and use it in GitHub Desktop.
Save Thomas-Rosenkrans-Vestergaard/a573ee6cb93eb79c342b9378d3dc6a6f to your computer and use it in GitHub Desktop.

Polygons

Count the number of corners in a black and white figure.

Count

Create a python script that can count the number of corners in a figure, when provided the filename to the image. The filename should be provided as a command-argument.

Extra points for using argparse.

The number of corners should be written to stdout.

Mark

Create a new python script that can mark the corners in a figure, when provided the filename to the image. The script should also be provided a destination to the output image.

Mark the detected corners with a red dot.

Save the image to the provided destination path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment