nextcv.image.stitching ⚓︎
Generalized image stitching framework.
Simple, extensible architecture for stitching images from multiple cameras.
| CLASS | DESCRIPTION |
|---|---|
AdditiveCompensator | Sequential additive bias correction. |
ExposureCompensator | Abstract base class for exposure compensation strategies. |
HorizontalStitcher | Stitch cameras arranged horizontally (left-to-right). |
ImageStitcher | Abstract base class for image stitching. |
LeftRightStitcher | Stitch cameras arranged horizontally (left-to-right). |
NoOpCompensator | No compensation - returns images unchanged. |
Rect | Image region defined by top-left corner and dimensions. |
Tile | A tile within a canvas for image stitching. |
nextcv.image.stitching.AdditiveCompensator ⚓︎
Bases: ExposureCompensator
Sequential additive bias correction.
Computes median intensity difference in overlap regions and applies additive corrections. First image is used as reference. Each subsequent image is corrected to match the already-corrected previous image.
Good for small-to-medium brightness differences in thermal cameras.
| METHOD | DESCRIPTION |
|---|---|
__call__ | Compute and apply additive bias corrections. |
__call__ ⚓︎
Compute and apply additive bias corrections.
_compute_bias_between_tiles staticmethod ⚓︎
Compute intensity bias between two overlapping tiles.
| PARAMETER | DESCRIPTION |
|---|---|
tile_i | First tile (reference) TYPE: |
tile_j | Second tile (to be corrected) TYPE: |
img_i | Warped image from tile_i TYPE: |
img_j | Warped image from tile_j TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
float | Bias to add to img_j to match img_i (float scalar) |
nextcv.image.stitching.ExposureCompensator ⚓︎
nextcv.image.stitching.HorizontalStitcher ⚓︎
HorizontalStitcher(cameras: List[CameraType], compensator: Optional[ExposureCompensator] = None)
nextcv.image.stitching.ImageStitcher ⚓︎
ImageStitcher(cameras: List[CameraType], compensator: Optional[ExposureCompensator] = None)
Bases: ABC, Generic[CameraType]
Abstract base class for image stitching.
| PARAMETER | DESCRIPTION |
|---|---|
cameras | List of cameras to stitch TYPE: |
compensator | Exposure compensator to use. Defaults to NoOpCompensator() TYPE: |
| METHOD | DESCRIPTION |
|---|---|
__call__ | Stitch images into panorama. |
create_warp_tiles | Create normalized warp tiles for all cameras. |
stitch | Stitch images into the virtual camera. |
nextcv.image.stitching.LeftRightStitcher ⚓︎
LeftRightStitcher(left_camera: PinholeCamera, right_camera: PinholeCamera)
nextcv.image.stitching.NoOpCompensator ⚓︎
Bases: ExposureCompensator
No compensation - returns images unchanged.
Fastest option. Use when images are already well-balanced or when exposure differences are negligible.
| METHOD | DESCRIPTION |
|---|---|
__call__ | Return images unchanged. |
nextcv.image.stitching.Rect dataclass ⚓︎
Image region defined by top-left corner and dimensions.
| PARAMETER | DESCRIPTION |
|---|---|
x | TYPE: |
y | TYPE: |
w | TYPE: |
h | TYPE: |
| METHOD | DESCRIPTION |
|---|---|
clamp_to | Clamp region to bounds, return None if no overlap. |
intersect | Compute intersection with another rectangle. |
numpy_slices | Return (y_slice, x_slice) for numpy indexing with optional offset. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
s | Shorthand for numpy_slices() - returns (y_slice, x_slice). |
nextcv.image.stitching.Tile dataclass ⚓︎
A tile within a canvas for image stitching.
| PARAMETER | DESCRIPTION |
|---|---|
rect | TYPE: |
maps | TYPE: |
mask | TYPE: |
weights | TYPE: |
| METHOD | DESCRIPTION |
|---|---|
from_camera_pair | Create a warp tile from a camera. |
update_weights | Update the weights. |
warp_image | Warp source image to this tile. |
from_camera_pair classmethod ⚓︎
Create a warp tile from a camera.