Camera Alignment Accuracy

I have two questions related to the accuracy of camera alignment; I will first describe the context.

  1. I have integrated the Atomstack AC1, a 5MP camera (I am considering an 8MP camera)
  • During the calibration, all scores were below 0.2, a good sign
  • Before aligning, I have reduced the Working Area to (300, 300) (During the first iterations, I have kept the original (430, 400) Working Area, the results were similar to what is described below)
  • During the alignment, I have set Scale to 150 (1.5*200 = 300)
  1. I have created and etched a matrix of 1cmx1cm squares, spacing is 1cm

  2. I have checked the width, height and spacing of the etched matrix, all is as expected

  3. I have adjusted the X Shift and Y Shift in the Camera window, based on the top left square

Unfortunately, as you can see in the below picture, the matrix in the Lightburn (in green) and the camera image of the etched matrix gradually shift, i both X and Y dimensions; the questions that I have

  • How can I improve the Camera Alignment process, so the matrix (in green) totally overlaps the camera image at all points i.e. for all (x,y) points?
  • How much accuracy should I realistically expect? (I am looking for a 0.1mm accuracy, am I being unrealistic?)

A 0.1mm accuracy is unrealistic for camera, yes. They take a fisheye lens, which distorts every dimension, and flatten it out using calibration cards placed at different angles. The camera is to help you position things faster than using frame mode with a red dot or cross hair placement laser…it is not meant for the accuracy you are trying to get from it.
Id consider it a huge miracle you have it as accurate as it is.
Most jobs are calculated from a production standpoint within the extents of a given piece of material. Patterns and nesting are done to maximize usage of space on said material. Positioning really doesnt matter if you use your drafting or patterning software to calculate your layout. If it fits in the file and is within the abiloty of your machine it will be cut as previewed for the most part. The camera is just a quick/lazy system to cut down tedium.

I generally agree with this.

However, I don’t necessarily agree with this. The screenshot looks like the alignment is off by at least 3mm. I’d expect this to be under 2mm or less. I don’t think sub-millimeter precision would be impossible to reach with a sufficiently high resolution camera.

Is the distance between top of material to the lens the same distance as when the alignment targets were burned? If not, parallax will throw off the alignment accuracy. Alignment is only optimal for a single focal distance.

You can additionally try tweaking the alignment using the Width and Height adjustments in Camera window in additional the XY shift that you’re already using. Adjust the values until the shapes align with the burn as much as possible.

A few other notes:

Is there a reason you did this? Ideally you’d be using the entirety of your bed for the alignment. The larger the area covered, the more accurate the alignment.

I’m not following this. You wan to scale to as large a target area as available to you. Scale is % of base 180mm square. You should be able to scale to around 200% or more for a 430x400 area.

When I have the right light conditions (which are and have always been my problem child) I have a deviation of approx. 0.5m-1mm - over my entire 600x400 machine bed. If I adjust my system further so that it primarily covers an area from approx. 200x200mm (from machine/home position) I am down to at least half, it becomes so precise that the optical quality of the rendering makes it difficult to measure.
Camera is the best tool I have ever added to my system and I use it daily.
There is also a picture in an old post here on the forum where I show my test procedure and a pencil, freely placed on the machine bed with writing on one of the 6 sides - very precise. - so LightBurn’s camera is definitely not just a toy for me.

In fact, good reading too :wink:

(I am driving Ubuntu today, due to compatibility issues with other Linux Distros and Lightburn)

1 Like

The squares getting off further away you go is exactly the physical mapping of a fisheye lens…

It sounds like what you are describing with higher accuracy in a smaller area is the mathematical unfolding/flattening of the fisheye lens.
I read through your post, nice read. I wish I could get use out of my camera…its junk. I dont have the desire to fiddle with another external program to adjust the camera. Lightburns control system for calibration is abysmal and should incorporate the v4l2 adjustments to exposure you have to fiddle with.

…there is hope ahead :smiley: ,as I have read/heard they are working on a complete revision of this part of the program. I am very excited and looking forward to it.

I was in the workshop to experiment a bit with different things, the best result I achieve with my camera is still when I turn off the light in the workshop. It’s just not that practical with all the other work… :wink:

But to avoid misunderstanding, I use my camera every day and am happy with this helpful tool.

1 Like

Thank You for sharing your experience and views. You may be right, but it’s too early to give up, I’m somehow more optimistic

If you use Custom Camera System in Edit->Settings you will get brightness and exposure controls in Camera Control window.

LightBurn’s lens calibration is designed to allow for fisheye distortion correction. However, parallax at different distances to the material will still cause parallax issues.

Yes, that improves the mapping of the Overlay(bed) to the Work Area(Lightburn); however, may not be enough??? As shown in the picture below, there remains squares that are not properly mapped.

Interestingly, rows six and seven suggest that the shift may not be linear, though position/coordinate dependent

I wonder if the remaining distortion is due to the camera or the (software) correction applied in Lightburn to the output of the camera???

Yes, it is. It is very unlikely that the distortion is due to focal distance.

For several reasons,
My Use Case is well defined: Accurately align a section/slice of a (large) photo to a previously etched slice of the same (large) photo. An error greater than 0.15mm will be visible, therefore unacceptable

  1. Reducing the size of Work Area may/would, though moderately, increase the DPI of the Overlay (I believe that bernd.dk’s experience gives credit to the idea???)
  2. The point that will be positioned (the top-left corner of the slice of photo in Lightburn) will always be in the vicinity of the origin i.e. (0,0)

Based on the above,
Work Area = (300, 300)
Material used to align: (300, 300)
Scale = 150 as 1.5*200 = 300

I believe this could work only if accompanied by a proportionate increase in utilization of the camera sensor. Meaning the camera is closer to the material. Is that the case?

Where are you getting this calculation? I can’t make sense of it. The base square for the calibration is 180x180mm. This doesn’t account for the size of the target markers, however. So have you assumed 20x20 markers? If so, that makes sense. I haven’t checked the size of the markers directly.

It’s possible. You may want to rerun lens calibration in search of better scores.

Also, is the camera as directly above the center of your planned target area as possible? With the intent of reducing any perspective correction required.

I am constantly adjusting from one cut to the next shifting parameters. I try to position work directly under camera yet things always shift each time. I think I am just chasing my tail here.

Thank You for sharing the link and positive input; I will consider VL4.

Would you care sharing the link to the above mentioned thread? Thanks.

I like your Test Pattern, far more elaborate than a matrix of squares, but may be over-engineered for my purposes: To align, my goal is to accurately determine the coordinates of a point???
Regardless, I will consider your Test Pattern.

Yes, one gets that impression: The required adjustments seem to be position dependent i.e. the coordinates of a point in the Work Area.

That is why I have taken a step backward, and created the simple Test Pattern that consists of a matrix of squares: Find a way to “perfectly” map the Test Pattern in Lightburn with it’s etched image (the Overlay)

How is your camera mounted? If the overlay is shifting there’s something going on. Typically this is from an unreliable ability to relocate camera to the same exact position and orientation, usually on lid mounted cameras.

The other major factor for fixed bed machines is parallax from different material heights.

Whats the code for flattening the fisheye lens out? Is it tied to bed size? It had to be. Will messing with the work area cause the math to flatten the fisheye differently? In the test photo the top left (origin) is perfect, and it slowly gets worse the further away from that point. This reads like an issue with the math for interpreting the fisheye curvature and getting it to align with the workspace.

No. All distortion correction features, as far as I know, are handled during lens calibration. Although thinking about it now, it’s possible that perspective correction may be handled during camera alignment.

If this were fisheye distortion you’d expect not a linear distortion on X and Y but rather a spherical distortion the farther out from center.

This isn’t likely a basic match calculation issue more than it is an accumulation of errors from lens calibration all the way to camera alignment.

It’s rigidly fixed. Impossible keep every project at same height. Just don’t know if I should bother realigning each time. I guess it would be practical if you are running a series of the same thing in a row.

At that point I think I’d relegate it to more a rough placement tool and use other methods to get fine-grained placement accuracy.

Or invest in a way to have a movable bed that allows for fixed distance to camera.