AzureViolin / intelligent_scissors_5421spring2018

1 stars 1 forks source link

Usage

  1. open image, wait for initialization
  2. click on any point as first seed, wait a little bit for computation to end if picture is large
  3. move mouse and see visualized path in real time

environment setup

python == 3.6/3.4.3 opencv == 3.1/3.4

sudo apt-get install python3-pip python3-tk python3-pil.imagetk
sudo pip3 install numpy

to run gui

python3 gui.py

interfaces & global variables

GUI

Implemented required feature:

  1. Ctrl + left click : first seed
  2. left click : following seed
  3. moving cursor in sissor mode: keep a stack for previous seeds in sequence shared between GUI and algorithm. The top element is the current seed. GUI keep sending current cursor coordinates to algorithm, and algorithm keeps computing the path, send it back to GUI, where GUI visuializes it.
  4. Enter : finish the current contour
  5. Ctrl + Enter: close current contour and fish
  6. Backspace: when scissoring, delete the last seed. otherwise, delete selected contour. Select a contour by moving onto it. Selected contour is thicker, un-selected ones are thinner.

Implemented additional feature:

  1. Click right mouse button and grad to pan in any zoom level
  2. Scroll bar
  3. Different width for live wire and drawn path
  4. Change cursor to pencil when in live wire mode, change it back to pointer when not.
  5. Size grid at bottom right corner
  6. Auto resize canvas when window is resized
  7. Show mouse coordinates below canvas
  8. Help menu, Help and About window

Wish list:

  1. point marker for marking start and intermediate points.
  2. opacity setting for all lines and markers
  3. Ctrl + '+' : zoom in
  4. Ctrl + '-' : zoom out