Sony's Developer World forum

    • Home
    • Forum guidelines

    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

    Spresense
    3
    7
    1478
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hasanyilmaz last edited by

      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?

      C 1 Reply Last reply Reply Quote
      • C
        CamilaSouza DeveloperWorld @hasanyilmaz last edited by

        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"?

        H 1 Reply Last reply Reply Quote
        • H
          hasanyilmaz @CamilaSouza last edited by

          @CamilaSouza
          For Example:
          WhatsApp Image 2022-10-07 at 10.21.00.jpeg

          C 1 Reply Last reply Reply Quote
          • C
            CamilaSouza DeveloperWorld @hasanyilmaz last edited by

            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-text

            They 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.

            H 1 Reply Last reply Reply Quote
            • H
              hasanyilmaz @CamilaSouza last edited by hasanyilmaz

              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.)

              J 1 Reply Last reply Reply Quote
              • J
                jens6151 0 1 1 @hasanyilmaz last edited by

                @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.

                C 1 Reply Last reply Reply Quote
                • C
                  CamilaSouza DeveloperWorld @jens6151 0 1 1 last edited by

                  @jens6151-0-1-1
                  That's a very good suggestion.

                  1 Reply Last reply Reply Quote
                  • First post
                    Last post
                  Developer World
                  Copyright © 2021 Sony Group Corporation. All rights reserved.
                  • Contact us
                  • Legal