Multi Projector System 4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
calibration.CalibrationManager Class Reference

Handles auto-calibration of projector overlap using a camera. More...

Public Member Functions

 __init__ (self, int camera_index=0)
 Constructor & Destructor Documentation.
 
Optional[np.ndarray] capture_image (self)
 Member Function Documentation.
 
Optional[int] calculate_overlap (self, np.ndarray img_left, np.ndarray img_right)
 Member Function Documentation.
 
int simulate_calibration (self, int image_width, int current_overlap)
 Member Function Documentation.
 

Public Attributes

 camera_index
 
 flann
 

Detailed Description

Handles auto-calibration of projector overlap using a camera.

Detailed Description This class uses computer vision to detect misalignment between two projectors. It analyzes camera-captured images using SIFT feature detection and FLANN-based matching to calculate horizontal displacement between left and right projected images.

Public Member Functions:

Public Attributes:

Constructor & Destructor Documentation

◆ __init__()

calibration.CalibrationManager.__init__ (   self,
int   camera_index = 0 
)

Constructor & Destructor Documentation.

Initializes the calibration manager.

Parameters
camera_indexCamera device index (default: 0)

Member Function Documentation

◆ calculate_overlap()

Optional[int] calibration.CalibrationManager.calculate_overlap (   self,
np.ndarray  img_left,
np.ndarray  img_right 
)

Member Function Documentation.

Calculates horizontal overlap between two images using SIFT features.

Parameters
img_leftImage from left projector only
img_rightImage from right projector only
Returns
Horizontal overlap error in pixels, or None if insufficient features
Calculates the horizontal overlap between two images using SIFT features.
img_left: The captured image when ONLY the left projector is on.
img_right: The captured image when ONLY the right projector is on.

◆ capture_image()

Optional[np.ndarray] calibration.CalibrationManager.capture_image (   self)

Member Function Documentation.

Captures a single frame from the camera.

Returns
Captured frame as numpy array, or None if capture fails
Captures a single frame from the camera.
Returns None if capture fails.

◆ simulate_calibration()

int calibration.CalibrationManager.simulate_calibration (   self,
int  image_width,
int  current_overlap 
)

Member Function Documentation.

Simulates the calibration process for testing.

Parameters
image_widthInput image width (unused)
current_overlapCurrent overlap value
Returns
Suggested overlap adjustment in pixels
Simulates the calibration process.
Returns the suggested adjustment to the overlap.

The documentation for this class was generated from the following file: