ClassesClassesClassesClasses | | | | Operators

create_ocv_projcreate_ocv_projCreateOcvProjcreate_ocv_projCreateOcvProjCreateOcvProj (Operator)

Name

create_ocv_projcreate_ocv_projCreateOcvProjcreate_ocv_projCreateOcvProjCreateOcvProj — Create a new OCV tool based on gray value projections.

Signature

create_ocv_proj( : : PatternNames : OCVHandle)

Herror create_ocv_proj(const char* PatternNames, Hlong* OCVHandle)

Herror T_create_ocv_proj(const Htuple PatternNames, Htuple* OCVHandle)

Herror create_ocv_proj(const HTuple& PatternNames, Hlong* OCVHandle)

void HOCV::CreateOcvProj(const HTuple& PatternNames)

void CreateOcvProj(const HTuple& PatternNames, HTuple* OCVHandle)

void HOCV::HOCV(const HTuple& PatternNames)

void HOCV::CreateOcvProj(const HTuple& PatternNames)

void HOCV::CreateOcvProj(const HString& PatternNames)

void HOCV::CreateOcvProj(const char* PatternNames)

void HOperatorSetX.CreateOcvProj(
[in] VARIANT PatternNames, [out] VARIANT* OCVHandle)

void HOCVX.CreateOcvProj([in] VARIANT PatternNames)

static void HOperatorSet.CreateOcvProj(HTuple patternNames, out HTuple OCVHandle)

public HOCV(HTuple patternNames)

void HOCV.CreateOcvProj(HTuple patternNames)

void HOCV.CreateOcvProj(string patternNames)

Description

create_ocv_projcreate_ocv_projCreateOcvProjcreate_ocv_projCreateOcvProjCreateOcvProj creates a new OCV tool. This tool will be used to train good-patterns for the optical character verification. The training is done using the operator traind_ocv_projtraind_ocv_projTraindOcvProjtraind_ocv_projTraindOcvProjTraindOcvProj. Thus traind_ocv_projtraind_ocv_projTraindOcvProjtraind_ocv_projTraindOcvProjTraindOcvProj is normally called after create_ocv_projcreate_ocv_projCreateOcvProjcreate_ocv_projCreateOcvProjCreateOcvProj.

The pattern comparison is based on the gray projections: For every training pattern the horizontal and vertical gray projections are calculated by summing up the gray values along the rows and columns inside the region of the pattern. This operation is applied to the training patterns and the test patterns. For the training patterns the result is stored inside the OCV tool to save runtime while comparing patterns. The OCV is done by comparing the corresponding projections. The Quality is the similarity of the projections.

Input for create_ocv_projcreate_ocv_projCreateOcvProjcreate_ocv_projCreateOcvProjCreateOcvProj are the names of the patterns (PatternNamesPatternNamesPatternNamesPatternNamesPatternNamespatternNames) which have to be trained. The number and the names can be chosen arbitrary. In most case only one pattern will be trained, thus only one name has to be specified. The names will be used when doing the OCV (do_ocv_simpledo_ocv_simpleDoOcvSimpledo_ocv_simpleDoOcvSimpleDoOcvSimple). It is possible to specify more names than actually used. These might be trained later.

To close the OCV tool, i.e. to free the memory, the operator close_ocvclose_ocvCloseOcvclose_ocvCloseOcvCloseOcv is called.

Parallelization

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

PatternNamesPatternNamesPatternNamesPatternNamesPatternNamespatternNames (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

List of names for patterns to be trained.

Default value: 'a' "a" "a" "a" "a" "a"

OCVHandleOCVHandleOCVHandleOCVHandleOCVHandleOCVHandle (output_control)  ocv HOCV, HTupleHTupleHOCV, HTupleHOCVX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the created OCV tool.

Example (C++ (HALCON 5.0-10.0))

create_ocv_proj("A",&ocv_handle);
draw_region(&ROI,window_handle);
reduce_domain(Image,ROI,&Sample);
traind_ocv_proj(Sample,ocv_handle,"A","single");

Result

create_ocv_projcreate_ocv_projCreateOcvProjcreate_ocv_projCreateOcvProjCreateOcvProj returns 2 (H_MSG_TRUE), if the parameters are correct. Otherwise, an exception is raised.

Possible Successors

traind_ocv_projtraind_ocv_projTraindOcvProjtraind_ocv_projTraindOcvProjTraindOcvProj, write_ocvwrite_ocvWriteOcvwrite_ocvWriteOcvWriteOcv, close_ocvclose_ocvCloseOcvclose_ocvCloseOcvCloseOcv

Alternatives

read_ocvread_ocvReadOcvread_ocvReadOcvReadOcv

See also

create_ocr_class_boxcreate_ocr_class_boxCreateOcrClassBoxcreate_ocr_class_boxCreateOcrClassBoxCreateOcrClassBox

Module

OCR/OCV


ClassesClassesClassesClasses | | | | Operators