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

Take Snapshots from PhotonClient #940

Merged
merged 16 commits into from
Oct 17, 2023

Conversation

srimanachanta
Copy link
Member

closes #342
replace #696

@srimanachanta srimanachanta requested a review from a team as a code owner October 9, 2023 21:40
@srimanachanta
Copy link
Member Author

Might want to debounce this given the UI can be laggy sometimes and people like to spam.

};
const handleCaptureClick = () => {
if (props.streamType === "Raw") {
useCameraSettingsStore().saveInputSnapshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make more sense to pass in the correct callback through a prop?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would rather compartmentalize as much logic into the stream viewer component as possible. This icon would only serve this function so adding it as a callback just duplicates code a lot.

@@ -384,7 +384,7 @@ const endCalibration = () => {
color="secondary"
style="width: 100%"
:disabled="!settingsValid"
@click="isCalibrating ? useCameraSettingsStore().takeCalibrationSnapshot(true) : startCalibration()"
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah this fun hack. We should probably not have one button doing two things

Copy link
Member Author

Choose a reason for hiding this comment

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

nah its chill, the logic makes sense now with better variable names

Copy link
Contributor

@mcm001 mcm001 left a comment

Choose a reason for hiding this comment

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

Worth noting that these snapshots include overlays we draw on the stream. I thought we had fixed that?

image
image

@srimanachanta
Copy link
Member Author

srimanachanta commented Oct 17, 2023

Worth noting that these snapshots include overlays we draw on the stream. I thought we had fixed that?

image

image

Wouldn't that be good for debugging things? Saving the output at a specific moment can help share if anything was wrong and saving the input with no drawings allows us to rerun pipelines on it. Are you referring to the crosshair?

@srimanachanta srimanachanta merged commit ededc4f into PhotonVision:master Oct 17, 2023
22 checks passed
@srimanachanta srimanachanta deleted the ui-snapshots branch October 17, 2023 13:08
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.

Take Snapshot of camera feed from UI
2 participants