Skip to content

Commit

Permalink
Removed pre-compiler check for opencv3 (#695)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde authored Jul 10, 2024
1 parent 6503d8e commit e5dc799
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions intra_process_demo/include/image_pipeline/camera_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,8 @@ class CameraNode final : public rclcpp::Node
{
// Initialize OpenCV
cap_.open(device);
// TODO(jacobperron): Remove pre-compiler check when we drop support for Xenial
#if CV_MAJOR_VERSION < 3
cap_.set(CV_CAP_PROP_FRAME_WIDTH, static_cast<double>(width));
cap_.set(CV_CAP_PROP_FRAME_HEIGHT, static_cast<double>(height));
#else
cap_.set(cv::CAP_PROP_FRAME_WIDTH, static_cast<double>(width));
cap_.set(cv::CAP_PROP_FRAME_HEIGHT, static_cast<double>(height));
#endif
if (!cap_.isOpened()) {
throw std::runtime_error("Could not open video stream!");
}
Expand Down

0 comments on commit e5dc799

Please sign in to comment.