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

Clearer Display of OpenCV window in image_tools/showimage ROS2 node #668

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion image_tools/src/showimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ class ShowImage : public rclcpp::Node
cv::cvtColor(frame, frame, cv::COLOR_YUV2BGR_YUYV);
}

// Show the image in a window
// Define starting position of OpenCV window.
int x_position = 0;
int y_position = 0;
cv::moveWindow(window_name_, x_position, y_position);

// Show the image in OpenCV window
cv::imshow(window_name_, frame);
// Draw the screen and wait for 1 millisecond.
cv::waitKey(1);
Expand Down