Some questions about auto focus camera on Jetson Nano

Published by Margarito Lehmann on

Home Forums Camera Modules for NVIDIA Jetson Nano Some questions about auto focus camera on Jetson Nano

Viewing 9 reply threads
  • Author
    Posts
    • #23083
      Margarito Lehmann
      Participant

      The first question:

      I received my first IMX219-auto focus camera for Jetson Nano a few days ago. But i don’t know how to operate the auto focus function. I tried this command: $ DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1’ ! nvoverlaysink -e But it cannot perform the focus by using the up-down arrow keys. I also tried the sample code downloaded from your website, but also cannot do manual focus. How can i do

      The second question:

      I want to: 1. press a button on GUI to perform auto focus; 2. use arrow keys (or other keys) to perform manual focus, as it do in your demo

       

    • #23091
      cydu
      Participant

      This is the image from the camera

    • #23120
      wong
      Moderator

      Hi @Margarito Lehmann ,

      1. We are a recently updated repository and added a manual focus example, you can check it.

      2. At present, we do not provide GUI examples, more advanced usage requires you to implement it yourself.

      • This reply was modified 1 month ago by wong.
    • #23157
      cydu
      Participant

      Hi Wong:

      Thank you for adding the manual focus test code to your repository. I tried your examples, but there some error, as shown below:

      File “/home/amtd/JN_Camera_Test/JetsonCamera.py”, line 10, in <module>
      from Queue import Queue
      ModuleNotFoundError: No module named ‘Queue’.

      So can not run.

      Where can I find or install the Queue module?

      Thanks.

    • #23170
      wong
      Moderator

      Hi @cydu ,

      Sorry, I only tested on python2.7, omit the test of python3, now this problem has been fixed. Thanks for your feedback.

    • #23203
      cydu
      Participant

      Hi @ Wong:
      I tested the manual focus function. Now it works. Thank you very much for your codes.

      In the meantime, I also tested the auto-focus code. It is found that the camera stops at focus_distance = ~500 (at this position, the image is very blurred), but actually the focus_distance is 380 (at this position, the image is most clear). Can you please retest your code?

    • #23204
      cydu
      Participant

      I saw a very clear image (it should be the position of focus_distance=380) during the auto focus processing, but the camera stopped at wrong position, capturing blurred image.

    • #23226
      wong
      Moderator

      Hi @cydu ,

      Autofocus script is a very simple implementation of autofocus. It will fail in some scenes. Try to find some scenes with more textures to run the script.

    • #24640
      cydu
      Participant

      Hi, Wong:

      Thanks to your Focuser.py, I can do manual focus for camera 1 of JN-B01.  Now I need to do the same for camera 2 of JN-B01. I found the address setting of camera 1 is: CHIP_I2C_ADDR = 0x0C. What’s it for camera 2? Or what i need do in order to conduct manual focus for camera 2?

      Thank you in advance.

    • #24683
      wong
      Moderator

      Hi @cydu ,

      The i2c address is the same, but the difference is the i2c bus. On JN-B01, the i2c bus of CAM0 is 7, and the i2c bus of CAM1 is 8.

Viewing 9 reply threads
  • You must be logged in to reply to this topic.