'잡동사니'에 해당되는 글 13142건

  1. 2023.12.27 tesseract 버전별 차이?
  2. 2023.12.27 tesseract 학습 데이터
  3. 2023.12.26 tesseract on arm
  4. 2023.12.25 캐논 br-e1
  5. 2023.12.24 개들은 무산 꿈을 꿀까
  6. 2023.12.23 약빨인가..
  7. 2023.12.21 elephant robotics cobot python api
  8. 2023.12.21 산업로봇과 협동로봇의 차이
  9. 2023.12.21 NXP i.mx8mp LF_v6.1.55-2.2.0 테스트
  10. 2023.12.21 ROS rviz

왼쪽은 PC(ubuntu 22.04)

오른쪽은 arm에서 소스 받아서 직접 빌드.

동일한 tessdata 를 이용했는데 인식율에 차이가 어마어마하게 난다 -_-

 

$ tesseract --dpi 132 스크린샷\ 2023-12-26\ 17-19-43.png - -v
tesseract 4.1.1
 leptonica-1.82.0
  libgif 5.1.9 : libjpeg 8d (libjpeg-turbo 2.1.1) : libpng 1.6.37 : libtiff 4.3.0 : zlib 1.2.11 : libwebp 1.2.2 : libopenjp2 2.4.0
 Found AVX2
 Found AVX
 Found FMA
 Found SSE
 Found libarchive 3.6.0 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.9.3 libzstd/1.4.8
Warning:guessing pitch as xheight on row 1, block 1
Pec ea a

ach Seer

OEE PC LU)

Pee at Pere EEC
Rae ientcee Prete meee ceed

aa MEL ig
Pace
Pace Cra ur ue ecg

feta
Reset

ERTL Ee a Peay



# ./tesseract /home/root/a.png - -v
tesseract 5.3.3
 leptonica-1.84.0
  libjpeg 6b (libjpeg-turbo 2.1.5.1) : libpng 1.6.39 : zlib 1.2.13 : libopenjp2 2.5.0
 Found NEON
 Found libarchive 3.6.2 zlib/1.2.13 liblzma/5.4.4 bz2lib/1.0.8 libzstd/1.5.4
 Found libcurl/8.0.1 OpenSSL/3.1.3 zlib/1.2.13 libidn2/2.3.4
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
Estimating resolution as 132
Warning:guessing pitch as xheight on row 1, block 1
1.MX8MP Evaluation Kit

.MxeMP 1.50 GHz

2020-06-07 2848 MB RAM

> Console Options wait, 65535 means
Select Language <Standard English> Reset

> Device Manager
> Boot Manager
> Boot Maintenance Manager

Continue
Reset

ay=Move Highlight <Enter>=Select Entry

 

--dpi 옵션 유용..한가?

[링크 : https://simmigyeong.tistory.com/3]

'프로그램 사용 > tesseract ocr' 카테고리의 다른 글

tesseract 학습 데이터  (0) 2023.12.27
tesseract on arm  (0) 2023.12.26
tesseract ocr  (0) 2023.12.21
번호판 인식(tesseract)  (0) 2021.10.14
Posted by 구차니

strace로 추적해보니 신기한(?) 파일 발견

eng는 그냥 data인데

osd.traineddata는 Matlab v4 mat-file로 나온다. 맞나.. 우연인가?

 

$ ls -alh /usr/share/tesseract-ocr/4.00/tessdata
합계 15M
drwxr-xr-x 4 root root 4.0K 12월 21 10:48 .
drwxr-xr-x 3 root root 4.0K  5월 30  2023 ..
drwxr-xr-x 2 root root 4.0K  5월 30  2023 configs
-rw-r--r-- 1 root root 4.0M  9월 16  2017 eng.traineddata
-rw-r--r-- 1 root root  11M  9월 16  2017 osd.traineddata
-rw-r--r-- 1 root root  572  2월  9  2022 pdf.ttf
drwxr-xr-x 2 root root 4.0K  5월 30  2023 tessconfigs

$ file *.traineddata
eng.traineddata: data
osd.traineddata: Matlab v4 mat-file (little endian) , text, rows 4294967295, columns 4294967295, imaginary


$ tree /usr/share/tesseract-ocr/4.00/tessdata
.
├── configs
│   ├── alto
│   ├── ambigs.train
│   ├── api_config
│   ├── bigram
│   ├── box.train
│   ├── box.train.stderr
│   ├── digits
│   ├── get.images
│   ├── hocr
│   ├── inter
│   ├── kannada
│   ├── linebox
│   ├── logfile
│   ├── lstm.train
│   ├── lstmbox
│   ├── lstmdebug
│   ├── makebox
│   ├── pdf
│   ├── quiet
│   ├── rebox
│   ├── strokewidth
│   ├── tsv
│   ├── txt
│   ├── unlv
│   └── wordstrbox
├── eng.traineddata
├── osd.traineddata
├── pdf.ttf
└── tessconfigs
    ├── batch
    ├── batch.nochop
    ├── matdemo
    ├── msdemo
    ├── nobatch
    └── segdemo

2 directories, 34 files

 

kor 은 15메가

[링크 : https://github.com/tesseract-ocr/tessdata]

 

 

+

실행하니 당연히(?) tesseract용 데이터가 없다고 오류가 발생한다.

혹시나 해서 변수는 확인해도 비어있고

pc에서 복사해서 설정해주니 ok

~/tesseract-main/build/bin# ./tesseract /home/root/a.png -
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
Error opening data file ./eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
root@imx8mpevk:~/tesseract-main/build/bin# echo $TESSDATA_PREFIX

# export TESSDATA_PREFIX=/home/root/tessdata

 

아래 이미지를 인식시킴(pc는 dpi가 이상하다고 인식을 못함)

 

의외로 잘 인식한다.

그런데 pc 에서는 인식을 이상하게 했지만 0.2초

i.mx8 에서는 인식을 잘했지만 1.6초. 흐음.. 실시간으로 돌리기에는 무리군..

# time ./tesseract /home/root/a.png -
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
Estimating resolution as 132
Warning:guessing pitch as xheight on row 1, block 1
1.MX8MP Evaluation Kit

.MxeMP 1.50 GHz

2020-06-07 2848 MB RAM

> Console Options wait, 65535 means
Select Language <Standard English> Reset

> Device Manager
> Boot Manager
> Boot Maintenance Manager

Continue
Reset

ay=Move Highlight <Enter>=Select Entry

real 0m1.646s
user 0m1.578s
sys 0m0.060s

'프로그램 사용 > tesseract ocr' 카테고리의 다른 글

tesseract 버전별 차이?  (0) 2023.12.27
tesseract on arm  (0) 2023.12.26
tesseract ocr  (0) 2023.12.21
번호판 인식(tesseract)  (0) 2021.10.14
Posted by 구차니

빌드 하려고 해도 빡세다

 

tesseact 빌드 하려니 leptonica라는게 필요하다고 에러나고

# cmake ..
-- Configuring tesseract version 5.3.3...
-- IPO / LTO not supported: <Change Dir: /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin

Run Build Command(s):/usr/bin/make -f Makefile && /usr/bin/cmake -S/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/src -B/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin/CMakeFiles /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin//CMakeFiles/progress.marks
/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
/usr/bin/make  -f CMakeFiles/foo.dir/build.make CMakeFiles/foo.dir/depend
make[2]: Entering directory '/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
cd /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/src /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/src /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin/CMakeFiles/foo.dir/DependInfo.cmake
make[2]: Leaving directory '/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
/usr/bin/make  -f CMakeFiles/foo.dir/build.make CMakeFiles/foo.dir/build
make[2]: Entering directory '/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
[ 25%] Building CXX object CMakeFiles/foo.dir/foo.cpp.o
/usr/bin/c++   -flto=auto -fno-fat-lto-objects -o CMakeFiles/foo.dir/foo.cpp.o -c /home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/src/foo.cpp
[ 50%] Linking CXX static library libfoo.a
/usr/bin/cmake -P CMakeFiles/foo.dir/cmake_clean_target.cmake
/usr/bin/cmake -E cmake_link_script CMakeFiles/foo.dir/link.txt --verbose=1
"CMAKE_CXX_COMPILER_AR-NOTFOUND" cr libfoo.a CMakeFiles/foo.dir/foo.cpp.o
Error running link command: No such file or directory
make[2]: *** [CMakeFiles/foo.dir/build.make:100: libfoo.a] Error 2
make[2]: Leaving directory '/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
make[1]: *** [CMakeFiles/Makefile2:88: CMakeFiles/foo.dir/all] Error 2
make[1]: Leaving directory '/home/root/tesseract-main/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
make: *** [Makefile:94: all] Error 2

>
-- CMAKE_SYSTEM_PROCESSOR=<aarch64>
-- LTO build is not supported on arm/RBPi.
-- Could NOT find Leptonica (missing: Leptonica_DIR)
-- Checking for module 'lept>=1.74'
--   No package 'lept' found
CMake Error at CMakeLists.txt:404 (message):
  Cannot find required library Leptonica.  Quitting!


-- Configuring incomplete, errors occurred!
See also "/home/root/tesseract-main/build/CMakeFiles/CMakeOutput.log".
See also "/home/root/tesseract-main/build/CMakeFiles/CMakeError.log".

[링크 : https://github.com/tesseract-ocr/tesseract]

 

leptonica 라는거 빌드하려니 이젠 openjp2가 없다고 -_-

# cmake ..
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) (Required is at least version "5")
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Could NOT find WebP (missing: WebP_DIR)
-- WebP_INCLUDE_DIR : WebP_INCLUDE_DIR-NOTFOUND
WebP_MUX_INCLUDE_DIR: WebP_MUX_INCLUDE_DIR-NOTFOUND
WebP_LIBRARY: WebP_LIBRARY-NOTFOUND
WebP_MUX_LIBRARY: WebP_MUX_LIBRARY-NOTFOUND
CMake Error at /usr/lib/openjpeg-2.5/OpenJPEGTargets.cmake:95 (message):
  The imported target "openjp2_static" references the file

     "/usr/lib/libopenjp2.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/openjpeg-2.5/OpenJPEGTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/openjpeg-2.5/OpenJPEGConfig.cmake:28 (include)
  CMakeLists.txt:186 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/root/leptonica-master/build/CMakeFiles/CMakeOutput.log".

 

귀찮으니(!) 걍 주석으로 막고 인자가 3개인 녀석으로 강제 빌드!

//#if OPJ_VERSION_MINOR == 0                                                
//    opj_stream_set_user_data(l_stream, fp);                               
//#else                                                                  
    opj_stream_set_user_data(l_stream, fp,                               
                             (opj_stream_free_user_data_fn)NULL);        
//#endif                                                    

[링크 : https://github.com/danbloomberg/leptonica]

[링크 : http://www.leptonica.org/]

 

openjpeg는 별다른 에러없이 빌드 완료

[링크 : https://github.com/uclouvain/openjpeg]

 

leptonica 에서

src/jp2kio.c 에서 아래의 부분에서 MINOR가 0으로 되면서 구버전(?) 소스를 호출하는지 함수의 형태가 달라서 에러난다.

/home/root/leptonica-master/src/jp2kio.c: In function 'opjCreateStream':
/home/root/leptonica-master/src/jp2kio.c:938:5: error: too few arguments to function 'opj_stream_set_user_data'
  938 |     opj_stream_set_user_data(l_stream, fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

 

tesseract 다시 하려니 pangocairo 패키지가 없다고 에러.. 젠장.. 이거 이전에 weston 할때

개고생(?) 시키던 이름이 악몽으로 떠오르는데?

--   No package 'pangocairo' found

 

meson 깔고

# pip3 install meson
Collecting meson
  Downloading meson-1.3.0-py3-none-any.whl (976 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 976.4/976.4 kB 3.5 MB/s eta 0:00:00
Installing collected packages: meson
Successfully installed meson-1.3.0

 

pango 빌드 하려는데 git 필요하대서 git 깔고

WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency fribidi found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency fribidi

../meson.build:218:14: ERROR: Git program not found, cannot download fribidi.wrap via git.

 

아래 링크에서 받아서 빌드..

$ wget https://www.kernel.org/pub/software/scm/git/git-2.43.0.tar.gz

 

pango 다시 빌드하는데 ninja 없으면 배쨈! 시전하고

$ mkdir build
$ cd build
$ meson ..
ERROR: Could not detect Ninja v1.8.2 or newer

 

ninja 빌드하고 설치하려는데 또 백태클 -_-

그러니 cmake를 멀리하고

 12%] Building CXX object CMakeFiles/libninja.dir/src/dyndep_parser.cc.o
In file included from /home/root/ninja-master/build/_deps/googletest-src/googletest/src/gtest-all.cc:42:
/home/root/ninja-master/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function 'bool testing::internal::StackGrowsDown()':
/home/root/ninja-master/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: 'dummy' may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

 

파이썬으로 빌드하는게 낫....

# python3 configure.py --bootstrap

[링크 : https://github.com/ninja-build/ninja]

 

다시 pango으로 돌아와서

$ meson ..
Found ninja-1.12.0.git at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

 

build 안에서 ninja 치니 알아서 빌드. + 설치

~/pango-main/build# ninja
~/pango-main/build# ninja install

 

pango도 했는데 tesseract 다시 빌드 하려니 안된다 -_-

그냥 설치하는게 아니라 패키지로 만들어서 했어야 했나?

-- Checking for modules 'pango>=1.38.0;cairo;pangoft2;pangocairo;fontconfig'
--   No package 'pango' found
--   No package 'pangoft2' found
--   No package 'pangocairo' found

 

귀찮으니(!) cmake에서 패키지 확인하지 않도록 수정

~/tesseract-main/build# vi ../src/training/CMakeLists.txt
  if(PKG_CONFIG_FOUND OR SW_BUILD)
                   
    if(PKG_CONFIG_FOUND)  
      pkg_check_modules(
        PANGO                            
        REQUIRED
        IMPORTED_TARGET    
#        pango>=1.38.0
#        cairo       
#        pangoft2              
#        pangocairo
        fontconfig)  
    endif()

 

[ 95%] Building CXX object src/training/CMakeFiles/pango_training.dir/pango/ligature_table.cpp.o
In file included from /home/root/tesseract-main/src/training/pango/ligature_table.cpp:24:
/home/root/tesseract-main/src/training/pango/pango_font_info.h:27:10: fatal error: pango/pango-font.h: No such file or directory
   27 | #include "pango/pango-font.h"
      |          ^~~~~~~~~~~~~~~~~~~~

[ 96%] Building CXX object src/training/CMakeFiles/pango_training.dir/pango/tlog.cpp.o
In file included from /home/root/tesseract-main/src/training/pango/stringrenderer.cpp:20:
/home/root/tesseract-main/src/training/pango/stringrenderer.h:33:10: fatal error: pango/pango-layout.h: No such file or directory
   33 | #include "pango/pango-layout.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/training/CMakeFiles/pango_training.dir/build.make:118: src/training/CMakeFiles/pango_training.dir/pango/stringrenderer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/root/tesseract-main/src/training/pango/ligature_table.cpp:24:
/home/root/tesseract-main/src/training/pango/pango_font_info.h:27:10: fatal error: pango/pango-font.h: No such file or directory
   27 | #include <pango/pango-font.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/training/CMakeFiles/pango_training.dir/build.make:90: src/training/CMakeFiles/pango_training.dir/pango/ligature_table.cpp.o] Error 1
In file included from /home/root/tesseract-main/src/training/pango/pango_font_info.cpp:32:
/home/root/tesseract-main/src/training/pango/pango_font_info.h:27:10: fatal error: pango/pango-font.h: No such file or directory
   27 | #include <pango/pango-font.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

 

아마 패키지에서 배째는거 같은데 수작업으로 변경.. -_-

#include "pango/pango-font.h"
#include "pango/pango.h"
#include "pango/pangocairo.h"

#include <pango/pango-font.h>
#include <pango/pango.h>
#include <pango/pangocairo.h>

 

밑도 끝도 없네 -_-

[ 96%] Building CXX object src/training/CMakeFiles/pango_training.dir/pango/pango_font_info.cpp.o
In file included from /usr/local/include/pango/pango-font.h:25,
                 from /usr/local/include/pango/pango-attributes.h:25,
                 from /usr/local/include/pango/pango-layout.h:25,
                 from /home/root/tesseract-main/src/training/pango/stringrenderer.h:33,
                 from /home/root/tesseract-main/src/training/pango/stringrenderer.cpp:20:
/usr/local/include/pango/pango-coverage.h:25:10: fatal error: glib-object.h: No such file or directory
   25 | #include <glib-object.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/training/CMakeFiles/pango_training.dir/build.make:118: src/training/CMakeFiles/pango_training.dir/pango/stringrenderer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/local/include/pango/pango-font.h:25,
                 from /home/root/tesseract-main/src/training/pango/pango_font_info.h:27,
                 from /home/root/tesseract-main/src/training/pango/ligature_table.cpp:24:
/usr/local/include/pango/pango-coverage.h:25:10: fatal error: glib-object.h: No such file or directory
   25 | #include <glib-object.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/training/CMakeFiles/pango_training.dir/build.make:90: src/training/CMakeFiles/pango_training.dir/pango/ligature_table.cpp.o] Error 1
In file included from /usr/local/include/pango/pango-font.h:25,
                 from /home/root/tesseract-main/src/training/pango/pango_font_info.h:27,
                 from /home/root/tesseract-main/src/training/pango/pango_font_info.cpp:32:
/usr/local/include/pango/pango-coverage.h:25:10: fatal error: glib-object.h: No such file or directory
   25 | #include <glib-object.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

 

[ 96%] Building CXX object src/training/CMakeFiles/pango_training.dir/pango/stringrenderer.cpp.o
In file included from /usr/local/include/pango/pango-coverage.h:25,
                 from /usr/local/include/pango/pango-font.h:25,
                 from /usr/local/include/pango/pango-attributes.h:25,
                 from /usr/local/include/pango/pango-layout.h:25,
                 from /home/root/tesseract-main/src/training/pango/stringrenderer.h:33,
                 from /home/root/tesseract-main/src/training/pango/stringrenderer.cpp:20:
/usr/include/glib-2.0/glib-object.h:24:10: fatal error: gobject/gbinding.h: No such file or directory
   24 | #include <gobject/gbinding.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/training/CMakeFiles/pango_training.dir/build.make:118: src/training/CMakeFiles/pango_training.dir/pango/stringrenderer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/local/include/pango/pango-coverage.h:25,
                 from /usr/local/include/pango/pango-font.h:25,
                 from /home/root/tesseract-main/src/training/pango/pango_font_info.h:27,
                 from /home/root/tesseract-main/src/training/pango/ligature_table.cpp:24:
/usr/include/glib-2.0/glib-object.h:24:10: fatal error: gobject/gbinding.h: No such file or directory
   24 | #include <gobject/gbinding.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/training/CMakeFiles/pango_training.dir/build.make:90: src/training/CMakeFiles/pango_training.dir/pango/ligature_table.cpp.o] Error 1
In file included from /usr/local/include/pango/pango-coverage.h:25,
                 from /usr/local/include/pango/pango-font.h:25,
                 from /home/root/tesseract-main/src/training/pango/pango_font_info.h:27,
                 from /home/root/tesseract-main/src/training/pango/pango_font_info.cpp:32:
/usr/include/glib-2.0/glib-object.h:24:10: fatal error: gobject/gbinding.h: No such file or directory
   24 | #include <gobject/gbinding.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

 

inclue path를 찾는데 Makefile에 없어서 뒤져보니.. 저게 맞길..

# grep -rn "\-I" .
./CMakeFiles/libtesseract.dir/flags.make:7:CXX_INCLUDES = -I/home/root/tesseract-main/include -I/home/root/tesseract-main/src/arch -I/home/root/tesseract-main/src/ccmain -I/home/root/tesseract-main/src/ccstruct -I/home/root/tesseract-main/src/ccutil -I/home/root/tesseract-main/src/classify -I/home/root/tesseract-main/src/cutil -I/home/root/tesseract-main/src/dict -I/home/root/tesseract-main/src/lstm -I/home/root/tesseract-main/src/opencl -I/home/root/tesseract-main/src/textord -I/home/root/tesseract-main/src/viewer -I/home/root/tesseract-main/src/wordrec -I/home/root/tesseract-main/src/training -I/home/root/tesseract-main/src -I/usr/local/include/leptonica -I/home/root/tesseract-main/build -I/home/root/tesseract-main/build/include
./CMakeFiles/tesseract.dir/flags.make:7:CXX_INCLUDES = -I/usr/local/include/leptonica -I/home/root/tesseract-main/build -I/home/root/tesseract-main/build/include -I/home/root/tesseract-main/include -I/home/root/tesseract-main/src/arch -I/home/root/tesseract-main/src/ccmain -I/home/root/tesseract-main/src/ccstruct -I/home/root/tesseract-main/src/ccutil -I/home/root/tesseract-main/src/classify -I/home/root/tesseract-main/src/cutil -I/home/root/tesseract-main/src/dict -I/home/root/tesseract-main/src/lstm -I/home/root/tesseract-main/src/opencl -I/home/root/tesseract-main/src/textord -I/home/root/tesseract-main/src/viewer -I/home/root/tesseract-main/src/wordrec -I/home/root/tesseract-main/src/training

'프로그램 사용 > tesseract ocr' 카테고리의 다른 글

tesseract 버전별 차이?  (0) 2023.12.27
tesseract 학습 데이터  (0) 2023.12.27
tesseract ocr  (0) 2023.12.21
번호판 인식(tesseract)  (0) 2021.10.14
Posted by 구차니

eos r50용 리모컨

나온지 얼마안되서 인터벌 지원하는 리모컨 찾기가 힘들려나?

'개소리 왈왈 > 사진과 수다' 카테고리의 다른 글

탐론 SP AF 17-50mm F2.8 XR Di II VC  (0) 2024.06.12
500d 줍줍  (0) 2024.06.10
아부지 카메라 강탈!  (0) 2023.11.23
eos m 수리 부품...  (0) 2023.09.01
슈퍼~~~문  (0) 2023.08.31
Posted by 구차니

앞뒷다리 버둥버듕 하면서

혼자 짖기도 하고

도대체 무산 뀸을 꾸는 걸까 ㅎㅎ

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

폭설  (0) 2023.12.30
  (0) 2023.12.28
약빨인가..  (0) 2023.12.23
피곤하다!!!  (0) 2023.12.17
동물병원  (0) 2023.12.10
Posted by 구차니

아주 잠만 잔다 -_ㅠ

항히스타민제가 들어있다고 한데 기절하기 보다는

깨워져만 있는 수준이기도 한것 같고..(회사에서는)

집에서는 그나마도 마음 놔버리기 기절하는건가..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

  (0) 2023.12.28
개들은 무산 꿈을 꿀까  (0) 2023.12.24
피곤하다!!!  (0) 2023.12.17
동물병원  (0) 2023.12.10
연차인데 병원 투어  (0) 2023.12.05
Posted by 구차니
embeded/robot2023. 12. 21. 18:02

좌표계를 이해할 시간에

차라리 get_coords() 함수로 x,y,z,rx,ry,rz를 읽어서 저장하고

send_coords()를 이용하여 저장된 위치로 이동시키면 간단하게 만들수 있다.

 

get_coords
Prototype: get_coords()

Description: Get the Coords from robot arm, coordinate system based on base.

Returns: list: A float list of coord - [x, y, z, rx, ry, rz]

send_coords
Prototype: send_coords(coords, speed, mode)

Description: Send all coords to robot arm.

Parameters

coords: a list of coords value(List[float]), length 6.
speed: (int) 0 ~ 100
mode: (int): 0 - angular, 1 - linear
Example

from pymycobot.mycobot import MyCobot
from pymycobot.genre import Coord

mycobot = MyCobot('/dev/ttyUSB0')
mycobot.send_coords([160, 160, 160, 0, 0, 0], 70, 0)

[링크 : https://docs.elephantrobotics.com/docs/gitbook-en/7-ApplicationBasePython/7.8_API.html#getcoords]

 

atom 버튼을 눌러서 자동으로 좌표 나오게 한다거나

서보의 힘을 빼는게 아니라 약하게 해서 위치를 살짝 트는건 안되려나?

release_all_servo()는 전원 끈마냥 훅 쓰러지니 주의

[링크 : https://docs.elephantrobotics.com/docs/gitbook-en/7-ApplicationBasePython/7.8_API.html#releaseallservos]

'embeded > robot' 카테고리의 다른 글

elephantrobotics Mycobot-pi atom  (0) 2024.07.11
산업로봇과 협동로봇의 차이  (0) 2023.12.21
ROS rviz  (0) 2023.12.21
오일러 각 / 짐벌락 / 쿼터니언  (0) 2023.12.21
6축 로봇 좌표계(TCP?)  (0) 2023.12.15
Posted by 구차니
embeded/robot2023. 12. 21. 17:57

대충 요약(?)하자면

 

안전 측면에서 협동로봇은 산업로봇보다 힘이 약하고 느리며, 안전 펜스도 없어도 됨

설치 측면에서 협동로봇은 사용자가 학습을 시킬수 있으나, 산업로봇은 전문 프로그래머가 바꾸어야 함

 

반대로 생각하면 협동로봇은

힘이 약하고 느린대신(고출력 모터를 사용하지 않아 가격이 낮아짐?)

안전 펜스등을 통한 사용자와 분리할 필요가 없고(즉 안전관리자나 설치레벨에서의 안전 고려가 빠져도 된다)

사용자가 프로그래밍을 수정할 수 있다(학습/티칭) 정도고 구분이 될 듯

 

다만 사용자가 프로그램을 수정할 수 있도록 하기 위해

서보에 엔코더가 들어가서 외력에 의해서 움직이는 각도를 읽어낼수 있어야 하기 때문에

저출력으로 인한 가격 하락분이 상쇄될수도 있을 듯.

 

 

[링크 : https://www.myrobotsolution.com/contents/success-story/3aOp7xvmOuqBOjWsCbcR]

[링크 : https://blog.naver.com/universalrobots/221565530432]

[링크 : https://www.korearobot.or.kr/wp/wp-content/uploads/2021/06/특허청-로봇IP-협동로봇-특집편.pdf]

'embeded > robot' 카테고리의 다른 글

elephantrobotics Mycobot-pi atom  (0) 2024.07.11
elephant robotics cobot python api  (0) 2023.12.21
ROS rviz  (0) 2023.12.21
오일러 각 / 짐벌락 / 쿼터니언  (0) 2023.12.21
6축 로봇 좌표계(TCP?)  (0) 2023.12.15
Posted by 구차니
embeded/i.mx 8m plus2023. 12. 21. 15:51

i.MX Machine Learning User's Guide에 있는거 테스트 해봄

The behavior is as follows:
• If USE_GPU_INFERENCE=1, the graph is executed on the GPU
• Otherwise, the graph is executed on the NPU (if available)
By default, the NPU is used for OpenVX graph execution.

 

전체 실행시간으로는 neon 이 가장 빨랐고, inference 시간으로는 NPU가 가장 빨랐다.

의외로 GPU 가속이 NEON만도 못하다는 충격적인(!) 결과가..

root@imx8mpevk:/usr/bin/tensorflow-lite-2.12.1/examples# time ./label_image 
INFO: Loaded model ./mobilenet_v1_1.0_224_quant.tflite
INFO: resolved reporter
INFO: invoked
INFO: average time: 41.16 ms
INFO: 0.764706: 653 military uniform
INFO: 0.121569: 907 Windsor tie
INFO: 0.0156863: 458 bow tie
INFO: 0.0117647: 466 bulletproof vest
INFO: 0.00784314: 835 suit

real    0m0.173s
user    0m0.520s
sys     0m0.024s
root@imx8mpevk:/usr/bin/tensorflow-lite-2.12.1/examples# time USE_GPU_INFERENCE=0 ./label_image --external_delegate_path=/usr/lib/libvx_delegate.so
INFO: Loaded model ./mobilenet_v1_1.0_224_quant.tflite
INFO: resolved reporter
Vx delegate: allowed_cache_mode set to 0.
Vx delegate: device num set to 0.
Vx delegate: allowed_builtin_code set to 0.
Vx delegate: error_during_init set to 0.
Vx delegate: error_during_prepare set to 0.
Vx delegate: error_during_invoke set to 0.
EXTERNAL delegate created.
INFO: Applied EXTERNAL delegate.
W [HandleLayoutInfer:291]Op 162: default layout inference pass.
INFO: invoked
INFO: average time: 2.861 ms
INFO: 0.768627: 653 military uniform
INFO: 0.105882: 907 Windsor tie
INFO: 0.0196078: 458 bow tie
INFO: 0.0117647: 466 bulletproof vest
INFO: 0.00784314: 835 suit

real    0m3.116s
user    0m2.916s
sys     0m0.195s
root@imx8mpevk:/usr/bin/tensorflow-lite-2.12.1/examples# time USE_GPU_INFERENCE=1 ./label_image --external_delegate_path=/usr/lib/libvx_delegate.so
INFO: Loaded model ./mobilenet_v1_1.0_224_quant.tflite
INFO: resolved reporter
Vx delegate: allowed_cache_mode set to 0.
Vx delegate: device num set to 0.
Vx delegate: allowed_builtin_code set to 0.
Vx delegate: error_during_init set to 0.
Vx delegate: error_during_prepare set to 0.
Vx delegate: error_during_invoke set to 0.
EXTERNAL delegate created.
INFO: Applied EXTERNAL delegate.
W [query_hardware_caps:89]Unsupported evis version
W [HandleLayoutInfer:291]Op 162: default layout inference pass.
INFO: invoked
INFO: average time: 171.261 ms
INFO: 0.784314: 653 military uniform
INFO: 0.105882: 907 Windsor tie
INFO: 0.0156863: 458 bow tie
INFO: 0.00784314: 466 bulletproof vest
INFO: 0.00392157: 835 suit

real    0m1.992s
user    0m1.377s
sys     0m0.103s

'embeded > i.mx 8m plus' 카테고리의 다른 글

sounddevice on arm i.mx8 evk  (0) 2024.05.14
missed: not vectorized: relevant stmt not supported:  (0) 2023.08.31
nxp i.mx8mp win iot part 2  (0) 2023.05.26
nxp i.mx8mp win iot  (0) 2023.05.26
rpmsg-lite  (0) 2023.03.23
Posted by 구차니
embeded/robot2023. 12. 21. 15:34

'embeded > robot' 카테고리의 다른 글

elephantrobotics Mycobot-pi atom  (0) 2024.07.11
elephant robotics cobot python api  (0) 2023.12.21
산업로봇과 협동로봇의 차이  (0) 2023.12.21
오일러 각 / 짐벌락 / 쿼터니언  (0) 2023.12.21
6축 로봇 좌표계(TCP?)  (0) 2023.12.15
Posted by 구차니