Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orc Chinese image return '\f' #146

Open
lhyfcs opened this issue Oct 13, 2020 · 1 comment
Open

orc Chinese image return '\f' #146

lhyfcs opened this issue Oct 13, 2020 · 1 comment

Comments

@lhyfcs
Copy link

lhyfcs commented Oct 13, 2020

Image url http://www.87shuwu.info/toimg/data/2531989624.png
Is image format issue or others?

@englianhu
Copy link

I tried to ocr an image in chi_sim but there quality is not too good, some characters unable recognize... Is there anyway to improve accuracy?

Screenshot_1

> if(!require('BBmisc')) {
+   install.packages('BBmisc', dependencies = TRUE, INSTALL_opts = '--no-lock')
+ }
Loading required package: BBmisc

Attaching package: ‘BBmisc’

The following object is masked from ‘package:base’:

    isFALSE

> 
> suppressPackageStartupMessages(library('BBmisc'))
> # suppressPackageStartupMessages(library('rmsfuns'))
> 
> pkgs <- c('devtools', 'knitr', 'kableExtra', 'tint', 
+           'devtools','readr',   'lubridate', 'data.table', 
+           'feather', 'purrr', 'quantmod', 'tidyquant', 
+           'tibbletime', 'furrr', 'flyingfox', 'tidyr', 
+           'timetk', 'plyr', 'dplyr', 'stringr', 'magrittr', 
+           'tidyverse', 'memoise', 'htmltools', 'formattable', 
+           'zoo', 'forecast', 'seasonal', 'seasonalview', 
+           'rugarch', 'rmgarch', 'mfGARCH', 'sparklyr', 
+           'microbenchmark', 'dendextend', 'lhmetools', 
+           'stringr', 'pacman', 'tesseract')
> # https://github.com/mpiktas/midasr
> # https://github.com/onnokleen/mfGARCH
> # devtools::install_github("business-science/tibbletime")
> # devtools::install_github("DavisVaughan/furrr")
> 
> suppressAll(lib(pkgs))
> 
> Sys.getlocale()
[1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
> Sys.setlocale(category = "LC_ALL", locale = "chs")
[1] "LC_COLLATE=Chinese (Simplified)_China.936;LC_CTYPE=Chinese (Simplified)_China.936;LC_MONETARY=Chinese (Simplified)_China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_China.936"
> ## https://stackoverflow.com/a/24521657/3806250
> lnk <- 'https://jinshuju.net/f/pVKgV3'
> 
> # NOT RUN {
> if(is.na(match('chi_sim', tesseract_info()$available)))
+   tesseract_download('chi_sim')
> if(is.na(match('chi_sim_vert', tesseract_info()$available)))
+   tesseract_download('chi_sim_vert')
> 
> 
> chi_sim <- tesseract('chi_sim')
> text <- tesseract::ocr('https://gd-pub.jinshujufiles.com/di/20180308130431_f4fead', engine = chi_sim)
> cat(text)
吕]                                                           要    本
四                   SB    外    良
全中通速递详情秘 人IIIIIIHIILIIIINIIINI|
)    砚更”通过ISO9001:2000国际质量体系认证
中 通       http://www.zto.cn           Ooo10256518135、*
全                     本
EEC, GO nm | |
人人详址,                      收件人详址:         示            中,
》   |  上 :重庆市永川区  人
AAA人人入           -                       二一              全            |
广东省广州市 白云区 东平村 _    南大街 兴南路 观南城3栋 和有。
单位名称:                        单位名称:                        本、
)   Company  Company   四
, 由风攻Frame:15880302646昨名: 510000 几电Bisam 13167939801必纺: :402181I   和
请在签字前阅读背书条款,贵 | 名化说明,         本          仙 和
》     重物品请保价,未保价物品的理赔                                   重 量            NE于4          了二
癸最高为次并的5入。        是 目 时         |
号 zw        配件
寄件人签名,         经办人签名:      备注;   Re     | 人
   Senderssign        Operators sign     Remarks       Charge       所RNX     有 多
寄件日期,    书市         加风上
ee    4月1日 时    月日 时| 遇     |人 站
和                  其让     FE        与 名       |
二 680102618135 wa           sn
   下  写!       !
器                             请用力正楷填写! PRESS HARD                                  器

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants