Herror ::read_ocv (
    const HTuple &FileName,
    long *OCVHandle
)

Reading an OCV tool from file.

::read_ocv reads an OCV tool from file. The tool will contain the same information that it contained when saving it with ::write_ocv. After reading the tool the training can be completed for those patterns which have not been trained so far. Otherwise a pattern comparison can be applied directly by calling ::do_ocv_simple.

As extension '.ocv' is used. If this extension is not given with the file name it will be added automatically.


Parameters

FileName (input_control)
filename -> HTuple.char *
Name of the file which has to be read.
Default value: 'test_ocv'

OCVHandle (output_control)
ocv -> long *
Handle of read OCV tool.


Example
read_ocv("ocv_file",&ocv_handle);
for (i=0; i<1000; i++)
{
  grab_image_async(&Image,fg_handle,-1);
  reduce_domain(Image,ROI,&Pattern);
  do_ocv_simple(Pattern,ocv_handle,"A",
                "true","true","false","true",10,
                &Quality);
}
close_ocv(ocv_handle);

Result

::read_ocv returns H_MSG_TRUE, if the file is correct. If the file could not be opened ::read_ocv returns H_MSG_FAIL. Otherwise, an exception handling is raised.


Possible Predecessors

::write_ocv


Possible Successors

::do_ocv_simple, ::close_ocv


See also

::read_ocr


Module

Optical character verification



Copyright © 1996-2002 MVTec Software GmbH