Page 1 of 1

Up Camera Calibration

Posted: Thu Sep 06, 2018 6:00 pm
by robert@serve101.org
Recently I found my up camera calibration was off and causing placement problems on parts that were rotated.

While re-calibrating this camera using the "ruler and camera-box" method as described in the instructions, I got to wondering if there was a more accurate way. I am curious if my new method is an improvement or if there is an error in my thinking.

With the present software, the only thing the up facing camera is used for is to measure the wobble of the nozzles. So I put the smallest nozzle on and centered it in the cross-hairs of the up-camera in the down position. This X,Y position is then the base/reference point for the up-camera also used as the nominal value.

Then I jogged the nozzle to the upper right corner of the up camer's box. This gives me a measure in millimeters of both the x & y dimensions of the box. So just subtract the base value from the coordinates and double the result.

This seems to me to be more accurate for a couple of reasons. First, it is measuring the box size at the correct distance from the camera (the same distance that will be used when measuring wobble), so the magnification is the most accurate. Secondly, it is much easier to measure these small distances with the help of the camera's optical image.

Comments ?

Re: Up Camera Calibration

Posted: Fri Sep 07, 2018 12:53 pm
by JuKu
The feeling when the user tells the developer how his system should be used...

Now why didn't I think about this? (Actually, this was up a year or so ago, with the old cameras. The results were not good, but with the new cameras and less noise, this should work much better.)

Of course, the most accurate and easiest way to get the mm/pixel number is to use the machine itself. I will change the behaviour of the measure buttons so, that they also show the result in pixels. Then, you'd measure the homing mark (for down camera) or nozzle tip (for up camera), make a note about the pixel result, move the machine a little (not too much so that we don't get error because of sideways look), measure again and calculate the number. Of course. Doh.

RIght now, I'm testing the solution for the "abort job leaving the machine in a weird state" issue. When that works, I'll do a release, because that issue bugs so many people. But this idea should make the machine more accurate, so I'll work on this next. Implementing this is not as simple as the above sounds, as the natural way for this is to have the machine doing this automatically.

Thank you for this!

Re: Up Camera Calibration

Posted: Fri Sep 07, 2018 7:04 pm
by mrandt
This function has been in one of the forks for years and it's also documented as a feature request:

https://github.com/jkuusama/LitePlacer-DEV/issues/30
Determining pixel-to-mm ratios for down and up camera by moving gantry and measuring effective homing mark / needle move with computer vision; way more accurate than measuring box size with a ruler
:-)

Re: Up Camera Calibration

Posted: Sat Sep 08, 2018 6:46 am
by JuKu
As I said, I tried it back then and it didn’t work with the old cameras. The new cameras are much better so the results should be far better. There are other things as well that I need to revisit.