This interface provide functionalities of camera array generation, calibration and image stitching.
More...
|
LPVErrorCode | Calibrate () |
|
void | ImageToWorld (double imagePointX, double imagePointY, double *worldPointX, double *worldPointY) |
|
void | Init (LPVCalibModel calibModel, int hCount, int vCount) |
|
void | InitByCopy (ILCalib *calib, int hCount, int vCount, BOOL copyCalib, double hStep, double vStep) |
|
void | InitByCopyN (LArray< ILCalib * > calibs, int rows, int hCount, int vCount, BOOL copyCalib, double hStep, double vStep) |
|
BOOL | IsCalibrated () |
|
ILCalib * | Item (int index) |
|
LPVErrorCode | StitchImage (ILImageList *images, ILImage *stitchedImage) |
|
void | WorldToImage (double worldPointX, double worldPointY, double *imagePointX, double *imagePointY) |
|
int | Count () |
|
BOOL | Empty () |
|
ILObject * | ItemObject (int objIndex) |
|
ILObject * | Copy () |
|
LPVErrorCode | Load (LString filename) |
|
void | Reset () |
|
LPVErrorCode | Save (LString filename) |
|
BOOL | Valid () |
|
|
double | CalibError [get] |
| The calibration error of the camera array, which is the maximum error among all calibration objects in it.
|
|
BOOL | EnableBlend [get, set] |
| Whether to do blending in the overlap region of multiple views. By default, this feature is on.
Enable it will output a more smooth image stitching result, but slower.
|
|
LPVInterpolationMethod | InterpolationMethod [get, set] |
| The interpolation method used in stitching. By default, it's LPVInterCubic.
|
|
BOOL | UseCache [get, set] |
| Whether to make use of cache which is used to speed-up the process of the image stitching (and blending), but consume more memory. By default, it's off.
|
|
LString | Name [get, set] |
| Name of the object. By default, the object has no name.
In most cases, LPV classes don't make use of the names.
The name is drawn on canvas around the object if ILDrawable::SetDrawName() is enabled. More...
|
|
This interface provide functionalities of camera array generation, calibration and image stitching.
Camera array is a set of multiple independent cameras arranged on a known pattern, or one or multiple cameras moving along a fixed path which generate a virtual camera array. You can use this interface to create and manage the camera array, calibrate then stitch the images captured from individual cameras into a large image for preview or inspection.
To use this interface, you should create a LCameraArray object.
Example Code
C++
ILCameraArrayPtr camArray = LCameraArray::Create();
camArray->Init(LPVCalibModel::LPVCalibPinHole, 2, 1);
if (err != LPVErrorCode::LPVNoError || !camArray->IsCalibrated()) {
}
ILImageListPtr imgList = LImageList::Create();
imgList->Add(img1, nullptr);
imgList->Add(img2, nullptr);
camArray->StitchImage(imgList, imgStitched);
LPVErrorCode
This enumeration represents the type of a LPV function error.
Definition: LPVCore.idl:530
C#
LCameraArray camArray = new LCameraArray();
if (err !=
LPVErrorCode.LPVNoError || !camArray.IsCalibrated()) {
}
LImageList imgList = new LImageList();
imgList.Add(img1);
imgList.Add(img2);
camArray.StitchImage(imgList, imgStitched);
LPVCalibModel
This enumeration represents the calibration model.
Definition: LPVCalib.idl:263
COM
ILCameraArrayPtr camArray = LCameraArray::Create();
camArray->Init(LPVCalibModel::LPVCalibPinHole, 2, 1);
if (err != LPVErrorCode::LPVNoError || !camArray->IsCalibrated()) {
}
ILImageListPtr imgList = LImageList::Create();
imgList->Add(img1, NULL);
imgList->Add(img2, NULL);
camArray->StitchImage(imgList, imgStitched);
void InitByCopyN |
( |
LArray< ILCalib * > |
calibs, |
|
|
int |
rows, |
|
|
int |
hCount, |
|
|
int |
vCount, |
|
|
BOOL |
copyCalib, |
|
|
double |
hStep, |
|
|
double |
vStep |
|
) |
| |
Similar as InitByCopy(), initialize the camera array by moving n cameras multiple times horizontally and vertically.
It generates a \( (vCount * rows) \times (hCount * n / rows) \) camera array.
For example, given 1 2 3 4 input cameras int two rows, move it 3 times horizontally and 2 times vertically, it results in a camera array as:
\( \begin{matrix}1 & 2 & 1 & 2 & 1 & 2\\3 & 4 & 3 & 4 & 3 & 4\\1 & 2 & 1 & 2 & 1 & 2\\3 & 4 & 3 & 4 & 3 & 4\end{matrix} \)
- Parameters
-
[in] | calibs | The input collection of camera calibration objects. |
[in] | rows | The count of rows of the input collection. |
[in] | hCount | The horizontal count of cameras, should be \( \ge 1 \) . |
[in] | vCount | The vertical count of cameras, should be \( \ge 1 \) . |
[in] | copyCalib | True to copy the calibration matrices. If the movement steps are also available, it will also help generate a post-transform matrix on each copied camera calibration object. |
[in] | hStep | The distance of each horizontal movement, optional, in physical unit. |
[in] | vStep | The distance of each vertical movement, optional, in physical unit. |