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

Build on Linux: missing opencv libs: optflow xfeatures2d xphoto #108

Open
KarlZeilhofer opened this issue Jul 3, 2018 · 3 comments
Open

Comments

@KarlZeilhofer
Copy link

Hi,

I've problems on compiling ImagePlay on Linux Mint 18.3.

I've installed opencv according to this repository: https://github.com/jayrambhia/Install-OpenCV
(opencv_latest.sh).
It finished with success: OpenCV 3.4.1 ready to be used

Further more, I've tried to apply the patch for the Makefiles, described here: #100 (comment)
The library builds fine, but ImagePlay doesn't.

The final message is

g++ -m64 -Wl,-O1 -o ../_bin/Release/linux/imageplay ../intermediate/ImagePlay/Release/linux/stafx.h.o ../intermediate/ImagePlay/Release/linux/AboutWindow.o ../intermediate/ImagePlay/Release/linux/ConnectionDialog.o ../intermediate/ImagePlay/Release/linux/ImageViewerWindow.o ../intermediate/ImagePlay/Release/linux/IPApplication.o ../intermediate/ImagePlay/Release/linux/IPFilterLineEdit.o ../intermediate/ImagePlay/Release/linux/IPHistogramWidget.o ../intermediate/ImagePlay/Release/linux/IPImageViewer.o ../intermediate/ImagePlay/Release/linux/IPMorphologyCheckbox.o ../intermediate/ImagePlay/Release/linux/IPPluginManager.o ../intermediate/ImagePlay/Release/linux/IPProcessEdge.o ../intermediate/ImagePlay/Release/linux/IPProcessEdgeTmp.o ../intermediate/ImagePlay/Release/linux/IPProcessFactory.o ../intermediate/ImagePlay/Release/linux/IPProcessGrid.o ../intermediate/ImagePlay/Release/linux/IPProcessGridScene.o ../intermediate/ImagePlay/Release/linux/IPProcessInputOutputWidget.o ../intermediate/ImagePlay/Release/linux/IPProcessList.o ../intermediate/ImagePlay/Release/linux/IPProcessListTabWidget.o ../intermediate/ImagePlay/Release/linux/IPProcessMessageWidget.o ../intermediate/ImagePlay/Release/linux/IPProcessPropertiesWidget.o ../intermediate/ImagePlay/Release/linux/IPProcessScript.o ../intermediate/ImagePlay/Release/linux/IPProcessStep.o ../intermediate/ImagePlay/Release/linux/IPProcessThread.o ../intermediate/ImagePlay/Release/linux/IPZoomWidget.o ../intermediate/ImagePlay/Release/linux/main.o ../intermediate/ImagePlay/Release/linux/MainWindow.o ../intermediate/ImagePlay/Release/linux/PluginGenerator.o ../intermediate/ImagePlay/Release/linux/SettingsWindow.o ../intermediate/ImagePlay/Release/linux/TutorialDialog.o ../intermediate/ImagePlay/Release/linux/qrc_ressources.o ../intermediate/ImagePlay/Release/linux/moc_AboutWindow.o ../intermediate/ImagePlay/Release/linux/moc_ConnectionDialog.o ../intermediate/ImagePlay/Release/linux/moc_ImageViewerWindow.o ../intermediate/ImagePlay/Release/linux/moc_IPFilterLineEdit.o ../intermediate/ImagePlay/Release/linux/moc_IPHistogramThread.o ../intermediate/ImagePlay/Release/linux/moc_IPHistogramWidget.o ../intermediate/ImagePlay/Release/linux/moc_IPImageViewer.o ../intermediate/ImagePlay/Release/linux/moc_IPMorphologyCheckbox.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessGrid.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessGridScene.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessInputOutputWidget.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessList.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessListTabWidget.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessMessageWidget.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessPropertiesWidget.o ../intermediate/ImagePlay/Release/linux/moc_IPProcessThread.o ../intermediate/ImagePlay/Release/linux/moc_IPZoomWidget.o ../intermediate/ImagePlay/Release/linux/moc_MainWindow.o ../intermediate/ImagePlay/Release/linux/moc_PluginGenerator.o ../intermediate/ImagePlay/Release/linux/moc_SettingsWindow.o ../intermediate/ImagePlay/Release/linux/moc_TutorialDialog.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyBinaryMorphologyInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyBinaryMorphologyTristateInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyButtonBool.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyButtonInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyCheckbox.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyCheckboxInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyColorHSL.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyColorHSV.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyColorRGB.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyCombobox.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyFileOpen.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyFileSave.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyFolder.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyGrayscaleMorphologyInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyGroup.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyKernelInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyMatrixDouble.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyPoint.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyRadioInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertySliderDouble.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertySliderInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertySliderIntEven.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertySliderIntOdd.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertySpinnerInt.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyString.o ../intermediate/ImagePlay/Release/linux/moc_IPPropertyWidget.o   -L/usr/X11R6/lib64 -L../_bin/Release/linux/ -lIPL -lfreeimage -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_videoio -lopencv_calib3d -lopencv_optflow -lopencv_features2d -lopencv_xfeatures2d -lopencv_photo -lopencv_xphoto -ldl -lgomp -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld: cannot find -lopencv_optflow
/usr/bin/ld: cannot find -lopencv_xfeatures2d
/usr/bin/ld: cannot find -lopencv_xphoto
collect2: error: ld returned 1 exit status
Makefile:373: recipe for target '../_bin/Release/linux/imageplay' failed
make: *** [../_bin/Release/linux/imageplay] Error 1

Where can I get the missing libs from, and how can I install them?

Greets, Karl

@emedinac
Copy link

emedinac commented Sep 18, 2018

I had a similar problem showed below. did you solve the problem?

/usr/bin/ld: cannot find -lopencv_optflow
collect2: error: ld returned 1 exit status

@KarlZeilhofer
Copy link
Author

I'm sorry, no. I gave up on that issue.

@cedorman
Copy link

Several of the libraries that image play needs are in the 'contrib' part of OpenCV now. They changed the way that OpenCV works because of licensing and patents (SIFT, SURF, etc.); they moved all the potentially legal stuff to the contrib, so they can't be sued.

The way that I solved this was to build opencv locally and including the contrib libraries. The way to do this is to download an opencv version (I did 3.4.10) from the release ( ) and then download the corresponding opencv_contrib version (https://github.com/opencv/opencv_contrib/releases). Then, build it locally in the opencv directory:

  • cd opencv_3.4.10/
  • mkdir build
  • cd build
  • cmake -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.10/modules ..
  • make
  • sudo make install

The key is the -D part, which points at the contrib modules.

See additional instructions at: https://www.learnopencv.com/install-opencv-3-4-4-on-ubuntu-16-04/

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

No branches or pull requests

4 participants