projection¶
Project 3D points into image space using a cubic warp model.
This module provides a project_xy function, which:
- Constructs a cubic polynomial from alpha/beta slopes.
- Uses OpenCV's
projectPointsto map the resulting 3D points into image coordinates.
project_xy ¶
Get cubic polynomial coefficients for the specified boundary conditions.
f(0) = 0, f'(0) = alpha f(1) = 0, f'(1) = beta.
The polynomial is used to determine the z-coordinate of each point in xy_coords,
which is then projected into image space via projectPoints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xy_coords
|
|
An (N,2) array of (x, y) points (float32). |
required |
pvec
|
|
The parameter vector, from which we extract alpha/beta and rvec/tvec. |
required |
Returns:
| Type | Description |
|---|---|
|
An (N,1,2) array of the projected 2D image points. |