Camera calibration query please

Hello, I’m trying to calibrate a camera for the K40 and need some advice please.

My laser is a standard analog K40, with about 5 inches from the top of the bed to the underside of the lid with a 4mm piece of ply.

The idea is I have a spare 160º OV5648 from a project i was doing but abandoned, the camera is accepted by lightburn and I can get into the calibration wizard and see the image perfectly on the screen, I have Leds on the underside of the cabinet lid and this gives plenty of light.

Now when I go to calibrate the lens with the lid down, I get ridiculous readings if the camera is close to the test card,( 5 inches) I tried with a clamp to hold it at the height in your table ( HELP, CAMERA SELECTION HELP) and I get the strange readings and the pattern is not found.

With a 160º FOV I can see the entire bed perfectly at the underside of the lid, but as I say I’m getting strange readings, I have allowed for the fact the lid is not level and used a level and have the camera parallel to the bed.

However if I increase the height of the camera to about a 1 foot from the bed I get much better readings in the region of 0.23 and way better than that, but the image produced is almost a circular image.

I noticed in the official lightburn video you produced on setting up the camera on your 100 watt machine that you were holding the calibration card and captured images while it was in your hand.

My question is, I know the camera has to be fixed in its permanent position for Camera Alignment but for Calibration of the Lens can i assume that it does not need to be fixed, all we are doing is calibrating the lens for lightburn so its knows how much barrel roll and fisheye to defish etc. Is this correct?

Can i therefore hold the card a foot or more away from the camera and as long as its parallel the camera will read and calibrate correctly?

If I cant I can not see how I can calibrate the lens on this camera, Its exactly the same as your own , the specs are the same apart from the tweak you have done to yours on resolution.

I attach a picture of what a good capture looks like.

Please can you advise so I can move on from this to alignment, also are you aware as to how the camera can be mounted on a K40, I have seen some where its offset in the shaded window but glued to it, on another i have seen someone make a type of shoebox out of clear acrylic and mounted this onto the window and the camera on to the back of it ( i’m assuming his FOV might not be enough. I dont know.

Please could you give me some Ideas because unless i hold the card away further than the 5 inches or so inches where i intend to mount it I cant see how I will get a good calibration. Its all in focus and works fine.

Many thanks


Windows 10, mac mini bootcamped to windows, all uptodate, lightburn latest version, camera is same as yours ( apart from tweak) on a 3 metre usb lead. K40 analog machine. MCB in a mks 3d printer control board.

I really need to stop showing the corrected image at all until the 3rd sample or so is taken. Ignore the corrected image - it’s to show you how things are progressing, that’s all.

The system takes measurements from 9 locations in the camera view, and uses the combination of these measurements to compute the final calibration. What you’re looking at here is the result of taking one capture in the middle of the bed and using that alone - it’s not expected to look right because it doesn’t have enough information to do a proper correction yet.

Thanks Oz,

Im not sure my question was phrased right, the problem is that where i want the camera to be on the underside of the cabinet lid I can never get a result, it always says pattern not found, it is only when I move either the camera further away from the k40 or the pattern card further away from the lens do I get a result.

I understand that this image is just one of 9 and its doing its calculations.

In the video it shows a person calibrating the lens but the pattern is not at the same length from the lens in every shot, so what does this mean ?

If I can only get a score that is acceptable at say 20 inches away from the K40 does the camera have to be placed at that distance from the k40 permanently or does it not matter for calibration.

I understand for alignment it has to be in the right place permanently but calibration is surely just calculating the lens makeup/curvature/barrel roll etc???

Lens Calibration depends only on the camera lens and the printed pattern. You don’t even have to have the camera mounted in the machine for it, and the printed card doesn’t have to be a specific printed size - it has to fit roughly within a ‘tic-tac-toe’ square in the camera view. You haven’t shown your preview - if you can show a screen shot that includes it that might help.

ok thank you for that, now it makes sense I’m not at the machine at the moment but I will post a shot later, thank you for that answer, im sorry my question wasnt phrased correctly,

I now understand that i can calibrate anywhere as long as i am in a 9 box square and the distances from the lens to the pattern do not matter. that was what was confusing me and answers why i could not get a score that was acceptable.

I will re do my rig and try again and come back and post if needs be,

thanks very much.

Read through these - this is kind of the go-to for getting the lens calibration to work:

thanks Oz… for all the tips, I have done all of those as well, my camera is a autofocus , covered the bed with wood as its honeycomb, I might have to make my pattern a little larger i think… I installed all under lid white leds 6 k, plenty of light down there and no shadows at all.

my printer is running low on Ink so Im wondering if that is not black enough/large enough, its late here now so I will check all tomorrow, thanks as always.


Yhanks for all the tips, i got the camera calibration done and scored good enough to skip which I did.

I then did camera alignment and that went well, the final image it gave me had a small slight curve on the top of the image. However i carried on and did an overlay and went to engrave something and I am about 10mm out on the right hand side and about 6 mm low.

Now if I redo camera calibration and not skip the additional photos do you think that will correct the slight misalignment i am getting ? i was getting really good numbers.

I noticed in the camera control window you have the option to fine tune what appears to be X/Y and there is an option there to save, am I correct in thinking that this is what this option is for to correct minor alignment issues on the current open file only and not a ““across the board alignment correction tool””

Can you confirm what that option is for please and if there is an option to tweak alignment or do you have to keep going back to lens calibration to get it right?



Note to others considering a non lightburn camera

I also have to add that if what Lightburn say about the resolution issue on non Lightburn cameras
is correct then please everyone consider a lightburn camera as the windows rez is really not good and thats at 5 inches from the bed with a 160 º FOV OV5648 camera on a K40 laser, focus is not the issue, my camera focues to about 20mm perfectly well enough, its the resolution totally thats bad.

I have excellent bed and camera lighting and a good camera but it has not had the resolution tweaked like Lightburn cameras have, the picture is ok but very low quality almost like an old 640/480 image and if youre looking at adding items to a finely detailed item on the bed youll need better Rez than a cheap camera from Ali Express/BangGood can produce.

Lightburn cameras I believe have this Rez issue taken out of them, I understand that Windows 10 defaults to the lowest Rez of the camera which is why non Lightburn cameras dont produce a good image.

It’s actually the cameras themselves - they tell Windows which resolutions are supported, and Windows picks the first one as the default. The ‘Default’ camera capture library in LightBurn doesn’t let me choose other resolutions, but the ‘Custom’ one that I wrote does, so that could work for you. A lot of cameras list 640x480 as their first choice, though some of the ELP modules use 1920x1080 as their default, so those work out ok. :slight_smile:

When you click the ‘Capture’ button in the lens calibration window it will tell you what the captured resolution is. This is from your image above: image

Now, if the camera is mounted far enough that you can see more than the bed area of the machine, the part of the image outside the laser workspace will be cropped out, which lowers the usable resolution, which is why we get people to try to maximize the amount of laser area in the captured image.

The 160 degree cameras are a pain to get good lens calibration from, but once it’s done and good, you shouldn’t have to do it again. If the image you’re getting has curvature in it, it’s possible that the printed dot pattern card was curved a bit - if that’s the case, it will confuse the math - the system knows exactly what that card is supposed to look like, and any difference from that ‘theoretical perfect’ is treated as lens distortion to correct, so double check that.

These are global, because the camera numbers are global. Once you have the camera aligned properly, it will stay that way unless it gets moved, or the relative positions of the laser and camera change.

Thank you very much for the detailed response I will try all this today.

thank you.


O chose the 5mp 160` on lens calibration setup which used your settings and its 100% perfect.

OMG what a huge difference this is going to make on my K40 thanks so much for your help


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.