Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc

    SOLVED Problem with output array size of UYVY format

    VEYE MIPI camera
    2
    7
    663
    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
      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_xumm 1 Reply Last reply Reply Quote 0
      • veye_xumm
        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.

        1 Reply Last reply Reply Quote 0
        • W
          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
            watchever last edited by

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

            veye_xumm 1 Reply Last reply Reply Quote 0
            • veye_xumm
              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.

              1 Reply Last reply Reply Quote 0
              • W
                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
                  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
                  • First post
                    Last post