Herror ::find_caltab (
Hobject Image,
Hobject *Caltab,
const HTuple &CalTabDescrFile,
const HTuple &SizeGauss,
const HTuple &MarkThresh,
const HTuple &MinDiamMarks
)
HRegion HImage::FindCaltab (
const HTuple &CalTabDescrFile,
const HTuple &SizeGauss,
const HTuple &MarkThresh,
const HTuple &MinDiamMarks
) const
Segment the calibration table region in the image.
::find_caltab is used to determine the region of a plane
calibration table with circular marks in the input image Image.
First the input image is smoothed (see ::gauss_image);
the size of the used filter mask is given by SizeGauss.
Afterwards a thresholding operator (see ::threshold)
with minimum gray value MarkThresh and maximum gray value
255 is applied. Among the extracted connected regions the most
convex region with almost correct number of holes (corresponding to
the dark marks of the calibration table) is selected. Holes with a
diameter smaller than
the expected size of the marks MinDiamMarks are eliminated
to reduce the impact of noise.
The number of marks is read from the calibration table description
file CalTabDescrFile. The complete explanation of this file
can be found within the description of ::create_caltab.
Parameters
Image (input_object)
|
image -> Hobject: HImage ( byte )
|
|
Input image. |
Caltab (output_object)
|
region -> Hobject * : HRegion
|
|
Output region. |
CalTabDescrFile (input_control)
|
string -> HTuple.char *
|
|
File name of the calibration table description. |
|
Default value: 'caltab.descr' |
SizeGauss (input_control)
|
integer -> HTuple.long
|
|
Filter size of the Gaussian. |
|
Default value: 3 |
|
List of values: 0, 3, 5, 7, 9, 11 |
MarkThresh (input_control)
|
integer -> HTuple.long
|
|
Threshold value for mark extraction. |
|
Default value: 112 |
|
List of values: 48, 64, 80, 96, 112, 128, 144, 160 |
MinDiamMarks (input_control)
|
integer -> HTuple.long
|
|
Expected minimal diameter of the marks on the
calibration table. |
|
Default value: 5 |
|
List of values: 3, 5, 9, 15, 30, 50, 70 |
Example
// read calibration image
HImage Image("calib-01.tiff") ;
// find calibration pattern
HRegion Caltab = Image.FindCaltab("caltab.descr",3,112,5);
Result
::find_caltab returns H_MSG_TRUE if all parameter values are
correct and an image region is found. The behavior in case
of empty input (no image given) can be set via
::set_system('no_object_result',<Result>)
and the behavior in case of an empty result region via
::set_system('store_empty_region',<true/false>).
If necessary, an exception handling is raised.
Possible Predecessors
::read_image
Possible Successors
::find_marks_and_pose
See also
::find_marks_and_pose,
::camera_calibration,
::disp_caltab,
::sim_caltab,
::caltab_points,
::create_caltab
Module
Camera calibration
Copyright © 1996-2002 MVTec Software GmbH