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

    RPI Camera IMX327 different brightness values between startups

    Scheduled Pinned Locked Moved VEYE MIPI camera
    15 Posts 2 Posters 3.6k 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.
    • S Offline
      Seka
      last edited by

      Hi,

      I use the IMX327 camera with python and RPI to in controlled lighting settings where LEDs are used to for different colored lighting.

      I am trying to find the reason, why the brightness between different images stays constant, within the same boot cycle (once I have switched on, the images are same) but not, when I switch the RPI on and off again and on again.

      This is the code I use:

      from time import sleep
          
          import time
      
          import datetime
      
          import RPi.GPIO as GPIO
          ### Camera Init
          import D_mipicamera as Dcam
          camera = Dcam.mipi_camera()
          camera.init_camera()
          
          
          
          
          
          
          
          status = os.system('sh ./veye_mipi_i2c.sh -w -f cameramode -p1 0x0 -b 10')
          #print status 
      
          status = os.system('sh ./veye_mipi_i2c.sh -w -f daynightmode -p1 0xFF -p1 0x00 -b 10')
          #print status 
      
      
          ##turn off automatic exposure
          status = os.system('sh ./veye_mipi_i2c.sh -w -f agc -p1 0 -b 10')
          #print status 
          status = os.system('sh ./veye_mipi_i2c.sh -w -f wbmode -p1 0x1b -b 10')
         # print status 
          status = os.system('sh ./veye_mipi_i2c.sh -w -f mwbgain -p1 0x74 -p2 0x74 -b 10')
      
      
      
          status = os.system('sh ./veye_mipi_i2c.sh -w -f lowlight -p1 0x01  -b 10')
          #print status 
          
          status = os.system('sh ./veye_mipi_i2c.sh -w -f mshutter -p1 0x41  -b 10')
          #print status
          time.sleep(0.25)
          date = datetime.datetime.now().strftime("%m_%d_%Y_%H_%M_%S")
          frame = camera.capture(encoding = 'jpeg')
          camera.release_buffer(frame)
          del frame
          time.sleep(0.25)
          frame = camera.capture(encoding = 'jpeg')
      
          frame.as_array.tofile(dest+"control"+ date + ".jpg") 
          camera.release_buffer(frame)
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        Seka @Seka
        last edited by

        @what I forgot to say: Sometimes, the images are also the same between the boot cycles. For example the last test: 1. boot image is "normal", all are the same,
        2. boot cylcle: images are brighter than in 1. cycle but all the same within the 2. boot cycle,
        3. boot cycle: all are same as first boot cycle and all are same

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

          @seka
          My understanding of your question:
          You use manual exposure time and manual gain. You expect pictures with different brightness under different LED lights, but now the brightness of the image is the same. Isn't that right?
          Is it just that the brightness of the picture is different, or is it possible to get a duplicate picture?
          Can I use veye_raspistill to shoot?
          In addition, can you upload the pictures you took?

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

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            Seka @veye_xumm
            last edited by

            @veye_xumm Hello Xu,

            I expect exact same images, but I get different ones. Images stay same within same boot cycle but change after booting. I will send you images later.

            Can you please provide example code for raspistill where image settings are not automatic, all manual, everything controlled --> no changes between images?

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              Seka @Seka
              last edited by

              @seka regarding example code: I still run the i2c commands and just raspistill, and that is all i guess... how much sleep between i2c commands do you recommend between commands and before taking image?

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

                @seka
                I see your question.
                There is no need to test with raspistill, the result should be the same as your python test.
                I have some test suggestions that you can try.

                1. Do not enable low_light mode.
                2. Increase the speed of ae adjustment at the beginning of your scripts.
                . / veye_mipi_i2c.sh-w-f aespeed-p1 0x64-p2 0x64
                

                It's just for the purpose of pure testing.

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

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  Seka @veye_xumm
                  last edited by

                  @veye_xumm I just checked and another problem I have: I get no return value from the whitebalance mode and I cannot read its state also....

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    Seka @Seka
                    last edited by

                    @seka Sorry, realised I had this error before: Problem: not current veye_mipi_i2c.sh ... solved now

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      Seka @Seka
                      last edited by

                      @seka with regarding to your suggestion " do not enable low_light mode": When I disable it, images are very dark.... and I already have longest shutter settings....

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        Seka @Seka
                        last edited by

                        @seka another problem that now occurs (and which has occured seldomly before): images are corrupted:

                        7b25b367-4539-46f9-935f-d885a08b327a-image.png

                        25ffa122-da74-41da-bac0-040a6c4bb1b9-image.png

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          Seka @Seka
                          last edited by

                          @seka ok, I understand now what the problem is: os.system does not reliably execute shell commands. When executing directly in the terminal ---> problem is gone. Thank you

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

                            @seka
                            Hi,
                            All problems sloved?

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

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              Seka @veye_xumm
                              last edited by

                              @veye_xumm No, but I am currently assessing wether it is a light source problem or camera problem. Will get back soon..

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                Seka @Seka
                                last edited by

                                @seka Seems to be fixed right now

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

                                  @seka OK~

                                  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

                                  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