Camera Alignment Accuracy

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.

The reason for the “decrease” the area for e.g. 200x200mm is to keep correction smaller.
When I calibrate my camera to the entire work surface, which is my standard situation, I have to compromise in relation to error correction of the relatively large area. I start with T0 and hope it does not have a deviation or at least one very small, (+/- Few Tenth of a Millimeter). Then I measure in record 1 to 4. The average value I use for correction. (It requires Camera Alignment and Lense Calibration are in the best possible way before the fine tuning starts.)
When I want extreme account for certain tasks, I only check and adjust the “small” area I want to use, the variation is more manageable and faster compensated.
I have no idea if that’s the right way to do, but it works very well for me, with tolerances down to almost nothing.

Unfortunately not on Mac OS or Linux Ubuntu, here with me.

Yes. I was addressing the user’s specific OS.

First of all, Thank You for the link.

Regarding your approach, it makes sense and I did proceed with a similar approach; however, after few days of experimentation, I came to the conclusion that I may have to revisit the Alignment Process, and, consequently, decided to step back and revisit the basics:

  • If steps in the Alignment Process are not tight/controlled enough, then the process may not be predictable(Actually, I find that the Alignment Process is not tight/controlled enough, and the multiple approximate, manual steps, are error prone)
  • I’d rather consider ways to improve the (alignment) process than to check/test the accuracy, once the alignment is done

I will share my findings in subsequent posts

I would sincerely appreciate if the Lightburn Team can/would suggest solutions/workarounds to the below issue that is, most likely, negatively impacting all camera users.

The below photo illustrates how a 20mmx20mm square (in the Work Area, dotted green) maps to it’s etched image (Overlay); as of the Overlay, the bottom side of the etched image is linearly diverging
(Almost 0.5mm for 20mm; though some may argue that the error is below 3%, but it remains visible)
Single Square

In reality, as shown below, the actual etched image looks square
Firefox Square2

There seems to be a perspective in the Overlay???

1. I asked myself: Is the camera properly positioned so the camera capture is parallel?
After few minutes of trying to adjust the position of the camera, I realized that: What I see in the Camera Control window is always skewed, no matter how I adjust.
I took a Screenshot of what the Camera Control shows

2. I asked myself: Is the camera “distorting” the image?
I connected the camera to a Linux laptop [the camera is tightly fixed to the engraver and the camera/engraver/material did not move, I have simply unplugged the USB and re-plugged]
I took the below Screenshot; few differences

  • No skew
  • Brighter image
  • Sharper image (to some degree, it may be caused by the brightness; personally, I see some blur and/or loss of resolution)

3. I asked myself: Is is caused by the OS?
I added a Webcam Add-on to Firefox (that may or may not be the best one); the below Screenshot suggests that it is not caused by the OS. (Not as clean as the Linux one, but of higher quality than what is shown in the Camera Control window)

(Later, I have noticed a similar perspective in other photos shared on the forum and Lightburn official documentation)

  1. I tried to improve the quality of the capture in the Camera Control window, it turned Off “Auto Brightness” and Lightburn crashed, as shown below

To me this doesn’t look linear since the right side seems more distorted than the left.

I’d suggest rerunning lens calibration. If you haven’t already, adhere the calibration pattern to something rigid and known flat. Any wrinkles or distortion in the calibration pattern could lead to worse distortion correction values.

Then rerun camera alignment.

I’d suggest exporting your current camera settings in case things go south and you want to revert to the current settings.

The bottom line looks linear, you can check it with a ruler, but it does not matter.

You seem to have in mind the Overlay, that is impacted by the calibration/alignment process.

Let’s start with the basics: Can we have a clean capture in the Camera Control window before starting the calibration/alignment process.

I have provided enough evidence to show that the capture in the Camera Control window is of poor quality.

I appreciate your effort, but I was expecting more than a standard answer, that we all know.

Repeating the calibration/alignment process and hoping for the best, may not work if the camera capture is poor.

As it is, the camera calibration/alignment process is not tight/controlled/automated enough to guarantee predictable/repeatable/accurate alignment.

I didn’t address the Camera Control window because I’m not familiar with the full relationship with what is shown there vs what gets to the overlay. We know that the view in Camera Control window is not distortion corrected so is likely to have little processing applied to it. The image is certainly not being rotated slightly there. It’s possible that any differences between video views is due to the particular video mode being shown.

Additionally, there’s really little user control for what you see there so from a practical perspective it’s likely more expedient to focus on what can be controlled which is the quality of the captures during calibration, especially if you’re leaving things on the table today.

But you do you.