These programs (written in C++ and Python) demonstrate how to use OpenCV to compute and draw Delaunay triangles on an image.
The full source code for example_draw_delaunay_triangles.cpp and example_draw_delaunay_triangles.py is available as a gzipped tar file at http://www.cs.sjsu.edu/~bruce/programs/spring_2016_cs161/example_draw_delaunay_triangles/example_draw_delaunay_triangles.tar.gz (right mouse click then select "Save Link As..." to download)
To unpack the gzipped tar file, enter the following command at a shell prompt: tar xzf example_draw_delaunay_triangles.tar.gz
To build the C++ program, type make at a shell prompt inside the example_draw_delaunay_triangles directory. Then enter example_draw_delaunay_triangles to run the program.
To run the Python program, type example_draw_delaunay_triangles.py at a shell prompt inside the example_draw_delaunay_triangles directory.
Spring 2016, CS-161:
Lectures
Assignments:
Programs: