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 detection, Makefile cleanup #507

Merged
merged 16 commits into from
Sep 25, 2021

Conversation

linuxkidd
Copy link
Collaborator

@linuxkidd linuxkidd commented Sep 24, 2021

  • Updated all cvFunction to cv::function, etc.. format to be compatible with OpenCV4.
  • Updated Makefile to work for either OpenCV or OpenCV4 libraries.
  • Updated Makefile to exit when dependencies were not found by pkg-config.
  • Updated Makefile to exit when the platform is not known.
  • Removed deprecated systemd service terms.

NOTE: I had quite a bit of issue getting the Display() function to compile, but finally got something workable -- although, I've not tested the Display capability. I would love for someone to test the Display code prior to merge. Otherwise, the rest of the code compiles fine on both Raspberry Pi OS based on Debian Buster with OpenCV 3.2.0, as well as Debian Bullseye with OpenCV 4.5.1.

Resolves #508
Resolves #509

@linuxkidd linuxkidd marked this pull request as ready for review September 24, 2021 20:48
@ckuethe
Copy link
Collaborator

ckuethe commented Sep 25, 2021

Reviewing now, just looking to see if I have an old-enough debian machine or if I have to spin up a VM or something.

Copy link
Collaborator

@ckuethe ckuethe left a comment

Choose a reason for hiding this comment

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

Just a few remarks on the Makefile, the c++ changes seem to work for me on x86_64.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@ckuethe
Copy link
Collaborator

ckuethe commented Sep 25, 2021

Oh, one more change to Makefile: suggest that the user needs to install libusb-1.0-0-dev or something similar. At least on my machines libusb-dev would install libusb-0.12-dev.

@linuxkidd
Copy link
Collaborator Author

linuxkidd commented Sep 25, 2021

@ckuethe So, overall, seems like we don't need the DEFS += -DOPENCV_C_HEADERS for any platform.. which also likely means we don't need the conditional include at the top of capture.cpp which looks for that define... right?

#ifdef OPENCV_C_HEADERS
#include <opencv2/core/types_c.h>
#include <opencv2/highgui/highgui_c.h>
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/imgcodecs/legacy/constants_c.h>
#endif

-- this can all be removed? ( I'm pretty sure the answer is yes, just confirming )

@ckuethe
Copy link
Collaborator

ckuethe commented Sep 25, 2021

Indeed, it looks like you can get rid of that #ifdef everywhere.

@ckuethe ckuethe merged commit 65e7612 into AllskyTeam:master Sep 25, 2021
@linuxkidd linuxkidd deleted the opencv_detection branch September 25, 2021 19:57
@ckuethe
Copy link
Collaborator

ckuethe commented Sep 25, 2021

Thanks for helping make Allsky better. :)

@linuxkidd
Copy link
Collaborator Author

Likewise!

This was referenced Oct 23, 2021
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.

Platform aarch64 missing in Makefile Compile fails on Rapsberry Pi OS Bullseye due to OpenCV4
2 participants