Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows setting and profiling #103

Open
meiqua opened this issue Aug 20, 2020 · 0 comments
Open

Windows setting and profiling #103

meiqua opened this issue Aug 20, 2020 · 0 comments

Comments

@meiqua
Copy link
Owner

meiqua commented Aug 20, 2020

Motivation

Many friends run this repo on Windows but face some problems often. Though you can find answers in issues, we summarize some tips here to make things easier.

Dependency

This repo only depends on Opencv3 (4 is fine too but not tested). You can follow Installation by Using the Pre-built Libraries to install Opencv 3.4.11.
After downloading this repo, use cmake-gui to config, or add files manually. We need c++11 here so it's better to use >= Visual Studio 2017.

Visual Studio Config

  1. Build in release mode, set /o2
  2. enable SIMD and openMP options
  3. You may want to use custom openmp reduction. If you are lazy, just delete the 3 lines that the compiler complains

All Configs:

/MP /GS- /Qpar /GL /W0 /Gy /Zc:wchar_t- /I"C:\Users\meiqua\software\shape_based_matching\MIPP" /I"C:\Users\meiqua\library\opencv\build\include" /I"C:\Users\meiqua\library\opencv\build\include\opencv" /Gm- /O2 /Ob2 /sdl- /Fd"shape_based_matching_test.dir\Release\vc142.pdb" /Zc:inline /fp:fast /D "CMAKE_INTDIR=\"Release\"" /fp:except- /errorReport:prompt /GF /WX- /Zc:forScope- /GR- /arch:AVX2 /Gr /Oy /Oi /MT /openmp /std:c++14 /Fa"shape_based_matching_test.dir\Release\" /nologo /Fo"shape_based_matching_test.dir\Release\" /Ot /Fp"shape_based_matching_test.dir\Release\shape_based_matching_test.pch" /diagnostics:column 

Configs captured:
property0
property1

Profiling

In a i5-10400 PC, using fusion branch, it costs 70ms for 5,000,000 pixels image under Ubuntu16.04.
For windows Visual Studio 2019 with opencv 3.4.11, it cost 70ms too (with custom openmp reduction).
profile openmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant