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

OpenCV 3 build update and other minor fixes #1261

Merged
merged 4 commits into from
Oct 11, 2014
Merged

OpenCV 3 build update and other minor fixes #1261

merged 4 commits into from
Oct 11, 2014

Conversation

kmatzen
Copy link
Contributor

@kmatzen kmatzen commented Oct 10, 2014

Changes are pretty similar to #1247 except I just omit the OpenCV module names from the CMakeLists.txt so that it selects all of them and I also use the opencv2/opencv.hpp header rather than each individual module header so that I don't have to test whether or not to include the imgcodecs.hpp header.

This change also adds a test in the softmax loss layer to check for a dimensionality mismatch and includes a header in cudnn.hpp to make sure glog is available.

@@ -331,6 +330,7 @@ NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
MATLAB_CXXFLAGS := $(CXXFLAGS) -Wno-uninitialized
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) \
-Wl,--start-group `pkg-config opencv --libs` -Wl,--end-group \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang doesn't do --start-group and --end-group so linking this way breaks OS X.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shelhamer
Copy link
Member

Ok this looks good, but needs a rebase for clean merge. Thanks @kmatzen!

Kevin James Matzen added 4 commits October 11, 2014 15:24
…nclude glog at some point. Including caffe/common.hpp. (2) I often misconfigure some layer and softmax breaks when the dimensionality is too small for the input layers. Check and fail fast. (3) CV_LOAD_IMAGE_COLOR is deprecated and has been removed in OpenCV 3.0. Replaced with cv::IMREAD_COLOR.
@bhack
Copy link
Contributor

bhack commented Oct 11, 2014

It is not good to select all of them. This not work for installation that not have all modules compiled.

@kmatzen
Copy link
Contributor Author

kmatzen commented Oct 11, 2014

@bhack, When you build OpenCV, it autogenerates opencv.pc for pkg-config and OpenCVConfig.cmake for cmake to match the subset of modules that you decided to build. So if you choose not to build a module, then it will not appear in these files, and when you try to import all modules, only the built modules will be included.

shelhamer added a commit that referenced this pull request Oct 11, 2014
[fix] build with OpenCV 3 and other minor fixes
@shelhamer shelhamer merged commit 540ad6b into BVLC:dev Oct 11, 2014
@bhack
Copy link
Contributor

bhack commented Oct 12, 2014

@kmatzen I need to check this again because probably there is some issue in opencv master branch with the behaviour you have described on some modules.

@kloudkl
Copy link
Contributor

kloudkl commented Oct 13, 2014

Did this pass the CI? The tests can't be built with OpenCV 2.7.

@kloudkl
Copy link
Contributor

kloudkl commented Oct 13, 2014

2.4.9.

RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
[fix] build with OpenCV 3 and other minor fixes
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

Successfully merging this pull request may close these issues.

4 participants