Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Due to the inability of the lens to focus,oak-d-lite can be calibrated. #1055

Open
fjz0911fang123 opened this issue Jul 22, 2024 · 15 comments
Open

Comments

@fjz0911fang123
Copy link

Hi there, I was using depthai python to calibrate the Oak-d-lite camera and found that the RGB lens couldn't focus. The calibration program cannot be executed. But starting the camera alone, all lenses focus well.
Could you help me take a look at this issue? Thank you very much!

@Erol444
Copy link
Member

Erol444 commented Jul 22, 2024

Hi @fjz0911fang123 ,
Any terminal logs / screenshots would be helpful for us in order to help you.

@fjz0911fang123
Copy link
Author

fjz0911fang123 commented Jul 25, 2024

Hi @Erol444 ,thank you very much for your attention to my question.The following is the log output by the console,when I run 'python3 calibrate.py -s 2.47 --board OAK-D-LITE -nx 15 -ny 8'

Cam: rgb and focus: True
Cam: left and focus: False
Cam: right and focus: False
Saving dataset to: dataset
Sensor name for rgb is IMX214
Sensor name for left is OV7251
Sensor name for right is OV7251
Starting image capture. Press the [ESC] key to abort.
Will take 39 total images.
Start capturing...
new minimum: {'ts': 0.14534599999999998, 'indicies': {'rgb': 0, 'left': 0, 'right': 0}} min required: 0.2
new minimum: {'ts': 0.065214000000001, 'indicies': {'rgb': 1, 'left': 0, 'right': 0}} min required: 0.2
Time stamp of rgb is 1:38:19.946550
Markers count ... 0
Total markers needed -> 24
Status of rgb is False
Time stamp of left is 1:38:19.913937
Markers count ... 42
Total markers needed -> 24
py: Saved image as: dataset/left/p0_0.png
Status of left is True
Time stamp of right is 1:38:19.913949
Markers count ... 42
Total markers needed -> 24
py: Saved image as: dataset/right/p0_0.png
Status of right is True
py: Capture failed, unable to find chessboard! Fix position and press spacebar again

@Erol444
Copy link
Member

Erol444 commented Jul 25, 2024

@fjz0911fang123 could you send over the dataset/left/p0_0.png?

@engrmusawarali71
Copy link

I am facing same problem

@Erol444
Copy link
Member

Erol444 commented Feb 10, 2025

Hi @engrmusawarali71 , please fill out https://www.luxonis.com/rma and attach some images of this, and we can replace your product. We apologize for the inconvenience.

@engrmusawarali71
Copy link

Thanks @Erol444 my problem is that when ever I used manual focus within the range 0-50 the images are fine but when I change the focus to higher values images are blurry. Secondly, I can not execute calibrate.py even with fixed focus. I would be thankful if you guide me in detailed way.

@Erol444
Copy link
Member

Erol444 commented Feb 11, 2025

@engrmusawarali71 is this for color camera (AF)? What value did you set it to? Image will be out of focus (blurry) if the lens isn't correctly set (eg. if you input just a random number to manual focus).

@engrmusawarali71
Copy link

engrmusawarali71 commented Feb 11, 2025

Thank you @Erol444 This is for color camera, in fact. This works only for focus range 0-60, all other values provide blurry images. 25 works for fine for me.

@Erol444
Copy link
Member

Erol444 commented Feb 11, 2025

@engrmusawarali71 if you run eg. depthai-viewer, the AF mode won't focus further than eg. 1 meter? I am not sure what value correspond to what focus range, as it's usually unique to sesors/lenses.

@engrmusawarali71
Copy link

@Erol444 Autofocus is perfect. I am facing problems with manual focus. Since the calibration.py sets manual focus and default value is 135. Since my camera give blurry results with 135, I was wondering if my camera has some fault. Thanks.

@Erol444
Copy link
Member

Erol444 commented Feb 11, 2025

@engrmusawarali71 ah i see. no, it doesn't have, 135 is value useful for IMX378, not IMX214 sensor (which you have). I'd suggest running this script:
https://docs.luxonis.com/software/depthai/examples/rgb_camera_control/
And use , and . to find out which value is good for your sensor (calib board should be about 1m away).

@engrmusawarali71
Copy link

Thank you @Erol444 . You are very kind and gentle. I would be happy if calibrate.py script is updated to accommodate the OAK-D-LITE camera, this shall minimize the queries over to you.!!

@engrmusawarali71
Copy link

Dear @Erol444 you have been very kind, I want to ask one question for calibration do we need to turn off auto exposure and auto white balance?

@Erol444
Copy link
Member

Erol444 commented Feb 11, 2025

@MaticTonin ^ wrt manual focus, could we also measure what value should be set for imx214, and check whether it's imx214 to apply that value instead of 135?

@engrmusawarali71 no, AWB and AE should be enabled. AF is disabled because of "lens breathing", and that can cause sensor to be out of focus exactly when it's capturing images.

@engrmusawarali71
Copy link

@Erol444 Thank you so much for your response. Since I am trying to collect the dataset for Neural Radiance Fields, that why I was concerned about AWB and AE.

Thanks for considering my views on manual focus setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants