File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
src/viam/components/camera Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,9 @@ async def get_image(
48
48
49
49
::
50
50
51
- from viam.media.video import CameraMimeType
52
-
53
- my_camera = Camera.from_robot(robot=machine, name="my_camera")
54
-
55
- # Assume "frame" has a mime_type of "image/vnd.viam.dep"
56
- frame = await my_camera.get_image(mime_type = CameraMimeType.VIAM_RAW_DEPTH)
57
-
58
- # Convert "frame" to a standard 2D image representation.
59
- # Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].
60
- standard_frame = frame.bytes_to_depth_array()
51
+ my_camera = Camera.from_robot(machine, "my_camera")
52
+ frame = await my_camera.get_image()
53
+ print(f"Frame: {frame}")
61
54
62
55
Args:
63
56
mime_type (str): The desired mime type of the image. This does not guarantee output type
You can’t perform that action at this time.
0 commit comments