close_ocvT_close_ocvCloseOcvCloseOcvclose_ocv (算子)

名称

close_ocvT_close_ocvCloseOcvCloseOcvclose_ocv — 清除 OCV 工具。

签名

close_ocv( : : OCVHandle : )

Herror T_close_ocv(const Htuple OCVHandle)

void CloseOcv(const HTuple& OCVHandle)

void HOCV::CloseOcv() const

static void HOperatorSet.CloseOcv(HTuple OCVHandle)

void HOCV.CloseOcv()

def close_ocv(ocvhandle: HHandle) -> None

描述

close_ocvclose_ocvCloseOcvCloseOcvCloseOcvclose_ocv closes an open OCV tool and frees the memory. The OCV tool has been created using create_ocv_projcreate_ocv_projCreateOcvProjCreateOcvProjCreateOcvProjcreate_ocv_proj or read_ocvread_ocvReadOcvReadOcvReadOcvread_ocv。The handle is after this call no longer valid.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

OCVHandleOCVHandleOCVHandleOCVHandleOCVHandleocvhandle (输入控制,状态被修改)  ocv HOCV, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the OCV tool which has to be freed.

示例 (C++ (HALCON 5.0-10.0))

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);

结果

close_ocvclose_ocvCloseOcvCloseOcvCloseOcvclose_ocv returns 2 ( H_MSG_TRUE) , if the handle is valid.否则,将抛出异常。

可能的前趋

read_ocvread_ocvReadOcvReadOcvReadOcvread_ocv, create_ocv_projcreate_ocv_projCreateOcvProjCreateOcvProjCreateOcvProjcreate_ocv_proj

另见

close_ocrclose_ocrCloseOcrCloseOcrCloseOcrclose_ocr

模块

光学字符识别/光学字符验证