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.
Spresense Camera Examples
-
Hi,
Is it possible to overwrite the captured image with "Hello World" and write it to the sd card?
Is there any solution? How do I do this? -
Hey, @hasanyilmaz
You want to take a picture with the camera and instead of saving the picture in the sd card you want to save a text file with the text "Hello world"? -
@CamilaSouza
For Example:
-
Hey, @hasanyilmaz
I haven't done anything like that and for what I researched online it might not be so easy to accomplish.
One thing to keep in mind is that you won't be able to use jpeg format since you will need to decode the picture and there will be not enough RAM.There are no predefined functions to perform this task.. so you would need to find a library that does this and is small enough to work for microncontrollers.
You mentioned that you're using circuitpython, but I think you would have more luck moving to the sdk.Here is one answer on stack overflow that might provide some insight:
https://stackoverflow.com/questions/56446351/how-can-i-draw-a-string-of-text-onto-the-pixels-of-a-bgr-image-so-that-the-textThey are recommending the Cimg library, which I haven't tried before.
I saw someone using it on a BeagleBone microcontroller, so maybe it works.Also, if you tell me more details about your application and why you need to write text on your image, I might help you think of another option that is easier to implement.
-
Hi, @CamilaSouza
In our application, we want to add date-time information and camera ID information on the picture. In this way, we will detect the pictures we have taken from different cameras.(We have to use more than one camera in our application.)
-
@hasanyilmaz
Probably Cimg could be a good try. However it seems like you will need un-compressed images in memory. So depending on the resolution on the images you take it will hardly be possible or at least large effort. A BeagleBone is has >100x more memory.I would recommend to encode this information into the filename and let the import script (for example Python) write the information into the image. This is a very easy task for any PC or Linux based board.
If you want more information, write a metadata file with the same filename as the image. -
@jens6151-0-1-1
That's a very good suggestion.