5 Replies Latest reply on Aug 27, 2020 8:43 PM by JayakrishnaT_76

    cx3: can i compute stats on image pixels and forget the pixels?

    JoSc_4565121

      current pipeline: himax 10-bit camera chip -> cx3 -> usb -> PC (which calculates image stats)

       

      can i calculate the stats on the cx3 instead, skip sending all the pixels across, and save the host CPU cycles?

       

      apologies, i can't seem to post anything on the USB forum.

        • 1. Re: cx3: can i compute stats on image pixels and forget the pixels?
          JayakrishnaT_76

          Hello,

           

          Please refer to the following thread which addresses a similar query:

          auto-exposure algorithm on CX3

           

          We do not recommend any processing on the image data to be done on CX3. It should be used for forwarding the data obtained from the sensor to the host. Any processing on the image data should be done on the host side or using an ISP before CX3.

           

          Best Regards,

          Jayakrishna

          • 2. Re: cx3: can i compute stats on image pixels and forget the pixels?
            JoSc_4565121

            Many thanks. I've read through the thread, and the answer seems to hinge on

            the SRAM size, and not being able to buffer a full frame.

             

            What if I don't need to buffer a full frame? I can compute the stats I need

            on individual buffers -- subsets of scanlines of the image -- and forward

            those to the host. It would help a great deal if I could make this work.

             

            :-jfs

             

             

            On Tue, Aug 25, 2020 at 11:45 PM JayakrishnaT_76 <

            • 3. Re: cx3: can i compute stats on image pixels and forget the pixels?
              JayakrishnaT_76

              Hello,

               

              Please let us know the following so that we can evaluate the feasibility of processing the data:

              1. How many buffers do you need for processing?

              2. What is the data format from the sensor? Is the incoming data padded or packed?

              3. What is the computation that needs to be done on the pixels?

               

              Best Regards,

              Jayakrishna

              • 4. Re: cx3: can i compute stats on image pixels and forget the pixels?
                JoSc_4565121

                Thank you, Jayakrishna, for giving this question some thought. Does this

                help?

                 

                1. How many buffers do you need for processing?

                can be done one at a time.

                 

                2. What is the data format from the sensor? Is the incoming data padded or

                packed?

                it's a 10-bit camera. 4 pixels in 5 bytes as   [ p3

                10:2 ]  .

                 

                3. What is the computation that needs to be done on the pixels?

                mean and standard deviation. (for which there are incremental formulae, so

                we don't need the whole image). but we should count pixels. and we may want

                to keep a list of bad pixels to reject.

                 

                 

                 

                On Wed, Aug 26, 2020 at 11:27 PM JayakrishnaT_76 <

                • 5. Re: cx3: can i compute stats on image pixels and forget the pixels?
                  JayakrishnaT_76

                  Hello,

                   

                  You can try doing the calculations in CX3. For this, you need to disable the sensor to send any more data after one buffer is received. This is because the calculations will take some time and if the sensor sends out data during this time, there are chances that the CX3 may freeze. To avoid this, the sensor should not send out data when the calculations are done by CX3. After the calculations are done, you need to restart the streaming again by using Appstop and Appstart. This will cause loss of data. We have not tested this approach but you can try implementing this and check if it helps. We also do not have a reference example for your requirement.  We recommend that the computation needs to be done on the Host/ISP side. This is the standard approach for calculating image stats.

                   

                  Best Regards,

                  Jayakrishna