Skip to content

Reduce cv::Mat copy#165

Open
yasen5 wants to merge 4 commits intomainfrom
reduce-cvmat-copy
Open

Reduce cv::Mat copy#165
yasen5 wants to merge 4 commits intomainfrom
reduce-cvmat-copy

Conversation

@yasen5
Copy link
Copy Markdown
Collaborator

@yasen5 yasen5 commented Apr 18, 2026

No description provided.

@yasen5
Copy link
Copy Markdown
Collaborator Author

yasen5 commented Apr 18, 2026

Tested on 2nd robot

Comment thread src/camera/camera.h
public:
virtual auto GetFrame() -> timestamped_frame_t = 0;
virtual auto Restart() -> void = 0;
virtual void GetFrame(timestamped_frame_t* output) = 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we use a reference instead of a pointer?

Comment thread src/camera/camera.h

using timestamped_frame_t = struct TimestampedFrame {
cv::Mat frame;
double timestamp;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we add an default timestamp and set invalid to be true by default?

@@ -22,7 +22,7 @@ MultiCameraSource::MultiCameraSource(
}
}
timestamped_frame_t timestamped_frame;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to construct a new timestamped frame every time?

Comment thread src/camera/uvc_camera.cc

namespace camera {

const cv::Mat UVCCamera::backup_image_ =
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we put backup_image in the constructor so we can make sure that the size of the backup image matches what the image size should be eg 1280 x 800 for ov9281

Comment thread src/main_bot_main.cc
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now that we have removed the old way of running localization, can we update the unambigous main to support only multi-tag or only square solve? This should probably be a seperate pr though. Also, can you clean up some of the code in multi tag solver?

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.

2 participants