Skip to content

add opencv4 into the dependency list for ROS2#324

Merged
mjcarroll merged 2 commits intoros-perception:ros2from
LewisLiuPub:ros2_cv4
Apr 30, 2020
Merged

add opencv4 into the dependency list for ROS2#324
mjcarroll merged 2 commits intoros-perception:ros2from
LewisLiuPub:ros2_cv4

Conversation

@LewisLiuPub
Copy link
Copy Markdown
Contributor

@gaoethan @ahcorde
I updated code to support OpenCV4 for branch ros2, please have a review.

Signed-off-by: Lewis Liu wei.zhi.liu@intel.com

Signed-off-by: Lewis Liu <wei.zhi.liu@intel.com>
Comment thread cv_bridge/CMakeLists.txt Outdated

find_package(sensor_msgs REQUIRED)
find_package(OpenCV 3 REQUIRED
find_package(OpenCV 4 REQUIRED
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line force to OpenCV4 , there is no option for version 3.

You should do something like:

find_package(OpenCV 4 QUIET opencv_core opencv_core)
if(NOT OpenCV_FOUND)
  find_package(OpenCV 3 REQUIRED opencv_core opencv_core)
endif()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It really works, I checked it and uploaded one new patch.
@ahcorde

Copy link
Copy Markdown
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

Please review the comment regarding OpenCV

Copy link
Copy Markdown

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

FWIW this works for me with OpenCV 4 on Focal.

@ruffsl
Copy link
Copy Markdown

ruffsl commented Apr 29, 2020

@mjcarroll @ahcorde did you get a chance to look at this?
I see in #272 you've been discussing about this for foxy release.

@mjcarroll mjcarroll merged commit eae9586 into ros-perception:ros2 Apr 30, 2020
@ijnek ijnek mentioned this pull request Sep 4, 2022
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.

5 participants