OpenCV_contrib compile and install

A very good article, very clear.
OpenCV_contrib compile and install

Note here that after the first configure (all white), you must also click generate, configure and generate again.

Insert picture description here

Open VS and remember to compile with administrator rights

The error type is generally as described above, because VS is not running as an administrator. Find VSLauncher.exe under the path C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv, right click → properties → compatibility → tick Choose to run as an administrator;

Cannot open python36_d.lib during cmake compilation

Make the following changes in the corresponding pyconfig.h file:
change them to
Insert picture description here
and cancel define Py_DEBUG (337 sentences):
Insert picture description here

success

Insert picture description here

Configuration

First, configure the environment variables, not to mention, it's relatively simple

Then configure as follows in the project:
Insert picture description here

Insert picture description here
Add as follows:

opencv_aruco420.lib
opencv_aruco420d.lib
opencv_bgsegm420.lib
opencv_bgsegm420d.lib
opencv_bioinspired420.lib
opencv_bioinspired420d.lib
opencv_calib3d420.lib
opencv_calib3d420d.lib
opencv_ccalib420.lib
opencv_ccalib420d.lib
opencv_core420.lib
opencv_core420d.lib
opencv_datasets420.lib
opencv_datasets420d.lib
opencv_dnn420.lib
opencv_dnn420d.lib
opencv_dnn_objdetect420.lib
opencv_dnn_objdetect420d.lib
opencv_dnn_superres420.lib
opencv_dnn_superres420d.lib
opencv_dpm420.lib
opencv_dpm420d.lib
opencv_face420.lib
opencv_face420d.lib
opencv_features2d420.lib
opencv_features2d420d.lib
opencv_flann420.lib
opencv_flann420d.lib
opencv_fuzzy420.lib
opencv_fuzzy420d.lib
opencv_gapi420.lib
opencv_gapi420d.lib
opencv_hdf420.lib
opencv_hdf420d.lib
opencv_hfs420.lib
opencv_hfs420d.lib
opencv_highgui420.lib
opencv_highgui420d.lib
opencv_imgcodecs420.lib
opencv_imgcodecs420d.lib
opencv_imgproc420.lib
opencv_imgproc420d.lib
opencv_img_hash420.lib
opencv_img_hash420d.lib
opencv_line_descriptor420.lib
opencv_line_descriptor420d.lib
opencv_ml420.lib
opencv_ml420d.lib
opencv_objdetect420.lib
opencv_objdetect420d.lib
opencv_optflow420.lib
opencv_optflow420d.lib
opencv_phase_unwrapping420.lib
opencv_phase_unwrapping420d.lib
opencv_photo420.lib
opencv_photo420d.lib
opencv_plot420.lib
opencv_plot420d.lib
opencv_quality420.lib
opencv_quality420d.lib
opencv_reg420.lib
opencv_reg420d.lib
opencv_rgbd420.lib
opencv_rgbd420d.lib
opencv_saliency420.lib
opencv_saliency420d.lib
opencv_shape420.lib
opencv_shape420d.lib
opencv_stereo420.lib
opencv_stereo420d.lib
opencv_stitching420.lib
opencv_stitching420d.lib
opencv_structured_light420.lib
opencv_structured_light420d.lib
opencv_superres420.lib
opencv_superres420d.lib
opencv_surface_matching420.lib
opencv_surface_matching420d.lib
opencv_text420.lib
opencv_text420d.lib
opencv_tracking420.lib
opencv_tracking420d.lib
opencv_video420.lib
opencv_video420d.lib
opencv_videoio420.lib
opencv_videoio420d.lib
opencv_videostab420.lib
opencv_videostab420d.lib
opencv_xfeatures2d420.lib
opencv_xfeatures2d420d.lib
opencv_ximgproc420.lib
opencv_ximgproc420d.lib
opencv_xobjdetect420.lib
opencv_xobjdetect420d.lib
opencv_xphoto420.lib
opencv_xphoto420d.lib

Guess you like

Origin blog.csdn.net/mao_hui_fei/article/details/111351438