Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to compile opencv_traincascade

If you just want to goof around with cascades, you can use this gui tool: 
https://amin-ahmadi.com/cascade-trainer-gui/
Otherwise, here's how to compile:

Programs you will need: git, cmake and
	Visual Studio (with c/c++) (I used VS 2019)

Open commandline (cmd) in a folder of your choice.
Run the command:
	git clone 3.4 https://github.com/opencv/opencv.git
(the reason why version 3.4 is chosen is because
	traincascade doesn't work in newer versions of opencv)
In your folder you should now have a folder called 'opencv'

Now create a new folder (not inside opencv,
	but inside the 'folder of your choice')
Open commandline in that folder
Run the command: cmake -DBUILD_EXSAMPLES=ON ../opencv
Wait a long time for cmake to finish

Inside the folder you created for cmake, open
	apps/traincascade/opencv_traincascade.sln   with Visual Studio
In VS, on the top of the screen change the
	Solution Configurations from 'Debug' to 'Release'
In the solution explorer inside VS, click the folder applications
Then right-click opencv_traincascade, select
	Project Only -> Build only opencv_traincascade
(you might first have to select Clean Only opencv_traincascade)
It should now be compiling.
When compiling is done, the executable should be in
	[cmakefolder]/bin/release/opencv_traincascade.exe

To actually use the program, see
	https://docs.opencv.org/3.4/dc/d88/tutorial_traincascade.html
Running the program goes like this:
open command line in [cmakefolder]/bin/release
Run the command:
	opencv_traincascade -commandoption1 argument1 -commandoption2 argument2
Of course you have to fill in the commandoptions yourself
	(again, see https://docs.opencv.org/3.4/dc/d88/tutorial_traincascade.html)
Comment

PREVIOUS NEXT
Code Example
Python :: Tableau prep encoding to a set of fields in a flow 
Python :: find the middle of the document in the image opencv 
Python :: How to make a script that reads from Database and then writes to the csv file and then uploads the file to Google Drive in python 
Python :: python interface kenee 
Python :: how to make a tuple 
Python :: odoo create new admin user command line 
Python :: save impt 
Python :: cors python functions framework local 
Python :: encanto meaning spanish 
Python :: check processing bar of loop in python 
Python :: sklearn kmeans mnist 
Python :: using rlike in pyspark for numeric 
Python :: argmin returns one value for 2d array 
Python :: jpg image in tkinter title 
Python :: computercraft turtle place block 
Python :: how to use python-socker.io with fast api 
Python :: compute slice distance from image position 
Python :: pagerank formula 
Python :: onetoone vs foreign key django 
Python :: anagram game 
Python :: list tuple dictionary, 
Python :: check check writability of the file 
Python :: function continuity python 
Python :: box detection 
Python :: pysftp get-r 
Python :: write a variable and assin a string to it 
Python :: create file and store output python 
Python :: sns regplot make the line and confidence interval thicker 
Python :: Define a python function day_of_week, which displays the day name for a given date supplied in the form (day,month,year). 
Python :: print hello in python 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =