Exemplo n.º 1
0
func (t *TesseractAPI) BaseAPIProcessPage(filename string, pix *lept.Pix, page_index int, retry_config *C.char, timeout_millisec int) string {
	cFilename := C.CString(filename)
	defer C.free(unsafe.Pointer(cFilename))
	cPix := pix.RawPix()

	out := C.TessBaseAPIProcessPage(
		t.api, (*C.struct_Pix)(unsafe.Pointer(cPix)),
		C.int(page_index), cFilename,
		retry_config, C.int(timeout_millisec))
	result := C.GoString(out)
	return result
}
Exemplo n.º 2
0
func (t *TesseractAPI) BaseAPISetImage(pix *lept.Pix) {
	cPix := pix.RawPix()
	C.TessBaseAPISetImage2(t.api, (*C.struct_Pix)(unsafe.Pointer(cPix)))
}