Skip to content

update RDK and vision service signatures to NamedImage#15

Open
bhaney wants to merge 2 commits intomainfrom
rdk-update-named-image
Open

update RDK and vision service signatures to NamedImage#15
bhaney wants to merge 2 commits intomainfrom
rdk-update-named-image

Conversation

@bhaney
Copy link
Copy Markdown
Collaborator

@bhaney bhaney commented Apr 30, 2026

go.mod — bumped go.viam.com/rdk to v0.125.0

waitsensor/waitsensor.go

  • Added go.viam.com/rdk/data import (for data.Annotations{} when re-wrapping cropped images).
  • Added a getNamedImageFromCamera helper that calls cam.Images() and returns the first *camera.NamedImage.
  • The counter.run loop now:
    • Pulls a *camera.NamedImage directly from the camera (replaces camera.DecodeImageFromCamera).
    • In the no-bounding-box branch, passes the *camera.NamedImage straight to cs.detector.Detections.
    • In the bounding-box branch, decodes the NamedImage to image.Image once via namedImg.Image(ctx), runs the existing BoundingBox.Crop logic, then re-wraps each crop with camera.NamedImageFromImage (preserving source name and mime type) before calling
      cs.detector.Detections.

@bhaney bhaney requested a review from johnwalicki May 6, 2026 16:07
Copy link
Copy Markdown

@johnwalicki johnwalicki left a comment

Choose a reason for hiding this comment

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

LGTM

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