VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    Problem with output array size of UYVY format

    Scheduled Pinned Locked Moved VEYE MIPI camera
    7 Posts 2 Posters 1.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      watchever
      last edited by

      Hi, I am a bit confused with the format of the output array receive from capture function. I set UYVY format and my picture definition is 1920x1088 (so total of 2 088 960 pixels). If output format is UYVY I should have an output array of 4 177 920 elements (4 bytes UYVY code 2 pixels), but output array from capture has a size of 3 133 440 elements (2 088 960 x 1.5). Don't really understand the format of this output array. Any idea or help (not sure my explanation is clear) ?
      Thanks in advance

      veye_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        veye_xumm @watchever
        last edited by

        @watchever
        I think somehow the data you got has been transferred to YUV420 format.
        Please tell me how you got that data.

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

        1 Reply Last reply Reply Quote 0
        • W Offline
          watchever
          last edited by

          I have a IMX432 so as you told me in a previous post it does not support I420. Following is my code, I also force register to UYVY, when I initialize the camera.

          buffer_array = self._camera.capture(encoding = 'i422')
          output = buffer_array.as_rgb_array

          When I make the caputre I have following message on my terminal window :
          mmal: capture_buffer_callback data len is 3133440

          However getting a I420 format is not a problem, but need to know to manipulate the picture. And also know the order of the elements in the array, because it does not seem to be standard (should be all the Y elements first then U and last V).

          Thanks

          1 Reply Last reply Reply Quote 0
          • W Offline
            watchever
            last edited by

            Mistake in my code :
            buffer_array = self._camera.capture(encoding = 'i422')
            output = buffer_array.as_array

            veye_xummV 1 Reply Last reply Reply Quote 0
            • veye_xummV Offline
              veye_xumm @watchever
              last edited by

              @watchever
              I think the data is in the place where the raspberry pie is received, and the format conversion has been completed at the mmal level.
              1920, 1088, 1.5, 133, 440.
              Why pursue YUV422? I don't think YUV420 has really lost anything.

              Questions will be answered as soon as possible, please be patient.
              如果你使用中文,请直接用中文提问。
              May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

              1 Reply Last reply Reply Quote 0
              • W Offline
                watchever
                last edited by

                I don't mind using I420, however you told me in previous post that IMX432 only support I422 format, so I go that way. Do you confirm IMX432 support I420. I confirm that usinf i420 encoding and i422 does not change output array size. So it also means that yuvseq register is useless.

                Any idea how the data are stored in this array. Standards say that I should have 1920x1088 Y elements first in the output array, then (960x544) U elements then (960x544 / 2) V elements, but does not seem to be the case.

                1 Reply Last reply Reply Quote 0
                • W Offline
                  watchever
                  last edited by

                  Ok got it. I confirm output format is I420 and array order is correct. Thanks for your help

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post