One: Add the C++ sample program that comes with OpenCV into the VS2015 source file
Two: run the edge detection sample program
The picture called by default is like this, if you want to use our own picture, you need to modify the default parameters:
step1: Put the picture in the project source file:
step2: View——Property Manager——Double-click "Debug|x64"—— Debugging-command parameters-Hepburn.jpg running results (GIF animation) -here
is actually using the Canny operator for edge detection:
Three: Use the windows terminal interface (not using VS2015) to run the edge detection sample program
step1: Open the windows terminal
step2: find the exe program and image path just built by VS2015
step3: terminal enter the executable file path + space + image path + carriage return to run the
operation results (GIF animation):
Four: run the K clustering sample program
step1: find kmeans.cpp sample program source file added to the VS2015
step2: Due to the need for external kmeans.cpp pictures, input parameters can not run, so you want to cancel the default parameters Hepburn.jpg added when the edge detection
operation results (GIF move Figure): Run, press the space bar to continue, press the ESC key to exit . (Common operation of OpenCV sample program)