Question About Using With With A Tilted Grid Non-chessboard Pattern
Introduction
Calibrating thermal infrared cameras is a crucial step in ensuring accurate temperature measurements. In this article, we will explore the process of calibrating a pair of thermal infrared cameras using an anchored grid pattern with a moving rig. We will also discuss how to pass the list of object-space centers to the test-surveyed-calibration.py example.
Understanding the Calibration Target
The calibration target is an array of stick-on resistive electric hotpads against a wooden board. The visual camera appearance is similar to the following image:
The thermal pair images are similar to the following images:
Generating the Object Points
The object points are generated using a combination of an algorithmic generation and a table of offsets. The algorithmic generation creates a 4x9 grid of points, with each point spaced 9.5 inches apart vertically and horizontally. The table of offsets is used to apply corrections to the generated points.
The following code snippet shows how to generate the object points:
from target_corrections import corrections_california as corrections
boardSize = (4,9) # 4 (staggered) rows of 9 columns per staggered row#35
# example of one staggered row of 9 columns
# * * * * *
# * * * *
frameSize = (1280, 1024) # sensor is 1280 wide x1024 tall
# assuming sensor pixel is 11 micrometers square (0.001 cm per pixel)
# and estimated focal length is 25mm (2.50 cm), then focal length in pixels
# will be 2.5/0.001 pixels
est_focal_length = 2.5 / 0.001
est_cx = frameSize[0] / 2
est_cy = frameSize[1] / 2
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0).
objp = np.zeros((boardSize[0] * boardSize[1], 3), np.float32)
# assuming:
# units in centimeters
# target is ~10 meters away
#
# |----9.5" ----|
# * * * * * --
# |
# * * * * 9.5"
# |
# * * * * * --
#
# * * * *
# with board upright, targets are spaced 9.5" apart vertically and horizontally, so
# vertical/horizontal center-to-center distance is .13 cm apart
# and diagonal center-to-center distance is 17.062 cm apart
# indexing the pattern starts at top right, and goes top to bottom, then shifts
# 1 column left and repeats top-to-bottom, until all 9 columns are completed.
#initialize objp starting from top left, and going top-to-bottom, left-to-right
step_size = 24.13 # center-to-center distance in cm
half_step_size = step_size / 2.0
# the openCV findCircleGrid returns sequence ordered as top->bottom, right-to-left !!!
# and openCV's calibrateCamera expects that.
# *** objp units are in cm ***
target_world_X = 0
target_world_Y = 0
target_world_Z = 0
index = 0
if apply_known_offsets:
for x in range(boardSize[1], 0, -1):
for y in range(boardSize[0]):
target_world_X = (x * half_step_size) + half_step_size + (corrections[index][0])
target_world_Y = ((y * step_size) + (((x + 1) % 2) * half_step_size)) + (corrections[index][1])
objp[index] = (target_world_X, target_world_Y, target_world_Z)
index += 1
else:
for x in range(boardSize[1], 0, -1):
for y in range(boardSize[0]):
target_world_X = (x * half_step_size) + half_step_size
target_world_Y = ((y * step_size) + (((x+1)%2) * half_step_size))
objp[index] = (target_world_X, target_world_Y, target_world_Z)
index += 1
Passing the Object Points to the Calibration Example
The object points are stored in a list of X,Y,Z coordinates, where Z=0, and X,Y are horizontal and vertical distances in centimeters from the top left corner of the board holding the thermal pads. To pass this list of object-space centers to the test-surveyed-calibration.py example, you can use the following code snippet:
import numpy as np
# load the object points from the file
objp = np.loadtxt('objp.txt')
# pass the object points to the calibration example
calibrate_camera(objp)
Conclusion
Calibrating thermal infrared cameras using an anchored grid pattern with a moving rig is a complex process that requires careful consideration of the object points and the camera calibration parameters. By following the steps outlined in this article, you can successfully calibrate your thermal infrared cameras and achieve accurate temperature measurements.
Additional Resources
For more information on calibrating thermal infrared cameras, please refer to the following resources:
- OpenCV documentation: Calibrate Camera
- OpenCV documentation: findCircleGrid
- Open documentation: calibrateCamera
Q&A: Calibrating Thermal Infrared Cameras with a Tilted Grid Non-Chessboard Pattern ====================================================================================
Q: What is the purpose of calibrating thermal infrared cameras?
A: Calibrating thermal infrared cameras is a crucial step in ensuring accurate temperature measurements. By calibrating the cameras, you can eliminate errors caused by the camera's inherent characteristics, such as lens distortion and sensor non-uniformity.
Q: What is a tilted grid non-chessboard pattern?
A: A tilted grid non-chessboard pattern is a type of calibration target that consists of a grid of points with a specific spacing and orientation. Unlike a chessboard pattern, which has a regular grid of squares, a tilted grid non-chessboard pattern has a grid of points with a specific tilt and spacing.
Q: How do I generate the object points for the calibration target?
A: To generate the object points, you can use a combination of an algorithmic generation and a table of offsets. The algorithmic generation creates a 4x9 grid of points, with each point spaced 9.5 inches apart vertically and horizontally. The table of offsets is used to apply corrections to the generated points.
Q: How do I pass the object points to the calibration example?
A: To pass the object points to the calibration example, you can use the following code snippet:
import numpy as np
# load the object points from the file
objp = np.loadtxt('objp.txt')
# pass the object points to the calibration example
calibrate_camera(objp)
Q: What are the benefits of using a tilted grid non-chessboard pattern for calibration?
A: The benefits of using a tilted grid non-chessboard pattern for calibration include:
- Improved accuracy: The tilted grid non-chessboard pattern allows for more accurate calibration of the camera's intrinsic and extrinsic parameters.
- Increased flexibility: The tilted grid non-chessboard pattern can be used with a variety of camera configurations and calibration targets.
- Simplified calibration process: The tilted grid non-chessboard pattern can be used to simplify the calibration process by reducing the number of calibration targets required.
Q: What are the challenges of using a tilted grid non-chessboard pattern for calibration?
A: The challenges of using a tilted grid non-chessboard pattern for calibration include:
- Increased complexity: The tilted grid non-chessboard pattern requires more complex algorithms and calculations to generate the object points and pass them to the calibration example.
- Higher computational requirements: The tilted grid non-chessboard pattern requires more computational resources to generate the object points and pass them to the calibration example.
- Potential for errors: The tilted grid non-chessboard pattern requires careful attention to detail to avoid errors in the calibration process.
Q: How do I troubleshoot common issues with the calibration process?
A: To troubleshoot common issues with the calibration process, you can use the following steps:
- Check the object points: Verify that the object points are correctly generated and passed to the calibration example.
- Check the camera configuration: Verify that the camera configuration is correctly set up and calibrated.
- Check the calibration target: Verify that the calibration target is correctly set up and aligned with the camera.
- Check the calibration algorithm: Verify that the calibration algorithm is correctly implemented and functioning as expected.
Q: What are the future directions for research in thermal infrared camera calibration?
A: The future directions for research in thermal infrared camera calibration include:
- Development of new calibration algorithms and techniques: Researchers are working on developing new calibration algorithms and techniques that can improve the accuracy and efficiency of the calibration process.
- Investigation of new calibration targets: Researchers are investigating new calibration targets and techniques that can improve the accuracy and efficiency of the calibration process.
- Development of new thermal infrared camera systems: Researchers are working on developing new thermal infrared camera systems that can improve the accuracy and efficiency of the calibration process.