Issue with Advanced Camera Calibration for Up-looking camera

121 views
Skip to first unread message

Daniel Guerrero

unread,
Jun 24, 2024, 11:25:48 AM (9 days ago) Jun 24
to OpenPnP
Hi everyone,

We are having difficulty with the advanced calibration for our upward looking camera using openPnP.  We have been able to do the other calibrations through "Issues and Solutions" (e.g. backlash results attached), and it appears that only the advanced camera calibration is causing difficulty.   After running the advanced calibration the solution generated has a significantly higher units/pixel, and calibration indicates a significant ~4 degree camera/nozzle misalignment (photos attached). We are wondering what it could be the problem.

We have also made sure that the camera and the nozzle head are properly aligned. When the nozzle is positioned directly above the upwards looking camera we have moved the nozzle up 30mm in the Z direction.  This only is causing an apparent shift in the x coordinate of .1mm and a shift in the y coordinate of .2 mm, this corresponds with a 0.4 degree misalignment at most.

We have also attached the machine.xml, as well as the log file that was generated in the most recent calibration.

Best,
Daniel

CallibrationLog.txt
advanced2.png
NozzleMissalignment.png
advanced1.png
backlashnon-squareX.png
machine.xml
backlashy.png

JW

unread,
Jun 24, 2024, 11:31:18 AM (9 days ago) Jun 24
to OpenPnP
Have you read my recent thread here... I've just been through all sorts of pain with advanced calibration, that turned out to be a slightly 'wobbly' camera lens!

JW

unread,
Jun 24, 2024, 1:56:50 PM (9 days ago) Jun 24
to OpenPnP
I also saw exactly what you were seeing, very odd remapping/masks applied to the image. Are you using the typical ELP 720p camera modules that everybody recommends?

If so, I applied PTFE to the lens thread, set the focus and then also tightened the lock screw - that holds the lens firmly in place.

tonyl...@gmail.com

unread,
Jun 25, 2024, 8:45:46 AM (8 days ago) Jun 25
to OpenPnP
Daniel,

Why do you have the Cropped Width and Height set to 3000? What is the native resolution of the camera you are using? If you are going to crop the image, set both the Cropped Width and Height to the smaller of the native resolution width and height and try the calibration again.

Tony

Daniel Guerrero

unread,
Jun 25, 2024, 4:35:00 PM (8 days ago) Jun 25
to OpenPnP
Hi JW and Tony,

It is a 4000 x 3000 (12 MP) camera (DFK 37 BUX226). We have it setup in a stable camera mount (attached) around 50 cm from the tip of the nozzle. 

Important to mention is that we built an identical setup in the past (same hardware and software), but we don't have the same issue with the up-camera misalignment.

Thanks,
Daniel
thumbnail_IMG_1385.jpg

JW

unread,
Jun 25, 2024, 7:31:31 PM (8 days ago) Jun 25
to OpenPnP
>>  same hardware and software

As in, same build of OpenPnP, or same vision pipeline settings?

I know your camera has a lot more resolution that most OpenPnP builds, but your distance to the nozzle tip is proportionally greater than your increased resolution is (i.e. I think you likely have a lower 'effective' resolution than most people, despite having such a capable camera). Most nozzle tips around 3cm from the camera lens on most builds. Can you confirm visually during advanced calibration, that the same feature in the nozzle tip is being reliably detected (typically the air bore). Slow the machine right down and watch the calibration carefully, you should see green crosshairs centered on the feature in question.

I had an issue during one attempt to run advanced calibration, where the tip went slightly out of view by being hidden behind the circular light diffuser, seen in the outline of the image below. When this happened, the vision pipeline was still detecting 'something' on the side of the nozzle, maybe a small glimpse of the spring it might have been, and advanced calibration would complete, with terrible results, as the point it was detecting was not the nozzle tip.

up_before.PNG

Gregory Alley

unread,
Jun 28, 2024, 2:21:00 PM (5 days ago) Jun 28
to OpenPnP
It seems we have now been successful.  While it was not our lens vibrating that was the problem, the platform our mount was attached to was too free to move.  After clamping that down with additional supports we have now gotten the advanced calibration to give reasonable results.  Thank you for your help, without it we may not have figured it out.
Reply all
Reply to author
Forward
0 new messages