Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Reading images in spresense
-
I would like to know the ways in which images are read in spresense, the format in which they are read and also is there any function to load images in spresense using the in-built image processing library?
-
The best option to see how to read images from the Spresense camera is this example: https://github.com/sonydevworld/spresense-nuttx-apps/tree/1a501330f462e8d433c31fd6f6b7822a70ed0c26/examples/camera
You can also see the documentation here:
https://developer.sony.com/develop/spresense/docs/sdk_developer_guide_en.html#_cameraThe image formats you can get with the Spresense camera are JPEG and YUV4:2:2.
You have an image processing library here: https://github.com/sonydevworld/spresense-nuttx/blob/b02a66b25bccdaeece1ba4aaf5ba53f427b3bdc2/boards/arm/cxd56xx/spresense/include/cxd56_imageproc.h. It can convert image to RGB or gray scale. It can also resize and clip the image.
Best Regards,
Kamil Tomaszewski -
-
-
@KamilTomaszewski Can we adjust the resolution of spresense camera and capture images with different resolutions in spresense?
-
You can change the resolution. You just need to pass other values here: https://github.com/sonydevworld/spresense-nuttx-apps/blob/1a501330f462e8d433c31fd6f6b7822a70ed0c26/examples/camera/camera_main.c#L522
The possible values are defined here: https://github.com/sonydevworld/spresense-nuttx/blob/b02a66b25bccdaeece1ba4aaf5ba53f427b3bdc2/include/nuttx/video/video.h#L193
Here you can find information about the limitations:
https://developer.sony.com/develop/spresense/docs/sdk_developer_guide_en.html#_restrictions_of_image_size_and_frame_rateBest Regards,
Kamil Tomaszewski -
@KamilTomaszewski Thank you!