我正在使用Tesseract和OpenCL选项在我的项目中启用。在执行GetUTF8Text()方法时,我得到以下错误:
DS] Profile read from file (tesseract_opencl_profile_devices.dat).
[DS] Device[1] 1:Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz score is 14049349632.000000
[DS] Device[2] 1:HD Graphics 5000 score is 14049349632.000000
[DS] Device[3] 0:(null) score is 21474836480.000000
[DS] Selected Device[1]: "Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz" (OpenCL)
OpenCL error code is -54 at when clEnqueueNDRangeKernel kernel_HistogramRectAllChannels .
OpenCL error code is -54 at when clEnqueueNDRangeKernel kernel_HistogramRectAllChannelsReduction .
OpenCL error code is -54 at when clEnqueueNDRangeKernel kernel_ThresholdRectToPix .
OpenCL error code is -54 at when clEnqueueNDRangeKernel kernel_HistogramRectAllChannels .
OpenCL error code is -54 at when clEnqueueNDRangeKernel kernel_HistogramRectAllChannelsReduction .
使用的图书馆版本:
tesseract 3.04.00
leptonica-1.71
zlib 1.2.5
OpenCL info:
Found 1 platforms.
Platform name: Apple.
Version: OpenCL 1.2 (Dec 14 2014 22:29:47).
Found 2 devices.
Device 1 name: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz.
Device 2 name: HD Graphics 5000.
以前有没有人面对过这个问题?
发布于 2015-04-06 10:34:42
它看起来就像Tessaract用16x16
的工作组大小对内核进行排队,这是GPU上图像处理的一个相当典型的块大小。然而,苹果对CPU的OpenCL实现有一个限制,即工作组的大小只能是一维的(即第二维度必须是1),因此这个工作组大小将无效。您正在获取的错误代码(-54
)对应于CL_INVALID_WORK_GROUP_SIZE
。
如果您可以让Tesseract在GPU上运行(HD 5000),那么您应该没事。
https://stackoverflow.com/questions/29466580
复制相似问题