Skip to content

Commit

Permalink
adding license information to function
Browse files Browse the repository at this point in the history
  • Loading branch information
emrekuru97 committed Feb 24, 2024
1 parent 4f00ab6 commit caab7ed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/CameraNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@ CameraNode::declareParameters()
set_parameters(parameters_init_list);
}

/*********************************************************************
* Copyright (c) 2011, Willow Garage, Inc.
* Copyright (c) 2015, Tal Regev.
* Copyright (c) 2018 Intel Corporation.
* All rights reserved.
* The code snippet below compressImageMsg Function is taken from :https://github.com/ros-perception/vision_opencv
* And is sligthly modefied to meet the requirments of this code.
**********************************************************************/
void
CameraNode::compressImageMsg(const sensor_msgs::msg::Image &source,
sensor_msgs::msg::CompressedImage &destination)
Expand Down Expand Up @@ -573,9 +581,8 @@ CameraNode::requestComplete(libcamera::Request *request)
memcpy(msg_img->data.data(), buffer_info[buffer].data, buffer_info[buffer].size);

// compress to jpeg
if (pub_image_compressed->get_subscription_count()) {
if (pub_image_compressed->get_subscription_count())
compressImageMsg(*msg_img, *msg_img_compressed);
}
}
else if (format_type(cfg.pixelFormat) == FormatType::COMPRESSED) {
// compressed image
Expand Down

0 comments on commit caab7ed

Please sign in to comment.