[PYTHON] Is your dll a dll that can take advantage of multi-core?

OpenCV users who care about "how slow is Python than C ++" should care about the DLL they are using and the contents of the cv2.pyd build. Have you ever used a multi-core CPU, but the contents of the dll you are using are dlls that cannot make use of it?

buildIno.cpp


#include <opencv2/core/core.hpp>
#include <iostream>

int main(int argc, const char* argv[])
{
  //Display build information
  std::cout << cv::getBuildInformation() << std::endl;

  return 0;
}

CMakeLists.txt


cmake_minimum_required(VERSION 2.8)
add_executable(buildInfo buildInfo.cpp)

find_package(OpenCV REQUIRED)

if(OpenCV_FOUND)
  include_directories(${OpenCV_INCLUDE_DIRS})

  target_link_libraries(buildInfo ${OpenCV_LIBS})
endif(OpenCV_FOUND)

reference [Start with CMakeLists.txt] http://qiita.com/nonbiri15/items/c77c046f0e10f8140cfe

The condition of cv2.pyd used by Python is You can see it as follows. >>> import cv2 >>> print cv2.getBuildInformation()

General configuration for OpenCV 2.4.11 =====================================

Platform: Host: Windows 6.2 AMD64 CMake: 3.1.1 CMake generator: Visual Studio 9 2008 CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.com MSVC: 1500

C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe (ver 15.0.30729.1) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /MD /O2 /Ob2 /D NDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MD /O2 /Ob2 /D NDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:X86 /debug /INCREMENTAL:YES Precompiled headers: YES

OpenCV modules: To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab Disabled: world Disabled by dependency: - Unavailable: androidcamera dynamicuda java viz

Windows RT support: NO

GUI: QT: NO Win32 UI: YES OpenGL support: YES (glu32 opengl32) VTK support: NO

Media I/O: ZLib: build (ver 1.2.7) JPEG: build (ver 62) PNG: build (ver 1.5.12) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1)

Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) codec: YES (ver 55.18.102) format: YES (ver 55.12.100) util: YES (ver 52.38.100) swscale: YES (ver 2.3.100) gentoo-style: YES OpenNI: NO OpenNI PrimeSensor Modules: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

Other third-party libraries: Use IPP: 8.1.1 [8.1.1] at: C:/Program Files (x86)/intel/Composer XE/ipp Use Eigen: NO Use TBB: YES (ver 4.2 interface 7005) Use OpenMP: NO Use GCD NO Use Concurrency NO Use C=: NO Use Cuda: NO Use OpenCL: YES

OpenCL: Version: dynamic Include path: D:/Build/OpenCV/opencv-2.4.11/3rdparty/include/opencl/1.2 Use AMD FFT: NO Use AMD BLAS: NO

Python: Interpreter: X:/Python27/python.exe (ver 2.7.9) Libraries: X:/Python27/libs/python27.lib (ver 2.7.9+) numpy: X:/Python27/lib/site-packages/numpy/core/include (ver 1.8.2) packages path: X:/Python27/Lib/site-packages

Java: ant: NO JNI: X:/Java18/include X:/Java18/include/win32 X:/Java18/include Java tests: NO

Documentation: Build Documentation: NO Sphinx: NO PdfLaTeX compiler: NO Doxygen: NO

Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO

Install path: D:/Build/OpenCV/OpenCV-2.4.11-vc9-x32/install

cvconfig.h is in: D:/Build/OpenCV/OpenCV-2.4.11-vc9-x32

Recommended Posts

Is your dll a dll that can take advantage of multi-core?
Development of games that take advantage of quantum properties
Separately install a version of Python that is not pre-installed on your Mac
[Python] A program that finds the maximum number of toys that can be purchased with your money
Create a program that can generate your favorite images with Selenium
From a book that programmers can learn ... (Python): Review of arrays
Introduction of ls command lsix that can display a list of images
[EC2] How to take a screen capture of your smartphone with selenium
A memorandum of JSON Schema notation for dictionaries that take arbitrary keys
Mathematics is a graph of common tests.
[python] [meta] Is the type of python a type?
A class for PYTHON that can be operated without being aware of LDAP
From a book that programmers can learn: Verification of rune checksum (fixed length)
A personal memo of Pandas related operations that can be used in practice