启动tesseract报错,请求大神帮忙破解qq空间看一下日志是什么原因

tesseract-ocr错误总结
最近在使用tesseract-ocr做图像识别,但是使用官方的训练集的准确率实在是低的可以。。。
没办法,还是自己做训练集把,但是接着就遇到了很多错误。。。
编译下面两句的时候
shapeclustering -F font_properties -U unicharset
eng.timesitalic.exp0.tr
mftraining -F font_properties -U unicharset -O eng.unicharset
eng.timesitalic.exp0.tr
出现错误:
Warning: No shape table file
present: shapetable
Reading num.tr …
Font id = -1/0, class id = 1/13 on sample 0
font_id &= 0 && font_id &
font_id_map_.SparseSiz
..\..\classify\trainingsampleset.cpp, line
原因:主要出在font_properties这个文件的配置上。
在使用tesseract-ocr时,生成的文件要用一下格式:
[lang].[fontname].exp[num].tif
其中lang为语言名称,fontname为字体名称,num为序号,可以随便定义。
在网上有一篇教程全程都使用orderNo作为文件名。。。结果浪费了我很多时间。。
出现在中文训练时:
大致就是编码的问题,BOX文件等需要使用UE保存成UTF-8格式
最后终于能弄出训练集了,但是结果不是很理想,还需要在努力。。。。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。启动tesseract报错,请大神帮忙看一下日志是什么原因?!万分感谢! - 开源中国社区
当前访客身份:游客 [
当前位置:
& . & ____ & & & & &_ & & & & & &__ _ _
&/\\ / ___'_ __ _ _(_)_ __ &__ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
&\\/ &___)| |_)| | | | | || (_| | &) ) ) )
& ' &|____| .__|_| |_|_| |_\__, | / / / /
&=========|_|==============|___/=/_/_/_/
&:: Spring Boot :: & & & &(v1.2.3.RELEASE)
[ 18:23:44443 INFO]--main--TesseractApplication: Starting TesseractApplication v2.0.0-SNAPSHOT on TimBai with PID 28824 (D:\TurboHIP\biplatform\tesseract-2.0.0-SNAPSHOT.jar started by Administrator in D:\TurboHIP\biplatform)&
[ 18:23:44539 INFO]--main--AnnotationConfigEmbeddedWebApplicationContext: Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@12a42f3: startup date [Mon May 16 18:23:44 CST 2016]; root of context hierarchy&
[ 18:23:46712 INFO]--main--XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [conf/applicationContext-cache.xml]&
[ 18:23:46946 INFO]--main--XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [conf/applicationContext-tesseract.xml]&
[ 18:23:46974 INFO]--main--XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [conf/applicationContext-properties.xml]&
[ 18:23:47184 INFO]--main--DefaultListableBeanFactory: Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract= lazyInit= autowireMode=3; dependencyCheck=0; autowireCandidate= primary= factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewC factoryMethodName=beanNameViewR initMethodName= destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract= lazyInit= autowireMode=3; dependencyCheck=0; autowireCandidate= primary= factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationA factoryMethodName=beanNameViewR initMethodName= destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]&
[ 18:23:47726 INFO]--main--PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [conf/tesseract.properties]&
[ 18:23:48140 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.jms.annotation.JmsBootstrapConfiguration' of type [class org.springframework.jms.annotation.JmsBootstrapConfiguration$$EnhancerBySpringCGLIB$$80e2d5a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48243 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$5992dfb7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48292 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'transactionAttributeSource' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48319 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'transactionInterceptor' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48346 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:49558 INFO]--main--TomcatEmbeddedServletContainer: Tomcat initialized with port(s): 8090 (http)&
[ 18:23:49810 INFO]--main--StandardService: Starting service Tomcat&
[ 18:23:49811 INFO]--main--StandardEngine: Starting Servlet Engine: Apache Tomcat/8.0.20&
[ 18:23:5079 INFO]--localhost-startStop-1--[/]: Initializing Spring embedded WebApplicationContext&
[ 18:23:5079 INFO]--localhost-startStop-1--ContextLoader: Root WebApplicationContext: initialization completed in 5544 ms&
[ 18:23:51474 INFO]--localhost-startStop-1--ServletRegistrationBean: Mapping servlet: 'dispatcherServlet' to [/]&
[ 18:23:51491 INFO]--localhost-startStop-1--FilterRegistrationBean: Mapping filter: 'characterEncodingFilter' to: [/*]&
[ 18:23:51491 INFO]--localhost-startStop-1--FilterRegistrationBean: Mapping filter: 'hiddenHttpMethodFilter' to: [/*]&
[ 18:23:5280 WARN]--main--AnnotationConfigEmbeddedWebApplicationContext: Exception encountered during context initialization - cancelling refresh attempt&
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceManageAction': Injection of resource nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourcePoolServiceImpl': Injection of resource nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStoreManager': Injection of autowired nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.redisson.Redisson com.baidu.rigel.biplatform.cache.store.service.impl.RedisStoreManagerImpl. nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisson' defined in com.baidu.rigel.biplatform.cache.config.BiplatformRedisConfiguration$RedisPooledConnectionConfiguration: Bean instantiation via f nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.Redisson]: Factory method 'redisson' nested exception is java.lang.NullPointerException
at org.springframework.monAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at com.baidu.rigel.biplatform.tesseract.application.TesseractApplication.main(TesseractApplication.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
at java.lang.Thread.run(Thread.java:745)
---------------问题补充---------------
:在eclipse中debug运行TesseractApplication的main方法能够正常执行,但是打包后的jar文件通过命令行执行报错:java -jar tesseract-2.0.0-SNAPSHOT.jar -Xmx2048m -Xms2048m
-Dserver.port=8020 --debug -Dac.config.location=tesseract.properties & log/tesseract.log &
:在eclipse中正常启动会输出:[ 18:05:09578 INFO]--main--HazelcastStoreManager: local memchine ip: 1.1.50.2
单独运行jar包不能输入该日志。
共有0个答案
更多开发者职位上
有什么技术问题吗?
baiheqi...的其它问题
类似的话题查看: 2451|回复: 4
c#2010使用自己训练的tesseract 文件报错
请教大神,我训练了一个data文件,c#调用的报错,求指导
Tesseract _ocr = new Tesseract(@&tessdata&, &eng1&, Tesseract.OcrEngineMode.OEM_TESSERACT_CUBE_COMBINED);
错误提示见附件。
c#2010使用自己训练的tesseract 文件报错
自己顶一个!
错误提示如下:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
c#2010使用自己训练的tesseract 文件报错
我晕,只有人看贴没人回贴,呜。。。
c#2010使用自己训练的tesseract 文件报错
大概知道原因了,估计是版本问题
训练出来的文件是用tesseract3的版本
c#2010使用自己训练的tesseract 文件报错
在使用相机标定函数时 出现cvut_test.exe 中的 0x000007fefd709e5d 处有未经处理的异常: Microsoft C++ 异常: 内存位置 0x002fc650 处的 cv::Exception。请各位大神帮帮忙,要做毕业设计弄不出来啊!
Powered by启动tesseract报错,请大神帮忙看一下日志是什么原因?!万分感谢! - 开源中国社区
当前访客身份:游客 [
当前位置:
& . & ____ & & & & &_ & & & & & &__ _ _
&/\\ / ___'_ __ _ _(_)_ __ &__ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
&\\/ &___)| |_)| | | | | || (_| | &) ) ) )
& ' &|____| .__|_| |_|_| |_\__, | / / / /
&=========|_|==============|___/=/_/_/_/
&:: Spring Boot :: & & & &(v1.2.3.RELEASE)
[ 18:23:44443 INFO]--main--TesseractApplication: Starting TesseractApplication v2.0.0-SNAPSHOT on TimBai with PID 28824 (D:\TurboHIP\biplatform\tesseract-2.0.0-SNAPSHOT.jar started by Administrator in D:\TurboHIP\biplatform)&
[ 18:23:44539 INFO]--main--AnnotationConfigEmbeddedWebApplicationContext: Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@12a42f3: startup date [Mon May 16 18:23:44 CST 2016]; root of context hierarchy&
[ 18:23:46712 INFO]--main--XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [conf/applicationContext-cache.xml]&
[ 18:23:46946 INFO]--main--XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [conf/applicationContext-tesseract.xml]&
[ 18:23:46974 INFO]--main--XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [conf/applicationContext-properties.xml]&
[ 18:23:47184 INFO]--main--DefaultListableBeanFactory: Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract= lazyInit= autowireMode=3; dependencyCheck=0; autowireCandidate= primary= factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewC factoryMethodName=beanNameViewR initMethodName= destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract= lazyInit= autowireMode=3; dependencyCheck=0; autowireCandidate= primary= factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationA factoryMethodName=beanNameViewR initMethodName= destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]&
[ 18:23:47726 INFO]--main--PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [conf/tesseract.properties]&
[ 18:23:48140 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.jms.annotation.JmsBootstrapConfiguration' of type [class org.springframework.jms.annotation.JmsBootstrapConfiguration$$EnhancerBySpringCGLIB$$80e2d5a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48243 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$5992dfb7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48292 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'transactionAttributeSource' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48319 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'transactionInterceptor' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:48346 INFO]--main--PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)&
[ 18:23:49558 INFO]--main--TomcatEmbeddedServletContainer: Tomcat initialized with port(s): 8090 (http)&
[ 18:23:49810 INFO]--main--StandardService: Starting service Tomcat&
[ 18:23:49811 INFO]--main--StandardEngine: Starting Servlet Engine: Apache Tomcat/8.0.20&
[ 18:23:5079 INFO]--localhost-startStop-1--[/]: Initializing Spring embedded WebApplicationContext&
[ 18:23:5079 INFO]--localhost-startStop-1--ContextLoader: Root WebApplicationContext: initialization completed in 5544 ms&
[ 18:23:51474 INFO]--localhost-startStop-1--ServletRegistrationBean: Mapping servlet: 'dispatcherServlet' to [/]&
[ 18:23:51491 INFO]--localhost-startStop-1--FilterRegistrationBean: Mapping filter: 'characterEncodingFilter' to: [/*]&
[ 18:23:51491 INFO]--localhost-startStop-1--FilterRegistrationBean: Mapping filter: 'hiddenHttpMethodFilter' to: [/*]&
[ 18:23:5280 WARN]--main--AnnotationConfigEmbeddedWebApplicationContext: Exception encountered during context initialization - cancelling refresh attempt&
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceManageAction': Injection of resource nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourcePoolServiceImpl': Injection of resource nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStoreManager': Injection of autowired nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.redisson.Redisson com.baidu.rigel.biplatform.cache.store.service.impl.RedisStoreManagerImpl. nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisson' defined in com.baidu.rigel.biplatform.cache.config.BiplatformRedisConfiguration$RedisPooledConnectionConfiguration: Bean instantiation via f nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.Redisson]: Factory method 'redisson' nested exception is java.lang.NullPointerException
at org.springframework.monAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at com.baidu.rigel.biplatform.tesseract.application.TesseractApplication.main(TesseractApplication.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
at java.lang.Thread.run(Thread.java:745)
---------------问题补充---------------
:在eclipse中debug运行TesseractApplication的main方法能够正常执行,但是打包后的jar文件通过命令行执行报错:java -jar tesseract-2.0.0-SNAPSHOT.jar -Xmx2048m -Xms2048m
-Dserver.port=8020 --debug -Dac.config.location=tesseract.properties & log/tesseract.log &
:在eclipse中正常启动会输出:[ 18:05:09578 INFO]--main--HazelcastStoreManager: local memchine ip: 1.1.50.2
单独运行jar包不能输入该日志。
共有0个答案
更多开发者职位上
有什么技术问题吗?
baiheqi...的其它问题
类似的话题

我要回帖

更多关于 tesseract ocr 的文章

 

随机推荐