Showing preview only (7,893K chars total). Download the full file or copy to clipboard to get everything.
Repository: alexcohn/tess-two
Branch: 4.1
Commit: 377ddf88f65d
Files: 594
Total size: 7.4 MB
Directory structure:
gitextract_37xgee5l/
├── .gitignore
├── .gitmodules
├── BUILDING.md
├── CHANGELOG.md
├── COPYING
├── ISSUE_TEMPLATE.md
├── README.md
├── build.gradle
├── eyes-two/
│ ├── .classpath
│ ├── .project
│ ├── AndroidManifest.xml
│ ├── COPYING
│ ├── build.gradle
│ ├── build.xml
│ ├── project.properties
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── OpticalFlowTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── eyesfree/
│ │ ├── opticflow/
│ │ │ ├── ImageBlur.java
│ │ │ └── OpticalFlow.java
│ │ └── textdetect/
│ │ ├── HydrogenTextDetector.java
│ │ └── Thresholder.java
│ └── jni/
│ ├── Android.mk
│ ├── Application.mk
│ ├── common/
│ │ ├── Android.mk
│ │ ├── time_log.cpp
│ │ ├── time_log.h
│ │ ├── types.h
│ │ └── utils.h
│ ├── hydrogen/
│ │ ├── Android.mk
│ │ ├── jni/
│ │ │ ├── common.h
│ │ │ ├── hydrogentextdetector.cpp
│ │ │ ├── jni.cpp
│ │ │ └── thresholder.cpp
│ │ └── src/
│ │ ├── clusterer.cpp
│ │ ├── clusterer.h
│ │ ├── hydrogentextdetector.cpp
│ │ ├── hydrogentextdetector.h
│ │ ├── leptonica.h
│ │ ├── thresholder.cpp
│ │ ├── thresholder.h
│ │ ├── utilities.cpp
│ │ ├── utilities.h
│ │ ├── validator.cpp
│ │ └── validator.h
│ ├── imageutils/
│ │ ├── Android.mk
│ │ ├── blur-jni.cpp
│ │ ├── blur.cpp
│ │ ├── blur.h
│ │ ├── similar-jni.cpp
│ │ ├── similar.cpp
│ │ └── similar.h
│ └── opticalflow/
│ ├── Android.mk
│ ├── feature_detector.cpp
│ ├── feature_detector.h
│ ├── image.h
│ ├── optical_flow-jni.cpp
│ ├── optical_flow.cpp
│ ├── optical_flow.h
│ └── optical_flow_utils.h
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── preparetests.cmd
├── preparetests.sh
├── settings.gradle
├── tess-two/
│ ├── .classpath
│ ├── .gitignore
│ ├── .project
│ ├── AndroidManifest.xml
│ ├── COPYING
│ ├── build.gradle
│ ├── build.xml
│ ├── jni/
│ │ ├── Android.mk
│ │ ├── Application.mk
│ │ ├── com_googlecode_leptonica_android/
│ │ │ ├── Android.mk
│ │ │ ├── box.cpp
│ │ │ ├── boxa.cpp
│ │ │ ├── common.h
│ │ │ ├── endianness.h
│ │ │ ├── jni.cpp
│ │ │ ├── pix.cpp
│ │ │ ├── pixa.cpp
│ │ │ ├── readfile.cpp
│ │ │ ├── utilities.cpp
│ │ │ └── writefile.cpp
│ │ ├── com_googlecode_tesseract_android/
│ │ │ ├── Android.mk
│ │ │ ├── common.h
│ │ │ ├── debugpixa.h
│ │ │ ├── pageiterator.cpp
│ │ │ ├── resultiterator.cpp
│ │ │ ├── tess_version.h
│ │ │ └── tessbaseapi.cpp
│ │ ├── libjpeg/
│ │ │ ├── Android.mk
│ │ │ ├── Makefile.am
│ │ │ ├── README
│ │ │ ├── ar-lib
│ │ │ ├── cderror.h
│ │ │ ├── cdjpeg.c
│ │ │ ├── cdjpeg.h
│ │ │ ├── change.log
│ │ │ ├── cjpeg.1
│ │ │ ├── cjpeg.c
│ │ │ ├── ckconfig.c
│ │ │ ├── coderules.txt
│ │ │ ├── compile
│ │ │ ├── config.guess
│ │ │ ├── config.sub
│ │ │ ├── configure.ac
│ │ │ ├── depcomp
│ │ │ ├── djpeg.1
│ │ │ ├── djpeg.c
│ │ │ ├── example.c
│ │ │ ├── filelist.txt
│ │ │ ├── install-sh
│ │ │ ├── install.txt
│ │ │ ├── jaricom.c
│ │ │ ├── jcapimin.c
│ │ │ ├── jcapistd.c
│ │ │ ├── jcarith.c
│ │ │ ├── jccoefct.c
│ │ │ ├── jccolor.c
│ │ │ ├── jcdctmgr.c
│ │ │ ├── jchuff.c
│ │ │ ├── jcinit.c
│ │ │ ├── jcmainct.c
│ │ │ ├── jcmarker.c
│ │ │ ├── jcmaster.c
│ │ │ ├── jcomapi.c
│ │ │ ├── jconfig.bcc
│ │ │ ├── jconfig.cfg
│ │ │ ├── jconfig.dj
│ │ │ ├── jconfig.h
│ │ │ ├── jconfig.mac
│ │ │ ├── jconfig.manx
│ │ │ ├── jconfig.mc6
│ │ │ ├── jconfig.sas
│ │ │ ├── jconfig.st
│ │ │ ├── jconfig.txt
│ │ │ ├── jconfig.vc
│ │ │ ├── jconfig.vms
│ │ │ ├── jconfig.wat
│ │ │ ├── jcparam.c
│ │ │ ├── jcprepct.c
│ │ │ ├── jcsample.c
│ │ │ ├── jctrans.c
│ │ │ ├── jdapimin.c
│ │ │ ├── jdapistd.c
│ │ │ ├── jdarith.c
│ │ │ ├── jdatadst.c
│ │ │ ├── jdatasrc.c
│ │ │ ├── jdcoefct.c
│ │ │ ├── jdcolor.c
│ │ │ ├── jdct.h
│ │ │ ├── jddctmgr.c
│ │ │ ├── jdhuff.c
│ │ │ ├── jdinput.c
│ │ │ ├── jdmainct.c
│ │ │ ├── jdmarker.c
│ │ │ ├── jdmaster.c
│ │ │ ├── jdmerge.c
│ │ │ ├── jdpostct.c
│ │ │ ├── jdsample.c
│ │ │ ├── jdtrans.c
│ │ │ ├── jerror.c
│ │ │ ├── jerror.h
│ │ │ ├── jfdctflt.c
│ │ │ ├── jfdctfst.c
│ │ │ ├── jfdctint.c
│ │ │ ├── jidctflt.c
│ │ │ ├── jidctfst.c
│ │ │ ├── jidctint.c
│ │ │ ├── jinclude.h
│ │ │ ├── jmemansi.c
│ │ │ ├── jmemdos.c
│ │ │ ├── jmemdosa.asm
│ │ │ ├── jmemmac.c
│ │ │ ├── jmemmgr.c
│ │ │ ├── jmemname.c
│ │ │ ├── jmemnobs.c
│ │ │ ├── jmemsys.h
│ │ │ ├── jmorecfg.h
│ │ │ ├── jpegint.h
│ │ │ ├── jpeglib.h
│ │ │ ├── jpegtran.1
│ │ │ ├── jpegtran.c
│ │ │ ├── jquant1.c
│ │ │ ├── jquant2.c
│ │ │ ├── jutils.c
│ │ │ ├── jversion.h
│ │ │ ├── libjpeg.txt
│ │ │ ├── ltmain.sh
│ │ │ ├── makcjpeg.st
│ │ │ ├── makdjpeg.st
│ │ │ ├── makeadsw.vc6
│ │ │ ├── makeasln.v10
│ │ │ ├── makecdep.vc6
│ │ │ ├── makecdsp.vc6
│ │ │ ├── makecfil.v10
│ │ │ ├── makecmak.vc6
│ │ │ ├── makecvcx.v10
│ │ │ ├── makeddep.vc6
│ │ │ ├── makeddsp.vc6
│ │ │ ├── makedfil.v10
│ │ │ ├── makedmak.vc6
│ │ │ ├── makedvcx.v10
│ │ │ ├── makefile.ansi
│ │ │ ├── makefile.b32
│ │ │ ├── makefile.bcc
│ │ │ ├── makefile.dj
│ │ │ ├── makefile.manx
│ │ │ ├── makefile.mc6
│ │ │ ├── makefile.mms
│ │ │ ├── makefile.sas
│ │ │ ├── makefile.unix
│ │ │ ├── makefile.vc
│ │ │ ├── makefile.vms
│ │ │ ├── makefile.wat
│ │ │ ├── makejdep.vc6
│ │ │ ├── makejdsp.vc6
│ │ │ ├── makejdsw.vc6
│ │ │ ├── makejfil.v10
│ │ │ ├── makejmak.vc6
│ │ │ ├── makejsln.v10
│ │ │ ├── makejvcx.v10
│ │ │ ├── makeproj.mac
│ │ │ ├── makerdep.vc6
│ │ │ ├── makerdsp.vc6
│ │ │ ├── makerfil.v10
│ │ │ ├── makermak.vc6
│ │ │ ├── makervcx.v10
│ │ │ ├── maketdep.vc6
│ │ │ ├── maketdsp.vc6
│ │ │ ├── maketfil.v10
│ │ │ ├── maketmak.vc6
│ │ │ ├── maketvcx.v10
│ │ │ ├── makewdep.vc6
│ │ │ ├── makewdsp.vc6
│ │ │ ├── makewfil.v10
│ │ │ ├── makewmak.vc6
│ │ │ ├── makewvcx.v10
│ │ │ ├── makljpeg.st
│ │ │ ├── maktjpeg.st
│ │ │ ├── makvms.opt
│ │ │ ├── missing
│ │ │ ├── rdbmp.c
│ │ │ ├── rdcolmap.c
│ │ │ ├── rdgif.c
│ │ │ ├── rdjpgcom.1
│ │ │ ├── rdjpgcom.c
│ │ │ ├── rdppm.c
│ │ │ ├── rdrle.c
│ │ │ ├── rdswitch.c
│ │ │ ├── rdtarga.c
│ │ │ ├── structure.txt
│ │ │ ├── testimg.ppm
│ │ │ ├── transupp.c
│ │ │ ├── transupp.h
│ │ │ ├── usage.txt
│ │ │ ├── wizard.txt
│ │ │ ├── wrbmp.c
│ │ │ ├── wrgif.c
│ │ │ ├── wrjpgcom.1
│ │ │ ├── wrjpgcom.c
│ │ │ ├── wrppm.c
│ │ │ ├── wrrle.c
│ │ │ └── wrtarga.c
│ │ └── libpng/
│ │ ├── ANNOUNCE
│ │ ├── Android.bp
│ │ ├── Android.mk
│ │ ├── CHANGES
│ │ ├── CMakeLists.txt
│ │ ├── CleanSpec.mk
│ │ ├── INSTALL
│ │ ├── LICENSE
│ │ ├── MODULE_LICENSE_BSD_LIKE
│ │ ├── Makefile.am
│ │ ├── README
│ │ ├── README.android
│ │ ├── README.version
│ │ ├── TODO
│ │ ├── arm/
│ │ │ ├── arm_init.c
│ │ │ ├── filter_neon.S
│ │ │ └── filter_neon_intrinsics.c
│ │ ├── autogen.sh
│ │ ├── configure.ac
│ │ ├── contrib/
│ │ │ ├── README.txt
│ │ │ ├── arm-neon/
│ │ │ │ ├── README
│ │ │ │ ├── android-ndk.c
│ │ │ │ ├── linux-auxv.c
│ │ │ │ └── linux.c
│ │ │ ├── conftest/
│ │ │ │ ├── README
│ │ │ │ ├── pngcp.dfa
│ │ │ │ ├── read.dfa
│ │ │ │ ├── s_read.dfa
│ │ │ │ ├── s_write.dfa
│ │ │ │ ├── simple.dfa
│ │ │ │ └── write.dfa
│ │ │ ├── examples/
│ │ │ │ ├── README.txt
│ │ │ │ ├── iccfrompng.c
│ │ │ │ ├── pngpixel.c
│ │ │ │ ├── pngtopng.c
│ │ │ │ └── simpleover.c
│ │ │ ├── gregbook/
│ │ │ │ ├── COPYING
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile.mingw32
│ │ │ │ ├── Makefile.sgi
│ │ │ │ ├── Makefile.unx
│ │ │ │ ├── Makefile.w32
│ │ │ │ ├── README
│ │ │ │ ├── makevms.com
│ │ │ │ ├── readpng.c
│ │ │ │ ├── readpng.h
│ │ │ │ ├── readpng2.c
│ │ │ │ ├── readpng2.h
│ │ │ │ ├── readppm.c
│ │ │ │ ├── rpng-win.c
│ │ │ │ ├── rpng-x.c
│ │ │ │ ├── rpng2-win.c
│ │ │ │ ├── rpng2-x.c
│ │ │ │ ├── wpng.c
│ │ │ │ ├── writepng.c
│ │ │ │ └── writepng.h
│ │ │ ├── intel/
│ │ │ │ ├── INSTALL
│ │ │ │ ├── Makefile.am.patch
│ │ │ │ ├── configure.ac.patch
│ │ │ │ ├── filter_sse2_intrinsics.c
│ │ │ │ ├── intel_init.c
│ │ │ │ └── intel_sse.patch
│ │ │ ├── libtests/
│ │ │ │ ├── fakepng.c
│ │ │ │ ├── gentests.sh
│ │ │ │ ├── makepng.c
│ │ │ │ ├── pngimage.c
│ │ │ │ ├── pngstest-errors.h
│ │ │ │ ├── pngstest.c
│ │ │ │ ├── pngunknown.c
│ │ │ │ ├── pngvalid.c
│ │ │ │ ├── readpng.c
│ │ │ │ ├── tarith.c
│ │ │ │ └── timepng.c
│ │ │ ├── mips-msa/
│ │ │ │ ├── README
│ │ │ │ └── linux.c
│ │ │ ├── pngminim/
│ │ │ │ ├── README
│ │ │ │ ├── decoder/
│ │ │ │ │ ├── README
│ │ │ │ │ ├── pngusr.dfa
│ │ │ │ │ └── pngusr.h
│ │ │ │ ├── encoder/
│ │ │ │ │ ├── README
│ │ │ │ │ ├── pngusr.dfa
│ │ │ │ │ └── pngusr.h
│ │ │ │ └── preader/
│ │ │ │ ├── README
│ │ │ │ ├── pngusr.dfa
│ │ │ │ └── pngusr.h
│ │ │ ├── pngminus/
│ │ │ │ ├── README
│ │ │ │ ├── makefile.std
│ │ │ │ ├── makefile.tc3
│ │ │ │ ├── makevms.com
│ │ │ │ ├── png2pnm.bat
│ │ │ │ ├── png2pnm.c
│ │ │ │ ├── png2pnm.sh
│ │ │ │ ├── pngminus.bat
│ │ │ │ ├── pngminus.sh
│ │ │ │ ├── pnm2png.bat
│ │ │ │ ├── pnm2png.c
│ │ │ │ └── pnm2png.sh
│ │ │ ├── pngsuite/
│ │ │ │ └── README
│ │ │ ├── tools/
│ │ │ │ ├── README.txt
│ │ │ │ ├── checksum-icc.c
│ │ │ │ ├── chkfmt
│ │ │ │ ├── cvtcolor.c
│ │ │ │ ├── genpng.c
│ │ │ │ ├── intgamma.sh
│ │ │ │ ├── makesRGB.c
│ │ │ │ ├── png-fix-itxt.c
│ │ │ │ ├── pngcp.c
│ │ │ │ ├── pngfix.c
│ │ │ │ ├── reindent
│ │ │ │ └── sRGB.h
│ │ │ └── visupng/
│ │ │ ├── PngFile.c
│ │ │ ├── PngFile.h
│ │ │ ├── README.txt
│ │ │ ├── VisualPng.c
│ │ │ ├── VisualPng.dsp
│ │ │ ├── VisualPng.dsw
│ │ │ ├── VisualPng.rc
│ │ │ ├── cexcept.h
│ │ │ └── resource.h
│ │ ├── example.c
│ │ ├── libpng-config.in
│ │ ├── libpng-manual.txt
│ │ ├── libpng.3
│ │ ├── libpng.pc.in
│ │ ├── libpngpf.3
│ │ ├── mips/
│ │ │ ├── filter_msa_intrinsics.c
│ │ │ └── mips_init.c
│ │ ├── png.5
│ │ ├── png.c
│ │ ├── png.h
│ │ ├── pngconf.h
│ │ ├── pngdebug.h
│ │ ├── pngerror.c
│ │ ├── pngget.c
│ │ ├── pnginfo.h
│ │ ├── pnglibconf.h
│ │ ├── pngmem.c
│ │ ├── pngpread.c
│ │ ├── pngpriv.h
│ │ ├── pngread.c
│ │ ├── pngrio.c
│ │ ├── pngrtran.c
│ │ ├── pngrutil.c
│ │ ├── pngset.c
│ │ ├── pngstruct.h
│ │ ├── pngtest.c
│ │ ├── pngtrans.c
│ │ ├── pngusr.dfa
│ │ ├── pngusr.h
│ │ ├── pngwio.c
│ │ ├── pngwrite.c
│ │ ├── pngwtran.c
│ │ ├── pngwutil.c
│ │ ├── projects/
│ │ │ ├── owatcom/
│ │ │ │ ├── libpng.tgt
│ │ │ │ ├── libpng.wpj
│ │ │ │ ├── pngconfig.mak
│ │ │ │ ├── pngstest.tgt
│ │ │ │ ├── pngtest.tgt
│ │ │ │ └── pngvalid.tgt
│ │ │ ├── visualc71/
│ │ │ │ ├── PRJ0041.mak
│ │ │ │ ├── README.txt
│ │ │ │ ├── README_zlib.txt
│ │ │ │ ├── libpng.sln
│ │ │ │ ├── libpng.vcproj
│ │ │ │ ├── pngtest.vcproj
│ │ │ │ └── zlib.vcproj
│ │ │ └── vstudio/
│ │ │ ├── libpng/
│ │ │ │ └── libpng.vcxproj
│ │ │ ├── pnglibconf/
│ │ │ │ └── pnglibconf.vcxproj
│ │ │ ├── pngstest/
│ │ │ │ └── pngstest.vcxproj
│ │ │ ├── pngtest/
│ │ │ │ └── pngtest.vcxproj
│ │ │ ├── pngunknown/
│ │ │ │ └── pngunknown.vcxproj
│ │ │ ├── pngvalid/
│ │ │ │ └── pngvalid.vcxproj
│ │ │ ├── readme.txt
│ │ │ ├── vstudio.sln
│ │ │ ├── zlib/
│ │ │ │ └── zlib.vcxproj
│ │ │ └── zlib.props
│ │ ├── scripts/
│ │ │ ├── README.txt
│ │ │ ├── SCOPTIONS.ppc
│ │ │ ├── checksym.awk
│ │ │ ├── def.c
│ │ │ ├── descrip.mms
│ │ │ ├── dfn.awk
│ │ │ ├── genchk.cmake.in
│ │ │ ├── genout.cmake.in
│ │ │ ├── gensrc.cmake.in
│ │ │ ├── intprefix.c
│ │ │ ├── libpng-config-body.in
│ │ │ ├── libpng-config-head.in
│ │ │ ├── libpng.pc.in
│ │ │ ├── macro.lst
│ │ │ ├── makefile.32sunu
│ │ │ ├── makefile.64sunu
│ │ │ ├── makefile.acorn
│ │ │ ├── makefile.aix
│ │ │ ├── makefile.amiga
│ │ │ ├── makefile.atari
│ │ │ ├── makefile.bc32
│ │ │ ├── makefile.beos
│ │ │ ├── makefile.bor
│ │ │ ├── makefile.cegcc
│ │ │ ├── makefile.darwin
│ │ │ ├── makefile.dec
│ │ │ ├── makefile.dj2
│ │ │ ├── makefile.freebsd
│ │ │ ├── makefile.gcc
│ │ │ ├── makefile.hp64
│ │ │ ├── makefile.hpgcc
│ │ │ ├── makefile.hpux
│ │ │ ├── makefile.ibmc
│ │ │ ├── makefile.intel
│ │ │ ├── makefile.knr
│ │ │ ├── makefile.linux
│ │ │ ├── makefile.mips
│ │ │ ├── makefile.msc
│ │ │ ├── makefile.msys
│ │ │ ├── makefile.ne12bsd
│ │ │ ├── makefile.netbsd
│ │ │ ├── makefile.openbsd
│ │ │ ├── makefile.sco
│ │ │ ├── makefile.sggcc
│ │ │ ├── makefile.sgi
│ │ │ ├── makefile.so9
│ │ │ ├── makefile.solaris
│ │ │ ├── makefile.solaris-x86
│ │ │ ├── makefile.std
│ │ │ ├── makefile.sunos
│ │ │ ├── makefile.tc3
│ │ │ ├── makefile.vcwin32
│ │ │ ├── makevms.com
│ │ │ ├── options.awk
│ │ │ ├── pnglibconf.dfa
│ │ │ ├── pnglibconf.h.prebuilt
│ │ │ ├── pnglibconf.mak
│ │ │ ├── pngwin.rc
│ │ │ ├── prefix.c
│ │ │ ├── smakefile.ppc
│ │ │ ├── sym.c
│ │ │ ├── symbols.c
│ │ │ ├── symbols.def
│ │ │ ├── test.cmake.in
│ │ │ └── vers.c
│ │ └── tests/
│ │ ├── pngimage-full
│ │ ├── pngimage-quick
│ │ ├── pngstest
│ │ ├── pngstest-1.8
│ │ ├── pngstest-1.8-alpha
│ │ ├── pngstest-linear
│ │ ├── pngstest-linear-alpha
│ │ ├── pngstest-none
│ │ ├── pngstest-none-alpha
│ │ ├── pngstest-sRGB
│ │ ├── pngstest-sRGB-alpha
│ │ ├── pngtest
│ │ ├── pngunknown-IDAT
│ │ ├── pngunknown-discard
│ │ ├── pngunknown-if-safe
│ │ ├── pngunknown-sAPI
│ │ ├── pngunknown-sTER
│ │ ├── pngunknown-save
│ │ ├── pngunknown-vpAg
│ │ ├── pngvalid-gamma-16-to-8
│ │ ├── pngvalid-gamma-alpha-mode
│ │ ├── pngvalid-gamma-background
│ │ ├── pngvalid-gamma-expand16-alpha-mode
│ │ ├── pngvalid-gamma-expand16-background
│ │ ├── pngvalid-gamma-expand16-transform
│ │ ├── pngvalid-gamma-sbit
│ │ ├── pngvalid-gamma-threshold
│ │ ├── pngvalid-gamma-transform
│ │ ├── pngvalid-progressive-interlace-standard
│ │ ├── pngvalid-progressive-size
│ │ ├── pngvalid-progressive-standard
│ │ ├── pngvalid-standard
│ │ └── pngvalid-transform
│ ├── proguard-rules.pro
│ ├── project.properties
│ ├── res/
│ │ └── .gitkeep
│ └── src/
│ └── com/
│ └── googlecode/
│ ├── leptonica/
│ │ └── android/
│ │ ├── AdaptiveMap.java
│ │ ├── Binarize.java
│ │ ├── Box.java
│ │ ├── Boxa.java
│ │ ├── Clip.java
│ │ ├── Constants.java
│ │ ├── Convert.java
│ │ ├── Edge.java
│ │ ├── Enhance.java
│ │ ├── GrayQuant.java
│ │ ├── JpegIO.java
│ │ ├── MorphApp.java
│ │ ├── Pix.java
│ │ ├── Pixa.java
│ │ ├── ReadFile.java
│ │ ├── Rotate.java
│ │ ├── Scale.java
│ │ ├── Skew.java
│ │ └── WriteFile.java
│ └── tesseract/
│ └── android/
│ ├── PageIterator.java
│ ├── ResultIterator.java
│ ├── TessBaseAPI.java
│ └── TessPdfRenderer.java
└── tess-two-test/
├── .classpath
├── .project
├── AndroidManifest.xml
├── build.gradle
├── project.properties
├── res/
│ └── values/
│ └── strings.xml
└── src/
└── com/
└── googlecode/
├── leptonica/
│ └── android/
│ └── test/
│ ├── AdaptiveMapTest.java
│ ├── BinarizeTest.java
│ ├── BoxTest.java
│ ├── BoxaTest.java
│ ├── ClipTest.java
│ ├── ConvertTest.java
│ ├── EdgeTest.java
│ ├── EnhanceTest.java
│ ├── GrayQuantTest.java
│ ├── JpegIOTest.java
│ ├── PixTest.java
│ ├── PixaTest.java
│ ├── ReadFileTest.java
│ ├── RotateTest.java
│ ├── ScaleTest.java
│ ├── SkewTest.java
│ ├── TestUtils.java
│ └── WriteFileTest.java
└── tesseract/
└── android/
└── test/
├── TessBaseAPITest.java
└── TessPdfRendererTest.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.settings
.svn
local.properties
proguard.cfg
proguard-project.txt
bin/
gen/
libs/
obj/
patches/
target/
src/test/resources/META-INF/config.properties
*.Plo
*.dylib
*.la
*.a
*.lo
.libs/
.deps/
autom4te.cache/
Makefile.in
Makefile
config.status
*.m4
config_auto.h
configure
libtool
tesseract.pc
stamp-h1
build/
.gradle/
.idea/
*.iml
javadoc/
tessdata/
.externalNativeBuild
eyes-two/.cxx
tess-two/.cxx
================================================
FILE: .gitmodules
================================================
[submodule "leptonica"]
path = leptonica
url = https://github.com/alexcohn/leptonica
[submodule "tesseract"]
path = tesseract
url = https://github.com/alexcohn/tesseract
================================================
FILE: BUILDING.md
================================================
# Building
This project may be built manually as an alternative to including the pre-built
AAR as an external dependency in your app project. To start the build, import
the root directory of this project into Android Studio as an existing Android
Studio project, or follow the instructions below to build on the command line.
## _Building with Android Studio_
The Gradle build uses the gradle-stable plugin and the Android NDK to
build the Tesseract and Leptonica native C/C++ code through a call to
`ndk-build` in `build.gradle`. In Android Studio, use
Build -> Rebuild Project
to build or rebuild the project.
Note: When building from Android Studio, you may need to set the path to your
NDK installation in the Project Structure dialog (File->Project Structure).
## _Building on the Command Line_
_On Mac/Linux:_
Edit your local.properties file to include the path to your NDK directory:
ndk.dir=/path/to/your/android-ndk
Run the following commands:
export ANDROID_HOME=/path/to/your/android-sdk
git clone git://github.com/rmtheis/tess-two tess
cd tess
./gradlew assemble
_On Windows:_
Edit your local.properties file to include the path to your NDK directory:
ndk.dir=C\:\\path\\to\\your\\android-ndk
Run the following commands:
set ANDROID_HOME=C:\\path\\to\\your\\android-sdk
git clone git://github.com/rmtheis/tess-two tess
cd tess
gradlew assemble
On all above platforms you can build a command-line static banary, e.g.
ndk-build -C tess-two-git/tess-two tesseract APP_ABI=arm64-v8a
It can be deployed to `/data/local/tmp` of a compatible Android device and run from adb shell:
adb shell time tesseract --tessdata-dir tessdata imagename outputbase
With v.4.1 you can use new or old data files.
# Importing
After building, the code that is generated may be imported into your app
project in Android Studio as a module using
File -> New -> Import Module -> `tess-two` folder
and then adding the dependency to your app module build.gradle:
dependencies {
implementation project(':tess-two')
}
# Testing
_On Mac/Linux:_
./preparetests.sh
./gradlew connectedAndroidTest
_On Windows:_
preparetests.cmd
gradlew connectedAndroidTest
# Removing
If you want to remove your app's dependency on the tess-two module, reverse
the import process by removing the module using the Project Structure dialog
(File->Project Structure), manually deleting the tess-two subfolder from your
app project folder, and removing the tess-two reference from your app module
build.gradle.
================================================
FILE: CHANGELOG.md
================================================
# Change Log
## [9.1.0](https://github.com/rmtheis/tess-two/tree/9.1.0) (2019-10-19)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/9.0.0...9.1.0)
**Fixed bugs:**
- WriteFile.writeBytes altering the source image endiannes and producing artefacts [\#228](https://github.com/rmtheis/tess-two/issues/228)
- Crashing reported on 64-bit devices [\#197](https://github.com/rmtheis/tess-two/issues/197)
- testPixaReplacePix crashes in native code [\#159](https://github.com/rmtheis/tess-two/issues/159)
- ReadFile.readBitmap alters image colors [\#87](https://github.com/rmtheis/tess-two/issues/87)
**Closed issues:**
- read Jpeg and PNG produce wrong alpha in 32bpp pix [\#264](https://github.com/rmtheis/tess-two/issues/264)
- Native crush when 'vert'.tessdata is used [\#263](https://github.com/rmtheis/tess-two/issues/263)
- In versions higher than 5.4.1 TessBaseAPI.ProgressNotifier never called [\#262](https://github.com/rmtheis/tess-two/issues/262)
- Decoding is slow when multiple languages are used [\#261](https://github.com/rmtheis/tess-two/issues/261)
- Getting different results when using tesseract on mobile vs on PC using Python. [\#260](https://github.com/rmtheis/tess-two/issues/260)
- Illegible words recognition in Persian lang [\#259](https://github.com/rmtheis/tess-two/issues/259)
- Could not initialize Tesseract API with language=ces! [\#258](https://github.com/rmtheis/tess-two/issues/258)
- Can't lanch [\#257](https://github.com/rmtheis/tess-two/issues/257)
- Tess4 initialize crash [\#255](https://github.com/rmtheis/tess-two/issues/255)
- tess4 on android studio [\#254](https://github.com/rmtheis/tess-two/issues/254)
- How I can init the tesseract to work only with digits? [\#253](https://github.com/rmtheis/tess-two/issues/253)
- java.lang.NoSuchFieldError: no "I" field "mNativeData" in class "Lcom/googlecode/tesseract/android/TessBaseAPI;" or its superclasses [\#252](https://github.com/rmtheis/tess-two/issues/252)
- java.lang.NoSuchFieldError: no "I" field "mNativeData" in class "Lcom/googlecode/tesseract/android/TessBaseAPI;" or its superclasses [\#251](https://github.com/rmtheis/tess-two/issues/251)
- Arabic trained-data produce 20% accuracy [\#250](https://github.com/rmtheis/tess-two/issues/250)
- import tess two error [\#249](https://github.com/rmtheis/tess-two/issues/249)
- error in Android 7.0 [\#248](https://github.com/rmtheis/tess-two/issues/248)
- How to build tess-two without JNI? [\#247](https://github.com/rmtheis/tess-two/issues/247)
- Initializing TessBaseAPI crashes app [\#246](https://github.com/rmtheis/tess-two/issues/246)
- OCR number [\#245](https://github.com/rmtheis/tess-two/issues/245)
- compile binary only [\#244](https://github.com/rmtheis/tess-two/issues/244)
- Skip tesseract's default image preprocessing \(Otsu\) [\#243](https://github.com/rmtheis/tess-two/issues/243)
- How to add OPTITypewriter-Special font [\#242](https://github.com/rmtheis/tess-two/issues/242)
- Special requirements for Hindi and Arabic OCR [\#239](https://github.com/rmtheis/tess-two/issues/239)
**Merged pull requests:**
- fix Java tests for leptronica [\#265](https://github.com/rmtheis/tess-two/pull/265) ([alexcohn](https://github.com/alexcohn))
- Update to support latest Android Studio [\#256](https://github.com/rmtheis/tess-two/pull/256) ([Robyer](https://github.com/Robyer))
## [9.0.0](https://github.com/rmtheis/tess-two/tree/9.0.0) (2018-04-20)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/8.0.0...9.0.0)
**Change:**
- This version fixes and adds back in the 64-bit ABIs, and removes the deprecated armv5 and mips/mips64 ABIs.
**Implemented enhancements:**
- Improve developer support for Hindi/Arabic [\#240](https://github.com/rmtheis/tess-two/issues/240)
**Fixed bugs:**
- Crashing reported on 64-bit devices [\#197](https://github.com/rmtheis/tess-two/issues/197)
**Merged pull requests:**
- Updated repositories. Changed compile to implementation. [\#233](https://github.com/rmtheis/tess-two/pull/233) ([mauriciotogneri](https://github.com/mauriciotogneri))
- Updated version of SDK, build tools and support libraries [\#231](https://github.com/rmtheis/tess-two/pull/231) ([mauriciotogneri](https://github.com/mauriciotogneri))
## [8.0.0](https://github.com/rmtheis/tess-two/tree/8.0.0) (2017-08-13)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/7.0.0...8.0.0)
**Change:**
- This version removes the 64-bit ABIs from the default build in order to avoid crashes due to [\#197](https://github.com/rmtheis/tess-two/issues/197)
**Closed issues:**
- Build failure with Android Studio 3 and NDK ver. 15.x [\#215](https://github.com/rmtheis/tess-two/issues/215)
**Merged pull requests:**
- clone tag 3.04.00 from tessdata [\#217](https://github.com/rmtheis/tess-two/pull/217) ([ivankolev](https://github.com/ivankolev))
- See issue \#215 [\#216](https://github.com/rmtheis/tess-two/pull/216) ([ivankolev](https://github.com/ivankolev))
## [7.0.0](https://github.com/rmtheis/tess-two/tree/7.0.0) (2017-06-12)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.3.0...7.0.0)
**API-breaking change:**
- ResultIterator getChoicesAndConfidence\(\) is now getSymbolChoicesAndConfidence\(\)
**Fixed bugs:**
- ResultIterator crashes with certain character combinations [\#126](https://github.com/rmtheis/tess-two/issues/126)
- ResultIterator returns single Character as Alternatives for Words [\#119](https://github.com/rmtheis/tess-two/issues/119)
- beginDocument\(\) returns false even when successful [\#103](https://github.com/rmtheis/tess-two/issues/103)
**Closed issues:**
- Hardcoded path in TessBaseAPITest.java [\#208](https://github.com/rmtheis/tess-two/issues/208)
**Merged pull requests:**
- Add missing PageSegMode constant [\#209](https://github.com/rmtheis/tess-two/pull/209) ([Robyer](https://github.com/Robyer))
- Fix return value of BeginDocument \(fixes \#103\) [\#207](https://github.com/rmtheis/tess-two/pull/207) ([Robyer](https://github.com/Robyer))
- Improve ResultIterator [\#206](https://github.com/rmtheis/tess-two/pull/206) ([Robyer](https://github.com/Robyer))
- Update gradle plugin [\#205](https://github.com/rmtheis/tess-two/pull/205) ([Robyer](https://github.com/Robyer))
- Fix javadocs errors and warnings [\#202](https://github.com/rmtheis/tess-two/pull/202) ([Robyer](https://github.com/Robyer))
## [6.3.0](https://github.com/rmtheis/tess-two/tree/6.2.0) (2017-04-06)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.2.0...6.3.0)
**Updates:**
- Tesseract code updated to version 3.05.00
[Tesseract change log](https://github.com/tesseract-ocr/tesseract/blob/cf0b378577e7ed0c75bfaf97cae7e35d7634cf4d/ChangeLog#L22)
## [6.2.0](https://github.com/rmtheis/tess-two/tree/6.2.0) (2017-02-04)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.1.1...6.2.0)
**Updates:**
- Leptonica 1.74.1
- Libpng 1.6.25
**Fixed bugs:**
- Stop\(\) does not work with GetUTF8Text\(\) [\#185](https://github.com/rmtheis/tess-two/issues/185)
- TessBaseAPI stop\(\) sometimes causes SIGSEGV [\#97](https://github.com/rmtheis/tess-two/issues/97)
**Merged pull requests:**
- Issue 185 [\#186](https://github.com/rmtheis/tess-two/pull/186) ([Xyresic](https://github.com/Xyresic))
## [6.1.1](https://github.com/rmtheis/tess-two/tree/6.1.1) (2016-11-27)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.1.0...6.1.1)
**Updates:**
- Changed ProGuard settings
## [6.1.0](https://github.com/rmtheis/tess-two/tree/6.1.0) (2016-11-22)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.0.4...6.1.0)
**Updates:**
- Tesseract code updated, version 3.05.00dev
**Closed issues:**
- Tests doesn't work on devices without sdcard [\#171](https://github.com/rmtheis/tess-two/issues/171)
- no field with name='mNativeData' signature='J' in class Lcom/googlecode/tesseract/android/TessBaseAPI; [\#166](https://github.com/rmtheis/tess-two/issues/166)
**Merged pull requests:**
- Pass native pointer as parameter [\#172](https://github.com/rmtheis/tess-two/pull/172) ([jereksel](https://github.com/jereksel))
## [6.0.4](https://github.com/rmtheis/tess-two/tree/6.0.4) (2016-08-21)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.0.3...6.0.4)
**Updates:**
- Changed ProGuard settings
**Closed issues:**
- android studio2.1.2 not build [\#168](https://github.com/rmtheis/tess-two/issues/168)
- no field with name='mNativeData' signature='J' in class Lcom/googlecode/tesseract/android/TessBaseAPI; [\#166](https://github.com/rmtheis/tess-two/issues/166)
## [6.0.3](https://github.com/rmtheis/tess-two/tree/6.0.3) (2016-07-16)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.0.2...6.0.3)
**Closed issues:**
- UnsatisfiedLinkError; thrown while initializing Lcom/googlecode/tesseract/android/TessBaseAPI 'libjpgt.so' and 'liblept.so' w/ compile 'com.rmtheis:tess-two:6.0.0' [\#150](https://github.com/rmtheis/tess-two/issues/150)
## [6.0.2](https://github.com/rmtheis/tess-two/tree/6.0.2) (2016-06-20)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.0.1...6.0.2)
**Closed issues:**
- Building project error on Windows - javadoc failed [\#148](https://github.com/rmtheis/tess-two/issues/148)
**Merged pull requests:**
- Refactor nativeMergeAndReplacePix. Addresses \#132. [\#157](https://github.com/rmtheis/tess-two/pull/157) ([megabytefisher](https://github.com/megabytefisher))
- Fix memory leak in setImage\(Bitmap bmp\) [\#154](https://github.com/rmtheis/tess-two/pull/154) ([megabytefisher](https://github.com/megabytefisher))
## [6.0.1](https://github.com/rmtheis/tess-two/tree/6.0.1) (2016-06-09)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/6.0.0...6.0.1)
**Bug fix:**
- Fixed nativeGetPix for 64-bit devices
## [6.0.0](https://github.com/rmtheis/tess-two/tree/6.0.0) (2016-05-16)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/5.4.1...6.0.0)
**API-breaking changes:**
- Progress values no longer available when using getUTF8Text. Use getHOCRText instead.
- Android 2.2 (API level 8) no longer supported
- Eyes-two project refactored. Code similar to what was removed is available from the [Google Mobile Vision API](https://developers.google.com/vision/).
- Tess-two deprecated methods removed
**Updates:**
- Tesseract 3.05.00dev (tesseract-ocr/tesseract@add1ed1)
- Leptonica 1.73
- Libpng 1.6.20 (android/platform_external_libpng@2789184)
**Implemented enhancements:**
- GetUTF8Text\(\) monitor and multi-platform projects [\#116](https://github.com/rmtheis/tess-two/issues/116)
- Update eyes-two structure [\#95](https://github.com/rmtheis/tess-two/issues/95)
- Expand image I/O format support [\#94](https://github.com/rmtheis/tess-two/issues/94)
**Fixed bugs:**
- NDK r11 clang build error: undefined reference to isnanf/\_\_isinff [\#138](https://github.com/rmtheis/tess-two/issues/138)
- init\(\) crashes when using OEM\_TESSERACT\_CUBE\_COMBINED for Arabic [\#12](https://github.com/rmtheis/tess-two/issues/12)
## [5.4.1](https://github.com/rmtheis/tess-two/tree/5.4.1) (2016-01-17)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/5.4.0...5.4.1)
**Updates:**
- Added libjpeg 9b
**Closed issues:**
- Pdf renderer isn't working with jpg input images [\#122](https://github.com/rmtheis/tess-two/issues/122)
## [5.4.0](https://github.com/rmtheis/tess-two/tree/5.4.0) (2016-01-10)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/5.3.0...5.4.0)
**Updates:**
- Added Gradle build
- Released on Bintray
**Closed issues:**
- Add Maven support [\#53](https://github.com/rmtheis/tess-two/issues/53)
**Merged pull requests:**
- Gradle build [\#99](https://github.com/rmtheis/tess-two/pull/99) ([Aaargh20318](https://github.com/Aaargh20318))
## [5.3.0](https://github.com/rmtheis/tess-two/tree/5.3.0) (2015-10-30)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/5.2.0...5.3.0)
**Implemented enhancements:**
- Added TessPdfRenderer for PDF output [\#46](https://github.com/rmtheis/tess-two/issues/46)
- Added libpng 1.6.10 (android/platform_external_libpng@37f83eb)
**Closed issues:**
- java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "png\_set\_longjmp\_fn" referenced by "liblept.so"... [\#106](https://github.com/rmtheis/tess-two/issues/106)
- "'libpng.so' not found" message on some 4.x versions of Android [\#105](https://github.com/rmtheis/tess-two/issues/105)
- libpng fails to build on ARMv8 [\#102](https://github.com/rmtheis/tess-two/issues/102)
**Merged pull requests:**
- fix 64-bit ARMv8 build [\#124](https://github.com/rmtheis/tess-two/pull/124) ([panzerfahrer](https://github.com/panzerfahrer))
- Bugfix for progress notifier [\#115](https://github.com/rmtheis/tess-two/pull/115) ([FDIM](https://github.com/FDIM))
## [5.2.0](https://github.com/rmtheis/tess-two/tree/5.2.0) (2015-07-21)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/5.1.0...5.2.0)
**Updates:**
- Added support for using multiple training data files/languages
- Tesseract 3.04 (tesseract-ocr/tesseract@e8b6d6f)
- Leptonica 1.72
**Fixed bugs:**
- Fix finalizers [\#88](https://github.com/rmtheis/tess-two/issues/88)
- WriteFile.writeImpliedFormat fails for jpegs [\#86](https://github.com/rmtheis/tess-two/issues/86)
- WriteFile don't work as expected [\#25](https://github.com/rmtheis/tess-two/issues/25)
**Closed issues:**
- clang "atomicity.h:49: error: undefined reference to '\_\_atomic\_fetch\_add\_4''" for armeabi [\#81](https://github.com/rmtheis/tess-two/issues/81)
- Android \(ART\) crash with error JNI DETECTED ERROR IN APPLICATION: jarray is an invalid stack indirect reference table or invalid reference [\#78](https://github.com/rmtheis/tess-two/issues/78)
## [5.1.0](https://github.com/rmtheis/tess-two/tree/5.1.0) (2015-03-16)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/5.0.0...5.1.0)
**Updates:**
- Added 64-bit ABI support
- Tesseract 3.04 (tesseract-ocr/tesseract@239f350)
**Added to Tesseract API:**
- ProgressNotifier for getting OCR percent complete values
- ChoiceIterator support for getting per-symbol alternatives
- GetConnectedComponents
**Added to Leptonica API:**
- Edge.pixSobelEdgeFilter
- GrayQuant.pixThresholdToBinary
- Pix.clipRectangle
- Pix.pixFastTophat
- Pix.pixTophat
- Pix.rotateOrth
- Pix.scaleWithoutSharpening
## [5.0.0](https://github.com/rmtheis/tess-two/tree/5.0.0) (2014-08-13)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/4.0.0...5.0.0)
**Updates:**
- Tesseract 3.03
- Leptonica 1.71
## [4.0.0](https://github.com/rmtheis/tess-two/tree/4.0.0) (2014-02-17)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/3.0.0...4.0.0)
**Updates:**
- Tesseract 3.03
- Leptonica 1.70
**Merged pull requests:**
- Add some useful functions [\#40](https://github.com/rmtheis/tess-two/pull/40) ([ductranit](https://github.com/ductranit))
## [3.0.0](https://github.com/rmtheis/tess-two/tree/3.0.0) (2013-01-22)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/2.0.0...3.0.0)
**Updates:**
- Tesseract 3.03
- Leptonica 1.69
## [2.0.0](https://github.com/rmtheis/tess-two/tree/2.0.0) (2012-05-31)
[Full Changelog](https://github.com/rmtheis/tess-two/compare/1.0.0...2.0.0)
**Updates:**
- Eyes-free project added
- Tesseract 3.02
## [1.0.0](https://github.com/rmtheis/tess-two/tree/1.0.0) (2011-11-06)
- Initial release, branched from tesseract-android-tools project
- Tesseract 3.01
- Leptonica 1.68
\* *This change log was generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
================================================
FILE: COPYING
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: ISSUE_TEMPLATE.md
================================================
Summary:
Steps to reproduce the issue:
1.
2.
3.
Expected result:
Actual result:
Tess-two version:
Android version:
Phone/device model:
Phone/device architecture (armeabi, armeabi-v7a, x86, mips, arm64-v8a, x86_64, mips64):
Link to training data used:
Link to image used as input:
================================================
FILE: README.md
================================================
## NO LONGER MAINTAINED
This project won't be receiving further updates or maintenance.
Please consider trying one of the forks of this project such as
[https://github.com/alexcohn/tess-two](https://github.com/alexcohn/tess-two).
# tess-two
A fork of Tesseract Tools for Android
([tesseract-android-tools][tesseract-android-tools]) that adds some
additional functions. Tesseract Tools for Android is a set of Android APIs and
build files for the [Tesseract OCR][tesseract-ocr] and [Leptonica][leptonica]
image processing libraries.
This project works with:
- Tesseract 4.1 (submodule)
- Leptonica 1.9 (submodule)
- libjpeg 9b
- libpng 1.6.25
The source code for these dependencies is included within the
`tess-two/jni` folder.
The `tess-two` module contains tools for compiling the Tesseract and Leptonica
libraries for use on the Android platform. It provides a Java API for accessing
natively-compiled Tesseract and Leptonica APIs.
The `eyes-two` module contains additional image processing code copied from the
[eyes-free project][eyes-free]. It includes native functions for text detection,
blur detection, optical flow detection, and thresholding. Eyes-two is not needed
for using the Tesseract or Leptonica APIs.
The `tess-two-test` module contains instrumented unit tests for tess-two.
## Pre-requisites
* Android 2.3 or higher
* A v4.1 or 3.02 [trained data file][tessdata] for a language. Data files must be
copied to the Android device in a subdirectory named `tessdata`.
## Usage
To use tess-two from your app, edit your app module's `build.gradle` file to add
tess-two as an external dependency:
dependencies {
implementation 'com.rmtheis:tess-two:9.1.0'
}
[Javadoc][javadoc] is available.
## Building
If you want to modify the tess-two code, or you want to use the eyes-two module,
you may build the project yourself locally. See [BUILDING.md](BUILDING.md).
## Versions
Release points are tagged with [version numbers][semantic-versioning]. A change
to the major version number indicates an API change making that version
incompatible with previous versions.
The [change log](CHANGELOG.md) shows what's new in each version.
## Support
* Stack Overflow: https://stackoverflow.com/questions/tagged/tess-two
* tesseract-ocr: https://groups.google.com/forum/#!forum/tesseract-ocr
## License
Copyright 2011 Robert Theis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## See Also
The Google Mobile Vision API team has made available an OCR capability that is
provided to developers through the Google Play Services library: The
[Mobile Vision API][mobile-vision-api] offers a simple API for OCR that
currently works for Latin-based characters.
[tesseract-android-tools]: https://github.com/alanv/tesseract-android-tools
[Tesseract4Android]: https://github.com/adaptech-cz/Tesseract4Android
[tesseract-ocr]: https://github.com/tesseract-ocr/tesseract
[leptonica]: https://github.com/DanBloomberg/leptonica
[eyes-free]: https://github.com/rmtheis/eyes-free
[tessdata]: https://github.com/tesseract-ocr/tessdata/tree/3.04.00
[javadoc]: https://rmtheis.github.io/tess-two/javadoc/index.html
[semantic-versioning]: http://semver.org
[stackoverflow]: https://stackoverflow.com/
[mobile-vision-api]: https://developers.google.com/vision/
================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
allprojects {
group = 'com.rmtheis'
version = '9.1.0'
repositories {
google()
jcenter()
}
}
================================================
FILE: eyes-two/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
================================================
FILE: eyes-two/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>eyes-two</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
================================================
FILE: eyes-two/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.googlecode.eyesfree.ocr"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
</manifest>
================================================
FILE: eyes-two/COPYING
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: eyes-two/build.gradle
================================================
apply plugin: 'com.android.library'
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName '1.0'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
ndkBuild {
arguments "TESSERACT_BUILD_PATH=${project(':tess-two').getBuildDir().path}"
}
}
}
externalNativeBuild {
ndkBuild {
path "src/main/jni/Android.mk"
}
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation project(':tess-two')
androidTestImplementation 'androidx.test:runner:1.3.0'
}
================================================
FILE: eyes-two/build.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project name="eyes-two" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
unless="sdk.dir"
/>
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<!--
<target name="-pre-build">
</target>
<target name="-pre-compile">
</target>
/* This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir} */
<target name="-post-compile">
</target>
-->
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>
================================================
FILE: eyes-two/project.properties
================================================
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-16
android.library=true
android.library.reference.1=../tess-two
================================================
FILE: eyes-two/src/androidTest/java/OpticalFlowTest.java
================================================
import android.util.Log;
import junit.framework.TestCase;
import androidx.test.filters.SmallTest;
import com.googlecode.eyesfree.opticflow.OpticalFlow;
public class OpticalFlowTest extends TestCase {
private static final String TAG = OpticalFlowTest.class.getSimpleName();
@SmallTest
public void testInit() {
OpticalFlow of = new OpticalFlow();
of.initialize(360, 240, 2);
assertTrue(of != null);
}
}
================================================
FILE: eyes-two/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest package="com.googlecode.eyesfree.ocr">
</manifest>
================================================
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/opticflow/ImageBlur.java
================================================
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.opticflow;
/**
* Wrapper for native image blur detection code. Modified by Alan Viverette from
* Xiaotao Duan's original source.
*
* @author Xiaotao Duan
* @author alanv@google.com (Alan Viverette)
*/
public class ImageBlur {
static {
System.loadLibrary("imageutils");
}
/**
* Tests if a given image is blurred or not.
*
* @param input An array of input pixels in YUV420SP format.
* @param width The width of the input image.
* @param height The height of the input image.
* @return true when input image is blurred.
*/
public static native boolean isBlurred(byte[] input, int width, int height);
/**
* Computes signature of a given image.
*
* @param input An array of input pixels in YUV420SP format.
* @param width The width of the input image.
* @param height The height of the input image.
* @param signatureBuffer A buffer for output signature. If it's null or not
* in the right size, this buffer will be ignored and not used.
* This is used to avoid GC.
* @return Signature of input image. If signatureBuffer is valid,
* signatureBuffer will be returned. Otherwise a new array will be
* returned and can be used as signature buffer in next function
* call.
*/
public static native int[] computeSignature(
byte[] input, int width, int height, int[] signatureBuffer);
/**
* Computes how similar of two given images represented by their signatures.
*
* @return An integer from 0 to 100 is returned indicating how much
* percentage of signature2 is different from signature1.
*/
public static native int diffSignature(int[] signature1, int[] signature2);
}
================================================
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/opticflow/OpticalFlow.java
================================================
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.opticflow;
import android.graphics.PointF;
/**
* Interface to native optical flow library.
*
* Modified by Alan Viverette from Andrew Harp's original source.
*
* @author Andrew Harp
* @author alanv@google.com (Alan Viverette)
*/
public class OpticalFlow {
static {
System.loadLibrary("opticalflow");
}
@Override
protected void finalize() {
resetNative();
}
public void initialize(int width, int height, int downsampleFactor) {
initNative(width, height, downsampleFactor);
}
public void setImage(byte[] data, long timestamp) {
addFrameNative(data, timestamp);
}
public void computeOpticalFlow() {
computeFeaturesNative(true);
computeFlowNative();
printInfoNative();
}
public float[] getFeatures(boolean onlyReturnCorrespondingFeatures) {
return getFeaturesNative(onlyReturnCorrespondingFeatures);
}
public PointF getAccumulatedDelta(
long timestamp, float positionX, float positionY, float radius) {
float[] delta = new float[2];
getAccumulatedDeltaNative(timestamp, positionX, positionY, radius, delta);
return new PointF(delta[0], delta[1]);
}
public void addInterestRegion(int numX, int numY, int left, int top, int right, int bottom) {
addInterestRegionNative(numX, numY, left, top, right, bottom);
}
/*********************** NATIVE METHODS *************************************/
private native void initNative(int width, int height, int downsampleFactor);
private native void addFrameNative(byte[] data, long timeStamp);
private native void computeFeaturesNative(boolean cachedOk);
private native void computeFlowNative();
private native void printInfoNative();
private native void getAccumulatedDeltaNative(
long timestamp, float positionX, float positionY, float radius, float[] delta);
private native void addInterestRegionNative(
int numX, int numY, float left, float top, float right, float bottom);
private native float[] getFeaturesNative(boolean onlyReturnCorrespondingFeatures);
private native void resetNative();
}
================================================
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/textdetect/HydrogenTextDetector.java
================================================
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.textdetect;
import android.os.Environment;
import com.googlecode.leptonica.android.Pix;
import com.googlecode.leptonica.android.Pixa;
/**
* @author alanv@google.com (Alan Viverette)
*/
@SuppressWarnings("unused")
public class HydrogenTextDetector {
private final long mNative;
static {
System.loadLibrary("lept");
System.loadLibrary("hydrogen");
}
private Parameters mParams;
public HydrogenTextDetector() {
mNative = nativeConstructor();
mParams = new Parameters();
setParameters(mParams);
}
public void setSize(int width, int height) {
// TODO(alanv): Set up native buffers
}
@Override
protected void finalize() throws Throwable {
try {
nativeDestructor(mNative);
} finally {
super.finalize();
}
}
public void setParameters(Parameters params) {
mParams = params;
nativeSetParameters(mNative, mParams);
}
public Parameters getParameters() {
return mParams;
}
public Pixa getTextAreas() {
long nativePixa = nativeGetTextAreas(mNative);
if (nativePixa == 0) {
return null;
}
int width = nativeGetSourceWidth(mNative);
int height = nativeGetSourceHeight(mNative);
return new Pixa(nativePixa, width, height);
}
public float getSkewAngle() {
return nativeGetSkewAngle(mNative);
}
public float[] getTextConfs() {
return nativeGetTextConfs(mNative);
}
public Pix getSourceImage() {
long nativePix = nativeGetSourceImage(mNative);
if (nativePix == 0) {
return null;
}
return new Pix(nativePix);
}
/**
* Sets the text detection source image to be a clone of the supplied source
* image. The supplied image may be recycled after calling this method.
*
* @param pixs The source image on which to perform text detection.
*/
public void setSourceImage(Pix pixs) {
nativeSetSourceImage(mNative, pixs.getNativePix());
}
public void detectText() {
nativeDetectText(mNative);
}
public void clear() {
nativeClear(mNative);
}
// ******************
// * PUBLIC CLASSES *
// ******************
public class Parameters {
public boolean debug;
public String out_dir;
// Edge-based thresholding
public int edge_tile_x;
public int edge_tile_y;
public int edge_thresh;
public int edge_avg_thresh;
// Skew angle correction
public boolean skew_enabled;
public float skew_min_angle;
public float skew_sweep_range;
public float skew_sweep_delta;
public int skew_sweep_reduction;
public int skew_search_reduction;
public float skew_search_min_delta;
// Singleton filter
public float single_min_aspect;
public float single_max_aspect;
public int single_min_area;
public float single_min_density;
// Quick pair filter
public float pair_h_ratio;
public float pair_d_ratio;
public float pair_h_dist_ratio;
public float pair_v_dist_ratio;
public float pair_h_shared;
// Cluster pair filter
public int cluster_width_spacing;
public float cluster_shared_edge;
public float cluster_h_ratio;
// Finalized cluster filter
public int cluster_min_blobs;
public float cluster_min_aspect;
public float cluster_min_fdr;
public int cluster_min_edge;
public int cluster_min_edge_avg;
public Parameters() {
debug = false;
out_dir = Environment.getExternalStorageDirectory().toString();
// Edge-based thresholding
edge_tile_x = 32;
edge_tile_y = 64;
edge_thresh = 64;
edge_avg_thresh = 4;
// Skew angle correction
skew_enabled = true;
skew_min_angle = 1.0f;
skew_sweep_range = 30.0f;
skew_sweep_delta = 5.0f;
skew_sweep_reduction = 8;
skew_search_reduction = 4;
skew_search_min_delta = 0.01f;
// Singleton filter
single_min_aspect = 0.1f;
single_max_aspect = 4.0f;
single_min_area = 4;
single_min_density = 0.2f;
// Quick pair filter
pair_h_ratio = 1.0f;
pair_d_ratio = 1.5f;
pair_h_dist_ratio = 2.0f;
pair_v_dist_ratio = 0.25f;
pair_h_shared = 0.25f;
// Cluster pair filter
cluster_width_spacing = 2;
cluster_shared_edge = 0.5f;
cluster_h_ratio = 1.0f;
// Finalized cluster filter
cluster_min_blobs = 5;
cluster_min_aspect = 2;
cluster_min_fdr = 2.5f;
cluster_min_edge = 32;
cluster_min_edge_avg = 1;
}
}
// ******************
// * NATIVE METHODS *
// ******************
private static native long nativeConstructor();
private static native void nativeDestructor(long nativePtr);
private static native void nativeSetParameters(long nativePtr, Parameters params);
private static native long nativeGetTextAreas(long nativePtr);
private static native float nativeGetSkewAngle(long nativePtr);
private static native int nativeGetSourceWidth(long nativePtr);
private static native int nativeGetSourceHeight(long nativePtr);
private static native float[] nativeGetTextConfs(long nativePtr);
private static native long nativeGetSourceImage(long nativePtr);
private static native void nativeSetSourceImage(long nativePtr, long nativePix);
private static native void nativeDetectText(long nativePtr);
private static native void nativeClear(long nativePtr);
}
================================================
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/textdetect/Thresholder.java
================================================
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.textdetect;
import com.googlecode.leptonica.android.Pix;
/**
* @author alanv@google.com (Alan Viverette)
*/
public class Thresholder {
static {
System.loadLibrary("lept");
System.loadLibrary("hydrogen");
}
/* Threshold under which pixels will be pulled low */
public final static int SOBEL_THRESH = 64;
public static Pix sobelEdgeThreshold(Pix pixs) {
return sobelEdgeThreshold(pixs, SOBEL_THRESH);
}
public static Pix sobelEdgeThreshold(Pix pixs, int thresh) {
if (pixs == null)
throw new IllegalArgumentException("Source pix must be non-null");
if (pixs.getDepth() != 8)
throw new IllegalArgumentException("Source pix depth must be 8bpp");
if (thresh >= 255 || thresh < 0)
throw new IllegalArgumentException("Threshold must be in the range 0 <= thresh < 255");
long nativePix = nativeSobelEdgeThreshold(pixs.getNativePix(), thresh);
if (nativePix == 0)
throw new RuntimeException("Failed to run Sobel edge threshold on Pix");
return new Pix(nativePix);
}
/* Desired tile X dimension; actual size may vary */
public static final int EDGE_TILE_X = 32;
/* Desired tile Y dimension; actual size may vary */
public static final int EDGE_TILE_Y = 64;
/* Threshold for maximum edge, typically 32 */
public static final int EDGE_THRESH = 32;
/* Threshold for average edge, typically 1 */
public static final int EDGE_AVERAGE = 1;
/**
* Returns a version of the image thresholded using Fisher's discriminant.
*
* @return a thresholded image or <code>null</code> on error
*/
public static Pix edgeAdaptiveThreshold(Pix pixs) {
return edgeAdaptiveThreshold(pixs, EDGE_TILE_X, EDGE_TILE_Y, EDGE_THRESH, EDGE_AVERAGE);
}
public static Pix edgeAdaptiveThreshold(
Pix pixs, int tileX, int tileY, int threshold, int average) {
if (pixs == null)
throw new IllegalArgumentException("Source pix must be non-null");
if (pixs.getDepth() != 8)
throw new IllegalArgumentException("Source pix depth must be 8bpp");
if (tileX < 8)
throw new IllegalArgumentException("Tile width must be at least 8 pixels");
if (tileY < 8)
throw new IllegalArgumentException("Tile height must be at least 8 pixels");
long nativePix = nativeEdgeAdaptiveThreshold(
pixs.getNativePix(), tileX, tileY, threshold, average);
if (nativePix == 0)
throw new RuntimeException("Failed to run Fisher adaptive threshold on Pix");
return new Pix(nativePix);
}
/* Desired tile X dimension; actual size may vary */
public static final int FDR_TILE_X = 48;
/* Desired tile Y dimension; actual size may vary */
public static final int FDR_TILE_Y = 48;
/* Fraction of the max Otsu score, typically 0.01 */
public static final float FDR_SCORE_FRACT = 0.0f;
/* Threshold for Fisher's Discriminant Rate, typically 3.5 */
public static final float FDR_THRESH = 2.5f;
/**
* Returns a version of the image thresholded using Fisher's discriminant.
*
* @return a thresholded image or <code>null</code> on error
*/
public static Pix fisherAdaptiveThreshold(Pix pixs) {
return fisherAdaptiveThreshold(pixs, 30, 20);
}
public static Pix fisherAdaptiveThreshold(Pix pixs, int numTilesX, int numTilesY) {
int tileX = pixs.getWidth() / numTilesX;
int tileY = pixs.getHeight() / numTilesY;
return fisherAdaptiveThreshold(pixs, tileX, tileY, FDR_SCORE_FRACT, FDR_THRESH);
}
public static Pix fisherAdaptiveThreshold(
Pix pixs, int tileX, int tileY, float scoreFract, float thresh) {
if (pixs == null)
throw new IllegalArgumentException("Source pix must be non-null");
if (pixs.getDepth() != 8)
throw new IllegalArgumentException("Source pix depth must be 8bpp");
if (tileX < 8)
throw new IllegalArgumentException("Tile width must be at least 8 pixels");
if (tileY < 8)
throw new IllegalArgumentException("Tile height must be at least 8 pixels");
long nativePix = nativeFisherAdaptiveThreshold(
pixs.getNativePix(), tileX, tileY, scoreFract, thresh);
if (nativePix == 0)
throw new RuntimeException("Failed to run Fisher adaptive threshold on Pix");
return new Pix(nativePix);
}
// ***************
// * NATIVE CODE *
// ***************
private static native long nativeFisherAdaptiveThreshold(
long nativePix, int tileX, int tileY, float scoreFract, float thresh);
private static native long nativeEdgeAdaptiveThreshold(
long nativePix, int tileX, int tileY, int threshold, int average);
private static native long nativeSobelEdgeThreshold(long nativePix, int threshold);
}
================================================
FILE: eyes-two/src/main/jni/Android.mk
================================================
out_path := $(realpath $(NDK_OUT))
out_path := $(out_path:$(realpath $(out_path)/../../../..)%=%)
TESSERACT_TOOLS_PATH := $(TESSERACT_BUILD_PATH)/$(out_path)/local
PREBUILT_PATH := $(TESSERACT_TOOLS_PATH)/$(TARGET_ARCH_ABI)
ROOT_PATH := $(TESSERACT_BUILD_PATH)/../..
include $(call all-subdir-makefiles)
================================================
FILE: eyes-two/src/main/jni/Application.mk
================================================
APP_ABI := armeabi-v7a x86 arm64-v8a x86_64
APP_OPTIM := release
NDK_TOOLCHAIN_VERSION := clang
================================================
FILE: eyes-two/src/main/jni/common/Android.mk
================================================
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := time_log.cpp
LOCAL_CFLAGS := -Wall \
-DHAVE_MALLOC_H \
-DHAVE_PTHREAD \
-finline-functions \
-frename-registers \
-ffast-math \
-s \
-fomit-frame-pointer
ifeq ($(LOG_TIME),true)
LOCAL_CFLAGS += -DLOG_TIME
endif
LOCAL_MODULE := common
include $(BUILD_STATIC_LIBRARY)
================================================
FILE: eyes-two/src/main/jni/common/time_log.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Andrew Harp
#include "types.h"
#include "time_log.h"
#ifdef LOG_TIME
// Storage for logging functionality.
int32 num_time_logs = 0;
LogEntry time_logs[NUM_LOGS];
int32 num_avg_entries = 0;
AverageEntry avg_entries[NUM_LOGS];
float32 running_total = 0.0f;
#endif
================================================
FILE: eyes-two/src/main/jni/common/time_log.h
================================================
// Copyright 2010 Google Inc. All Rights Reserved.
// Author: andrewharp@google.com (Andrew Harp)
//
// Utility functions for performance profiling.
#ifndef JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_TIME_LOG_H_
#define JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_TIME_LOG_H_
#include <time.h>
#include "utils.h"
#include "types.h"
#ifdef LOG_TIME
inline static long currentThreadTimeNanos() {
struct timespec tm;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
return tm.tv_sec * 1000000000LL + tm.tv_nsec;
}
// Blend constant for running average.
#define ALPHA 0.98f
#define NUM_LOGS 100
struct LogEntry {
const char* id;
clock_t time_stamp;
};
struct AverageEntry {
const char* id;
float32 average_duration;
};
// Storage for keeping track of this frame's values.
extern int32 num_time_logs;
extern LogEntry time_logs[NUM_LOGS];
// Storage for keeping track of average values (each entry may not be printed
// out each frame).
extern AverageEntry avg_entries[NUM_LOGS];
extern int32 num_avg_entries;
extern float32 running_total;
// Call this at the start of a logging phase.
inline static void resetTimeLog() {
num_time_logs = 0;
}
// Log a message to be printed out when printTimeLog is called, along with the
// amount of time in ms that has passed since the last call to this function.
inline static void timeLog(const char* str) {
if (num_time_logs >= NUM_LOGS) {
LOGE("Out of log entries!");
return;
}
time_logs[num_time_logs].id = str;
time_logs[num_time_logs].time_stamp = currentThreadTimeNanos();
++num_time_logs;
}
inline static float32 blend(float32 old_val, float32 new_val) {
return ALPHA * old_val + (1.0f - ALPHA) * new_val;
}
inline static float32 updateAverage(const char* str, const float32 new_val) {
for (int32 entry_num = 0; entry_num < num_avg_entries; ++entry_num) {
AverageEntry* const entry = avg_entries + entry_num;
if (str == entry->id) {
entry->average_duration = blend(entry->average_duration, new_val);
return entry->average_duration;
}
}
if (num_avg_entries >= NUM_LOGS) {
LOGE("Too many log entries!");
}
// If it wasn't there already, add it.
avg_entries[num_avg_entries].id = str;
avg_entries[num_avg_entries].average_duration = new_val;
++num_avg_entries;
return new_val;
}
// Prints out all the timeLog statements in chronological order with the
// interval that passed between subsequent statements. The total time between
// the first and last statements is printed last.
inline static void printTimeLog() {
LogEntry* last_time = time_logs;
for (int i = 0; i < num_time_logs; ++i) {
LogEntry* this_time = time_logs + i;
const float32 curr_time =
(this_time->time_stamp - last_time->time_stamp) / 1000000.0f;
const float32 avg_time = updateAverage(this_time->id, curr_time);
LOGD("%32s: %6.2fms %6.2fms", this_time->id, curr_time, avg_time);
last_time = this_time;
}
float32 total_time =
(last_time->time_stamp - time_logs->time_stamp) / 1000000.0f;
running_total = blend(running_total, total_time);
LOGD("TOTAL TIME: %6.2fms %6.2fms\n",
total_time, running_total);
}
#else
inline static void resetTimeLog() {}
inline static void timeLog(const char* str) {}
inline static void printTimeLog() {}
#endif
#endif // JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_TIME_LOG_H_
================================================
FILE: eyes-two/src/main/jni/common/types.h
================================================
// Copyright 2010 Google Inc. All Rights Reserved.
// Author: andrewharp@google.com (Andrew Harp)
//
// This file exists to make the optical flow library more portable to different
// platforms.
#ifndef JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_NATIVE_TYPES_H_
#define JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_NATIVE_TYPES_H_
//typedef unsigned char bool;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef signed char int8;
typedef short int16;
typedef signed int int32;
typedef float float32;
#endif // JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_NATIVE_TYPES_H_
================================================
FILE: eyes-two/src/main/jni/common/utils.h
================================================
// Copyright 2009 Google Inc. All Rights Reserved.
// Author: andrewharp@google.com (Andrew Harp)
#ifndef JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_UTILS_H_
#define JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_UTILS_H_
#include <android/log.h>
#include <stdlib.h>
#ifdef HAVE_ARMEABI_V7A
#include <cpu-features.h>
#include <arm_neon.h>
#endif
#include <math.h>
#include "types.h"
#define SAFE_DELETE(pointer) {\
if ((pointer) != NULL) {\
LOGV("Safe deleting pointer: %s", #pointer);\
delete (pointer);\
(pointer) = NULL;\
} else {\
LOGV("Pointer already null: %s", #pointer);\
}\
}
#ifdef VERBOSE_LOGGING
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
#else
#define LOGV(...) {}
#endif
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
#define LOG_TAG "goggles"
#ifdef SANITY_CHECKS
#define CHECK(condition, ...) {\
if (!(condition)) {\
LOGE("CHECK FAILED: (%s) @ %s:%u\n", #condition, __FILE__, __LINE__);\
LOGE(__VA_ARGS__);\
}\
}
#else
#define CHECK(...) {}
#endif
#ifdef HAVE_ARMEABI_V7A
// Runtime check for NEON support. Only call on devices that support at least
// armeabi-v7a.
inline bool supportsNeon() {
return (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
}
#endif
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) > (b)) ? (b) : (a))
#endif
template<typename T>
inline static T square(const T a) {
return a * a;
}
template<typename T>
inline static T clip(const T a, const T floor, const T ceil) {
return min(ceil, max(a, floor));
}
template<typename T>
inline static int32 floor(const T a) {
return static_cast<int32>(a);
}
template<typename T>
inline static int32 ceil(const T a) {
return floor(a) + 1;
}
template<typename T>
inline static bool inRange(const T a, const T min, const T max) {
return (a >= min) && (a <= max);
}
template<typename T>
inline static int32 round(const float a) {
return (a - (float) floor(a) > 0.5f) ? ceil(a) : floor(a);
}
template<typename T>
inline static void swap(T* const a, T* const b) {
// Cache out the VALUE of what's at a.
T tmp = *a;
*a = *b;
*b = tmp;
}
#endif // JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_COMMON_UTILS_H_
================================================
FILE: eyes-two/src/main/jni/hydrogen/Android.mk
================================================
ifneq ($(TARGET_SIMULATOR),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libhydrogen
LOCAL_SRC_FILES += \
src/clusterer.cpp \
src/hydrogentextdetector.cpp \
src/thresholder.cpp \
src/utilities.cpp \
src/validator.cpp
LOCAL_SRC_FILES += \
jni/hydrogentextdetector.cpp \
jni/thresholder.cpp \
jni/jni.cpp
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/src \
$(ROOT_PATH)/tess-two/jni/com_googlecode_leptonica_android \
$(ROOT_PATH)/leptonica/src
LOCAL_LDLIBS += \
-llog
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_DISABLE_FORMAT_STRING_CHECKS := true
TARGET_PREBUILT_SHARED_LIBRARIES += \
$(PREBUILT_PATH)/liblept.so
include $(BUILD_SHARED_LIBRARY)
endif #TARGET_SIMULATOR
================================================
FILE: eyes-two/src/main/jni/hydrogen/jni/common.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TEXTDETECT_JNI_COMMON_H
#define TEXTDETECT_JNI_COMMON_H
#include <jni.h>
#include <android/log.h>
#include <assert.h>
#include <cstdlib>
#define LOG_TAG "TextDetect(native)"
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
#define LOG_ASSERT(_cond, ...) if (!_cond) __android_log_assert("conditional", LOG_TAG, __VA_ARGS__)
#endif /* TEXTDETECT_JNI_COMMON_H */
================================================
FILE: eyes-two/src/main/jni/hydrogen/jni/hydrogentextdetector.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "common.h"
#include "hydrogentextdetector.h"
#define DEBUG_MODE false
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
jlong Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeConstructor(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = new HydrogenTextDetector();
return (jlong) ptr;
}
void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeDestructor(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
delete ptr;
}
bool getBoolField(JNIEnv *env, jclass &clazz, jobject &obj, const char *field) {
jfieldID fieldID = env->GetFieldID(clazz, field, "Z");
return (env->GetBooleanField(obj, fieldID) == JNI_TRUE);
}
int getIntField(JNIEnv *env, jclass &clazz, jobject &obj, const char *field) {
jfieldID fieldID = env->GetFieldID(clazz, field, "I");
return (int) env->GetIntField(obj, fieldID);
}
float getFloatField(JNIEnv *env, jclass &clazz, jobject &obj, const char *field) {
jfieldID fieldID = env->GetFieldID(clazz, field, "F");
return (float) env->GetFloatField(obj, fieldID);
}
void getStringField(JNIEnv *env, jclass &clazz, jobject &obj, const char *field,
char *dst) {
jfieldID fieldID = env->GetFieldID(clazz, field, "Ljava/lang/String;");
jstring str = (jstring) env->GetObjectField(obj, fieldID);
if (str != NULL) {
jsize len = L_MIN(env->GetStringLength(str), 254);
env->GetStringUTFRegion(str, 0, len, dst);
dst[len + 1] = 0;
} else {
dst[0] = 0;
}
}
void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeSetParameters(
JNIEnv *env,
jclass clazz,
jlong nativePtr,
jobject params) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
HydrogenTextDetector::TextDetectorParameters *myParams = ptr->GetMutableParameters();
jclass paramClass = env->GetObjectClass(params);
getStringField(env, paramClass, params, "out_dir", myParams->out_dir);
myParams->debug = getBoolField(env, paramClass, params, "debug");
myParams->edge_tile_x = getIntField(env, paramClass, params, "edge_tile_x");
myParams->edge_tile_y = getIntField(env, paramClass, params, "edge_tile_y");
myParams->edge_thresh = getIntField(env, paramClass, params, "edge_thresh");
myParams->edge_avg_thresh = getIntField(env, paramClass, params, "edge_avg_thresh");
myParams->skew_enabled = getBoolField(env, paramClass, params, "skew_enabled");
myParams->skew_min_angle = getFloatField(env, paramClass, params, "skew_min_angle");
myParams->skew_sweep_range = getFloatField(env, paramClass, params, "skew_sweep_range");
myParams->skew_sweep_delta = getFloatField(env, paramClass, params, "skew_sweep_delta");
myParams->skew_sweep_reduction = getIntField(env, paramClass, params, "skew_sweep_reduction");
myParams->skew_search_reduction = getIntField(env, paramClass, params, "skew_search_reduction");
myParams->skew_search_min_delta = getFloatField(env, paramClass, params, "skew_search_min_delta");
myParams->single_min_aspect = getFloatField(env, paramClass, params, "single_min_aspect");
myParams->single_max_aspect = getFloatField(env, paramClass, params, "single_max_aspect");
myParams->single_min_area = getIntField(env, paramClass, params, "single_min_area");
myParams->single_min_density = getFloatField(env, paramClass, params, "single_min_density");
myParams->pair_h_ratio = getFloatField(env, paramClass, params, "pair_h_ratio");
myParams->pair_d_ratio = getFloatField(env, paramClass, params, "pair_d_ratio");
myParams->pair_h_dist_ratio = getFloatField(env, paramClass, params, "pair_h_dist_ratio");
myParams->pair_v_dist_ratio = getFloatField(env, paramClass, params, "pair_v_dist_ratio");
myParams->pair_h_shared = getFloatField(env, paramClass, params, "pair_h_shared");
myParams->cluster_width_spacing = getIntField(env, paramClass, params, "cluster_width_spacing");
myParams->cluster_shared_edge = getFloatField(env, paramClass, params, "cluster_shared_edge");
myParams->cluster_h_ratio = getFloatField(env, paramClass, params, "cluster_h_ratio");
myParams->cluster_min_blobs = getIntField(env, paramClass, params, "cluster_min_blobs");
myParams->cluster_min_aspect = getFloatField(env, paramClass, params, "cluster_min_aspect");
myParams->cluster_min_fdr = getFloatField(env, paramClass, params, "cluster_min_fdr");
myParams->cluster_min_edge = getIntField(env, paramClass, params, "cluster_min_edge");
myParams->cluster_min_edge_avg = getIntField(env, paramClass, params, "cluster_min_edge_avg");
}
jlong Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeGetTextAreas(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
PIXA *textAreas = ptr->GetTextAreas();
return (jlong) textAreas;
}
jfloat Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeGetSkewAngle(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
l_float32 skew_angle = ptr->GetSkewAngle();
return (jfloat) skew_angle;
}
jint Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeGetSourceWidth(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
PIX *pix = ptr->GetSourceImage();
jint h = pixGetWidth(pix);
pixDestroy(&pix);
return (jint) h;
}
jint Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeGetSourceHeight(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
//LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
PIX *pix = ptr->GetSourceImage();
jint w = pixGetHeight(pix);
pixDestroy(&pix);
return (jint) w;
}
jfloatArray Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeGetTextConfs(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
NUMA *confs = ptr->GetTextConfs();
l_int32 count = numaGetCount(confs);
jfloatArray ret = env->NewFloatArray(count);
l_float32 nval;
jfloat jval;
if (ret != NULL) {
for (int i = 0; i < count; i++) {
numaGetFValue(confs, i, &nval);
jval = (jfloat) nval;
env->SetFloatArrayRegion(ret, i, 1, &jval);
}
}
numaDestroy(&confs);
return ret;
}
jlong Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeGetSourceImage(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
return (jlong) ptr->GetSourceImage();
}
void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeSetSourceImage(
JNIEnv *env,
jclass clazz,
jlong nativePtr,
jlong nativePix) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
PIX *pix = (PIX *) nativePix;
ptr->SetSourceImage(pix);
}
void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeDetectText(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
ptr->DetectText();
}
void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeClear(
JNIEnv *env,
jclass clazz,
jlong nativePtr) {
if (DEBUG_MODE) LOGV(__FUNCTION__);
HydrogenTextDetector *ptr = (HydrogenTextDetector *) nativePtr;
ptr->Clear();
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#undef DEBUG_MODE
================================================
FILE: eyes-two/src/main/jni/hydrogen/jni/jni.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "common.h"
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
JNIEnv *env;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK) {
LOGE("ERROR: GetEnv failed\n");
return -1;
}
assert(env != NULL);
return JNI_VERSION_1_6;
}
================================================
FILE: eyes-two/src/main/jni/hydrogen/jni/thresholder.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "common.h"
#include "thresholder.h"
#include "utilities.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
jlong Java_com_googlecode_eyesfree_textdetect_Thresholder_nativeSobelEdgeThreshold(JNIEnv *env,
jclass clazz,
jlong nativePix,
jlong threshold) {
LOGV(__FUNCTION__);
PIX *pixs = (PIX *) nativePix;
PIX *pixd = pixThreshedSobelEdgeFilter(pixs, (l_int32) threshold);
return (jlong) pixd;
}
jlong Java_com_googlecode_eyesfree_textdetect_Thresholder_nativeEdgeAdaptiveThreshold(JNIEnv *env,
jclass clazz,
jlong nativePix,
jint tileX,
jint tileY,
jint threshold,
jint average) {
LOGV(__FUNCTION__);
PIX *pixs = (PIX *) nativePix;
PIX *pixd;
if (pixEdgeAdaptiveThreshold(pixs, &pixd, (l_int32) tileX, (l_int32) tileY, (l_int32) threshold,
(l_int32) average)) {
return (jlong) 0;
}
return (jlong) pixd;
}
jlong Java_com_googlecode_eyesfree_textdetect_Thresholder_nativeFisherAdaptiveThreshold(JNIEnv *env,
jclass clazz,
jlong nativePix,
jint tileX,
jint tileY,
jfloat scoreFract,
jfloat thresh) {
LOGV(__FUNCTION__);
PIX *pixs = (PIX *) nativePix;
PIX *pixd;
if (pixFisherAdaptiveThreshold(pixs, &pixd, (l_int32) tileX, (l_int32) tileY,
(l_float32) scoreFract, (l_float32) thresh)) {
return (jlong) 0;
}
return (jlong) pixd;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/clusterer.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <malloc.h>
#include "leptonica.h"
#include "clusterer.h"
#include "validator.h"
/* Type of connected components: 4 is up/down/left/right. 8 includes diagonals */
#define CONN_COMP 8
l_int32 ConnCompValidPixa(PIX *pix8, PIX *pix, PIXA **ppixa, NUMA **pconfs,
HydrogenTextDetector::TextDetectorParameters ¶ms) {
l_int32 h, iszero;
l_int32 x, y, xstart, ystart;
l_float32 singleton_conf;
PIX *pixt1, *pixt2, *pixt3, *pixt4, *pixt5;
PIXA *pixa, *pixasort;
NUMA *confs, *confsort;
BOX *box;
BOXA *boxa;
L_STACK *lstack, *auxstack;
PROCNAME("pixConnCompValidPixa");
if (!ppixa)
return ERROR_INT("&pixa not defined", procName, 1);
if (!pconfs)
return ERROR_INT("&confs not defined", procName, 1);
*ppixa = NULL;
*pconfs = NULL;
if (!pix || pixGetDepth(pix) != 1)
return ERROR_INT("pixs undefined or not 1 bpp", procName, 1);
pixa = pixaCreate(0);
confs = numaCreate(0);
pixZero(pix, &iszero);
if (iszero) {
*ppixa = pixa;
return 0;
}
if ((pixt1 = pixCopy(NULL, pix)) == NULL)
return ERROR_INT("pixt1 not made", procName, 1);
if ((pixt2 = pixCopy(NULL, pix)) == NULL)
return ERROR_INT("pixt2 not made", procName, 1);
h = pixGetHeight(pix);
if ((lstack = lstackCreate(h)) == NULL)
return ERROR_INT("lstack not made", procName, 1);
if ((auxstack = lstackCreate(0)) == NULL)
return ERROR_INT("auxstack not made", procName, 1);
lstack->auxstack = auxstack;
if ((boxa = boxaCreate(0)) == NULL)
return ERROR_INT("boxa not made", procName, 1);
xstart = 0;
ystart = 0;
while (1) {
if (!nextOnPixelInRaster(pixt1, xstart, ystart, &x, &y))
break;
if ((box = pixSeedfillBB(pixt1, lstack, x, y, CONN_COMP)) == NULL)
return ERROR_INT("box not made", procName, 1);
/* Save the c.c. and remove from pixt2 as well */
pixt3 = pixClipRectangle(pixt1, box, NULL);
pixt4 = pixClipRectangle(pixt2, box, NULL);
pixt5 = pixClipRectangle(pix8, box, NULL);
pixXor(pixt3, pixt3, pixt4);
pixRasterop(pixt2, box->x, box->y, box->w, box->h, PIX_SRC ^ PIX_DST, pixt3, 0, 0);
pixDestroy(&pixt4);
if (ValidateSingleton(pixt3, box, pixt5, &singleton_conf, params)) {
boxaAddBox(boxa, box, L_INSERT);
pixaAddPix(pixa, pixt3, L_INSERT);
numaAddNumber(confs, singleton_conf);
} else {
boxDestroy(&box);
pixDestroy(&pixt3);
}
pixDestroy(&pixt5);
xstart = x;
ystart = y;
}
/* Remove old boxa of pixa and replace with a clone copy */
boxaDestroy(&pixa->boxa);
pixa->boxa = boxaCopy(boxa, L_CLONE);
/* Sort pixa, then destroy old pixa */
NUMA *naindex;
if ((pixasort = pixaSort(pixa, L_SORT_BY_X, L_SORT_INCREASING, &naindex, L_CLONE)) == NULL)
return ERROR_INT("pixasort not made", procName, 1);
confsort = numaSortByIndex(confs, naindex);
/* Cleanup, freeing the fillsegs on each stack */
lstackDestroy(&lstack, TRUE);
pixDestroy(&pixt1);
pixDestroy(&pixt2);
boxaDestroy(&boxa);
pixaDestroy(&pixa);
*ppixa = pixasort;
*pconfs = confsort;
return 0;
}
l_int32 MergePix(PIXA *pixad, l_int32 d_idx, PIXA *pixas, l_int32 s_idx) {
l_int32 op;
l_int32 x, y, w, h;
l_int32 dx, dy, dw, dh;
PIX *pixd, *pixs, *pixmerge;
BOX *boxd, *boxs, *boxmerge;
PROCNAME("pixMergePix");
if (!pixad)
return ERROR_INT("pixad not defined", procName, 1);
if (!pixas)
return ERROR_INT("pixas not defined", procName, 1);
boxd = pixaGetBox(pixad, d_idx, L_CLONE);
boxs = pixaGetBox(pixas, s_idx, L_CLONE);
boxmerge = boxBoundingRegion(boxd, boxs);
boxGetGeometry(boxmerge, &x, &y, &w, &h);
pixmerge = pixCreate(w, h, 1);
op = PIX_SRC | PIX_DST;
pixs = pixaGetPix(pixas, s_idx, L_CLONE);
if (!pixs)
return ERROR_INT("s_idx not valid", procName, 1);
boxGetGeometry(boxs, &dx, &dy, &dw, &dh);
pixRasterop(pixmerge, dx - x, dy - y, dw, dh, op, pixs, 0, 0);
pixDestroy(&pixs);
boxDestroy(&boxs);
pixd = pixaGetPix(pixad, d_idx, L_CLONE);
if (!pixd)
return ERROR_INT("d_idx not valid", procName, 1);
boxGetGeometry(boxd, &dx, &dy, &dw, &dh);
pixRasterop(pixmerge, dx - x, dy - y, dw, dh, op, pixd, 0, 0);
pixDestroy(&pixd);
boxDestroy(&boxd);
pixaReplacePix(pixad, d_idx, pixmerge, boxmerge);
return 0;
}
l_int32 MergePairFragments(PIX *pix8, PIXA *clusters, PIXA *pixa, l_uint8 *remove) {
l_uint8 setj;
l_int32 i, j, real_j, contains, n, count, num_clusters, initj;
l_int32 xi, yi, wi, hi;
l_int32 xj, yj, wj, hj;
BOX *boxi, *boxj;
PIXA *pixasort;
NUMA *numa;
PROCNAME("pixMergePairFragments");
if (!pixa)
return ERROR_INT("pixa not defined", procName, -1);
if (!remove)
return ERROR_INT("remove not defined", procName, -1);
n = pixaGetCount(pixa);
num_clusters = pixaGetCount(clusters);
if (!n) {
L_INFO("pixa contained 0 pix", procName);
return 0;
}
if (!num_clusters) {
L_INFO("clusters contained 0 pix", procName);
return 0;
}
if ((pixasort = pixaSort(pixa, L_SORT_BY_Y, L_SORT_INCREASING, &numa, L_CLONE)) == NULL)
return ERROR_INT("failed to sort pixa", procName, -1);
count = 0;
initj = 0;
setj = 0;
for (i = 0; i < num_clusters; i++) {
pixaGetBoxGeometry(clusters, i, &xi, &yi, &wi, &hi);
boxi = pixaGetBox(clusters, i, L_CLONE);
setj = 0;
for (j = initj; j < n; j++) {
numaGetIValue(numa, j, &real_j);
// Only consider removed pix
if (!remove[real_j])
continue;
pixaGetBoxGeometry(pixasort, j, &xj, &yj, &wj, &hj);
// If the top of this pix is above the top of the cluster, skip
if (yj < yi)
continue;
if (!setj) {
initj = j;
setj = 1;
}
// If the bottom of this pix is below the bottom of the cluster, stop
if (yj > yi + hi)
break;
boxj = pixaGetBox(pixasort, j, L_CLONE);
boxIntersects(boxi, boxj, &contains);
if (contains) {
MergePix(clusters, i, pixasort, j);
//remove[real_j] = 0; // TODO eliminates duplicates
count++;
}
boxDestroy(&boxj);
}
boxDestroy(&boxi);
}
pixaDestroy(&pixasort);
numaDestroy(&numa);
return count;
}
l_int32 RemoveInvalidPairs(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *remove,
HydrogenTextDetector::TextDetectorParameters ¶ms) {
l_int32 i, j, n, count;
l_float32 pair_conf;
l_uint8 *has_partner;
BOX *b1, *b2;
PROCNAME("pixRemoveInvalidPairs");
if (!pixa)
return ERROR_INT("pixa not defined", procName, -1);
if (!remove)
return ERROR_INT("remove not defined", procName, -1);
n = pixaGetCount(pixa);
if (!n) {
L_INFO("pixa contained 0 pix", procName);
return 0;
}
has_partner = (l_uint8 *) calloc(n, sizeof(l_uint8));
count = 0;
for (i = 0; i < n; i++) {
if (remove[i])
continue;
b1 = pixaGetBox(pixa, i, L_CLONE);
/* Search right for a partner for i */
for (j = i + 1; j < n; j++) {
if (remove[j])
continue;
b2 = pixaGetBox(pixa, j, L_CLONE);
/* Check whether this is a valid pair */
if (!ValidatePair(b1, b2, &pair_conf, params)) {
boxDestroy(&b2);
continue;
}
// We don't need to adjust confidence values here, since we'll
// generate cluster pairs and use those later.
boxDestroy(&b2);
has_partner[i] = 1;
has_partner[j] = 1;
break;
}
boxDestroy(&b1);
}
for (i = 0; i < n; i++) {
if (!has_partner[i]) {
remove[i] = 1;
count++;
}
}
free(has_partner);
return count;
}
// Clustering pass
l_int32 GenerateClusterPartners(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *remove, l_int32 **pleft,
l_int32 **pright, HydrogenTextDetector::TextDetectorParameters ¶ms) {
l_int32 n, i, j;
l_int32 xi, yi, wi, hi, maxd;
l_int32 xj, yj, wj, hj;
l_int32 dx, dy, d, mind, minj;
l_int32 *left, *right;
l_float32 clusterpair_conf, minconf;
BOX *b1, *b2;
bool too_far;
PROCNAME("GenerateClusterPartners");
if (!pixa)
return ERROR_INT("pixa not defined", procName, -1);
if (!pright)
return ERROR_INT("&right not defined", procName, -1);
if (!pleft)
return ERROR_INT("&left not defined", procName, -1);
n = pixaGetCount(pixa);
if (!n) {
L_INFO("pixa contained 0 pix", procName);
return 0;
}
/* If n == 0, remove may be NULL. Since we have already checked for that,
* any NULL arrays signal an error condition.
*/
if (!remove)
return ERROR_INT("remove not defined", procName, -1);
left = (l_int32 *) malloc(n * sizeof(l_int32));
right = (l_int32 *) malloc(n * sizeof(l_int32));
/* Initialize left and right arrays */
for (i = 0; i < n; i++) {
left[i] = -2;
right[i] = -2;
}
/* For each component, check all possible neighbors to find the most likely
* right neighbor. If that right neighbor already has a left neighbor, insert
* the component to the right of the existing neighbor and the left of the
* right neighbor.
*/
for (i = 0; i < n; i++) {
if (remove[i])
continue;
pixaGetBoxGeometry(pixa, i, &xi, &yi, &wi, &hi);
b1 = pixaGetBox(pixa, i, L_CLONE);
mind = -1;
minj = -1;
maxd = L_MAX(wi, hi);
minconf = 0.0;
/* Search for closest right neighbor */
for (j = i + 1; j < n; j++) {
if (remove[j])
continue;
pixaGetBoxGeometry(pixa, j, &xj, &yj, &wj, &hj);
b2 = pixaGetBox(pixa, j, L_CLONE);
if (!ValidateClusterPair(b1, b2, &too_far, &clusterpair_conf, params)) {
if (too_far)
break;
else
continue;
}
/* calculate spacing between i and j */
dx = xj - (xi + wi);
dy = (yj + hj) - (yi + hi);
d = dx * dx + dy * dy;
/* If we haven't found a neighbor OR we're the closest neighbor, update
* i's record for most likely neighbor.
*/
if (mind < 0 || d < mind) {
mind = d;
minj = j;
minconf = clusterpair_conf;
}
}
/* If we found a valid neighbor, go ahead and use it. */
if (mind >= 0) {
j = left[minj];
/* If minj already had a left neighbor, replace it with i */
// TODO(alanv): Insertion fudges the partner confidence value
if (j >= 0) {
left[i] = j;
right[j] = i;
}
left[minj] = i;
right[i] = minj;
// Adjust confidence to reflect partner confidence
l_float32 conf;
numaGetFValue(confs, i, &conf);
conf *= minconf;
numaReplaceNumber(confs, i, conf);
}
}
*pleft = left;
*pright = right;
return 0;
}
l_int32 MergeClusterPartners(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *remove, l_int32 *left, l_int32 *right,
PIXA **ppixad, NUMA **pclusterconfs, HydrogenTextDetector::TextDetectorParameters ¶ms) {
l_int32 n, count, i, j, temp;
l_uint32 x, y, w, h;
l_int32 xi, yi, wi, hi;
l_int32 xj, yj, wj, hj;
PIXA *pixad, *pixa_cluster;
NUMA *confd, *numa_cluster;
PIX *pix, *pixd, *pix_cluster;
BOX *box, *boxd;
PROCNAME("ClusterValidComponents");
if (!ppixad)
return ERROR_INT("&pixad not defined", procName, -1);
if (!pclusterconfs)
return ERROR_INT("&clusterconfs not defined", procName, -1);
n = pixaGetCount(pixa);
pixad = pixaCreate(0);
confd = numaCreate(0);
*ppixad = pixad;
*pclusterconfs = confd;
if (!n) {
L_INFO("pixa contained 0 pix", procName);
return 0;
}
/* If n == 0, then left, right, and remove may be NULL. Since we have
* already checked for that, any NULL arrays signal an error condition.
*/
if (!left)
return ERROR_INT("left not defined", procName, -1);
if (!right)
return ERROR_INT("right not defined", procName, -1);
if (!remove)
return ERROR_INT("remove not defined", procName, -1);
count = 0;
/* Starting from the first component, generate a cluster by traveling
* left and right as far as possible. Ignore components that have no
* neighbors.
*/
for (i = 0; i < n; i++) {
if (remove[i])
continue;
if (left[i] < -1 && right[i] < -1)
remove[i] = 1;
if (left[i] < 0 && right[i] < 0)
continue;
pixa_cluster = pixaCreate(1);
numa_cluster = numaCreate(1);
/* We don't need to destroy this pix and box since pixa_cluster
* takes ownership with L_INSERT.
*/
pix = pixaGetPix(pixa, i, L_CLONE);
box = pixaGetBox(pixa, i, L_CLONE);
pixaAddPix(pixa_cluster, pix, L_INSERT);
pixaAddBox(pixa_cluster, box, L_INSERT);
numaAddNumber(numa_cluster, i);
boxGetGeometry(box, &xi, &yi, &wi, &hi);
x = xi;
y = yi;
w = xi + wi;
h = yi + hi;
/* Move along left neighbors */
j = left[i];
left[i] = -1;
while (j >= 0) {
pix = pixaGetPix(pixa, j, L_CLONE);
box = pixaGetBox(pixa, j, L_CLONE);
pixaAddPix(pixa_cluster, pix, L_INSERT);
pixaAddBox(pixa_cluster, box, L_INSERT);
numaAddNumber(numa_cluster, j);
boxGetGeometry(box, &xj, &yj, &wj, &hj);
x = L_MIN(x, (l_uint32) xj);
y = L_MIN(y, (l_uint32) yj);
w = L_MAX(w, (l_uint32) (xj + wj));
h = L_MAX(h, (l_uint32) (yj + hj));
right[j] = -1;
temp = left[j];
left[j] = -1;
j = temp;
}
/* Move along right neighbors */
j = right[i];
right[i] = -1;
while (j >= 0) {
pix = pixaGetPix(pixa, j, L_CLONE);
box = pixaGetBox(pixa, j, L_CLONE);
pixaAddPix(pixa_cluster, pix, L_INSERT);
pixaAddBox(pixa_cluster, box, L_INSERT);
numaAddNumber(numa_cluster, j);
boxGetGeometry(box, &xj, &yj, &wj, &hj);
x = L_MIN(x, (l_uint32) xj);
y = L_MIN(y, (l_uint32) yj);
w = L_MAX(w, (l_uint32) xj + wj);
h = L_MAX(h, (l_uint32) (yj + hj));
left[j] = -1;
temp = right[j];
right[j] = -1;
j = temp;
}
w = w - x;
h = h - y;
boxd = boxCreate(x, y, w, h);
pix_cluster = pixClipRectangle(pix8, boxd, NULL);
l_float32 temp_conf;
l_float32 cluster_conf;
/* If pixa seems valid, collapse its components to a single pix */
if (ValidateCluster(pix_cluster, pixa_cluster, boxd, &cluster_conf, params)) {
l_int32 num_comps = pixaGetCount(pixa_cluster);
l_float32 avg_conf = 0.0;
pixd = pixCreate(w, h, 1);
for (int i = 0; i < num_comps; i++) {
pix = pixaGetPix(pixa_cluster, i, L_CLONE);
pixaGetBoxGeometry(pixa_cluster, i, &xj, &yj, &wj, &hj);
pixRasterop(pixd, xj - x, yj - y, wj, hj, PIX_PAINT, pix, 0, 0);
pixDestroy(&pix);
numaGetFValue(confs, i, &temp_conf);
avg_conf += temp_conf;
}
// Adjust average confidence to reflect overall cluster confidence
avg_conf /= num_comps;
avg_conf *= cluster_conf;
pixaAddPix(pixad, pixd, L_INSERT);
pixaAddBox(pixad, boxd, L_INSERT);
numaAddNumber(confd, avg_conf);
count++;
} else {
l_int32 num_nums = numaGetCount(numa_cluster);
// Otherwise, mark its components as removed
for (int i = 0; i < num_nums; i++) {
if (!numaGetIValue(numa_cluster, i, &temp)) {
remove[temp] = 1;
}
}
boxDestroy(&boxd);
}
pixDestroy(&pix_cluster);
pixaDestroy(&pixa_cluster);
numaDestroy(&numa_cluster);
}
free(left);
free(right);
PIXA *pixasort;
NUMA *confsort;
/* Sort pixa, then destroy old pixa */
NUMA *naindex;
if ((pixasort = pixaSort(pixad, L_SORT_BY_Y, L_SORT_INCREASING, &naindex, L_CLONE)) == NULL)
return ERROR_INT("pixasort not made", procName, 1);
confsort = numaSortByIndex(confd, naindex);
*ppixad = pixasort;
*pclusterconfs = confsort;
pixaDestroy(&pixad);
numaDestroy(&confd);
return count;
}
l_int32 ClusterValidComponents(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *remove, PIXA **ppixad,
NUMA **pclusterconfs, HydrogenTextDetector::TextDetectorParameters ¶ms) {
l_int32 *left, *right;
PIXA *pixad;
NUMA *clusterconfs;
if (GenerateClusterPartners(pix8, pixa, confs, remove, &left, &right, params))
return -1;
int count = MergeClusterPartners(pix8, pixa, confs, remove, left, right, &pixad, &clusterconfs, params);
*ppixad = pixad;
*pclusterconfs = clusterconfs;
return count;
}
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/clusterer.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HYDROGEN_CLUSTERER_H_
#define HYDROGEN_CLUSTERER_H_
#include "leptonica.h"
#include "hydrogentextdetector.h"
l_int32 ConnCompValidPixa(PIX *pix8, PIX *pix, PIXA **ppixa, NUMA **pconfs,
HydrogenTextDetector::TextDetectorParameters ¶ms);
l_int32 MergePix(PIXA *pixad, l_int32 i, PIXA *pixas, l_int32 j);
l_int32 RemoveInvalidPairs(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *remove,
HydrogenTextDetector::TextDetectorParameters ¶ms);
l_int32 ClusterValidComponents(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *remove, PIXA **ppixad, NUMA **pconfs,
HydrogenTextDetector::TextDetectorParameters ¶ms);
l_int32 MergePairFragments(PIX *pix8, PIXA *clusters, PIXA *pixa, l_uint8 *remove);
#endif /* HYDROGEN_CLUSTERER_H_ */
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/hydrogentextdetector.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <ctime>
#include <cstring>
#include <cstdlib>
#include "leptonica.h"
#include "hydrogentextdetector.h"
#include "clusterer.h"
#include "thresholder.h"
#include "utilities.h"
HydrogenTextDetector::HydrogenTextDetector() {
pixs_ = NULL;
text_areas_ = NULL;
text_confs_ = NULL;
}
HydrogenTextDetector::~HydrogenTextDetector() {
Clear();
}
PIXA *HydrogenTextDetector::ExtractTextRegions(PIX *pix8, PIX *edges, NUMA **pconfs) {
l_int32 result;
if (parameters_.debug) fprintf(stderr, "ExtractTextRegions()\n");
// TODO(alanv): More error checking for invalid arguments
if (!pconfs) {
return NULL;
}
clock_t timer = clock();
NUMA *connconfs;
PIXA *conncomp;
if (parameters_.debug) fprintf(stderr, "ConnCompValidPixa()\n");
result = ConnCompValidPixa(pix8, edges, &conncomp, &connconfs, parameters_);
if (parameters_.debug) fprintf(stderr, "Found %d connected components\n", result);
if (parameters_.debug && parameters_.out_dir[0] != '\0' && result > 0) {
PIX *temp = pixaDisplayHeatmap(conncomp, pix8->w, pix8->h, connconfs);
char filename[255];
sprintf(filename, "%s/%d_validsingles.jpg", parameters_.out_dir, (int) timer);
pixWriteImpliedFormat(filename, temp, 85, 0);
}
l_int32 count = pixaGetCount(conncomp);
l_uint8 *remove = (l_uint8 *) calloc(count, sizeof(l_uint8));
if (parameters_.debug) fprintf(stderr, "RemoveInvalidPairs()\n");
result = RemoveInvalidPairs(pix8, conncomp, connconfs, remove, parameters_);
if (parameters_.debug) fprintf(stderr, "Removed %d invalid pairs\n", result);
if (parameters_.debug && parameters_.out_dir[0] != '\0' && result > 0) {
PIX *temp = pixaDisplayRandomCmapFiltered(conncomp, pix8->w, pix8->h, remove);
char filename[255];
sprintf(filename, "%s/%d_validpairs.jpg", parameters_.out_dir, (int) timer);
pixWriteImpliedFormat(filename, temp, 85, 0);
}
NUMA *clusterconfs;
PIXA *clusters;
if (parameters_.debug) fprintf(stderr, "ClusterValidComponents()\n");
result = ClusterValidComponents(pix8, conncomp, connconfs, remove, &clusters, &clusterconfs, parameters_);
if (parameters_.debug) fprintf(stderr, "Created %d clusters\n", result);
if (parameters_.debug && parameters_.out_dir[0] != '\0' && result > 0) {
PIX *temp = pixaDisplayHeatmap(clusters, pix8->w, pix8->h, clusterconfs);
char filename[255];
sprintf(filename, "%s/%d_validclusters.jpg", parameters_.out_dir, (int) timer);
pixWriteImpliedFormat(filename, temp, 85, 0);
}
// Merge unused components that are contained inside the detected text areas.
// This typically catches punctuation and dots over i's and j's.
if (parameters_.debug) fprintf(stderr, "MergePairFragments()\n");
result = MergePairFragments(pix8, clusters, conncomp, remove);
*pconfs = clusterconfs;
pixaDestroy(&conncomp);
free(remove);
return clusters;
}
PIX *HydrogenTextDetector::DetectAndFixSkew(PIX *pixs) {
l_float32 angle, conf;
skew_angle_ = 0.0;
if (!parameters_.skew_enabled) {
if (parameters_.debug) fprintf(stderr, "Bypassed skew (skew detection is disabled)\n");
return pixClone(pixs);
}
if (pixFindSkewSweepAndSearch(pixs, &angle, &conf, parameters_.skew_sweep_reduction,
parameters_.skew_search_reduction, parameters_.skew_sweep_range,
parameters_.skew_sweep_delta, parameters_.skew_search_min_delta)) {
if (parameters_.debug) fprintf(stderr, "Bypassed skew (failed sweep and search)\n");
return pixClone(pixs);
}
if (conf <= 0 || L_ABS(angle) < parameters_.skew_min_angle) {
if (parameters_.debug) fprintf(stderr, "Bypassed skew (low confidence or small angle)\n");
return pixClone(pixs);
}
if (parameters_.debug) fprintf(stderr, "Found %f degree skew with confidence %f\n", angle, conf);
// The detected angle is the one required to align the text,
// which is the opposite of the angle of the text itself.
skew_angle_ = -angle;
l_float32 deg2rad = 3.1415926535 / 180.0;
l_float32 radians = angle * deg2rad;
PIX *pixd = pixRotate(pixs, radians, L_ROTATE_SAMPLING, L_BRING_IN_WHITE, 0, 0);
return pixd;
}
void HydrogenTextDetector::SetSourceImage(PIX *pixs) {
pixs_ = pixClone(pixs);
}
void HydrogenTextDetector::DetectText() {
if (parameters_.debug) fprintf(stderr, "DetectText()\n");
clock_t timer = clock();
PIX *pix8 = pixConvertTo8(pixs_, false);
if (parameters_.debug && parameters_.out_dir[0] != '\0') {
char filename[255];
sprintf(filename, "%s/%d_input.jpg", parameters_.out_dir, (int) timer);
pixWriteImpliedFormat(filename, pix8, 85, 0);
}
PIX *edges;
pixEdgeAdaptiveThreshold(pix8, &edges, parameters_.edge_tile_x, parameters_.edge_tile_y,
parameters_.edge_thresh, parameters_.edge_avg_thresh);
if (parameters_.debug && parameters_.out_dir[0] != '\0') {
char filename[255];
sprintf(filename, "%s/%d_edges.jpg", parameters_.out_dir, (int) timer);
PIX *edges8 = pixConvertTo8(edges, false);
pixWriteImpliedFormat(filename, edges8, 85, 0);
pixDestroy(&edges8);
}
PIX *deskew = DetectAndFixSkew(edges);
pixDestroy(&edges);
if (parameters_.debug && parameters_.out_dir[0] != '\0') {
char filename[255];
sprintf(filename, "%s/%d_deskew.jpg", parameters_.out_dir, (int) timer);
PIX *deskew8 = pixConvertTo8(deskew, false);
pixWriteImpliedFormat(filename, deskew8, 85, 0);
pixDestroy(&deskew8);
}
NUMA *confs;
PIXA *clusters = ExtractTextRegions(pix8, deskew, &confs);
if (parameters_.debug) fprintf(stderr, "Inverting image...\n");
pixInvert(deskew, deskew);
NUMA *invconfs;
PIXA *invclusters = ExtractTextRegions(pix8, deskew, &invconfs);
pixDestroy(&deskew);
pixDestroy(&pix8);
pixaJoin(clusters, invclusters, 0, 0);
pixaDestroy(&invclusters);
numaJoin(confs, invconfs);
numaDestroy(&invconfs);
text_areas_ = pixaCopy(clusters, L_CLONE);
pixaDestroy(&clusters);
text_confs_ = numaClone(confs);
numaDestroy(&confs);
if (parameters_.debug && parameters_.out_dir[0] != '\0') {
PIX *temp = pixaDisplayHeatmap(text_areas_, pixs_->w, pixs_->h, text_confs_);
char filename[255];
sprintf(filename, "%s/heatmap.jpg", parameters_.out_dir);
pixWriteImpliedFormat(filename, temp, 85, 0);
}
}
void HydrogenTextDetector::Clear() {
if (text_confs_) {
numaDestroy(&text_confs_);
}
if (text_areas_) {
pixaDestroy(&text_areas_);
}
if (pixs_) {
pixDestroy(&pixs_);
}
}
PIXA *HydrogenTextDetector::GetTextAreas() {
return pixaCopy(text_areas_, L_CLONE);
}
l_float32 HydrogenTextDetector::GetSkewAngle() {
return skew_angle_;
}
NUMA *HydrogenTextDetector::GetTextConfs() {
return numaClone(text_confs_);
}
PIX *HydrogenTextDetector::GetSourceImage() {
return pixClone(pixs_);
}
HydrogenTextDetector::TextDetectorParameters *HydrogenTextDetector::GetMutableParameters() {
return ¶meters_;
}
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/hydrogentextdetector.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HYDROGEN_HYDROGENTEXTDETECTOR_H_
#define HYDROGEN_HYDROGENTEXTDETECTOR_H_
#include "leptonica.h"
class HydrogenTextDetector {
public:
HydrogenTextDetector();
~HydrogenTextDetector();
struct TextDetectorParameters {
bool debug;
char out_dir[255];
// Edge-based thresholding
l_int32 edge_tile_x;
l_int32 edge_tile_y;
l_int32 edge_thresh;
l_int32 edge_avg_thresh;
// Skew angle correction
bool skew_enabled;
l_float32 skew_min_angle;
l_float32 skew_sweep_range;
l_float32 skew_sweep_delta;
l_int32 skew_sweep_reduction;
l_int32 skew_search_reduction;
l_float32 skew_search_min_delta;
// Singleton filter
l_float32 single_min_aspect;
l_float32 single_max_aspect;
l_int32 single_min_area;
l_float32 single_min_density;
// Quick pair filter
l_float32 pair_h_ratio;
l_float32 pair_d_ratio;
l_float32 pair_h_dist_ratio;
l_float32 pair_v_dist_ratio;
l_float32 pair_h_shared;
// Cluster pair filter
l_int32 cluster_width_spacing;
l_float32 cluster_shared_edge;
l_float32 cluster_h_ratio;
// Finalized cluster filter
l_int32 cluster_min_blobs;
l_float32 cluster_min_aspect;
l_float32 cluster_min_fdr;
l_int32 cluster_min_edge;
l_int32 cluster_min_edge_avg;
TextDetectorParameters()
: debug(false),
edge_tile_x(32),
edge_tile_y(64),
edge_thresh(64),
edge_avg_thresh(4),
skew_enabled(true),
skew_min_angle(1.0),
skew_sweep_range(30.0),
skew_sweep_delta(5.0),
skew_sweep_reduction(8),
skew_search_reduction(4),
skew_search_min_delta(0.01),
single_min_aspect(0.1),
single_max_aspect(4.0),
single_min_area(4),
single_min_density(0.2),
pair_h_ratio(1.0),
pair_d_ratio(1.5),
pair_h_dist_ratio(2.0),
pair_v_dist_ratio(0.25),
pair_h_shared(0.25),
cluster_width_spacing(2),
cluster_shared_edge(0.5),
cluster_h_ratio(1.0),
cluster_min_blobs(5),
cluster_min_aspect(2),
cluster_min_fdr(2.5),
cluster_min_edge(32),
cluster_min_edge_avg(1)
{
}
};
// Function to set the original source image
void SetSourceImage(PIX *);
// Main text detection function
void DetectText();
// Clear recognition results between calls
void Clear();
// Function to return text area clippings of the original image
PIXA *GetImageAreas();
// Function to return binarized text areas
PIXA *GetTextAreas();
// Function to return text area confidences
NUMA *GetTextConfs();
// Function to return detected skew angle
l_float32 GetSkewAngle();
// Function to return the original source image
PIX *GetSourceImage();
TextDetectorParameters *GetMutableParameters();
private:
TextDetectorParameters parameters_;
// Source image
PIX *pixs_;
// Detected text areas
PIXA *text_areas_;
// Confidences of detected text areas
NUMA *text_confs_;
// Detected skew angle
l_float32 skew_angle_;
// Function to extract text areas from a PIX
PIXA *ExtractTextRegions(PIX *pix8, PIX *edges, NUMA **pconfs);
// Function to detect and fix text skew
PIX *DetectAndFixSkew(PIX *pixs);
};
#endif /* HYDROGEN_HYDROGENTEXTDETECTOR_H_ */
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/leptonica.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HYDROGEN_LEPTONICA_H_
#define HYDROGEN_LEPTONICA_H_
#include "allheaders.h"
#endif /* HYDROGEN_LEPTONICA_H_ */
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/thresholder.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <math.h>
#include "leptonica.h"
#include "thresholder.h"
/*!
* pixFisherAdaptiveThreshold()
*
* Input: pixs (8 bpp)
* &pixd (<required return> thresholded input for pixs)
* sx, sy (desired tile dimensions; actual size may vary)
* scorefract (fraction of the max Otsu score; typ. 0.1)
* fdrthresh (threshold for Fisher's Discriminant Rate; typ. 5.0)
* Return: 0 if OK, 1 on error
*/
l_int32 pixFisherAdaptiveThreshold(PIX *pixs, PIX **ppixd, l_int32 tile_x, l_int32 tile_y,
l_float32 score_fract, l_float32 thresh) {
l_float32 fdr;
l_int32 w, h, d, nx, ny, x, y, t;
PIX *pixb, *pixd, *pixt;
PIXTILING *pt;
PROCNAME("pixFisherAdaptiveThreshold");
if (!pixs)
return ERROR_INT("pixs not defined", procName, 1);
if (!ppixd)
return ERROR_INT("&ppixd not defined", procName, 1);
pixGetDimensions(pixs, &w, &h, &d);
if (d != 8)
return ERROR_INT("pixs not 8 bpp", procName, 1);
if (tile_x < 8 || tile_y < 8)
return ERROR_INT("sx and sy must be >= 8", procName, 1);
/* Compute FDR & threshold for individual tiles */
nx = L_MAX(1, w / tile_x);
ny = L_MAX(1, h / tile_y);
pt = pixTilingCreate(pixs, nx, ny, 0, 0, 0, 0);
pixd = pixCreate(w, h, 1);
for (y = 0; y < ny; y++) {
for (x = 0; x < nx; x++) {
pixt = pixTilingGetTile(pt, y, x);
pixGetFisherThresh(pixt, score_fract, &fdr, &t);
if (fdr > thresh) {
pixb = pixThresholdToBinary(pixt, t);
pixTilingPaintTile(pixd, y, x, pixb, pt);
pixDestroy(&pixb);
}
pixDestroy(&pixt);
}
}
pixTilingDestroy(&pt);
*ppixd = pixd;
return 0;
}
/*!
* pixGetFisherThresh()
*
* Input: pixs (any depth; cmapped ok)
* scorefract (fraction of the max score, used to determine
* the range over which the histogram min is searched)
* &xfdr (<optional return> Fisher's Discriminate Rate value)
* &xthresh (<optional return> Otsu threshold value)
* Return: 0 if OK, 1 on error
*/
l_int32 pixGetFisherThresh(PIX *pixs, l_float32 scorefract, l_float32 *pfdr, l_int32 *pthresh) {
l_float32 mean1, mean2, sum, sum1, sum2, fract;
l_float32 var, between, within, fdr;
l_int32 thresh;
NUMA *na;
PROCNAME("pixGetFisherThresh");
if (!pixs)
return ERROR_INT("pixs not defined", procName, 1);
if (!pfdr && !pthresh)
return ERROR_INT("neither &pfdr nor &pthresh defined", procName, 1);
na = pixGetGrayHistogram(pixs, 1);
/* Compute Otsu threshold for histogram */
numaSplitDistribution(na, scorefract, &thresh, &mean1, &mean2, &sum1, &sum2, NULL);
/* Compute Fisher's Discriminant Rate if needed */
if (pfdr) {
numaGetHistogramStats(na, 0.0, 1.0, NULL, NULL, NULL, &var);
numaGetSum(na, &sum);
/* Between-class variance = sum of weighted squared distances
between-class and overall means */
fract = sum1 / sum;
between = (fract * (1 - fract)) * (mean1 - mean2) * (mean1 - mean2);
/* Within-class variance = difference between total variance
and between-class variance */
within = var - between;
/* FDR = between-class variance over within-class variance */
if (within <= 1) {
fdr = between;
} else {
fdr = between / within;
}
*pfdr = fdr;
}
if (pthresh)
*pthresh = thresh;
numaDestroy(&na);
return 0;
}
PIX *pixThreshedSobelEdgeFilter(PIX *pixs, l_int32 threshold) {
l_uint8 bval, bidx;
l_int32 w, h, d, i, j, wplt, wpld, gx, gy, vald;
l_int32 val1, val2, val3, val4, val5, val6, val7, val8, val9;
l_uint32 *datat, *linet, *datad, *lined;
PIX *pixd;
PROCNAME("pixThreshedSobelEdgeFilter");
if (!pixs)
return (PIX *) ERROR_PTR("pixs not defined", procName, NULL);
pixGetDimensions(pixs, &w, &h, &d);
if (d != 8)
return (PIX *) ERROR_PTR("pixs not 8 bpp", procName, NULL);
/* Compute filter output at each location. */
pixd = pixCreateNoInit(w, h, 1);
datat = pixGetData(pixs);
wplt = pixGetWpl(pixs);
datad = pixGetData(pixd);
wpld = pixGetWpl(pixd);
val1 = val2 = val3 = val4 = val5 = 0;
val6 = val7 = val8 = val9 = 0;
bval = bidx = 0;
for (i = 0; i < h - 1; i++) {
linet = datat + i * wplt;
lined = datad + i * wpld;
for (j = 0; j < w - 1; j++) {
if (j == 0) { /* start a new row */
val1 = GET_DATA_BYTE(linet, j);
val2 = GET_DATA_BYTE(linet + wplt, j);
val3 = GET_DATA_BYTE(linet + (wplt << 1), j);
val4 = GET_DATA_BYTE(linet, j + 1);
val5 = GET_DATA_BYTE(linet + wplt, j + 1);
val6 = GET_DATA_BYTE(linet + (wplt << 1), j + 1);
val7 = GET_DATA_BYTE(linet, j + 2);
val8 = GET_DATA_BYTE(linet + wplt, j + 2);
val9 = GET_DATA_BYTE(linet + (wplt << 1), j + 2);
bval = 0;
bidx = 0x80;
} else { /* shift right by 1 pixel; update incrementally */
val1 = val4;
val2 = val5;
val3 = val6;
val4 = val7;
val5 = val8;
val6 = val9;
val7 = GET_DATA_BYTE(linet, j + 2);
val8 = GET_DATA_BYTE(linet + wplt, j + 2);
val9 = GET_DATA_BYTE(linet + (wplt << 1), j + 2);
}
bval <<= 1;
bidx >>= 1;
gx = val1 + (val2 << 1) + val3 - val7 - (val8 << 1) - val9;
gy = val1 + (val4 << 1) + val7 - val3 - (val6 << 1) - val9;
vald = L_MIN(255, L_ABS(gx) + L_ABS(gy));
/* Flip high bit if value exceeds threshold */
if (vald >= threshold) {
bval |= 1;
}
if (bidx == 0) {
SET_DATA_BYTE(lined, j / 8, bval);
bval = 0;
bidx = 0x80;
}
}
}
return pixd;
}
l_uint8 pixGradientEnergy(PIX *pixs, PIX *mask, l_float32 *penergy) {
l_int32 w, h, d;
l_uint8 val1, val2;
l_uint32 mask1, mask2;
l_int32 wpls, wplm;
l_uint32 *datas, *lines;
l_uint32 *datam, *linem;
l_int32 total, count;
PROCNAME("pixGradientEnergy");
if (!pixs)
return ERROR_INT("pixs not defined", procName, -1);
pixGetDimensions(pixs, &w, &h, &d);
if (d != 8)
return ERROR_INT("pixs not 8 bpp", procName, -1);
/* Compute filter output at each location. */
datas = pixGetData(pixs);
wpls = pixGetWpl(pixs);
datam = pixGetData(mask);
wplm = pixGetWpl(mask);
total = 0;
count = 1;
mask1 = mask2 = 0;
val1 = val2 = 0;
for (int y = 0; y < h; y++) {
lines = datas + y * wpls;
linem = datam + y * wplm;
for (int x = 0; x < w - 1; x++) {
if (x == 0) { /* start a new row */
mask1 = GET_DATA_BIT(linem, x);
mask2 = GET_DATA_BIT(linem, x + 1);
val1 = GET_DATA_BYTE(lines, x);
val2 = GET_DATA_BYTE(lines, x + 1);
} else { /* shift right by 1 pixel; update incrementally */
val1 = val2;
val2 = GET_DATA_BYTE(lines, x + 1);
mask1 = mask2;
mask2 = GET_DATA_BIT(linem, x + 1);
}
/* If we're on an edge, add the gradient value and increment */
if (mask1 != mask2) {
total += L_ABS(val1 - val2);
count += 1;
}
}
}
*penergy = total / (l_float32) count;
return 0;
}
l_uint8 pixEdgeMax(PIX *pixs, l_int32 *pmax, l_int32 *pavg) {
l_int32 w, h, d, wplt, vald;
l_uint8 val1, val2, val3, val4, val5;
l_uint32 *datat, *linet;
l_int32 max, total;
PROCNAME("pixEdgeMax");
if (!pixs)
return ERROR_INT("pixs not defined", procName, -1);
pixGetDimensions(pixs, &w, &h, &d);
if (d != 8)
return ERROR_INT("pixs not 8 bpp", procName, -1);
/* Compute filter output at each location. */
datat = pixGetData(pixs);
wplt = pixGetWpl(pixs);
max = 0;
total = 0;
val1 = val2 = val3 = val4 = val5 = 0;
for (int y = 0; y < h; y++) {
linet = datat + y * wplt;
for (int x = 0; x < w - 5; x++) {
if (x == 0) { /* start a new row */
val1 = GET_DATA_BYTE(linet, x);
val2 = GET_DATA_BYTE(linet, x + 1);
val3 = GET_DATA_BYTE(linet, x + 2);
val4 = GET_DATA_BYTE(linet, x + 3);
val5 = GET_DATA_BYTE(linet, x + 4);
} else { /* shift right by 1 pixel; update incrementally */
val1 = val2;
val2 = val3;
val3 = val4;
val4 = val5;
val5 = GET_DATA_BYTE(linet, x + 4);
}
//maxd = L_MAX(val5, L_MAX(val4, L_MAX(val3, L_MAX(val2, val1))));
//mind = L_MIN(val5, L_MIN(val4, L_MIN(val3, L_MIN(val2, val1))));
vald = L_ABS(val1 - val5); //maxd - mind;
if (vald > max) {
max = vald;
}
total += vald;
}
}
*pmax = max;
*pavg = total / (w * h);
return 0;
}
/*!
* pixEdgeAdaptiveThreshold()
*
* Input: pixs (8 bpp)
* &pixd (<required return> thresholded input for pixs)
* tile_x, tile_y (desired tile dimensions; actual size may vary)
* thresh
* avg_thresh
* Return: 0 if OK, 1 on error
*/
l_uint8 pixEdgeAdaptiveThreshold(PIX *pixs, PIX **ppixd, l_int32 tile_x, l_int32 tile_y,
l_int32 thresh, l_int32 avg_thresh) {
l_int32 w, h, d, nx, ny, x, y, t, max, avg;
PIX *pixb, *pixd, *pixt;
PIXTILING *pt;
PROCNAME("pixEdgeAdaptiveThreshold");
if (!pixs)
return ERROR_INT("pixs not defined", procName, 1);
if (!ppixd)
return ERROR_INT("&ppixd not defined", procName, 1);
pixGetDimensions(pixs, &w, &h, &d);
if (d != 8)
return ERROR_INT("pixs not 8 bpp", procName, 1);
if (tile_x < 8 || tile_y < 8)
return ERROR_INT("sx and sy must be >= 8", procName, 1);
/* Compute FDR & threshold for individual tiles */
nx = L_MAX(1, w / tile_x);
ny = L_MAX(1, h / tile_y);
pt = pixTilingCreate(pixs, nx, ny, 0, 0, 0, 0);
pixd = pixCreate(w, h, 1);
for (y = 0; y < ny; y++) {
for (x = 0; x < nx; x++) {
pixt = pixTilingGetTile(pt, y, x);
pixEdgeMax(pixt, &max, &avg);
if (max > thresh && avg > avg_thresh) {
pixSplitDistributionFgBg(pixt, 0.0, 1, &t, NULL, NULL, 0);
pixb = pixThresholdToBinary(pixt, t);
pixTilingPaintTile(pixd, y, x, pixb, pt);
pixDestroy(&pixb);
}
pixDestroy(&pixt);
}
}
pixTilingDestroy(&pt);
*ppixd = pixd;
return 0;
}
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/thresholder.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HYDROGEN_THRESHOLDER_H_
#define HYDROGEN_THRESHOLDER_H_
#include "leptonica.h"
l_int32 pixGetFisherThresh(PIX *pixs, l_float32 scorefract, l_float32 *pfdr, l_int32 *pthresh);
l_int32 pixFisherAdaptiveThreshold(PIX *pixs, PIX **ppixd, l_int32 tile_x, l_int32 tile_y,
l_float32 score_fract, l_float32 thresh);
PIX *pixThreshedSobelEdgeFilter(PIX *pixs, l_int32 threshold);
l_uint8 pixGradientEnergy(PIX *pixs, PIX *mask, l_float32 *pdensity);
l_uint8 pixEdgeMax(PIX *pixs, l_int32 *pmax, l_int32 *pavg);
l_uint8 pixEdgeAdaptiveThreshold(PIX *pixs, PIX **ppixd, l_int32 tile_x, l_int32 tile_y,
l_int32 thresh, l_int32 avg_thresh);
#endif /* HYDROGEN_THRESHOLDER_H_ */
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/utilities.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* smart sharpen
* PIX *edgemask = pixThreshedSobelEdgeFilter(pix8, 16, 2, L_ALL_EDGES);
* PIX *enhanced = pixUnsharpMasking(pix8, UNSHARP_HALFWIDTH, UNSHARP_FRACTION);
* PIX *blended = pixBlendWithGrayMask(normalized, enhanced, edgemask, 0, 0);
*/
#include "leptonica.h"
#include "utilities.h"
void numaJoin(NUMA *dst, NUMA *src) {
l_int32 count = numaGetCount(src);
l_float32 temp;
for (int i = 0; i < count; i++) {
numaGetFValue(src, i, &temp);
numaAddNumber(dst, temp);
}
}
PIX *pixaDisplayRandomCmapFiltered(PIXA *pixa, l_int32 w, l_int32 h, l_uint8 *filter) {
l_int32 i, n, d, index, xb, yb, wb, hb;
BOXA *boxa;
PIX *pixs, *pixt, *pixd;
PIXCMAP *cmap;
PROCNAME("pixaDisplayRandomCmapFiltered");
if (!pixa)
return (PIX *) ERROR_PTR("pixa not defined", procName, NULL);
n = pixaGetCount(pixa);
if (n == 0)
return (PIX *) ERROR_PTR("no components", procName, NULL);
/* Use the first pix in pixa to verify depth is 1 bpp */
pixs = pixaGetPix(pixa, 0, L_CLONE);
d = pixGetDepth(pixs);
pixDestroy(&pixs);
if (d != 1)
return (PIX *) ERROR_PTR("components not 1 bpp", procName, NULL);
/* If w and h not input, determine the minimum size required
* to contain the origin and all c.c. */
if (w == 0 || h == 0) {
boxa = pixaGetBoxa(pixa, L_CLONE);
boxaGetExtent(boxa, &w, &h, NULL);
boxaDestroy(&boxa);
}
/* Set up an 8 bpp dest pix, with a colormap with 254 random colors */
if ((pixd = pixCreate(w, h, 8)) == NULL)
return (PIX *) ERROR_PTR("pixd not made", procName, NULL);
cmap = pixcmapCreateRandom(8, 1, 1);
pixSetColormap(pixd, cmap);
/* Color each component and blit it in */
for (i = 0; i < n; i++) {
if (filter[i])
continue;
index = 1 + (i % 254);
pixaGetBoxGeometry(pixa, i, &xb, &yb, &wb, &hb);
pixs = pixaGetPix(pixa, i, L_CLONE);
pixt = pixConvert1To8(NULL, pixs, 0, index);
pixRasterop(pixd, xb, yb, wb, hb, PIX_PAINT, pixt, 0, 0);
pixDestroy(&pixs);
pixDestroy(&pixt);
}
return pixd;
}
/*!
* pixcmapCreateHeatmap()
*
* Input: d (depth of pix for this colormap; 1, 2, 4 or 8)
* Return: cmap, or null on error
*
* Notes:
* (1) Colormap shows 0 as black, 1-MAX as a range from violet to red.
*/
PIXCMAP *
pixcmapCreateHeatmap(l_int32 d)
{
l_int32 nlevels, i, h, s, v;
PIXCMAP *cmap;
PROCNAME("pixcmapCreateHeatmap");
if (d != 1 && d != 2 && d !=4 && d != 8)
return (PIXCMAP *)ERROR_PTR("d not in {1, 2, 4, 8}", procName, NULL);
nlevels = 1 << d;
cmap = pixcmapCreate(d);
nlevels--;
pixcmapAddColor(cmap, 0, 0, 0);
for (i = nlevels; i > 0; i--) {
h = 170 * i / nlevels;
s = 255;
v = 255;
pixcmapAddColor(cmap, h, s, v);
}
pixcmapConvertHSVToRGB(cmap);
return cmap;
}
PIX *pixaDisplayHeatmap(PIXA *pixa, l_int32 w, l_int32 h, NUMA *confs) {
l_int32 i, n, d, val, xb, yb, wb, hb;
l_float32 maxconf, minconf, confrange, conf;
BOXA *boxa;
PIX *pixs, *pixt, *pixd;
PIXCMAP *cmap;
PROCNAME("pixaDisplayHeatmap");
if (!pixa)
return (PIX *) ERROR_PTR("pixa not defined", procName, NULL);
n = pixaGetCount(pixa);
if (n == 0)
return (PIX *) ERROR_PTR("no components", procName, NULL);
/* Use the first pix in pixa to verify depth is 1 bpp */
pixs = pixaGetPix(pixa, 0, L_CLONE);
d = pixGetDepth(pixs);
pixDestroy(&pixs);
if (d != 1)
return (PIX *) ERROR_PTR("components not 1 bpp", procName, NULL);
/* If w and h not input, determine the minimum size required
* to contain the origin and all c.c. */
if (w == 0 || h == 0) {
boxa = pixaGetBoxa(pixa, L_CLONE);
boxaGetExtent(boxa, &w, &h, NULL);
boxaDestroy(&boxa);
}
/* Determine the confidence range */
numaGetMin(confs, &minconf, NULL);
numaGetMax(confs, &maxconf, NULL);
confrange = maxconf - minconf;
/* Set up an 8 bpp dest pix, with a colormap with 254 random colors */
if ((pixd = pixCreate(w, h, 8)) == NULL)
return (PIX *) ERROR_PTR("pixd not made", procName, NULL);
cmap = pixcmapCreateHeatmap(8);
pixSetColormap(pixd, cmap);
/* Color each component and blit it in */
for (i = 0; i < n; i++) {
numaGetFValue(confs, i, &conf);
val = (l_int32) ((conf - minconf) / confrange * 254) + 1;
pixaGetBoxGeometry(pixa, i, &xb, &yb, &wb, &hb);
pixs = pixaGetPix(pixa, i, L_CLONE);
pixt = pixConvert1To8(NULL, pixs, 0, val);
pixRasterop(pixd, xb, yb, wb, hb, PIX_PAINT, pixt, 0, 0);
pixDestroy(&pixs);
pixDestroy(&pixt);
}
return pixd;
}
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/utilities.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HYDROGEN_UTILITIES_H_
#define HYDROGEN_UTILITIES_H_
#include "leptonica.h"
void numaJoin(NUMA *dst, NUMA *src);
PIX *pixaDisplayRandomCmapFiltered(PIXA *pixa, l_int32 w, l_int32 h, l_uint8 *filter);
PIX *pixaDisplayHeatmap(PIXA *pixa, l_int32 w, l_int32 h, NUMA *confs);
#endif /* HYDROGEN_UTILITIES_H_ */
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/validator.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <math.h>
#include "leptonica.h"
#include "validator.h"
#include "thresholder.h"
#include "utilities.h"
#include "hydrogentextdetector.h"
l_int32 BBoxHDist(BOX *b1, BOX *b2) {
return L_MAX(b1->x, b2->x) - L_MIN(b1->x + b1->w, b2->x + b2->w);
}
l_int32 BBoxVDist(BOX *b1, BOX *b2) {
return L_MAX(b1->y, b2->y) - L_MIN(b1->y + b1->h, b2->y + b2->h);
}
l_float32 RelativeDiff(l_int32 v1, l_int32 v2) {
return L_ABS(v1 - v2) / (L_MIN(v1, v2) + 1.0);
}
#define OLDPAIR_MIN_HPAIR_RATIO 0.5
#define OLDPAIR_MIN_WPAIR_RATIO 0.1
#define OLDPAIR_MAX_HDIST_RATIO 3.0
#define OLDPAIR_MAX_VDIST_RATIO 0.5
/**
* Test whether b1 and b2 are close enough to be a character pair.
*/
bool ValidatePairOld(BOX *b1, BOX *b2) {
l_int32 max_w = L_MAX(b1->w, b2->w);
l_int32 centerx1 = b1->x + b1->w / 2;
l_int32 centerx2 = b2->x + b2->w / 2;
l_int32 h_dist = L_ABS(centerx1 - centerx2);
/* Horizontal distance between centers is
* less than twice the wider character */
if (h_dist > max_w * OLDPAIR_MAX_HDIST_RATIO)
return false;
l_int32 max_h = L_MAX(b1->h, b2->h);
l_int32 centery1 = b1->y + b1->h / 2;
l_int32 centery2 = b2->y + b2->h / 2;
l_int32 v_dist = L_ABS(centery1 - centery2);
/* Vertical distance between centers is
less than 50% of the taller character */
if (v_dist > max_h * OLDPAIR_MAX_VDIST_RATIO)
return false;
l_int32 min_h = L_MIN(b1->h, b2->h);
l_float32 h_ratio = min_h / (max_h + 1.0);
/* Height ratio is between 0.5 and 2 */
if (h_ratio < OLDPAIR_MIN_HPAIR_RATIO)
return false;
l_int32 min_w = L_MIN(b1->w, b2->w);
l_float32 w_ratio = min_w / (max_w + 1.0);
/* Width ratio is between 0.1 and 10 */
if (w_ratio < OLDPAIR_MIN_WPAIR_RATIO)
return false;
return true;
}
l_float32 ComputeFDR(PIX *cc8) {
l_float32 fdr;
pixGetFisherThresh(cc8, 0.0, &fdr, NULL);
return fdr;
}
l_float32 ComputeGradientEnergy(PIX *cc8, PIX *cc) {
l_float32 energy;
pixGradientEnergy(cc8, cc, &energy);
return energy;
}
l_float32 ComputeCCDensity(PIX *pix) {
l_int32 area = pix->w * pix->h;
l_int32 pixel_count;
pixCountPixels(pix, &pixel_count, NULL);
return pixel_count / (l_float32) area;
}
l_float32 ComputeCCEdgeMax(PIX *pix8) {
l_int32 max;
l_int32 avg;
pixEdgeMax(pix8, &max, &avg);
return (l_float32) max;
}
l_float32 ComputeSingletonConfidence(PIX *pix, BOX *box, PIX *pix8) {
l_float32 aspect_ratio = box->w / (l_float32) box->h;
l_float32 density = ComputeCCDensity(pix);
l_float32 gradient = ComputeGradientEnergy(pix8, pix);
l_float32 edgemax = ComputeCCEdgeMax(pix8);
/* Compute features for confidence */
l_float32 features[6];
features[0] = 1.0;
features[1] = aspect_ratio;
features[2] = aspect_ratio * aspect_ratio;
features[3] = gradient;
features[4] = aspect_ratio / density;
features[5] = edgemax;
l_float32 beta[6];
beta[0] = -3.099;
beta[1] = 1.244;
beta[2] = -0.1142;
beta[3] = 39.86;
beta[4] = -0.4005;
beta[5] = 0;
l_float32 confidence = 0.0;
for (int i = 0; i < 6; i++) {
confidence += features[i] * beta[i];
}
return confidence;
}
bool ValidateSingleton(PIX *pix, BOX *box, PIX *pix8, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms) {
l_float32 aspect_ratio = box->w / (l_float32) box->h;
l_float32 density = ComputeCCDensity(pix);
*pconf = 0.0;
/* Aspect ratio */
if (aspect_ratio > params.single_max_aspect)
return false;
if (aspect_ratio < params.single_min_aspect)
return false;
/* Pixel density */
if (density < params.single_min_density)
return false;
l_int32 area = box->w * box->h;
/* Area */
if (area < params.single_min_area)
return false;
*pconf = 1.0; //ComputeSingletonConfidence(pix, box, pix8);
return true;
}
/**
* Test whether b1 and b2 are close enough to be a character pair.
*/
bool ValidatePair(BOX *b1, BOX *b2, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms) {
*pconf = 0.0;
l_int32 max_h = L_MAX(b1->h, b2->h);
l_int32 h_dist = BBoxHDist(b1, b2);
l_int32 v_dist = BBoxVDist(b1, b2);
l_float32 h_ratio = RelativeDiff(b1->h, b2->h);
l_int32 d1 = L_MAX(b1->h, b1->w);
l_int32 d2 = L_MAX(b2->h, b2->w);
l_float32 d_ratio = RelativeDiff(d1, d2);
/* Horizontal spacing less than 2x taller edge */
if (h_dist > params.pair_h_dist_ratio * max_h)
return false;
/* Must share at least 0.25x the larger vertical edge */
if (v_dist > 0 || L_ABS(v_dist) < max_h * params.pair_h_shared)
return false;
/* Heights must be at least 2x tolerance */
if (h_ratio > params.pair_h_ratio)
return false;
/* Maximum dimensions must be within 3x tolerance */
if (d_ratio > params.pair_d_ratio)
return false;
// TODO(alanv): Does this need to return a confidence value?
*pconf = 1.0;
return true;
}
l_float32 ComputePairNormalizedOverlapArea(BOX *b1, BOX *b2) {
BOX *overlap = boxOverlapRegion(b1, b2);
if (!overlap || overlap->w == 0.0 || overlap->h == 0.0) return 0.0;
l_float32 area0 = overlap->w * overlap->h;
l_float32 area1 = b1->w * b1->h;
l_float32 area2 = b2->w * b2->h;
l_float32 oarea = 2.0 * area0 / (area1 + area2);
return oarea;
}
l_float32 ComputePairNormalizedBaselineDistance(BOX *b1, BOX *b2) {
l_float32 dy = (b1->y + b1->h) - (b2->y + b2->h);
l_float32 vdist = 2.0 * L_ABS(dy) / (b1->h + b2->h);
return vdist;
}
l_float32 ComputePairNormalizedToplineDistance(BOX *b1, BOX *b2) {
l_float32 dy = b1->y - b2->y;
l_float32 vdist = 2.0 * L_ABS(dy) / (b1->h + b2->h);
return vdist;
}
l_float32 ComputePairNormalizedHorizontalDistance(BOX *b1, BOX *b2) {
l_float32 dx = (b1->x - b2->x) + (b1->w - b2->w) / 2.0;
l_float32 hdist = 2.0 * L_ABS(dx) / (b1->w + b2->w);
return hdist;
}
l_float32 ComputePairAreaRatio(BOX *b1, BOX *b2) {
l_float32 area1 = b1->w * b1->h;
l_float32 area2 = b2->w * b2->h;
l_float32 ratio = L_MIN(area1, area2) / L_MAX(area1, area2);
return ratio;
}
l_float32 ComputePairWidthRatio(BOX *b1, BOX *b2) {
l_float32 ratio = L_MIN(b1->w, b2->w) / L_MAX(b1->w, b2->w);
return ratio;
}
l_float32 ComputePairHeightRatio(BOX *b1, BOX *b2) {
l_float32 ratio = L_MIN(b1->h, b2->h) / L_MAX(b1->h, b2->h);
return ratio;
}
l_float32 ComputePairContainmentCheck(BOX *b1, BOX *b2) {
l_int32 contains1, contains2;
boxContains(b1, b2, &contains1);
boxContains(b2, b1, &contains2);
l_float32 contains = (l_float32) (contains1 || contains2);
return contains;
}
l_float32 ComputePairConfidence(BOX *b1, BOX *b2) {
l_float32 features[9];
features[0] = 1.0;
features[1] = ComputePairNormalizedOverlapArea(b1, b2);
features[2] = ComputePairNormalizedBaselineDistance(b1, b2);
features[3] = ComputePairNormalizedToplineDistance(b1, b2);
features[4] = ComputePairNormalizedHorizontalDistance(b1, b2);
features[5] = ComputePairAreaRatio(b1, b2);
features[6] = ComputePairWidthRatio(b1, b2);
features[7] = ComputePairHeightRatio(b1, b2);
features[8] = ComputePairContainmentCheck(b1, b2);
l_float32 beta[9];
beta[0] = 3.987;
beta[1] = -9.681;
beta[2] = -5.804;
beta[3] = -4.857;
beta[4] = -2.906;
beta[5] = -1.813;
beta[6] = 3.481;
beta[7] = 3.983;
beta[8] = -39.24;
l_float32 confidence = 0.0;
for (int i = 0; i < 5; i++) {
confidence += features[i] * beta[i];
}
return confidence;
}
/**
* Test whether b1 and b2 are close enough to be clustered. More relaxed constraints than ValidatePair().
*/
bool ValidateClusterPair(BOX *b1, BOX *b2, bool *too_far, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms) {
*pconf = 0.0;
l_int32 max_d = L_MAX(b1->w, b1->h);
l_float32 h_ratio = RelativeDiff(b1->h, b2->h);
// If we're already too far out, quit
if (b2->x > b1->x + b1->w + params.cluster_width_spacing * max_d) {
*too_far = true;
return false;
}
*too_far = false;
// Must share at least 0.25x the larger vertical edge
//l_int32 v_dist = BBoxVDist(b1, b2);
//if (v_dist > 0 || L_ABS(v_dist) < L_MIN(min_h, max_h) * PAIR_H_SHARED)
// return false;
// i and j must share at least half an edge
if (b2->y + b2->h * params.cluster_shared_edge < b1->y)
return false;
if (b1->y + b1->h * params.cluster_shared_edge < b2->y)
return false;
// Heights must be at least 2x tolerance
if (h_ratio > params.pair_h_ratio)
return false;
*pconf = 1.0; //ComputePairConfidence(b1, b2);
return true;
}
/**
* Test whether a finalized cluster is valid.
*/
bool ValidateCluster(PIX *pix8, PIXA *pixa, BOX *box, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms) {
*pconf = 0.0;
l_float32 aspect = box->w / (l_float32) box->h;
l_int32 count = pixaGetCount(pixa);
l_float32 fdr = ComputeFDR(pix8);
if (box->h < 15)
return false;
if (aspect < params.cluster_min_aspect)
return false;
if (count < params.cluster_min_blobs)
return false;
if (fdr < params.cluster_min_fdr)
return false;
/*
l_int32 edge_max, edge_avg;
pixEdgeMax(pix8, &edge_max, &edge_avg);
if (edge_max < params.cluster_min_edge || edge_avg < params.cluster_min_edge_avg)
return false;
*/
// TODO(alanv): Combine all of these into a confidence score, higher = better
*pconf = log(fdr); //log(fdr * edge_max * edge_avg);
return true;
}
================================================
FILE: eyes-two/src/main/jni/hydrogen/src/validator.h
================================================
/*
* Copyright 2010, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HYDROGEN_VALIDATOR_H_
#define HYDROGEN_VALIDATOR_H_
#include "leptonica.h"
#include "hydrogentextdetector.h"
bool ValidatePairOld(BOX *b1, BOX *b2);
bool ValidateSingleton(PIX *pix, BOX *box, PIX *pix8, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms);
bool ValidatePair(BOX *b1, BOX *b2, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms);
bool ValidateClusterPair(BOX *b1, BOX *b2, bool *too_far, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms);
bool ValidateCluster(PIX *pix8, PIXA *pixa, BOX *box, l_float32 *pconf,
HydrogenTextDetector::TextDetectorParameters ¶ms);
#endif /* HYDROGEN_VALIDATOR_H_ */
================================================
FILE: eyes-two/src/main/jni/imageutils/Android.mk
================================================
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := imageutils$(LIB_SUFFIX)
LOCAL_SRC_FILES := blur-jni.cpp \
similar-jni.cpp \
blur.cpp \
similar.cpp
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_CFLAGS += -DHAVE_ARMEABI_V7A=1 -mfloat-abi=softfp -mfpu=neon
LOCAL_C_INCLUDES += $(NDK_ROOT)/sources/android/cpufeatures
LOCAL_STATIC_LIBRARIES += cpufeatures
endif
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../common
LOCAL_STATIC_LIBRARIES += common
include $(BUILD_SHARED_LIBRARY)
================================================
FILE: eyes-two/src/main/jni/imageutils/blur-jni.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Xiaotao Duan
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include "types.h"
#include "time_log.h"
#include "blur.h"
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jboolean JNICALL
Java_com_googlecode_eyesfree_opticflow_ImageBlur_isBlurred(
JNIEnv* env, jclass clazz, jbyteArray input, jint width, jint height);
#ifdef __cplusplus
}
#endif
JNIEXPORT jboolean JNICALL
Java_com_googlecode_eyesfree_opticflow_ImageBlur_isBlurred(
JNIEnv* env, jclass clazz, jbyteArray input, jint width, jint height) {
jboolean inputCopy = JNI_FALSE;
jbyte* const i = env->GetByteArrayElements(input, &inputCopy);
float blur = 0;
float extent = 0;
resetTimeLog();
int blurred = IsBlurred(reinterpret_cast<uint8*>(i),
width, height, &blur, &extent);
timeLog("Finished image blur detection");
printTimeLog();
env->ReleaseByteArrayElements(input, i, JNI_ABORT);
return blurred ? JNI_TRUE : JNI_FALSE;
}
================================================
FILE: eyes-two/src/main/jni/imageutils/blur.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Xiaotao Duan
//
// This library contains image processing method to detect
// image blurriness.
//
// This library is *not* thread safe because static memory is
// used for performance.
//
// A method to detect whether a given image is blurred or not.
// The algorithm is based on H. Tong, M. Li, H. Zhang, J. He,
// and C. Zhang. "Blur detection for digital images using wavelet
// transform".
//
// To achieve better performance on client side, the method
// is running on four 128x128 portions which compose the 256x256
// central area of the given image. On Nexus One, average time
// to process a single image is ~5 milliseconds.
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "blur.h"
#include "utils.h"
static const int kDecomposition = 3;
static const int kThreshold = 35;
static const float kMinZero = 0.05;
static const int kMaximumWidth = 256;
static const int kMaximumHeight = 256;
static int32 _smatrix[kMaximumWidth * kMaximumHeight];
static int32 _arow[kMaximumWidth > kMaximumHeight ?
kMaximumWidth : kMaximumHeight];
// Does Haar Wavelet Transformation in place on a given row of a matrix.
// The matrix is in size of matrix_height * matrix_width and represented
// in a linear array. Parameter offset_row indicates transformation is
// performed on which row. offset_column and num_columns indicate column
// range of the given row.
inline void Haar1DX(int* matrix, int matrix_height, int matrix_width,
int offset_row, int offset_column, int num_columns) {
int32* ptr_a = _arow;
int32* ptr_matrix = matrix + offset_row * matrix_width + offset_column;
int half_num_columns = num_columns / 2;
int32* a_tmp = ptr_a;
int32* matrix_tmp = ptr_matrix;
for (int j = 0; j < half_num_columns; ++j) {
*a_tmp++ = (matrix_tmp[0] + matrix_tmp[1]) / 2;
matrix_tmp += 2;
}
int32* average = ptr_a;
a_tmp = ptr_a + half_num_columns;
matrix_tmp = ptr_matrix;
for (int j = 0; j < half_num_columns; ++j) {
*a_tmp++ = *matrix_tmp - *average++;
matrix_tmp += 2;
}
memcpy(ptr_matrix, ptr_a, sizeof(int32) * num_columns);
}
// Does Haar Wavelet Transformation in place on a given column of a matrix.
inline void Haar1DY(int* matrix, int matrix_height, int matrix_width,
int offset_column, int offset_row, int num_rows) {
int32* ptr_a = _arow;
int32* ptr_matrix = matrix + offset_row * matrix_width + offset_column;
int half_num_rows = num_rows / 2;
int two_line_width = matrix_width * 2;
int32* a_tmp = ptr_a;
int32* matrix_tmp = ptr_matrix;
for (int j = 0; j < half_num_rows; ++j) {
*a_tmp++ = (matrix_tmp[matrix_width] + matrix_tmp[0]) / 2;
matrix_tmp += two_line_width;
}
int32* average = ptr_a;
a_tmp = ptr_a + half_num_rows;
matrix_tmp = ptr_matrix;
for (int j = 0; j < num_rows; j += 2) {
*a_tmp++ = *matrix_tmp - *average++;
matrix_tmp += two_line_width;
}
for (int j = 0; j < num_rows; ++j) {
*ptr_matrix = *ptr_a++;
ptr_matrix += matrix_width;
}
}
// Does Haar Wavelet Transformation in place for a specified area of
// a matrix. The matrix size is specified by matrix_width and matrix_height.
// The area on which the transformation is performed is specified by
// offset_column, num_columns, offset_row and num_rows.
void Haar2D(int* matrix, int matrix_height, int matrix_width,
int offset_column, int num_columns, int offset_row, int num_rows) {
for (int i = offset_row; i < offset_row + num_rows; ++i) {
Haar1DX(matrix, matrix_height, matrix_width, i, offset_column, num_columns);
}
for (int i = offset_column; i < offset_column + num_columns; ++i){
Haar1DY(matrix, matrix_height, matrix_width, i, offset_row, num_rows);
}
}
// Reads in a given matrix, does first round HWT and outputs result
// matrix into target array. This function is used for optimization by
// avoiding a memory copy. The input matrix has height rows and width
// columns. The transformation is performed on the given area specified
// by offset_column, num_columns, offset_row, num_rows. After
// transformation, the output matrix has num_columns columns and
// num_rows rows.
void HwtFirstRound(const uint8* const data, int height, int width,
int offset_column, int num_columns,
int offset_row, int num_rows, int32* matrix) {
int32* ptr_a = _arow;
const uint8* ptr_data = data + offset_row * width + offset_column;
int half_num_columns = num_columns / 2;
for (int i = 0; i < num_rows; ++i) {
int32* a_tmp = ptr_a;
const uint8* data_tmp = ptr_data;
for (int j = 0; j < half_num_columns; ++j) {
*a_tmp++ = (int32) ((data_tmp[0] + data_tmp[1]) / 2);
data_tmp += 2;
}
int32* average = ptr_a;
a_tmp = ptr_a + half_num_columns;
data_tmp = ptr_data;
for (int j = 0; j < half_num_columns; ++j) {
*a_tmp++ = *data_tmp - *average++;
data_tmp += 2;
}
int32* ptr_matrix = matrix + i * num_columns;
a_tmp = ptr_a;
for (int j = 0; j < num_columns; ++j) {
*ptr_matrix++ = *a_tmp++;
}
ptr_data += width;
}
// Column transformation does not involve input data.
for (int i = 0; i < num_columns; ++i) {
Haar1DY(matrix, num_rows, num_columns, i, 0, num_rows);
}
}
// Returns the weight of a given point in a certain scale of a matrix
// after wavelet transformation.
// The point is specified by k and l which are y and x coordinate
// respectively. Parameter scale tells in which scale the weight is
// computed, must be 1, 2 or 3 which stands respectively for 1/2, 1/4
// and 1/8 of original size.
int ComputeEdgePointWeight(int* matrix, int width, int height,
int k, int l, int scale) {
int r = k >> scale;
int c = l >> scale;
int window_row = height >> scale;
int window_column = width >> scale;
int v_top_right = square(matrix[r * width + c + window_column]);
int v_bot_left = square(matrix[(r + window_row) * width + c]);
int v_bot_right =
square(matrix[(r + window_row) * width + c + window_column]);
int v = sqrt(v_top_right + v_bot_left + v_bot_right);
return v;
}
// Computes point with maximum weight for a given local window for a
// given scale.
// Parameter scaled_width and scaled_height define scaled image size
// of a certain decomposition level. The window size is defined by
// window_size. Output value k and l store row (y coordinate) and
// column (x coordinate) respectively of the point with maximum weight.
// The maximum weight is returned.
int ComputeLocalMaximum(int* matrix, int width, int height,
int scaled_width, int scaled_height,
int top, int left, int window_size, int* k, int* l) {
int max = -1;
*k = top;
*l = left;
for (int i = 0; i < window_size; ++i) {
for (int j = 0; j < window_size; ++j) {
int r = top + i;
int c = left + j;
int v_top_right = abs(matrix[r * width + c + scaled_width]);
int v_bot_left = abs(matrix[(r + scaled_height) * width + c]);
int v_bot_right =
abs(matrix[(r + scaled_height) * width + c + scaled_width]);
int v = v_top_right + v_bot_left + v_bot_right;
if (v > max) {
max = v;
*k = r;
*l = c;
}
}
}
int r = *k;
int c = *l;
int v_top_right = square(matrix[r * width + c + scaled_width]);
int v_bot_left = square(matrix[(r + scaled_height) * width + c]);
int v_bot_right =
square(matrix[(r + scaled_height) * width + c + scaled_width]);
int v = sqrt(v_top_right + v_bot_left + v_bot_right);
return v;
}
// Detects blurriness of a transformed matrix.
// Blur confidence and extent will be returned through blur_conf
// and blur_extent. 1 is returned while input matrix is blurred.
int DetectBlur(int* matrix, int width, int height,
float* blur_conf, float* blur_extent) {
int nedge = 0;
int nda = 0;
int nrg = 0;
int nbrg = 0;
// For each scale
for (int current_scale = kDecomposition; current_scale > 0; --current_scale) {
int scaled_width = width >> current_scale;
int scaled_height = height >> current_scale;
int window_size = 16 >> current_scale; // 2, 4, 8
// For each window
for (int r = 0; r + window_size < scaled_height; r += window_size) {
for (int c = 0; c + window_size < scaled_width; c += window_size) {
int k, l;
int emax = ComputeLocalMaximum(matrix, width, height,
scaled_width, scaled_height, r, c, window_size, &k, &l);
if (emax > kThreshold) {
int emax1, emax2, emax3;
switch (current_scale) {
case 1:
emax1 = emax;
emax2 = ComputeEdgePointWeight(matrix, width, height,
k << current_scale, l << current_scale, 2);
emax3 = ComputeEdgePointWeight(matrix, width, height,
k << current_scale, l << current_scale, 3);
break;
case 2:
emax1 = ComputeEdgePointWeight(matrix, width, height,
k << current_scale, l << current_scale, 1);
emax2 = emax;
emax3 = ComputeEdgePointWeight(matrix, width, height,
k << current_scale, l << current_scale, 3);
break;
case 3:
emax1 = ComputeEdgePointWeight(matrix, width, height,
k << current_scale, l << current_scale, 1);
emax2 = ComputeEdgePointWeight(matrix, width, height,
k << current_scale, l << current_scale, 2);
emax3 = emax;
break;
}
nedge++;
if (emax1 > emax2 && emax2 > emax3) {
nda++;
}
if (emax1 < emax2 && emax2 < emax3) {
nrg++;
if (emax1 < kThreshold) {
nbrg++;
}
}
if (emax2 > emax1 && emax2 > emax3) {
nrg++;
if (emax1 < kThreshold) {
nbrg++;
}
}
}
}
}
}
// TODO(xiaotao): No edge point at all, blurred or not?
float per = nedge == 0 ? 0 : (float)nda / nedge;
*blur_conf = per;
*blur_extent = (float)nbrg / nrg;
return per < kMinZero;
}
// Detects blurriness of a given portion of a luminance matrix.
int IsBlurredInner(const uint8* const luminance,
const int width, const int height,
const int left, const int top,
const int width_wanted, const int height_wanted,
float* const blur, float* const extent) {
int32* matrix = _smatrix;
HwtFirstRound(luminance, height, width,
left, width_wanted, top, height_wanted, matrix);
Haar2D(matrix, height_wanted, width_wanted,
0, width_wanted >> 1, 0, height_wanted >> 1);
Haar2D(matrix, height_wanted, width_wanted,
0, width_wanted >> 2, 0, height_wanted >> 2);
int blurred = DetectBlur(matrix, width_wanted, height_wanted, blur, extent);
return blurred;
}
int IsBlurred(const uint8* const luminance,
const int width, const int height, float* const blur, float* const extent) {
int desired_width = min(kMaximumWidth, width);
int desired_height = min(kMaximumHeight, height);
int left = (width - desired_width) >> 1;
int top = (height - desired_height) >> 1;
float conf1, extent1;
int blur1 = IsBlurredInner(luminance, width, height,
left, top, desired_width >> 1, desired_height >> 1, &conf1, &extent1);
float conf2, extent2;
int blur2 = IsBlurredInner(luminance, width, height,
left + (desired_width >> 1), top, desired_width >> 1, desired_height >> 1,
&conf2, &extent2);
float conf3, extent3;
int blur3 = IsBlurredInner(luminance, width, height,
left, top + (desired_height >> 1), desired_width >> 1,
desired_height >> 1, &conf3, &extent3);
float conf4, extent4;
int blur4 = IsBlurredInner(luminance, width, height,
left + (desired_width >> 1), top + (desired_height >> 1),
desired_width >> 1, desired_height >> 1, &conf4, &extent4);
*blur = (conf1 + conf2 + conf3 + conf4) / 4;
*extent = (extent1 + extent2 + extent3 + extent4) / 4;
return *blur < kMinZero;
}
================================================
FILE: eyes-two/src/main/jni/imageutils/blur.h
================================================
// Copyright 2010 Google Inc. All Rights Reserved.
// Author: xiaotao@google.com (Xiaotao Duan)
#ifndef JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_IMAGEUTILS_BLUR_H_
#define JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_IMAGEUTILS_BLUR_H_
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
// Detects whether a given luminance matrix is blurred or not.
// The input matrix size if width * height. 1 is returned when
// input image is blurred along with blur confidence and extent
// returned through output value blur and extent.
int IsBlurred(const uint8* const luminance, const int width, const int height,
float* const blur, float* const extent);
#ifdef __cplusplus
}
#endif
#endif // JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_IMAGEUTILS_BLUR_H_
================================================
FILE: eyes-two/src/main/jni/imageutils/similar-jni.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Xiaotao Duan
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include "types.h"
#include "time_log.h"
#include "similar.h"
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jintArray JNICALL
Java_com_googlecode_eyesfree_opticflow_ImageBlur_computeSignature(
JNIEnv* env, jclass clazz, jbyteArray input, jint width, jint height,
jintArray signatureBuffer);
JNIEXPORT jint JNICALL
Java_com_googlecode_eyesfree_opticflow_ImageBlur_diffSignature(
JNIEnv* env, jclass clazz, jintArray signature1, jintArray signature2);
#ifdef __cplusplus
}
#endif
JNIEXPORT jintArray JNICALL
Java_com_googlecode_eyesfree_opticflow_ImageBlur_computeSignature(
JNIEnv* env, jclass clazz, jbyteArray input, jint width, jint height,
jintArray signatureBuffer) {
jboolean inputCopy = JNI_FALSE;
jbyte* const i = env->GetByteArrayElements(input, &inputCopy);
int sig_len = 0;
resetTimeLog();
uint32_t* sig = ComputeSignature(reinterpret_cast<uint8*>(i),
width, height, &sig_len);
timeLog("Finished image signature computation");
printTimeLog();
env->ReleaseByteArrayElements(input, i, JNI_ABORT);
jintArray ret = signatureBuffer;
if (ret == NULL || env->GetArrayLength(ret) != sig_len) {
ret = env->NewIntArray(sig_len);
}
jint* body = env->GetIntArrayElements(ret, 0);
for (int i = 0; i < sig_len; ++i) {
body[i] = sig[i];
}
env->ReleaseIntArrayElements(ret, body, 0);
return ret;
}
JNIEXPORT jint JNICALL
Java_com_googlecode_eyesfree_opticflow_ImageBlur_diffSignature(
JNIEnv* env, jclass clazz, jintArray signature1, jintArray signature2) {
jint* sig1 = env->GetIntArrayElements(signature1, 0);
jint* sig2 = env->GetIntArrayElements(signature2, 0);
int size = env->GetArrayLength(signature1);
int diff = Diff(sig1, sig2, size);
env->ReleaseIntArrayElements(signature1, sig1, 0);
env->ReleaseIntArrayElements(signature2, sig2, 0);
return diff;
}
================================================
FILE: eyes-two/src/main/jni/imageutils/similar.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Xiaotao Duan
//
// This library contains image processing method to estimate
// similarity of two given images.
//
// This library is *not* thread safe because static memory is
// used for performance.
//
// Two methods are provided to estimate the similarity of two
// given images. ComputeSignature() is used to compute the
// signature of a given image. Diff() takes two signatures
// as input to compute how similar two given images are.
// The algorithm is based on R. O. Stehling, M. A. Nascimento,
// and A. X. Falc ̃ao. "A Compact and Efficient Image Retrieval
// Approach Based on Border/Interior Pixel Classification".
//
// For performance consideration, 480x480 of central area of
// a given image is used for signature computation.
#include <string.h>
#include "similar.h"
#include "utils.h"
// How many quantized colors using to compute signature.
// For performance consideration, it's specified in format of
// number of left shift bits rather than color numbers directly.
// e.g. kShiftColors 4 means (1 << 4 == 16) colors are used.
static const int kShiftColors = 4;
static const int kDesiredWidthForSignature = 480;
static const int kDesiredHeightForSignature = 480;
static uint8 _colors[kDesiredHeightForSignature * kDesiredWidthForSignature];
// The final signature contains both color information of
// inner and outer pixels, and total pixel count at last.
static uint32_t _signature[1 + (1 << kShiftColors) * 2];
uint32_t* ComputeSignatureInner(const uint8* const luminance,
int width, int height,
int left, int top, int desired_width, int desired_height, int* size) {
int num_colors = 1 << kShiftColors;
memset(_signature, 0, sizeof(int32) * num_colors * 2);
// Build quantized color map for input image. For each possible lumiance
// value from 0 to 255, quantize it into more coarse value.
#ifdef HAVE_ARMEABI_V7A
if (supportsNeon()) {
for (int i = 0; i < desired_height; ++i) {
uint8* ptr_colors = _colors + i * desired_width;
const uint8* ptr_lumi = luminance + (i + top) * width + left;
int itrs = desired_width / 8;
for (int j = 0; j < itrs; ++j) {
// Load 8 bytes from ptr_lumi into neon vector
uint8x8_t lumix8 = vld1_u8(ptr_lumi);
// Batch right shift every elements (8 - kShiftColors) bits
// in the vector
uint8x8_t colorx8 = vshr_n_u8(lumix8, 8 - kShiftColors);
// Store above result into our own memory starting from ptr_colors
vst1_u8(ptr_colors, colorx8);
ptr_lumi += 8;
ptr_colors += 8;
}
}
} else {
#endif
int shift_bits = 8 - kShiftColors; // equals to 256/num_colors
for (int i = 0; i < desired_height; ++i) {
uint8* ptr_colors = &_colors[i * desired_width];
const uint8* ptr_lumi = luminance + (i + top) * width + left;
for (int j = 0; j < desired_width; ++j) {
*ptr_colors++ = *ptr_lumi++ >> shift_bits;
}
}
#ifdef HAVE_ARMEABI_V7A
}
#endif
// Go through each pixel, decide it is a inner pixel (having same
// quantized color as its 4 neighbours) or an outer one (at least one of
// his 4 neighbours has different color), update signature respectively.
int h = desired_height - 1;
int w = desired_width - 1;
for (int i = 1; i < h; ++i) {
uint8* ptr_colors = _colors + i * desired_width;
for (int j = 1; j < w; ++j) {
int inner = 0;
uint8 y = ptr_colors[j];
uint8 yleft = ptr_colors[j - 1];
if (y == yleft) {
uint8 yright = ptr_colors[j + 1];
if (y == yright) {
uint8 yup = ptr_colors[j - desired_width];
if (y == yup) {
uint8 ydown = ptr_colors[j + desired_width];
if (y == ydown) {
inner = 1;
}
}
}
}
_signature[inner * num_colors + y] += 1;
}
}
*size = sizeof(_signature) / sizeof(uint32);
_signature[*size - 1] = (desired_height - 2) * (desired_width - 2);
return _signature;
}
uint32_t* ComputeSignature(const uint8* const luminance,
const int width, const int height, int* size) {
int desired_width = min(kDesiredWidthForSignature, width);
int desired_height = min(kDesiredHeightForSignature, height);
int left = (width - desired_width) >> 1;
int top = (height - desired_height) >> 1;
return ComputeSignatureInner(luminance, width, height,
left, top, desired_width, desired_height, size);
}
int Diff(const int32* const signature1, const int32* const signature2,
const int size) {
int total = signature1[size - 1];
int diff = 0;
for (int i = 0; i < size; ++i) {
diff += abs(signature1[i] - signature2[i]);
}
return diff * 50 / total;
}
================================================
FILE: eyes-two/src/main/jni/imageutils/similar.h
================================================
// Copyright 2010 Google Inc. All Rights Reserved.
// Author: xiaotao@google.com (Xiaotao Duan)
#ifndef JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_IMAGEUTILS_SIMILAR_H_
#define JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_IMAGEUTILS_SIMILAR_H_
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
// Computes signature of a given image. This signature can be used to
// compute similarity of two different images. Signature is returned
// and size is returned via output parameter size.
uint32* ComputeSignature(const uint8* const luminance,
const int width, const int height, int* size);
// Returns how different two given images (represented by their signatures)
// are. The input signatures must be in the same size. An integer from 0 to
// 100 is returned to indicate difference percentage of signature2
// comparing against signature1.
int Diff(const int32* const signature1, const int32* const signature2,
const int size);
#ifdef __cplusplus
}
#endif
#endif // JAVA_COM_GOOGLE_ANDROID_APPS_UNVEIL_JNI_IMAGEUTILS_SIMILAR_H_
================================================
FILE: eyes-two/src/main/jni/opticalflow/Android.mk
================================================
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libopticalflow
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wall \
-DHAVE_MALLOC_H \
-DHAVE_PTHREAD \
-finline-functions \
-frename-registers \
-ffast-math \
-s \
-fomit-frame-pointer
LOCAL_SRC_FILES := optical_flow-jni.cpp \
optical_flow.cpp \
feature_detector.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../common
ifeq ($(LOG_TIME),true)
LOCAL_CFLAGS += -DLOG_TIME
endif
ifeq ($(SANITY_CHECKS),true)
LOCAL_CFLAGS += -DSANITY_CHECKS
endif
ifeq ($(VERBOSE_LOGGING),true)
LOCAL_CFLAGS += -DVERBOSE_LOGGING
endif
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_CFLAGS += -DHAVE_ARMEABI_V7A=1 -mfloat-abi=softfp -mfpu=neon
LOCAL_C_INCLUDES += $(NDK_ROOT)/sources/android/cpufeatures
LOCAL_STATIC_LIBRARIES += cpufeatures
endif
LOCAL_LDLIBS := -llog
LOCAL_STATIC_LIBRARIES += common
include $(BUILD_SHARED_LIBRARY)
include $(NDK_ROOT)/sources/android/cpufeatures/Android.mk
================================================
FILE: eyes-two/src/main/jni/opticalflow/feature_detector.cpp
================================================
/*
* Copyright 2011, Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Andrew Harp
//
// Various feature detecting functions.
#include <float.h>
#include <string.h>
#include "utils.h"
#include "time_log.h"
#include "image.h"
#include "feature_detector.h"
// Threshold for pixels to be considered different.
#define FAST_DIFF_AMOUNT 10
// How far from edge of frame to stop looking for FAST features.
#define FAST_BORDER_BUFFER 20
// Minimum enforced distance between detected features.
// Default
#define MIN_FEATURE_DIST_NORMAL 24
// Regions selected as "interesting" (aka have annotations) can have denser
// feature coverage.
#define MIN_FEATURE_DIST_INTEREST 12
// How many FAST qualifying pixels must be connected to a pixel for it to be
// considered a candidate feature for Harris filtering.
#define MIN_NUM_CONNECTED 8
// Size of the window to integrate over for Harris filtering.
// Compare to WINDOW_SIZE in optical_flow.h.
#define HARRIS_WINDOW_SIZE 2
// Arbitrary parameter for how picky Harris filter is, the higher the more
// discriminating.
#define SENSITIVITY 0.2f
namespace flow {
void scoreFeatures(const Image<int32>& I_x, const Image<int32>& I_y,
const int32 num_candidates,
Point2D* const candidate_features) {
// Score all the features
for (int32 i = 0; i < num_candidates; ++i) {
Point2D* const feature = candidate_features + i;
feature->score = harrisFilter(I_x, I_y, feature->x, feature->y);
}
}
// Quicksorts detected features by score and then selects them such that
// they are separated by a minimum distance.
int32 sortAndSelect(const int32 num_candidates, const int32 max_features,
const Image<bool>& interest_map,
Point2D* const candidate_features,
Point2D* const final_features,
Image<uint8>* const best_feature_map) {
qsort(candidate_features, num_candidates);
#ifdef SANITY_CHECKS
// Verify that the array got sorted.
float32 last_score = -FLT_MAX;
for (int32 i = 0; i < num_candidates; ++i) {
const float32 curr_score = (candidate_features + i)->score;
// Scores should be monotonically increasing.
CHECK(last_score <= curr_score,
"Quicksort failure! %d: %.5f > %d: %.5f",
i - 1, last_score, i, curr_score);
last_score = curr_score;
}
#endif
best_feature_map->clear(false);
int32 num_features = 0;
for (int32 i = num_candidates - 1; i >= 0; --i) {
const Point2D& candidate = candidate_features[i];
// Since features are sorted, the first 0 or less value means we can stop
// looking.
if (candidate.score <= 0.0f) {
break;
}
// Lookup whether this feature is in an interest region. If so, other
// features may appear closer to it than normal.
const int32 distance = interest_map.getPixel(candidate.x, candidate.y) ?
MIN_FEATURE_DIST_INTEREST : MIN_FEATURE_DIST_NORMAL;
if (markImage(candidate.x, candidate.y, distance, best_feature_map)) {
final_features[num_features] = candidate;
num_features++;
if (num_features >= max_features) {
break;
}
}
}
return num_features;
}
// Walks along the given circle checking for pixels above or below the center.
// Returns a score, or 0 if the feature did not pass the criteria.
//
// Parameters:
// circle_perimeter: the circumference in pixels of the circle.
// threshold: the minimum number of contiguous pixels that must be above or
// below the center value.
// center_ptr: the location of the center pixel in memory
// offsets: the relative offsets from the center pixel of the edge pixels.
inline int32 testCircle(const int32 circle_perimeter, const int32 threshold,
const uint8* const center_ptr,
const int32* offsets) {
// Get the actual value of the center pixel for easier reference later on.
const int32 center_value = static_cast<int32>(*center_ptr);
// Number of total pixels to check. Have to wrap around some in case
// the contiguous section is split by the array edges.
const int32 num_total = circle_perimeter + threshold - 1;
int32 num_above = 0;
int32 above_diff = 0;
int32 num_below = 0;
int32 below_diff = 0;
// Used to tell when this is definitely not going to meet the threshold so we
// can early abort.
int32 minimum_by_now = threshold - num_total + 1;
// Go through every pixel along the perimeter of the circle, and then around
// again a little bit.
for (int32 i = 0; i < num_total; ++i) {
// This should be faster than mod.
const int32 perim_index = i < circle_perimeter ? i : i - circle_perimeter;
// This gets the value of the current pixel along the perimeter by using
// a precomputed offset.
const int32 curr_value =
static_cast<int32>(center_ptr[offsets[perim_index]]);
const int32 difference = curr_value - center_value;
if (difference > FAST_DIFF_AMOUNT) {
above_diff += difference;
++num_above;
num_below = 0;
below_diff = 0;
if (num_above >= threshold) {
return above_diff;
}
} else if (difference < -FAST_DIFF_AMOUNT) {
below_diff += difference;
++num_below;
num_above = 0;
above_diff = 0;
if (num_below >= threshold) {
return below_diff;
}
} else {
num_above = 0;
num_below = 0;
above_diff = 0;
below_diff = 0;
}
// See if there's any chance of making the threshold.
if (max(num_above, num_below) < minimum_by_now) {
// Didn't pass.
return 0;
}
++minimum_by_now;
}
// Didn't pass.
return 0;
}
// Creates features in a regular grid, regardless of image contents.
int32 seedFeatures(const Image<uint8>& frame,
const int32 num_x, const int32 num_y,
const float32 left, const float32 top,
const float32 right, const float32 bottom,
const int32 type, Point2D* const features) {
int32 num_features = 0;
const float32 step_x = ((right - left) / (num_x - 1));
const float32 step_y = ((bottom - top) / (num_y - 1));
for (int32 x = 0; x < num_x; ++x) {
for (int32 y = 0; y < num_y; ++y) {
const int32 x_pos = x * step_x + left;
const int32 y_pos = y * step_y + top;
if (inRange(x_pos, 0, frame.width_less_one_) &&
inRange(y_pos, 0, frame.height_less_one_)) {
Point2D* const feature = features + num_features;
feature->x = x_pos;
feature->y = y_pos;
feature->type = type;
++num_features;
}
}
}
return num_features;
}
// Returns how likely a point in the image is to be a corner.
float32 harrisFilter(const Image<int32>& I_x, const Image<int32>& I_y,
const int32 x, const int32 y) {
// Image gradient matrix.
float32 G[] = { 0, 0, 0, 0 };
calculateG(HARRIS_WINDOW_SIZE, x, y, I_x, I_y, G);
const float32 g_sum = G[0] + G[1] + G[2] + G[3];
const float32 a = G[0] / g_sum;
const float32 b = G[1] / g_sum;
const float32 c = G[2] / g_sum;
const float32 d = G[3] / g_sum;
const float32 det = a * d - b * c;
const float32 trace = a + d;
const float32 inner = square(trace) - 4 * det;
if (inner >= 0.0f) {
const float32 square_root_inner = sqrtf(inner);
const float32 eig1 = (trace + square_root_inner) / 2.0f;
const float32 eig2 = (trace - square_root_inner) / 2.0f;
return eig1 * eig2 - SENSITIVITY * square(eig1 + eig2);
}
// Way negative.
return -100.0f;
}
// FAST feature detector.
int32 findFastFeatures(const Image<uint8>& frame, const int32 max_num_features,
Point2D* const features,
Image<uint8>* const best_feature_map) {
/*
// Reference for a circle of diameter 7.
const int32 circle[] = {0, 0, 1, 1, 1, 0, 0,
0, 1, 0, 0, 0, 1, 0,
1, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 1,
0, 1, 0, 0, 0, 1, 0,
0, 0, 1, 1, 1, 0, 0};
const int32 circle_offset[] =
{2, 3, 4, 8, 12, 14, 20, 21, 27, 28, 34, 36, 40, 44, 45, 46};
*/
// Quick test of compass directions. Any length 16 circle with a break of up
// to 4 pixels will have at least 3 of these 4 pixels active.
static const int32 short_circle_perimeter = 4;
static const int32 short_threshold = 3;
static const int32 short_circle_x[] = { -3, 0, +3, 0 };
static const int32 short_circle_y[] = { 0, -3, 0, +3 };
// Precompute image offsets.
int32 short_offsets[short_circle_perimeter];
for (int i = 0; i < short_circle_perimeter; ++i) {
short_offsets[i] = short_circle_x[i] + short_circle_y[i] * frame.getWidth();
}
// Large circle values.
static const int32 full_circle_perimeter = 16;
static const int32 full_threshold = 12;
static const int32 full_circle_x[] =
{ -1, 0, +1, +2, +3, +3, +3, +2, +1, +0, -1, -2, -3, -3, -3, -2 };
static const int32 full_circle_y[] =
{ -3, -3, -3, -2, -1, 0, +1, +2, +3, +3, +3, +2, +1, +0, -1, -2 };
// Precompute image offsets.
int32 full_offsets[full_circle_perimeter];
for (int i = 0; i < full_circle_perimeter; ++i) {
full_offsets[i] = full_circle_x[i] + full_circle_y[i] * frame.getWidth();
}
const int frame_width = frame.getWidth();
const int end_y = frame.getHeight() - FAST_BORDER_BUFFER;
const int end_x = frame.getWidth() - FAST_BORDER_BUFFER;
best_feature_map->clear(0);
// Loop through once to find FAST feature clumps.
for (int32 img_y = FAST_BORDER_BUFFER; img_y < end_y; ++img_y) {
const uint8* curr_pixel_ptr =
frame.getPixelPtrConst(FAST_BORDER_BUFFER, img_y);
for (int32 img_x = FAST_BORDER_BUFFER; img_x < end_x; ++img_x) {
// Only insert it if it meets the quick minimum requirements test.
if (testCircle(short_circle_perimeter, short_threshold,
curr_pixel_ptr, short_offsets) != 0) {
// Longer test for actual feature score..
const int32 fast_score = testCircle(full_circle_perimeter,
full_threshold,
curr_pixel_ptr,
full_offsets);
// Non-zero score means the feature was found.
if (fast_score != 0) {
uint8* const center_ptr = best_feature_map->getPixelPtr(img_x, img_y);
// Increase the feature count on this pixel and the pixels in all
// 4 cardinal directions.
*center_ptr += 5;
*(center_ptr - 1) += 1;
*(center_ptr + 1) += 1;
*(center_ptr - frame_width) += 1;
*(center_ptr + frame_width) += 1;
}
}
++curr_pixel_ptr;
} // x
} // y
timeLog("Found FAST features");
int32 num_features = 0;
// Loop through a
gitextract_37xgee5l/
├── .gitignore
├── .gitmodules
├── BUILDING.md
├── CHANGELOG.md
├── COPYING
├── ISSUE_TEMPLATE.md
├── README.md
├── build.gradle
├── eyes-two/
│ ├── .classpath
│ ├── .project
│ ├── AndroidManifest.xml
│ ├── COPYING
│ ├── build.gradle
│ ├── build.xml
│ ├── project.properties
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── OpticalFlowTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── eyesfree/
│ │ ├── opticflow/
│ │ │ ├── ImageBlur.java
│ │ │ └── OpticalFlow.java
│ │ └── textdetect/
│ │ ├── HydrogenTextDetector.java
│ │ └── Thresholder.java
│ └── jni/
│ ├── Android.mk
│ ├── Application.mk
│ ├── common/
│ │ ├── Android.mk
│ │ ├── time_log.cpp
│ │ ├── time_log.h
│ │ ├── types.h
│ │ └── utils.h
│ ├── hydrogen/
│ │ ├── Android.mk
│ │ ├── jni/
│ │ │ ├── common.h
│ │ │ ├── hydrogentextdetector.cpp
│ │ │ ├── jni.cpp
│ │ │ └── thresholder.cpp
│ │ └── src/
│ │ ├── clusterer.cpp
│ │ ├── clusterer.h
│ │ ├── hydrogentextdetector.cpp
│ │ ├── hydrogentextdetector.h
│ │ ├── leptonica.h
│ │ ├── thresholder.cpp
│ │ ├── thresholder.h
│ │ ├── utilities.cpp
│ │ ├── utilities.h
│ │ ├── validator.cpp
│ │ └── validator.h
│ ├── imageutils/
│ │ ├── Android.mk
│ │ ├── blur-jni.cpp
│ │ ├── blur.cpp
│ │ ├── blur.h
│ │ ├── similar-jni.cpp
│ │ ├── similar.cpp
│ │ └── similar.h
│ └── opticalflow/
│ ├── Android.mk
│ ├── feature_detector.cpp
│ ├── feature_detector.h
│ ├── image.h
│ ├── optical_flow-jni.cpp
│ ├── optical_flow.cpp
│ ├── optical_flow.h
│ └── optical_flow_utils.h
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── preparetests.cmd
├── preparetests.sh
├── settings.gradle
├── tess-two/
│ ├── .classpath
│ ├── .gitignore
│ ├── .project
│ ├── AndroidManifest.xml
│ ├── COPYING
│ ├── build.gradle
│ ├── build.xml
│ ├── jni/
│ │ ├── Android.mk
│ │ ├── Application.mk
│ │ ├── com_googlecode_leptonica_android/
│ │ │ ├── Android.mk
│ │ │ ├── box.cpp
│ │ │ ├── boxa.cpp
│ │ │ ├── common.h
│ │ │ ├── endianness.h
│ │ │ ├── jni.cpp
│ │ │ ├── pix.cpp
│ │ │ ├── pixa.cpp
│ │ │ ├── readfile.cpp
│ │ │ ├── utilities.cpp
│ │ │ └── writefile.cpp
│ │ ├── com_googlecode_tesseract_android/
│ │ │ ├── Android.mk
│ │ │ ├── common.h
│ │ │ ├── debugpixa.h
│ │ │ ├── pageiterator.cpp
│ │ │ ├── resultiterator.cpp
│ │ │ ├── tess_version.h
│ │ │ └── tessbaseapi.cpp
│ │ ├── libjpeg/
│ │ │ ├── Android.mk
│ │ │ ├── Makefile.am
│ │ │ ├── README
│ │ │ ├── ar-lib
│ │ │ ├── cderror.h
│ │ │ ├── cdjpeg.c
│ │ │ ├── cdjpeg.h
│ │ │ ├── change.log
│ │ │ ├── cjpeg.1
│ │ │ ├── cjpeg.c
│ │ │ ├── ckconfig.c
│ │ │ ├── coderules.txt
│ │ │ ├── compile
│ │ │ ├── config.guess
│ │ │ ├── config.sub
│ │ │ ├── configure.ac
│ │ │ ├── depcomp
│ │ │ ├── djpeg.1
│ │ │ ├── djpeg.c
│ │ │ ├── example.c
│ │ │ ├── filelist.txt
│ │ │ ├── install-sh
│ │ │ ├── install.txt
│ │ │ ├── jaricom.c
│ │ │ ├── jcapimin.c
│ │ │ ├── jcapistd.c
│ │ │ ├── jcarith.c
│ │ │ ├── jccoefct.c
│ │ │ ├── jccolor.c
│ │ │ ├── jcdctmgr.c
│ │ │ ├── jchuff.c
│ │ │ ├── jcinit.c
│ │ │ ├── jcmainct.c
│ │ │ ├── jcmarker.c
│ │ │ ├── jcmaster.c
│ │ │ ├── jcomapi.c
│ │ │ ├── jconfig.bcc
│ │ │ ├── jconfig.cfg
│ │ │ ├── jconfig.dj
│ │ │ ├── jconfig.h
│ │ │ ├── jconfig.mac
│ │ │ ├── jconfig.manx
│ │ │ ├── jconfig.mc6
│ │ │ ├── jconfig.sas
│ │ │ ├── jconfig.st
│ │ │ ├── jconfig.txt
│ │ │ ├── jconfig.vc
│ │ │ ├── jconfig.vms
│ │ │ ├── jconfig.wat
│ │ │ ├── jcparam.c
│ │ │ ├── jcprepct.c
│ │ │ ├── jcsample.c
│ │ │ ├── jctrans.c
│ │ │ ├── jdapimin.c
│ │ │ ├── jdapistd.c
│ │ │ ├── jdarith.c
│ │ │ ├── jdatadst.c
│ │ │ ├── jdatasrc.c
│ │ │ ├── jdcoefct.c
│ │ │ ├── jdcolor.c
│ │ │ ├── jdct.h
│ │ │ ├── jddctmgr.c
│ │ │ ├── jdhuff.c
│ │ │ ├── jdinput.c
│ │ │ ├── jdmainct.c
│ │ │ ├── jdmarker.c
│ │ │ ├── jdmaster.c
│ │ │ ├── jdmerge.c
│ │ │ ├── jdpostct.c
│ │ │ ├── jdsample.c
│ │ │ ├── jdtrans.c
│ │ │ ├── jerror.c
│ │ │ ├── jerror.h
│ │ │ ├── jfdctflt.c
│ │ │ ├── jfdctfst.c
│ │ │ ├── jfdctint.c
│ │ │ ├── jidctflt.c
│ │ │ ├── jidctfst.c
│ │ │ ├── jidctint.c
│ │ │ ├── jinclude.h
│ │ │ ├── jmemansi.c
│ │ │ ├── jmemdos.c
│ │ │ ├── jmemdosa.asm
│ │ │ ├── jmemmac.c
│ │ │ ├── jmemmgr.c
│ │ │ ├── jmemname.c
│ │ │ ├── jmemnobs.c
│ │ │ ├── jmemsys.h
│ │ │ ├── jmorecfg.h
│ │ │ ├── jpegint.h
│ │ │ ├── jpeglib.h
│ │ │ ├── jpegtran.1
│ │ │ ├── jpegtran.c
│ │ │ ├── jquant1.c
│ │ │ ├── jquant2.c
│ │ │ ├── jutils.c
│ │ │ ├── jversion.h
│ │ │ ├── libjpeg.txt
│ │ │ ├── ltmain.sh
│ │ │ ├── makcjpeg.st
│ │ │ ├── makdjpeg.st
│ │ │ ├── makeadsw.vc6
│ │ │ ├── makeasln.v10
│ │ │ ├── makecdep.vc6
│ │ │ ├── makecdsp.vc6
│ │ │ ├── makecfil.v10
│ │ │ ├── makecmak.vc6
│ │ │ ├── makecvcx.v10
│ │ │ ├── makeddep.vc6
│ │ │ ├── makeddsp.vc6
│ │ │ ├── makedfil.v10
│ │ │ ├── makedmak.vc6
│ │ │ ├── makedvcx.v10
│ │ │ ├── makefile.ansi
│ │ │ ├── makefile.b32
│ │ │ ├── makefile.bcc
│ │ │ ├── makefile.dj
│ │ │ ├── makefile.manx
│ │ │ ├── makefile.mc6
│ │ │ ├── makefile.mms
│ │ │ ├── makefile.sas
│ │ │ ├── makefile.unix
│ │ │ ├── makefile.vc
│ │ │ ├── makefile.vms
│ │ │ ├── makefile.wat
│ │ │ ├── makejdep.vc6
│ │ │ ├── makejdsp.vc6
│ │ │ ├── makejdsw.vc6
│ │ │ ├── makejfil.v10
│ │ │ ├── makejmak.vc6
│ │ │ ├── makejsln.v10
│ │ │ ├── makejvcx.v10
│ │ │ ├── makeproj.mac
│ │ │ ├── makerdep.vc6
│ │ │ ├── makerdsp.vc6
│ │ │ ├── makerfil.v10
│ │ │ ├── makermak.vc6
│ │ │ ├── makervcx.v10
│ │ │ ├── maketdep.vc6
│ │ │ ├── maketdsp.vc6
│ │ │ ├── maketfil.v10
│ │ │ ├── maketmak.vc6
│ │ │ ├── maketvcx.v10
│ │ │ ├── makewdep.vc6
│ │ │ ├── makewdsp.vc6
│ │ │ ├── makewfil.v10
│ │ │ ├── makewmak.vc6
│ │ │ ├── makewvcx.v10
│ │ │ ├── makljpeg.st
│ │ │ ├── maktjpeg.st
│ │ │ ├── makvms.opt
│ │ │ ├── missing
│ │ │ ├── rdbmp.c
│ │ │ ├── rdcolmap.c
│ │ │ ├── rdgif.c
│ │ │ ├── rdjpgcom.1
│ │ │ ├── rdjpgcom.c
│ │ │ ├── rdppm.c
│ │ │ ├── rdrle.c
│ │ │ ├── rdswitch.c
│ │ │ ├── rdtarga.c
│ │ │ ├── structure.txt
│ │ │ ├── testimg.ppm
│ │ │ ├── transupp.c
│ │ │ ├── transupp.h
│ │ │ ├── usage.txt
│ │ │ ├── wizard.txt
│ │ │ ├── wrbmp.c
│ │ │ ├── wrgif.c
│ │ │ ├── wrjpgcom.1
│ │ │ ├── wrjpgcom.c
│ │ │ ├── wrppm.c
│ │ │ ├── wrrle.c
│ │ │ └── wrtarga.c
│ │ └── libpng/
│ │ ├── ANNOUNCE
│ │ ├── Android.bp
│ │ ├── Android.mk
│ │ ├── CHANGES
│ │ ├── CMakeLists.txt
│ │ ├── CleanSpec.mk
│ │ ├── INSTALL
│ │ ├── LICENSE
│ │ ├── MODULE_LICENSE_BSD_LIKE
│ │ ├── Makefile.am
│ │ ├── README
│ │ ├── README.android
│ │ ├── README.version
│ │ ├── TODO
│ │ ├── arm/
│ │ │ ├── arm_init.c
│ │ │ ├── filter_neon.S
│ │ │ └── filter_neon_intrinsics.c
│ │ ├── autogen.sh
│ │ ├── configure.ac
│ │ ├── contrib/
│ │ │ ├── README.txt
│ │ │ ├── arm-neon/
│ │ │ │ ├── README
│ │ │ │ ├── android-ndk.c
│ │ │ │ ├── linux-auxv.c
│ │ │ │ └── linux.c
│ │ │ ├── conftest/
│ │ │ │ ├── README
│ │ │ │ ├── pngcp.dfa
│ │ │ │ ├── read.dfa
│ │ │ │ ├── s_read.dfa
│ │ │ │ ├── s_write.dfa
│ │ │ │ ├── simple.dfa
│ │ │ │ └── write.dfa
│ │ │ ├── examples/
│ │ │ │ ├── README.txt
│ │ │ │ ├── iccfrompng.c
│ │ │ │ ├── pngpixel.c
│ │ │ │ ├── pngtopng.c
│ │ │ │ └── simpleover.c
│ │ │ ├── gregbook/
│ │ │ │ ├── COPYING
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile.mingw32
│ │ │ │ ├── Makefile.sgi
│ │ │ │ ├── Makefile.unx
│ │ │ │ ├── Makefile.w32
│ │ │ │ ├── README
│ │ │ │ ├── makevms.com
│ │ │ │ ├── readpng.c
│ │ │ │ ├── readpng.h
│ │ │ │ ├── readpng2.c
│ │ │ │ ├── readpng2.h
│ │ │ │ ├── readppm.c
│ │ │ │ ├── rpng-win.c
│ │ │ │ ├── rpng-x.c
│ │ │ │ ├── rpng2-win.c
│ │ │ │ ├── rpng2-x.c
│ │ │ │ ├── wpng.c
│ │ │ │ ├── writepng.c
│ │ │ │ └── writepng.h
│ │ │ ├── intel/
│ │ │ │ ├── INSTALL
│ │ │ │ ├── Makefile.am.patch
│ │ │ │ ├── configure.ac.patch
│ │ │ │ ├── filter_sse2_intrinsics.c
│ │ │ │ ├── intel_init.c
│ │ │ │ └── intel_sse.patch
│ │ │ ├── libtests/
│ │ │ │ ├── fakepng.c
│ │ │ │ ├── gentests.sh
│ │ │ │ ├── makepng.c
│ │ │ │ ├── pngimage.c
│ │ │ │ ├── pngstest-errors.h
│ │ │ │ ├── pngstest.c
│ │ │ │ ├── pngunknown.c
│ │ │ │ ├── pngvalid.c
│ │ │ │ ├── readpng.c
│ │ │ │ ├── tarith.c
│ │ │ │ └── timepng.c
│ │ │ ├── mips-msa/
│ │ │ │ ├── README
│ │ │ │ └── linux.c
│ │ │ ├── pngminim/
│ │ │ │ ├── README
│ │ │ │ ├── decoder/
│ │ │ │ │ ├── README
│ │ │ │ │ ├── pngusr.dfa
│ │ │ │ │ └── pngusr.h
│ │ │ │ ├── encoder/
│ │ │ │ │ ├── README
│ │ │ │ │ ├── pngusr.dfa
│ │ │ │ │ └── pngusr.h
│ │ │ │ └── preader/
│ │ │ │ ├── README
│ │ │ │ ├── pngusr.dfa
│ │ │ │ └── pngusr.h
│ │ │ ├── pngminus/
│ │ │ │ ├── README
│ │ │ │ ├── makefile.std
│ │ │ │ ├── makefile.tc3
│ │ │ │ ├── makevms.com
│ │ │ │ ├── png2pnm.bat
│ │ │ │ ├── png2pnm.c
│ │ │ │ ├── png2pnm.sh
│ │ │ │ ├── pngminus.bat
│ │ │ │ ├── pngminus.sh
│ │ │ │ ├── pnm2png.bat
│ │ │ │ ├── pnm2png.c
│ │ │ │ └── pnm2png.sh
│ │ │ ├── pngsuite/
│ │ │ │ └── README
│ │ │ ├── tools/
│ │ │ │ ├── README.txt
│ │ │ │ ├── checksum-icc.c
│ │ │ │ ├── chkfmt
│ │ │ │ ├── cvtcolor.c
│ │ │ │ ├── genpng.c
│ │ │ │ ├── intgamma.sh
│ │ │ │ ├── makesRGB.c
│ │ │ │ ├── png-fix-itxt.c
│ │ │ │ ├── pngcp.c
│ │ │ │ ├── pngfix.c
│ │ │ │ ├── reindent
│ │ │ │ └── sRGB.h
│ │ │ └── visupng/
│ │ │ ├── PngFile.c
│ │ │ ├── PngFile.h
│ │ │ ├── README.txt
│ │ │ ├── VisualPng.c
│ │ │ ├── VisualPng.dsp
│ │ │ ├── VisualPng.dsw
│ │ │ ├── VisualPng.rc
│ │ │ ├── cexcept.h
│ │ │ └── resource.h
│ │ ├── example.c
│ │ ├── libpng-config.in
│ │ ├── libpng-manual.txt
│ │ ├── libpng.3
│ │ ├── libpng.pc.in
│ │ ├── libpngpf.3
│ │ ├── mips/
│ │ │ ├── filter_msa_intrinsics.c
│ │ │ └── mips_init.c
│ │ ├── png.5
│ │ ├── png.c
│ │ ├── png.h
│ │ ├── pngconf.h
│ │ ├── pngdebug.h
│ │ ├── pngerror.c
│ │ ├── pngget.c
│ │ ├── pnginfo.h
│ │ ├── pnglibconf.h
│ │ ├── pngmem.c
│ │ ├── pngpread.c
│ │ ├── pngpriv.h
│ │ ├── pngread.c
│ │ ├── pngrio.c
│ │ ├── pngrtran.c
│ │ ├── pngrutil.c
│ │ ├── pngset.c
│ │ ├── pngstruct.h
│ │ ├── pngtest.c
│ │ ├── pngtrans.c
│ │ ├── pngusr.dfa
│ │ ├── pngusr.h
│ │ ├── pngwio.c
│ │ ├── pngwrite.c
│ │ ├── pngwtran.c
│ │ ├── pngwutil.c
│ │ ├── projects/
│ │ │ ├── owatcom/
│ │ │ │ ├── libpng.tgt
│ │ │ │ ├── libpng.wpj
│ │ │ │ ├── pngconfig.mak
│ │ │ │ ├── pngstest.tgt
│ │ │ │ ├── pngtest.tgt
│ │ │ │ └── pngvalid.tgt
│ │ │ ├── visualc71/
│ │ │ │ ├── PRJ0041.mak
│ │ │ │ ├── README.txt
│ │ │ │ ├── README_zlib.txt
│ │ │ │ ├── libpng.sln
│ │ │ │ ├── libpng.vcproj
│ │ │ │ ├── pngtest.vcproj
│ │ │ │ └── zlib.vcproj
│ │ │ └── vstudio/
│ │ │ ├── libpng/
│ │ │ │ └── libpng.vcxproj
│ │ │ ├── pnglibconf/
│ │ │ │ └── pnglibconf.vcxproj
│ │ │ ├── pngstest/
│ │ │ │ └── pngstest.vcxproj
│ │ │ ├── pngtest/
│ │ │ │ └── pngtest.vcxproj
│ │ │ ├── pngunknown/
│ │ │ │ └── pngunknown.vcxproj
│ │ │ ├── pngvalid/
│ │ │ │ └── pngvalid.vcxproj
│ │ │ ├── readme.txt
│ │ │ ├── vstudio.sln
│ │ │ ├── zlib/
│ │ │ │ └── zlib.vcxproj
│ │ │ └── zlib.props
│ │ ├── scripts/
│ │ │ ├── README.txt
│ │ │ ├── SCOPTIONS.ppc
│ │ │ ├── checksym.awk
│ │ │ ├── def.c
│ │ │ ├── descrip.mms
│ │ │ ├── dfn.awk
│ │ │ ├── genchk.cmake.in
│ │ │ ├── genout.cmake.in
│ │ │ ├── gensrc.cmake.in
│ │ │ ├── intprefix.c
│ │ │ ├── libpng-config-body.in
│ │ │ ├── libpng-config-head.in
│ │ │ ├── libpng.pc.in
│ │ │ ├── macro.lst
│ │ │ ├── makefile.32sunu
│ │ │ ├── makefile.64sunu
│ │ │ ├── makefile.acorn
│ │ │ ├── makefile.aix
│ │ │ ├── makefile.amiga
│ │ │ ├── makefile.atari
│ │ │ ├── makefile.bc32
│ │ │ ├── makefile.beos
│ │ │ ├── makefile.bor
│ │ │ ├── makefile.cegcc
│ │ │ ├── makefile.darwin
│ │ │ ├── makefile.dec
│ │ │ ├── makefile.dj2
│ │ │ ├── makefile.freebsd
│ │ │ ├── makefile.gcc
│ │ │ ├── makefile.hp64
│ │ │ ├── makefile.hpgcc
│ │ │ ├── makefile.hpux
│ │ │ ├── makefile.ibmc
│ │ │ ├── makefile.intel
│ │ │ ├── makefile.knr
│ │ │ ├── makefile.linux
│ │ │ ├── makefile.mips
│ │ │ ├── makefile.msc
│ │ │ ├── makefile.msys
│ │ │ ├── makefile.ne12bsd
│ │ │ ├── makefile.netbsd
│ │ │ ├── makefile.openbsd
│ │ │ ├── makefile.sco
│ │ │ ├── makefile.sggcc
│ │ │ ├── makefile.sgi
│ │ │ ├── makefile.so9
│ │ │ ├── makefile.solaris
│ │ │ ├── makefile.solaris-x86
│ │ │ ├── makefile.std
│ │ │ ├── makefile.sunos
│ │ │ ├── makefile.tc3
│ │ │ ├── makefile.vcwin32
│ │ │ ├── makevms.com
│ │ │ ├── options.awk
│ │ │ ├── pnglibconf.dfa
│ │ │ ├── pnglibconf.h.prebuilt
│ │ │ ├── pnglibconf.mak
│ │ │ ├── pngwin.rc
│ │ │ ├── prefix.c
│ │ │ ├── smakefile.ppc
│ │ │ ├── sym.c
│ │ │ ├── symbols.c
│ │ │ ├── symbols.def
│ │ │ ├── test.cmake.in
│ │ │ └── vers.c
│ │ └── tests/
│ │ ├── pngimage-full
│ │ ├── pngimage-quick
│ │ ├── pngstest
│ │ ├── pngstest-1.8
│ │ ├── pngstest-1.8-alpha
│ │ ├── pngstest-linear
│ │ ├── pngstest-linear-alpha
│ │ ├── pngstest-none
│ │ ├── pngstest-none-alpha
│ │ ├── pngstest-sRGB
│ │ ├── pngstest-sRGB-alpha
│ │ ├── pngtest
│ │ ├── pngunknown-IDAT
│ │ ├── pngunknown-discard
│ │ ├── pngunknown-if-safe
│ │ ├── pngunknown-sAPI
│ │ ├── pngunknown-sTER
│ │ ├── pngunknown-save
│ │ ├── pngunknown-vpAg
│ │ ├── pngvalid-gamma-16-to-8
│ │ ├── pngvalid-gamma-alpha-mode
│ │ ├── pngvalid-gamma-background
│ │ ├── pngvalid-gamma-expand16-alpha-mode
│ │ ├── pngvalid-gamma-expand16-background
│ │ ├── pngvalid-gamma-expand16-transform
│ │ ├── pngvalid-gamma-sbit
│ │ ├── pngvalid-gamma-threshold
│ │ ├── pngvalid-gamma-transform
│ │ ├── pngvalid-progressive-interlace-standard
│ │ ├── pngvalid-progressive-size
│ │ ├── pngvalid-progressive-standard
│ │ ├── pngvalid-standard
│ │ └── pngvalid-transform
│ ├── proguard-rules.pro
│ ├── project.properties
│ ├── res/
│ │ └── .gitkeep
│ └── src/
│ └── com/
│ └── googlecode/
│ ├── leptonica/
│ │ └── android/
│ │ ├── AdaptiveMap.java
│ │ ├── Binarize.java
│ │ ├── Box.java
│ │ ├── Boxa.java
│ │ ├── Clip.java
│ │ ├── Constants.java
│ │ ├── Convert.java
│ │ ├── Edge.java
│ │ ├── Enhance.java
│ │ ├── GrayQuant.java
│ │ ├── JpegIO.java
│ │ ├── MorphApp.java
│ │ ├── Pix.java
│ │ ├── Pixa.java
│ │ ├── ReadFile.java
│ │ ├── Rotate.java
│ │ ├── Scale.java
│ │ ├── Skew.java
│ │ └── WriteFile.java
│ └── tesseract/
│ └── android/
│ ├── PageIterator.java
│ ├── ResultIterator.java
│ ├── TessBaseAPI.java
│ └── TessPdfRenderer.java
└── tess-two-test/
├── .classpath
├── .project
├── AndroidManifest.xml
├── build.gradle
├── project.properties
├── res/
│ └── values/
│ └── strings.xml
└── src/
└── com/
└── googlecode/
├── leptonica/
│ └── android/
│ └── test/
│ ├── AdaptiveMapTest.java
│ ├── BinarizeTest.java
│ ├── BoxTest.java
│ ├── BoxaTest.java
│ ├── ClipTest.java
│ ├── ConvertTest.java
│ ├── EdgeTest.java
│ ├── EnhanceTest.java
│ ├── GrayQuantTest.java
│ ├── JpegIOTest.java
│ ├── PixTest.java
│ ├── PixaTest.java
│ ├── ReadFileTest.java
│ ├── RotateTest.java
│ ├── ScaleTest.java
│ ├── SkewTest.java
│ ├── TestUtils.java
│ └── WriteFileTest.java
└── tesseract/
└── android/
└── test/
├── TessBaseAPITest.java
└── TessPdfRendererTest.java
Showing preview only (226K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3217 symbols across 228 files)
FILE: eyes-two/src/androidTest/java/OpticalFlowTest.java
class OpticalFlowTest (line 9) | public class OpticalFlowTest extends TestCase {
method testInit (line 12) | @SmallTest
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/opticflow/ImageBlur.java
class ImageBlur (line 26) | public class ImageBlur {
method isBlurred (line 39) | public static native boolean isBlurred(byte[] input, int width, int he...
method computeSignature (line 55) | public static native int[] computeSignature(
method diffSignature (line 64) | public static native int diffSignature(int[] signature1, int[] signatu...
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/opticflow/OpticalFlow.java
class OpticalFlow (line 29) | public class OpticalFlow {
method finalize (line 34) | @Override
method initialize (line 39) | public void initialize(int width, int height, int downsampleFactor) {
method setImage (line 43) | public void setImage(byte[] data, long timestamp) {
method computeOpticalFlow (line 47) | public void computeOpticalFlow() {
method getFeatures (line 53) | public float[] getFeatures(boolean onlyReturnCorrespondingFeatures) {
method getAccumulatedDelta (line 57) | public PointF getAccumulatedDelta(
method addInterestRegion (line 66) | public void addInterestRegion(int numX, int numY, int left, int top, i...
method initNative (line 72) | private native void initNative(int width, int height, int downsampleFa...
method addFrameNative (line 74) | private native void addFrameNative(byte[] data, long timeStamp);
method computeFeaturesNative (line 76) | private native void computeFeaturesNative(boolean cachedOk);
method computeFlowNative (line 78) | private native void computeFlowNative();
method printInfoNative (line 80) | private native void printInfoNative();
method getAccumulatedDeltaNative (line 82) | private native void getAccumulatedDeltaNative(
method addInterestRegionNative (line 85) | private native void addInterestRegionNative(
method getFeaturesNative (line 88) | private native float[] getFeaturesNative(boolean onlyReturnCorrespondi...
method resetNative (line 90) | private native void resetNative();
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/textdetect/HydrogenTextDetector.java
class HydrogenTextDetector (line 27) | @SuppressWarnings("unused")
method HydrogenTextDetector (line 38) | public HydrogenTextDetector() {
method setSize (line 45) | public void setSize(int width, int height) {
method finalize (line 49) | @Override
method setParameters (line 58) | public void setParameters(Parameters params) {
method getParameters (line 64) | public Parameters getParameters() {
method getTextAreas (line 68) | public Pixa getTextAreas() {
method getSkewAngle (line 81) | public float getSkewAngle() {
method getTextConfs (line 85) | public float[] getTextConfs() {
method getSourceImage (line 89) | public Pix getSourceImage() {
method setSourceImage (line 105) | public void setSourceImage(Pix pixs) {
method detectText (line 109) | public void detectText() {
method clear (line 113) | public void clear() {
class Parameters (line 121) | public class Parameters {
method Parameters (line 188) | public Parameters() {
method nativeConstructor (line 238) | private static native long nativeConstructor();
method nativeDestructor (line 240) | private static native void nativeDestructor(long nativePtr);
method nativeSetParameters (line 242) | private static native void nativeSetParameters(long nativePtr, Paramet...
method nativeGetTextAreas (line 244) | private static native long nativeGetTextAreas(long nativePtr);
method nativeGetSkewAngle (line 246) | private static native float nativeGetSkewAngle(long nativePtr);
method nativeGetSourceWidth (line 248) | private static native int nativeGetSourceWidth(long nativePtr);
method nativeGetSourceHeight (line 250) | private static native int nativeGetSourceHeight(long nativePtr);
method nativeGetTextConfs (line 252) | private static native float[] nativeGetTextConfs(long nativePtr);
method nativeGetSourceImage (line 254) | private static native long nativeGetSourceImage(long nativePtr);
method nativeSetSourceImage (line 256) | private static native void nativeSetSourceImage(long nativePtr, long n...
method nativeDetectText (line 258) | private static native void nativeDetectText(long nativePtr);
method nativeClear (line 260) | private static native void nativeClear(long nativePtr);
FILE: eyes-two/src/main/java/com/googlecode/eyesfree/textdetect/Thresholder.java
class Thresholder (line 24) | public class Thresholder {
method sobelEdgeThreshold (line 33) | public static Pix sobelEdgeThreshold(Pix pixs) {
method sobelEdgeThreshold (line 37) | public static Pix sobelEdgeThreshold(Pix pixs, int thresh) {
method edgeAdaptiveThreshold (line 71) | public static Pix edgeAdaptiveThreshold(Pix pixs) {
method edgeAdaptiveThreshold (line 75) | public static Pix edgeAdaptiveThreshold(
method fisherAdaptiveThreshold (line 112) | public static Pix fisherAdaptiveThreshold(Pix pixs) {
method fisherAdaptiveThreshold (line 116) | public static Pix fisherAdaptiveThreshold(Pix pixs, int numTilesX, int...
method fisherAdaptiveThreshold (line 123) | public static Pix fisherAdaptiveThreshold(
method nativeFisherAdaptiveThreshold (line 147) | private static native long nativeFisherAdaptiveThreshold(
method nativeEdgeAdaptiveThreshold (line 150) | private static native long nativeEdgeAdaptiveThreshold(
method nativeSobelEdgeThreshold (line 153) | private static native long nativeSobelEdgeThreshold(long nativePix, in...
FILE: eyes-two/src/main/jni/common/time_log.h
function currentThreadTimeNanos (line 16) | inline static long currentThreadTimeNanos() {
type LogEntry (line 26) | struct LogEntry {
type AverageEntry (line 31) | struct AverageEntry {
function resetTimeLog (line 47) | inline static void resetTimeLog() {
function timeLog (line 54) | inline static void timeLog(const char* str) {
function float32 (line 66) | inline static float32 blend(float32 old_val, float32 new_val) {
function float32 (line 71) | inline static float32 updateAverage(const char* str, const float32 new_v...
function printTimeLog (line 96) | inline static void printTimeLog() {
function resetTimeLog (line 119) | inline static void resetTimeLog() {}
function timeLog (line 120) | inline static void timeLog(const char* str) {}
function printTimeLog (line 121) | inline static void printTimeLog() {}
FILE: eyes-two/src/main/jni/common/types.h
type uint8 (line 12) | typedef unsigned char uint8;
type uint16 (line 13) | typedef unsigned short uint16;
type uint32 (line 14) | typedef unsigned int uint32;
type int8 (line 16) | typedef signed char int8;
type int16 (line 17) | typedef short int16;
type int32 (line 18) | typedef signed int int32;
type float32 (line 19) | typedef float float32;
FILE: eyes-two/src/main/jni/common/utils.h
function supportsNeon (line 55) | inline bool supportsNeon() {
function T (line 68) | static T square(const T a) {
function T (line 73) | static T clip(const T a, const T floor, const T ceil) {
function int32 (line 78) | static int32 floor(const T a) {
function int32 (line 83) | static int32 ceil(const T a) {
function inRange (line 88) | static bool inRange(const T a, const T min, const T max) {
function int32 (line 93) | static int32 round(const float a) {
function swap (line 98) | static void swap(T* const a, T* const b) {
FILE: eyes-two/src/main/jni/hydrogen/jni/hydrogentextdetector.cpp
function jlong (line 26) | jlong Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativ...
function Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeDestructor (line 37) | void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
function getBoolField (line 48) | bool getBoolField(JNIEnv *env, jclass &clazz, jobject &obj, const char *...
function getIntField (line 54) | int getIntField(JNIEnv *env, jclass &clazz, jobject &obj, const char *fi...
function getFloatField (line 60) | float getFloatField(JNIEnv *env, jclass &clazz, jobject &obj, const char...
function getStringField (line 66) | void getStringField(JNIEnv *env, jclass &clazz, jobject &obj, const char...
function Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeSetParameters (line 82) | void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
function jlong (line 132) | jlong Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativ...
function jfloat (line 145) | jfloat Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nati...
function jint (line 158) | jint Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
function jint (line 173) | jint Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
function jfloatArray (line 188) | jfloatArray Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector...
function jlong (line 214) | jlong Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativ...
function Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeSetSourceImage (line 225) | void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
function Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeDetectText (line 238) | void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
function Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_nativeClear (line 249) | void Java_com_googlecode_eyesfree_textdetect_HydrogenTextDetector_native...
FILE: eyes-two/src/main/jni/hydrogen/jni/jni.cpp
function jint (line 19) | jint JNI_OnLoad(JavaVM* vm, void* reserved) {
FILE: eyes-two/src/main/jni/hydrogen/jni/thresholder.cpp
function jlong (line 25) | jlong Java_com_googlecode_eyesfree_textdetect_Thresholder_nativeSobelEdg...
function jlong (line 37) | jlong Java_com_googlecode_eyesfree_textdetect_Thresholder_nativeEdgeAdap...
function jlong (line 57) | jlong Java_com_googlecode_eyesfree_textdetect_Thresholder_nativeFisherAd...
FILE: eyes-two/src/main/jni/hydrogen/src/clusterer.cpp
function l_int32 (line 25) | l_int32 ConnCompValidPixa(PIX *pix8, PIX *pix, PIXA **ppixa, NUMA **pconfs,
function l_int32 (line 126) | l_int32 MergePix(PIXA *pixad, l_int32 d_idx, PIXA *pixas, l_int32 s_idx) {
function l_int32 (line 174) | l_int32 MergePairFragments(PIX *pix8, PIXA *clusters, PIXA *pixa, l_uint...
function l_int32 (line 258) | l_int32 RemoveInvalidPairs(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8 *...
function l_int32 (line 329) | l_int32 GenerateClusterPartners(PIX *pix8, PIXA *pixa, NUMA *confs, l_ui...
function l_int32 (line 445) | l_int32 MergeClusterPartners(PIX *pix8, PIXA *pixa, NUMA *confs, l_uint8...
function l_int32 (line 635) | l_int32 ClusterValidComponents(PIX *pix8, PIXA *pixa, NUMA *confs, l_uin...
FILE: eyes-two/src/main/jni/hydrogen/src/hydrogentextdetector.cpp
function PIXA (line 37) | PIXA *HydrogenTextDetector::ExtractTextRegions(PIX *pix8, PIX *edges, NU...
function PIX (line 105) | PIX *HydrogenTextDetector::DetectAndFixSkew(PIX *pixs) {
function PIXA (line 230) | PIXA *HydrogenTextDetector::GetTextAreas() {
function l_float32 (line 234) | l_float32 HydrogenTextDetector::GetSkewAngle() {
function NUMA (line 238) | NUMA *HydrogenTextDetector::GetTextConfs() {
function PIX (line 242) | PIX *HydrogenTextDetector::GetSourceImage() {
FILE: eyes-two/src/main/jni/hydrogen/src/thresholder.cpp
function l_int32 (line 32) | l_int32 pixFisherAdaptiveThreshold(PIX *pixs, PIX **ppixd, l_int32 tile_...
function l_int32 (line 88) | l_int32 pixGetFisherThresh(PIX *pixs, l_float32 scorefract, l_float32 *p...
function PIX (line 138) | PIX *pixThreshedSobelEdgeFilter(PIX *pixs, l_int32 threshold) {
function l_uint8 (line 214) | l_uint8 pixGradientEnergy(PIX *pixs, PIX *mask, l_float32 *penergy) {
function l_uint8 (line 269) | l_uint8 pixEdgeMax(PIX *pixs, l_int32 *pmax, l_int32 *pavg) {
function l_uint8 (line 334) | l_uint8 pixEdgeAdaptiveThreshold(PIX *pixs, PIX **ppixd, l_int32 tile_x,...
FILE: eyes-two/src/main/jni/hydrogen/src/utilities.cpp
function numaJoin (line 26) | void numaJoin(NUMA *dst, NUMA *src) {
function PIX (line 36) | PIX *pixaDisplayRandomCmapFiltered(PIXA *pixa, l_int32 w, l_int32 h, l_u...
function PIXCMAP (line 96) | PIXCMAP *
function PIX (line 125) | PIX *pixaDisplayHeatmap(PIXA *pixa, l_int32 w, l_int32 h, NUMA *confs) {
FILE: eyes-two/src/main/jni/hydrogen/src/validator.cpp
function l_int32 (line 25) | l_int32 BBoxHDist(BOX *b1, BOX *b2) {
function l_int32 (line 29) | l_int32 BBoxVDist(BOX *b1, BOX *b2) {
function l_float32 (line 33) | l_float32 RelativeDiff(l_int32 v1, l_int32 v2) {
function ValidatePairOld (line 45) | bool ValidatePairOld(BOX *b1, BOX *b2) {
function l_float32 (line 83) | l_float32 ComputeFDR(PIX *cc8) {
function l_float32 (line 91) | l_float32 ComputeGradientEnergy(PIX *cc8, PIX *cc) {
function l_float32 (line 99) | l_float32 ComputeCCDensity(PIX *pix) {
function l_float32 (line 108) | l_float32 ComputeCCEdgeMax(PIX *pix8) {
function l_float32 (line 117) | l_float32 ComputeSingletonConfidence(PIX *pix, BOX *box, PIX *pix8) {
function ValidateSingleton (line 148) | bool ValidateSingleton(PIX *pix, BOX *box, PIX *pix8, l_float32 *pconf,
function ValidatePair (line 180) | bool ValidatePair(BOX *b1, BOX *b2, l_float32 *pconf,
function l_float32 (line 214) | l_float32 ComputePairNormalizedOverlapArea(BOX *b1, BOX *b2) {
function l_float32 (line 227) | l_float32 ComputePairNormalizedBaselineDistance(BOX *b1, BOX *b2) {
function l_float32 (line 234) | l_float32 ComputePairNormalizedToplineDistance(BOX *b1, BOX *b2) {
function l_float32 (line 241) | l_float32 ComputePairNormalizedHorizontalDistance(BOX *b1, BOX *b2) {
function l_float32 (line 248) | l_float32 ComputePairAreaRatio(BOX *b1, BOX *b2) {
function l_float32 (line 256) | l_float32 ComputePairWidthRatio(BOX *b1, BOX *b2) {
function l_float32 (line 262) | l_float32 ComputePairHeightRatio(BOX *b1, BOX *b2) {
function l_float32 (line 268) | l_float32 ComputePairContainmentCheck(BOX *b1, BOX *b2) {
function l_float32 (line 279) | l_float32 ComputePairConfidence(BOX *b1, BOX *b2) {
function ValidateClusterPair (line 313) | bool ValidateClusterPair(BOX *b1, BOX *b2, bool *too_far, l_float32 *pconf,
function ValidateCluster (line 352) | bool ValidateCluster(PIX *pix8, PIXA *pixa, BOX *box, l_float32 *pconf,
FILE: eyes-two/src/main/jni/imageutils/blur-jni.cpp
function JNIEXPORT (line 39) | JNIEXPORT jboolean JNICALL
FILE: eyes-two/src/main/jni/imageutils/blur.cpp
function Haar1DX (line 58) | inline void Haar1DX(int* matrix, int matrix_height, int matrix_width,
function Haar1DY (line 83) | inline void Haar1DY(int* matrix, int matrix_height, int matrix_width,
function Haar2D (line 115) | void Haar2D(int* matrix, int matrix_height, int matrix_width,
function HwtFirstRound (line 133) | void HwtFirstRound(const uint8* const data, int height, int width,
function ComputeEdgePointWeight (line 176) | int ComputeEdgePointWeight(int* matrix, int width, int height,
function ComputeLocalMaximum (line 199) | int ComputeLocalMaximum(int* matrix, int width, int height,
function DetectBlur (line 239) | int DetectBlur(int* matrix, int width, int height,
function IsBlurredInner (line 314) | int IsBlurredInner(const uint8* const luminance,
function IsBlurred (line 333) | int IsBlurred(const uint8* const luminance,
FILE: eyes-two/src/main/jni/imageutils/similar-jni.cpp
function JNIEXPORT (line 43) | JNIEXPORT jintArray JNICALL
function JNIEXPORT (line 72) | JNIEXPORT jint JNICALL
FILE: eyes-two/src/main/jni/imageutils/similar.cpp
function Diff (line 138) | int Diff(const int32* const signature1, const int32* const signature2,
FILE: eyes-two/src/main/jni/opticalflow/feature_detector.cpp
type flow (line 56) | namespace flow {
function scoreFeatures (line 58) | void scoreFeatures(const Image<int32>& I_x, const Image<int32>& I_y,
function int32 (line 70) | int32 sortAndSelect(const int32 num_candidates, const int32 max_features,
function int32 (line 132) | inline int32 testCircle(const int32 circle_perimeter, const int32 thre...
function int32 (line 205) | int32 seedFeatures(const Image<uint8>& frame,
function float32 (line 236) | float32 harrisFilter(const Image<int32>& I_x, const Image<int32>& I_y,
function int32 (line 266) | int32 findFastFeatures(const Image<uint8>& frame, const int32 max_num_...
FILE: eyes-two/src/main/jni/opticalflow/feature_detector.h
function namespace (line 7) | namespace flow {
FILE: eyes-two/src/main/jni/opticalflow/image.h
function namespace (line 32) | namespace flow {
function float32 (line 85) | inline float32 getPixelInterp(const float32 x, const float32 y) const {
function validPixel (line 150) | inline bool validPixel(const int32 x, const int32 y) const {
function validInterpPixel (line 158) | inline bool validInterpPixel(const float32 x, const float32 y) const {
function T (line 166) | inline T getPixelClipped(const int32 x, const int32 y) const {
function T (line 172) | inline const T* getPixelPtrConst(const int32 x, const int32 y) const {
function T (line 178) | inline T* getPixelPtr(const int32 x, const int32 y) const {
function T (line 184) | inline const T getPixel(const int32 x, const int32 y) const {
function setPixel (line 190) | inline void setPixel(const int32 x, const int32 y, const T& val) {
function clear (line 196) | inline void clear(const T& val) {
function downsample32ColumnsNeon (line 203) | inline void downsample32ColumnsNeon(const uint8* const original,
function downsampleAveragedNeon (line 265) | void downsampleAveragedNeon(const uint8* const original,
function downsampleAveraged (line 284) | void downsampleAveraged(const T* const original, const int32 stride,
function downsampleAveraged (line 326) | void downsampleAveraged(const Image<T>& original, const int32 factor) {
function downsampleSmoothed3x3 (line 332) | void downsampleSmoothed3x3(const Image<T>& original) {
function downsampleSmoothed5x5 (line 369) | void downsampleSmoothed5x5(const Image<T>& original) {
function T (line 417) | T scharrPixelX(const Image<U>& original,
function T (line 438) | T scharrPixelY(const Image<U>& original,
function scharrX (line 457) | void scharrX(const Image<U>& original) {
function scharrY (line 468) | void scharrY(const Image<U>& original) {
function T (line 476) | static inline T halfDiff(int32 first, int32 second) {
function T (line 522) | T convolvePixel3x3(const Image<U>& original,
function convolve3x3 (line 540) | void convolve3x3(const Image<U>& original,
function fromArray (line 555) | inline void fromArray(const T* const pixels, const int32 stride,
function toArray (line 567) | inline void toArray(T* const pixels) const {
function computeSmoothedPyramid (line 596) | inline void computeSmoothedPyramid(const Image<uint8>& frame,
function computeSpatialPyramid (line 613) | inline void computeSpatialPyramid(const Image<uint8>** const pyramid,
function markImage (line 631) | static bool markImage(const int32 x, const int32 y,
function calculateG (line 671) | inline void calculateG(const float32* const vals_x, const float32* const...
function calculateG (line 744) | inline void calculateG(const int window_size,
FILE: eyes-two/src/main/jni/opticalflow/optical_flow-jni.cpp
function JNIEXPORT (line 119) | JNIEXPORT
function JNIEXPORT (line 136) | JNIEXPORT
function JNIEXPORT (line 163) | JNIEXPORT
function JNIEXPORT (line 176) | JNIEXPORT
function JNIEXPORT (line 188) | JNIEXPORT
function JNIEXPORT (line 201) | JNIEXPORT
function JNIEXPORT (line 216) | JNIEXPORT
function JNIEXPORT (line 243) | JNIEXPORT
function JNIEXPORT (line 265) | JNIEXPORT
FILE: eyes-two/src/main/jni/opticalflow/optical_flow.cpp
type flow (line 31) | namespace flow {
function int32 (line 178) | int32 OpticalFlow::copyFeatures(const FramePair& prev_change,
function int32 (line 231) | int32 OpticalFlow::getFeatures(const bool only_found,
function Point2D (line 470) | Point2D OpticalFlow::getAccumulatedDelta(const Point2D& position,
function Point2D (line 544) | Point2D FramePair::queryFlow(
function Point2D (line 586) | Point2D FramePair::getWeightedDelta(const float32* const weights) const {
FILE: eyes-two/src/main/jni/opticalflow/optical_flow.h
function namespace (line 52) | namespace flow {
function class (line 112) | class FramePair {
function class (line 171) | class OpticalFlow {
FILE: eyes-two/src/main/jni/opticalflow/optical_flow_utils.h
function namespace (line 10) | namespace flow {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/AdaptiveMapTest.java
class AdaptiveMapTest (line 21) | public class AdaptiveMapTest extends TestCase {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/BinarizeTest.java
class BinarizeTest (line 21) | public class BinarizeTest extends TestCase {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/BoxTest.java
class BoxTest (line 24) | public class BoxTest extends TestCase {
method testBoxCreate (line 25) | @SmallTest
method testBoxCreate (line 31) | private void testBoxCreate(int x, int y, int w, int h) {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/BoxaTest.java
class BoxaTest (line 21) | public class BoxaTest extends TestCase {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/ClipTest.java
class ClipTest (line 25) | public class ClipTest extends TestCase {
method testClipRectangle (line 26) | @SmallTest
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/ConvertTest.java
class ConvertTest (line 27) | public class ConvertTest extends TestCase {
method testConvertTo8 (line 28) | @SmallTest
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/EdgeTest.java
class EdgeTest (line 21) | public class EdgeTest extends TestCase {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/EnhanceTest.java
class EnhanceTest (line 21) | public class EnhanceTest extends TestCase {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/GrayQuantTest.java
class GrayQuantTest (line 21) | public class GrayQuantTest extends TestCase {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/JpegIOTest.java
class JpegIOTest (line 29) | public class JpegIOTest extends TestCase {
method testCompressToJpeg (line 30) | @SmallTest
method testCompressToJpeg (line 36) | private void testCompressToJpeg(int width, int height, int quality, bo...
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/PixTest.java
class PixTest (line 32) | public class PixTest extends TestCase {
method testGetData (line 33) | @SmallTest
method testGetDimensions (line 48) | @SmallTest
method testPixClone (line 65) | @SmallTest
method testPixCreate (line 82) | @SmallTest
method testPixCreate (line 88) | private void testPixCreate(int w, int h, int d) {
method testPixPixelOps (line 100) | @SmallTest
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/PixaTest.java
class PixaTest (line 28) | public class PixaTest extends TestCase {
method testPixaCreate (line 29) | @SmallTest
method internalTestPixaCreate (line 37) | private void internalTestPixaCreate(int initialCapacity, int width, in...
method testPixaCopy (line 57) | @SmallTest
method internalTestPixaCopy (line 65) | private void internalTestPixaCopy(int initialCapacity, int width, int ...
method testPixaSort (line 88) | @SmallTest
method testPixaJoin (line 117) | @SmallTest
method internalTestPixaJoin (line 125) | private void internalTestPixaJoin(int sizeA, int sizeB) {
method testPixaReplacePix (line 149) | @SmallTest
method testPixaMergeAndReplacePix (line 180) | @SmallTest
method addBlockToPixa (line 221) | private static void addBlockToPixa(Pixa pixa, int x, int y, int width,...
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/ReadFileTest.java
class ReadFileTest (line 35) | public class ReadFileTest extends TestCase {
method testReadBitmap_1x1 (line 39) | @SmallTest
method testReadBitmap_100x100 (line 44) | @SmallTest
method testReadBitmap_640x480 (line 49) | @SmallTest
method testReadBitmap (line 54) | private void testReadBitmap(int width, int height, Bitmap.Config forma...
method testReadFile_bmp (line 68) | @SmallTest
method testReadFile_jpg (line 90) | @SmallTest
method testReadFile_png (line 112) | @SmallTest
method testReadMem_jpg (line 134) | @SmallTest
method testReadMem_png (line 158) | @SmallTest
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/RotateTest.java
class RotateTest (line 33) | public class RotateTest extends TestCase {
method testRotate (line 34) | @SmallTest
method testRotateOrth (line 64) | @SmallTest
method testRotateResize (line 94) | @SmallTest
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/ScaleTest.java
class ScaleTest (line 28) | public class ScaleTest extends TestCase {
method testScale (line 29) | @SmallTest
method testScaleGeneral (line 35) | @SmallTest
method testScale (line 41) | private void testScale(int inputWidth, int inputHeight, float scaleX, ...
method testScaleGeneral (line 54) | private void testScaleGeneral(int inputWidth, int inputHeight, float s...
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/SkewTest.java
class SkewTest (line 34) | public class SkewTest extends TestCase {
method testFindSkew (line 38) | @SmallTest
method testFindSkew (line 45) | private void testFindSkew(String text, int width, int height, float sk...
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/TestUtils.java
class TestUtils (line 34) | @SuppressWarnings("WeakerAccess")
method compareBitmaps (line 36) | public static float compareBitmaps(Bitmap a, Bitmap b) {
method compareImages (line 50) | public static float compareImages(Pix a, Bitmap b) {
method comparePix (line 75) | public static float comparePix(Pix a, Pix b) {
method createTestBitmap (line 100) | public static Bitmap createTestBitmap(int width, int height, Bitmap.Co...
method createTestPix (line 119) | public static Pix createTestPix(int width, int height) {
FILE: tess-two-test/src/com/googlecode/leptonica/android/test/WriteFileTest.java
class WriteFileTest (line 30) | public class WriteFileTest extends TestCase {
method testWriteBitmap_1x1 (line 31) | @SmallTest
method testWriteBitmap_100x100 (line 36) | @SmallTest
method testWriteBitmap_640x480 (line 41) | @SmallTest
method testWriteBitmap (line 46) | private void testWriteBitmap(int width, int height) {
method testWriteBytes8_1x1 (line 62) | @SmallTest
method testWriteBytes8_100x100 (line 67) | @SmallTest
method testWriteBytes8_640x480 (line 72) | @SmallTest
method testWriteBytes8 (line 77) | private static void testWriteBytes8(int width, int height) {
method testWriteImpliedFormat_bmp (line 92) | @SmallTest
method testWriteImpliedFormat_jpg (line 100) | @SmallTest
method testWriteImpliedFormat_png (line 108) | @SmallTest
method testWriteImpliedFormat (line 116) | private void testWriteImpliedFormat(Pix pixs, File file) {
FILE: tess-two-test/src/com/googlecode/tesseract/android/test/TessBaseAPITest.java
class TessBaseAPITest (line 55) | public class TessBaseAPITest extends TestCase {
method setUp (line 77) | protected void setUp() throws Exception {
method checkCubeData (line 91) | private void checkCubeData() {
method testChoiceIterator (line 101) | @SmallTest
method getTextImage (line 143) | private static Bitmap getTextImage(String text, int width, int height) {
method drawTextNewLines (line 162) | private static void drawTextNewLines(String text, Canvas canvas){
method testClear (line 188) | @SmallTest
method testEnd (line 212) | @SmallTest
method testGetHOCRText_tesseract (line 263) | @SmallTest
method testGetHOCRText (line 268) | private void testGetHOCRText(String language, int ocrEngineMode) {
method testGetInitLanguagesAsString (line 293) | @SmallTest
method testGetThresholdedImage (line 308) | @SmallTest
method testGetUTF8Text_tesseract (line 345) | @SmallTest
method testGetUTF8Text (line 350) | private void testGetUTF8Text(String language, int ocrEngineMode) {
method testInit (line 422) | @SmallTest
method testInit_ocrEngineMode (line 433) | @SmallTest
method testProgressValues (line 446) | @SmallTest
method testProgressValues_setRectangle (line 481) | @SmallTest
method testProgressValues (line 553) | private static void testProgressValues(ProgressValues progress, Rect b...
method testSetImage_bitmap (line 581) | @SmallTest
method testSetImage_file (line 597) | @SmallTest
method testSetImage_pix (line 619) | @SmallTest
method testSetPageSegMode (line 635) | @SmallTest
method testSetRectangle (line 656) | @SmallTest
method testSetVariable (line 705) | @SmallTest
method testStop (line 729) | @SmallTest
method testWordConfidences (line 780) | @SmallTest
method testGetVersion (line 816) | @SmallTest
FILE: tess-two-test/src/com/googlecode/tesseract/android/test/TessPdfRendererTest.java
class TessPdfRendererTest (line 44) | public class TessPdfRendererTest extends TestCase {
method testCreate (line 53) | @SmallTest
method testAddPageToDocument (line 71) | @SmallTest
method getTextImage (line 120) | private static Pix getTextImage(String text, int width, int height) {
FILE: tess-two/jni/com_googlecode_leptonica_android/box.cpp
function jlong (line 23) | jlong Java_com_googlecode_leptonica_android_Box_nativeCreate(JNIEnv *env...
function Java_com_googlecode_leptonica_android_Box_nativeDestroy (line 30) | void Java_com_googlecode_leptonica_android_Box_nativeDestroy(JNIEnv *env...
function jint (line 37) | jint Java_com_googlecode_leptonica_android_Box_nativeGetX(JNIEnv *env, j...
function jint (line 43) | jint Java_com_googlecode_leptonica_android_Box_nativeGetY(JNIEnv *env, j...
function jint (line 49) | jint Java_com_googlecode_leptonica_android_Box_nativeGetWidth(JNIEnv *en...
function jint (line 56) | jint Java_com_googlecode_leptonica_android_Box_nativeGetHeight(JNIEnv *e...
function jboolean (line 63) | jboolean Java_com_googlecode_leptonica_android_Box_nativeGetGeometry(JNI...
FILE: tess-two/jni/com_googlecode_leptonica_android/boxa.cpp
function Java_com_googlecode_leptonica_android_Boxa_nativeDestroy (line 23) | void Java_com_googlecode_leptonica_android_Boxa_nativeDestroy(JNIEnv *en...
function jboolean (line 29) | jboolean Java_com_googlecode_leptonica_android_Boxa_nativeGetGeometry(JN...
FILE: tess-two/jni/com_googlecode_leptonica_android/jni.cpp
function jint (line 19) | jint JNI_OnLoad(JavaVM* vm, void* reserved) {
FILE: tess-two/jni/com_googlecode_leptonica_android/pix.cpp
function jlong (line 24) | jlong Java_com_googlecode_leptonica_android_Pix_nativeCreatePix(JNIEnv *...
function jlong (line 31) | jlong Java_com_googlecode_leptonica_android_Pix_nativeCreateFromData(JNI...
function jbyteArray (line 47) | jbyteArray Java_com_googlecode_leptonica_android_Pix_nativeGetData(JNIEn...
function jlong (line 63) | jlong Java_com_googlecode_leptonica_android_Pix_nativeClone(JNIEnv *env,...
function jlong (line 71) | jlong Java_com_googlecode_leptonica_android_Pix_nativeCopy(JNIEnv *env, ...
function jboolean (line 78) | jboolean Java_com_googlecode_leptonica_android_Pix_nativeInvert(JNIEnv *...
function Java_com_googlecode_leptonica_android_Pix_nativeDestroy (line 89) | void Java_com_googlecode_leptonica_android_Pix_nativeDestroy(JNIEnv *env...
function jboolean (line 96) | jboolean Java_com_googlecode_leptonica_android_Pix_nativeGetDimensions(J...
function jint (line 116) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetWidth(JNIEnv *en...
function jint (line 123) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetRefCount(JNIEnv ...
function jint (line 129) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetHeight(JNIEnv *e...
function jint (line 136) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetDepth(JNIEnv *en...
function Java_com_googlecode_leptonica_android_Pix_nativeSetPixel (line 143) | void Java_com_googlecode_leptonica_android_Pix_nativeSetPixel(JNIEnv *en...
function jint (line 193) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetPixel(JNIEnv *en...
function jint (line 249) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetSpp(JNIEnv *env,...
function jint (line 255) | jint Java_com_googlecode_leptonica_android_Pix_nativeGetInputFormat(JNIE...
FILE: tess-two/jni/com_googlecode_leptonica_android/pixa.cpp
function jlong (line 23) | jlong Java_com_googlecode_leptonica_android_Pixa_nativeCreate(JNIEnv *en...
function jlong (line 29) | jlong Java_com_googlecode_leptonica_android_Pixa_nativeCopy(JNIEnv *env,...
function jlong (line 37) | jlong Java_com_googlecode_leptonica_android_Pixa_nativeSort(JNIEnv *env,...
function Java_com_googlecode_leptonica_android_Pixa_nativeDestroy (line 45) | void Java_com_googlecode_leptonica_android_Pixa_nativeDestroy(JNIEnv *en...
function jboolean (line 52) | jboolean Java_com_googlecode_leptonica_android_Pixa_nativeJoin(JNIEnv *e...
function jint (line 64) | jint Java_com_googlecode_leptonica_android_Pixa_nativeGetCount(JNIEnv *e...
function Java_com_googlecode_leptonica_android_Pixa_nativeAddPix (line 71) | void Java_com_googlecode_leptonica_android_Pixa_nativeAddPix(JNIEnv *env...
function Java_com_googlecode_leptonica_android_Pixa_nativeAddBox (line 80) | void Java_com_googlecode_leptonica_android_Pixa_nativeAddBox(JNIEnv *env...
function Java_com_googlecode_leptonica_android_Pixa_nativeAdd (line 89) | void Java_com_googlecode_leptonica_android_Pixa_nativeAdd(JNIEnv *env, j...
function Java_com_googlecode_leptonica_android_Pixa_nativeReplacePix (line 100) | void Java_com_googlecode_leptonica_android_Pixa_nativeReplacePix(JNIEnv ...
function Java_com_googlecode_leptonica_android_Pixa_nativeMergeAndReplacePix (line 110) | void Java_com_googlecode_leptonica_android_Pixa_nativeMergeAndReplacePix...
function jboolean (line 148) | jboolean Java_com_googlecode_leptonica_android_Pixa_nativeWriteToFileRan...
function jlong (line 177) | jlong Java_com_googlecode_leptonica_android_Pixa_nativeGetPix(JNIEnv *en...
function jlong (line 185) | jlong Java_com_googlecode_leptonica_android_Pixa_nativeGetBox(JNIEnv *en...
function jboolean (line 193) | jboolean Java_com_googlecode_leptonica_android_Pixa_nativeGetBoxGeometry...
FILE: tess-two/jni/com_googlecode_leptonica_android/readfile.cpp
function jlong (line 34) | jlong Java_com_googlecode_leptonica_android_ReadFile_nativeReadMem(JNIEn...
function jlong (line 46) | jlong Java_com_googlecode_leptonica_android_ReadFile_nativeReadBytes8(JN...
function jboolean (line 70) | jboolean Java_com_googlecode_leptonica_android_ReadFile_nativeReplaceByt...
function jlong (line 100) | jlong Java_com_googlecode_leptonica_android_ReadFile_nativeReadFiles(JNI...
function jlong (line 124) | jlong Java_com_googlecode_leptonica_android_ReadFile_nativeReadFile(JNIE...
function jlong (line 141) | jlong Java_com_googlecode_leptonica_android_ReadFile_nativeReadBitmap(JN...
FILE: tess-two/jni/com_googlecode_leptonica_android/utilities.cpp
function jlong (line 30) | jlong Java_com_googlecode_leptonica_android_AdaptiveMap_nativeBackground...
function jlong (line 45) | jlong Java_com_googlecode_leptonica_android_AdaptiveMap_nativePixContras...
function jlong (line 65) | jlong Java_com_googlecode_leptonica_android_Binarize_nativeOtsuAdaptiveT...
function jlong (line 85) | jlong Java_com_googlecode_leptonica_android_Binarize_nativeSauvolaBinari...
function jlong (line 108) | jlong Java_com_googlecode_leptonica_android_Clip_nativeClipRectangle(JNI...
function jlong (line 122) | jlong Java_com_googlecode_leptonica_android_Convert_nativeConvertTo8(JNI...
function jlong (line 134) | jlong Java_com_googlecode_leptonica_android_Edge_nativePixSobelEdgeFilte...
function jlong (line 148) | jlong Java_com_googlecode_leptonica_android_Enhance_nativeUnsharpMasking...
function jlong (line 162) | jlong Java_com_googlecode_leptonica_android_GrayQuant_nativePixThreshold...
function jbyteArray (line 174) | jbyteArray Java_com_googlecode_leptonica_android_JpegIO_nativeCompressTo...
function jlong (line 203) | jlong Java_com_googlecode_leptonica_android_MorphApp_nativePixTophat(JNI...
function jlong (line 212) | jlong Java_com_googlecode_leptonica_android_MorphApp_nativePixFastTophat...
function jlong (line 225) | jlong Java_com_googlecode_leptonica_android_Scale_nativeScaleGeneral(JNI...
function jlong (line 232) | jlong Java_com_googlecode_leptonica_android_Scale_nativeScale(JNIEnv *en...
function jfloat (line 245) | jfloat Java_com_googlecode_leptonica_android_Skew_nativeFindSkew(JNIEnv ...
function jlong (line 272) | jlong Java_com_googlecode_leptonica_android_Rotate_nativeRotate(JNIEnv *...
function jlong (line 296) | jlong Java_com_googlecode_leptonica_android_Rotate_nativeRotateOrth(JNIE...
FILE: tess-two/jni/com_googlecode_leptonica_android/writefile.cpp
function jint (line 30) | jint Java_com_googlecode_leptonica_android_WriteFile_nativeWriteBytes8(J...
function jboolean (line 51) | jboolean Java_com_googlecode_leptonica_android_WriteFile_nativeWriteImpl...
function jboolean (line 75) | jboolean Java_com_googlecode_leptonica_android_WriteFile_nativeWriteBitm...
FILE: tess-two/jni/com_googlecode_tesseract_android/debugpixa.h
function namespace (line 8) | namespace tesseract {
FILE: tess-two/jni/com_googlecode_tesseract_android/pageiterator.cpp
function Java_com_googlecode_tesseract_android_PageIterator_nativeBegin (line 31) | void Java_com_googlecode_tesseract_android_PageIterator_nativeBegin(JNIE...
function jboolean (line 36) | jboolean Java_com_googlecode_tesseract_android_PageIterator_nativeNext(J...
function jintArray (line 44) | jintArray Java_com_googlecode_tesseract_android_PageIterator_nativeBound...
FILE: tess-two/jni/com_googlecode_tesseract_android/resultiterator.cpp
function jstring (line 30) | jstring Java_com_googlecode_tesseract_android_ResultIterator_nativeGetUT...
function jfloat (line 43) | jfloat Java_com_googlecode_tesseract_android_ResultIterator_nativeConfid...
function jobjectArray (line 51) | jobjectArray Java_com_googlecode_tesseract_android_ResultIterator_native...
function jboolean (line 87) | jboolean Java_com_googlecode_tesseract_android_ResultIterator_nativeIsAt...
function jboolean (line 95) | jboolean Java_com_googlecode_tesseract_android_ResultIterator_nativeIsAt...
function Java_com_googlecode_tesseract_android_ResultIterator_nativeDelete (line 104) | void Java_com_googlecode_tesseract_android_ResultIterator_nativeDelete(J...
FILE: tess-two/jni/com_googlecode_tesseract_android/tessbaseapi.cpp
type native_data_t (line 29) | struct native_data_t {
method isStateValid (line 42) | bool isStateValid() {
method setTextBoundaries (line 51) | void setTextBoundaries(l_uint32 x, l_uint32 y, l_uint32 width, l_uint3...
method initStateVariables (line 55) | void initStateVariables(JNIEnv* env, jobject *object) {
method resetStateVariables (line 62) | void resetStateVariables() {
method native_data_t (line 70) | native_data_t() {
function cancelFunc (line 89) | bool cancelFunc(void* cancel_this, int words) {
function progressJavaCallback (line 97) | bool progressJavaCallback(ETEXT_DESC* monitor, int left, int right, int ...
function jint (line 117) | jint JNI_OnLoad(JavaVM* vm, void* reserved) {
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit (line 128) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit(J...
function jlong (line 134) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeConstruct(...
function jboolean (line 147) | jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInit(JN...
function jboolean (line 173) | jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInitOem...
function jstring (line 200) | jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetInitL...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImageBytes (line 215) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImageByt...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImagePix (line 250) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImagePix...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetRectangle (line 277) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetRectangl...
function jstring (line 292) | jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetUTF8T...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeStop (line 309) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeStop(JNIEnv...
function jint (line 320) | jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeMeanConfide...
function jintArray (line 329) | jintArray Java_com_googlecode_tesseract_android_TessBaseAPI_nativeWordCo...
function jboolean (line 359) | jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetVari...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClear (line 378) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClear(JNIEn...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeEnd (line 400) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeEnd(JNIEnv ...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetDebug (line 419) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetDebug(JN...
function jint (line 429) | jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetPageSegM...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetPageSegMode (line 438) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetPageSegM...
function jlong (line 448) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetThresho...
function jlong (line 459) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetRegions...
function jlong (line 474) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetTextlin...
function jlong (line 489) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetStrips(...
function jlong (line 504) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetWords(J...
function jlong (line 519) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetConnect...
function jlong (line 533) | jlong Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetResultI...
function jstring (line 541) | jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetHOCRT...
function jstring (line 564) | jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetBoxTe...
function jstring (line 580) | jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetVersi...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetInputName (line 590) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetInputNam...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetOutputName (line 600) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetOutputNa...
function Java_com_googlecode_tesseract_android_TessBaseAPI_nativeReadConfigFile (line 610) | void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeReadConfigF...
function jlong (line 620) | jlong Java_com_googlecode_tesseract_android_TessPdfRenderer_nativeCreate...
function Java_com_googlecode_tesseract_android_TessPdfRenderer_nativeRecycle (line 634) | void Java_com_googlecode_tesseract_android_TessPdfRenderer_nativeRecycle...
function jboolean (line 641) | jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeBeginDo...
function jboolean (line 656) | jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeEndDocu...
function jboolean (line 664) | jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeAddPage...
FILE: tess-two/jni/libjpeg/cdjpeg.c
function signal_catcher (line 34) | void /* must be global for Manx C */
function enable_signal_catcher (line 46) | GLOBAL(void)
function progress_monitor (line 67) | METHODDEF(void)
function start_progress_monitor (line 88) | GLOBAL(void)
function end_progress_monitor (line 102) | GLOBAL(void)
function keymatch (line 121) | GLOBAL(boolean)
function read_stdin (line 148) | GLOBAL(FILE *)
function write_stdout (line 166) | GLOBAL(FILE *)
FILE: tess-two/jni/libjpeg/cdjpeg.h
type cjpeg_source_struct (line 24) | struct cjpeg_source_struct
type cjpeg_source_struct (line 26) | struct cjpeg_source_struct {
type djpeg_dest_struct (line 45) | struct djpeg_dest_struct
type djpeg_dest_struct (line 47) | struct djpeg_dest_struct {
type cdjpeg_progress_mgr (line 81) | struct cdjpeg_progress_mgr {
type cdjpeg_progress_mgr (line 89) | struct cdjpeg_progress_mgr
FILE: tess-two/jni/libjpeg/cjpeg.c
function select_file_type (line 80) | LOCAL(cjpeg_source_ptr)
function usage (line 141) | LOCAL(void)
function parse_switches (line 211) | LOCAL(int)
function main (line 518) | int
FILE: tess-two/jni/libjpeg/ckconfig.c
type my_size_t (line 90) | typedef size_t my_size_t;
type methods_struct (line 105) | struct methods_struct { /* check method-pointer declarations */
function testfunction (line 111) | int testfunction (int arg1, int * arg2) /* check definitions */
function test2function (line 116) | int test2function (void) /* check void arg list */
function test3function (line 165) | void test3function (arg1, arg2)
function test4function (line 189) | int test4function (arg1)
type undefined_structure (line 205) | struct undefined_structure
function possibly_duplicate_function (line 217) | int possibly_duplicate_function ()
function possibly_dupli_function (line 222) | int possibly_dupli_function ()
function is_char_signed (line 245) | int is_char_signed (arg)
function is_shifting_signed (line 263) | int is_shifting_signed (arg)
function main (line 288) | int main (argc, argv)
FILE: tess-two/jni/libjpeg/djpeg.c
type IMAGE_FORMATS (line 60) | typedef enum {
function usage (line 90) | LOCAL(void)
function parse_switches (line 163) | LOCAL(int)
function jpeg_getc (line 359) | LOCAL(unsigned int)
function print_text_marker (line 374) | METHODDEF(boolean)
function main (line 429) | int
FILE: tess-two/jni/libjpeg/example.c
function write_JPEG_file (line 71) | GLOBAL(void)
type my_error_mgr (line 250) | struct my_error_mgr {
type my_error_mgr (line 256) | struct my_error_mgr
function my_error_exit (line 262) | METHODDEF(void)
function read_JPEG_file (line 283) | GLOBAL(int)
FILE: tess-two/jni/libjpeg/jcapimin.c
function jpeg_CreateCompress (line 30) | GLOBAL(void)
function jpeg_destroy_compress (line 95) | GLOBAL(void)
function jpeg_abort_compress (line 107) | GLOBAL(void)
function jpeg_suppress_tables (line 126) | GLOBAL(void)
function jpeg_finish_compress (line 154) | GLOBAL(void)
function jpeg_write_marker (line 199) | GLOBAL(void)
function jpeg_write_m_header (line 221) | GLOBAL(void)
function jpeg_write_m_byte (line 233) | GLOBAL(void)
function jpeg_write_tables (line 261) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcapistd.c
function jpeg_start_compress (line 38) | GLOBAL(void)
function jpeg_write_scanlines (line 77) | GLOBAL(JDIMENSION)
function jpeg_write_raw_data (line 120) | GLOBAL(JDIMENSION)
FILE: tess-two/jni/libjpeg/jcarith.c
type arith_entropy_encoder (line 23) | typedef struct {
type arith_entropy_encoder (line 48) | typedef arith_entropy_encoder * arith_entropy_ptr;
function emit_byte (line 115) | LOCAL(void)
function finish_pass (line 132) | METHODDEF(void)
function arith_encode (line 218) | LOCAL(void)
function emit_restart (line 318) | LOCAL(void)
function encode_mcu_DC_first (line 361) | METHODDEF(boolean)
function encode_mcu_AC_first (line 450) | METHODDEF(boolean)
function encode_mcu_DC_refine (line 557) | METHODDEF(boolean)
function encode_mcu_AC_refine (line 592) | METHODDEF(boolean)
function encode_mcu (line 691) | METHODDEF(boolean)
function start_pass (line 840) | METHODDEF(void)
function jinit_arith_encoder (line 923) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jccoefct.c
type my_coef_controller (line 35) | typedef struct {
type my_coef_controller (line 58) | typedef my_coef_controller * my_coef_ptr;
function start_iMCU_row (line 72) | LOCAL(void)
function start_pass_coef (line 100) | METHODDEF(void)
function compress_data (line 143) | METHODDEF(boolean)
function compress_first_pass (line 248) | METHODDEF(boolean)
function compress_output (line 345) | METHODDEF(boolean)
function jinit_c_coef_controller (line 409) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jccolor.c
type my_color_converter (line 19) | typedef struct {
type my_color_converter (line 26) | typedef my_color_converter * my_cconvert_ptr;
function rgb_ycc_start (line 98) | METHODDEF(void)
function rgb_ycc_convert (line 142) | METHODDEF(void)
function rgb_gray_convert (line 198) | METHODDEF(void)
function cmyk_ycck_convert (line 236) | METHODDEF(void)
function rgb_rgb1_convert (line 294) | METHODDEF(void)
function grayscale_convert (line 333) | METHODDEF(void)
function rgb_convert (line 361) | METHODDEF(void)
function null_convert (line 394) | METHODDEF(void)
function null_method (line 426) | METHODDEF(void)
function jinit_color_converter (line 437) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcdctmgr.c
type my_fdct_controller (line 23) | typedef struct {
type my_fdct_controller (line 35) | typedef my_fdct_controller * my_fdct_ptr;
type divisor_table (line 45) | typedef union {
function forward_DCT (line 73) | METHODDEF(void)
function forward_DCT_float (line 136) | METHODDEF(void)
function start_pass_fdctmgr (line 188) | METHODDEF(void)
function jinit_forward_dct (line 457) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jchuff.c
type c_derived_tbl (line 42) | typedef struct {
type savable_state (line 55) | typedef struct {
type huff_entropy_encoder (line 81) | typedef struct {
type huff_entropy_encoder (line 117) | typedef huff_entropy_encoder * huff_entropy_ptr;
type working_state (line 123) | typedef struct {
function jpeg_make_c_derived_tbl (line 160) | LOCAL(void)
function dump_buffer_s (line 268) | LOCAL(boolean)
function dump_buffer_e (line 283) | LOCAL(void)
function INLINE (line 305) | INLINE
function INLINE (line 347) | INLINE
function flush_bits_s (line 390) | LOCAL(boolean)
function flush_bits_e (line 401) | LOCAL(void)
function INLINE (line 414) | INLINE
function INLINE (line 427) | INLINE
function emit_buffered_bits (line 444) | LOCAL(void)
function emit_eobrun (line 463) | LOCAL(void)
function emit_restart_s (line 494) | LOCAL(boolean)
function emit_restart_e (line 515) | LOCAL(void)
function encode_mcu_DC_first (line 545) | METHODDEF(boolean)
function encode_mcu_AC_first (line 628) | METHODDEF(boolean)
function encode_mcu_DC_refine (line 739) | METHODDEF(boolean)
function encode_mcu_AC_refine (line 782) | METHODDEF(boolean)
function encode_one_block (line 912) | LOCAL(boolean)
function encode_mcu_huff (line 1012) | METHODDEF(boolean)
function finish_pass_huff (line 1069) | METHODDEF(void)
function htest_one_block (line 1118) | LOCAL(void)
function encode_mcu_gather (line 1193) | METHODDEF(boolean)
function jpeg_gen_optimal_table (line 1252) | LOCAL(void)
function finish_pass_gather (line 1393) | METHODDEF(void)
function start_pass_huff (line 1447) | METHODDEF(void)
function jinit_huff_encoder (line 1553) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcinit.c
function jinit_compress_master (line 30) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcmainct.c
type my_main_controller (line 29) | typedef struct {
type my_main_controller (line 51) | typedef my_main_controller * my_main_ptr;
function start_pass_main (line 69) | METHODDEF(void)
function process_data_simple_main (line 113) | METHODDEF(void)
function process_data_buffer_main (line 169) | METHODDEF(void)
function jinit_c_main_controller (line 247) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcmarker.c
type JPEG_MARKER (line 17) | typedef enum { /* JPEG marker codes */
type my_marker_writer (line 88) | typedef struct {
type my_marker_writer (line 94) | typedef my_marker_writer * my_marker_ptr;
function emit_byte (line 109) | LOCAL(void)
function emit_marker (line 123) | LOCAL(void)
function emit_2bytes (line 132) | LOCAL(void)
function emit_dqt (line 145) | LOCAL(int)
function emit_dht (line 186) | LOCAL(void)
function emit_dac (line 224) | LOCAL(void)
function emit_dri (line 273) | LOCAL(void)
function emit_lse_ict (line 285) | LOCAL(void)
function emit_sof (line 316) | LOCAL(void)
function emit_sos (line 347) | LOCAL(void)
function emit_pseudo_sos (line 382) | LOCAL(void)
function emit_jfif_app0 (line 398) | LOCAL(void)
function emit_adobe_app14 (line 433) | LOCAL(void)
function write_marker_header (line 487) | METHODDEF(void)
function write_marker_byte (line 499) | METHODDEF(void)
function write_file_header (line 518) | METHODDEF(void)
function write_frame_header (line 544) | METHODDEF(void)
function write_scan_header (line 612) | METHODDEF(void)
function write_file_trailer (line 656) | METHODDEF(void)
function write_tables_only (line 670) | METHODDEF(void)
function jinit_marker_writer (line 699) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcmaster.c
type c_pass_type (line 22) | typedef enum {
type my_comp_master (line 28) | typedef struct {
type my_comp_master (line 39) | typedef my_comp_master * my_master_ptr;
function jpeg_calc_jpeg_dimensions (line 52) | GLOBAL(void)
function jpeg_calc_trans_dimensions (line 208) | LOCAL(void)
function initial_setup (line 219) | LOCAL(void)
function validate_script (line 351) | LOCAL(void)
function reduce_script (line 486) | LOCAL(void)
function select_scan_parameters (line 521) | LOCAL(void)
function per_scan_setup (line 565) | LOCAL(void)
function prepare_for_pass (line 658) | METHODDEF(void)
function pass_startup (line 746) | METHODDEF(void)
function finish_pass_master (line 760) | METHODDEF(void)
function jinit_c_master_control (line 800) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcomapi.c
function jpeg_abort (line 28) | GLOBAL(void)
function jpeg_destroy (line 68) | GLOBAL(void)
function jpeg_alloc_quant_table (line 85) | GLOBAL(JQUANT_TBL *)
function jpeg_alloc_huff_table (line 97) | GLOBAL(JHUFF_TBL *)
FILE: tess-two/jni/libjpeg/jcparam.c
function jpeg_add_quant_table (line 23) | GLOBAL(void)
function jpeg_default_qtables (line 90) | GLOBAL(void)
function jpeg_set_linear_quality (line 105) | GLOBAL(void)
function jpeg_quality_scaling (line 122) | GLOBAL(int)
function jpeg_set_quality (line 148) | GLOBAL(void)
function add_huff_table (line 168) | LOCAL(void)
function std_huff_tables (line 198) | LOCAL(void)
function jpeg_set_defaults (line 284) | GLOBAL(void)
function jpeg_default_colorspace (line 385) | GLOBAL(void)
function jpeg_set_colorspace (line 424) | GLOBAL(void)
function fill_a_scan (line 535) | LOCAL(jpeg_scan_info *)
function fill_scans (line 550) | LOCAL(jpeg_scan_info *)
function fill_dc_scans (line 569) | LOCAL(jpeg_scan_info *)
function jpeg_simple_progression (line 597) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcprepct.c
type my_prep_controller (line 53) | typedef struct {
type my_prep_controller (line 70) | typedef my_prep_controller * my_prep_ptr;
function start_pass_prep (line 77) | METHODDEF(void)
function expand_bottom_edge (line 105) | LOCAL(void)
function pre_process_data (line 127) | METHODDEF(void)
function pre_process_context (line 196) | METHODDEF(void)
function create_context_buffer (line 268) | LOCAL(void)
function jinit_c_prep_controller (line 317) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jcsample.c
type cinfo (line 54) | typedef JMETHOD(void, downsample1_ptr,
type my_downsampler (line 60) | typedef struct {
type my_downsampler (line 76) | typedef my_downsampler * my_downsample_ptr;
function start_pass_downsample (line 83) | METHODDEF(void)
function expand_right_edge (line 95) | LOCAL(void)
function sep_downsample (line 122) | METHODDEF(void)
function int_downsample (line 149) | METHODDEF(void)
function fullsize_downsample (line 198) | METHODDEF(void)
function h2v1_downsample (line 223) | METHODDEF(void)
function h2v2_downsample (line 260) | METHODDEF(void)
function h2v2_smooth_downsample (line 304) | METHODDEF(void)
function fullsize_smooth_downsample (line 405) | METHODDEF(void)
function jinit_downsampler (line 477) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jctrans.c
function jpeg_write_coefficients (line 38) | GLOBAL(void)
function jpeg_copy_critical_parameters (line 63) | GLOBAL(void)
function transencode_master_selection (line 165) | LOCAL(void)
type my_coef_controller (line 205) | typedef struct {
type my_coef_controller (line 220) | typedef my_coef_controller * my_coef_ptr;
function start_iMCU_row (line 223) | LOCAL(void)
function start_pass_coef (line 251) | METHODDEF(void)
function compress_output (line 274) | METHODDEF(boolean)
function transencode_coef_controller (line 359) | LOCAL(void)
FILE: tess-two/jni/libjpeg/jdapimin.c
function jpeg_CreateDecompress (line 30) | GLOBAL(void)
function jpeg_destroy_decompress (line 91) | GLOBAL(void)
function jpeg_abort_decompress (line 103) | GLOBAL(void)
function default_decompress_parms (line 114) | LOCAL(void)
function jpeg_read_header (line 244) | GLOBAL(int)
function jpeg_consume_input (line 290) | GLOBAL(int)
function jpeg_input_complete (line 337) | GLOBAL(boolean)
function jpeg_has_multiple_scans (line 352) | GLOBAL(boolean)
function jpeg_finish_decompress (line 372) | GLOBAL(boolean)
FILE: tess-two/jni/libjpeg/jdapistd.c
function jpeg_start_decompress (line 38) | GLOBAL(boolean)
function output_pass_setup (line 95) | LOCAL(boolean)
function jpeg_read_scanlines (line 152) | GLOBAL(JDIMENSION)
function jpeg_read_raw_data (line 185) | GLOBAL(JDIMENSION)
function jpeg_start_output (line 228) | GLOBAL(boolean)
function jpeg_finish_output (line 253) | GLOBAL(boolean)
FILE: tess-two/jni/libjpeg/jdarith.c
type arith_entropy_decoder (line 23) | typedef struct {
type arith_entropy_decoder (line 45) | typedef arith_entropy_decoder * arith_entropy_ptr;
function get_byte (line 64) | LOCAL(int)
function arith_decode (line 105) | LOCAL(int)
function process_restart (line 189) | LOCAL(void)
function decode_mcu_DC_first (line 241) | METHODDEF(boolean)
function decode_mcu_AC_first (line 320) | METHODDEF(boolean)
function decode_mcu_DC_refine (line 402) | METHODDEF(boolean)
function decode_mcu_AC_refine (line 435) | METHODDEF(boolean)
function decode_mcu (line 510) | METHODDEF(boolean)
function start_pass (line 642) | METHODDEF(void)
function finish_pass (line 752) | METHODDEF(void)
function jinit_arith_decoder (line 763) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdatadst.c
type my_destination_mgr (line 31) | typedef struct {
type my_destination_mgr (line 38) | typedef my_destination_mgr * my_dest_ptr;
type my_mem_destination_mgr (line 45) | typedef struct {
type my_mem_destination_mgr (line 55) | typedef my_mem_destination_mgr * my_mem_dest_ptr;
function init_destination (line 63) | METHODDEF(void)
function init_mem_destination (line 77) | METHODDEF(void)
function empty_output_buffer (line 107) | METHODDEF(boolean)
function empty_mem_output_buffer (line 122) | METHODDEF(boolean)
function term_destination (line 162) | METHODDEF(void)
function term_mem_destination (line 179) | METHODDEF(void)
function jpeg_stdio_dest (line 195) | GLOBAL(void)
function jpeg_mem_dest (line 234) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdatasrc.c
type my_source_mgr (line 26) | typedef struct {
type my_source_mgr (line 34) | typedef my_source_mgr * my_src_ptr;
function init_source (line 44) | METHODDEF(void)
function init_mem_source (line 56) | METHODDEF(void)
function fill_input_buffer (line 96) | METHODDEF(boolean)
function fill_mem_input_buffer (line 121) | METHODDEF(boolean)
function skip_input_data (line 155) | METHODDEF(void)
function term_source (line 196) | METHODDEF(void)
function jpeg_stdio_src (line 209) | GLOBAL(void)
function jpeg_mem_src (line 248) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdcoefct.c
type my_coef_controller (line 29) | typedef struct {
type my_coef_controller (line 63) | typedef my_coef_controller * my_coef_ptr;
function start_iMCU_row (line 79) | LOCAL(void)
function start_input_pass (line 107) | METHODDEF(void)
function start_output_pass (line 119) | METHODDEF(void)
function decompress_onepass (line 147) | METHODDEF(int)
function dummy_consume_data (line 229) | METHODDEF(int)
function consume_data (line 245) | METHODDEF(int)
function decompress_data (line 316) | METHODDEF(int)
function smoothing_ok (line 406) | LOCAL(boolean)
function decompress_smooth_data (line 462) | METHODDEF(int)
function jinit_d_coef_controller (line 677) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdcolor.c
type my_color_deconverter (line 19) | typedef struct {
type my_color_deconverter (line 32) | typedef my_color_deconverter * my_cconvert_ptr;
function build_ycc_rgb_table (line 112) | LOCAL(void)
function build_bg_ycc_rgb_table (line 152) | LOCAL(void)
function ycc_rgb_convert (line 203) | METHODDEF(void)
function build_rgb_y_table (line 253) | LOCAL(void)
function rgb_gray_convert (line 277) | METHODDEF(void)
function rgb1_rgb_convert (line 317) | METHODDEF(void)
function rgb1_gray_convert (line 355) | METHODDEF(void)
function rgb_convert (line 397) | METHODDEF(void)
function null_convert (line 429) | METHODDEF(void)
function grayscale_convert (line 462) | METHODDEF(void)
function gray_rgb_convert (line 478) | METHODDEF(void)
function ycck_cmyk_convert (line 507) | METHODDEF(void)
function start_pass_dcolor (line 557) | METHODDEF(void)
function jinit_color_deconverter (line 568) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdct.h
type DCTELEM (line 36) | typedef int DCTELEM;
type INT32 (line 38) | typedef INT32 DCTELEM;
type data (line 41) | typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
type data (line 44) | typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
type MULTIPLIER (line 66) | typedef MULTIPLIER ISLOW_MULT_TYPE;
type MULTIPLIER (line 68) | typedef MULTIPLIER IFAST_MULT_TYPE;
type INT32 (line 71) | typedef INT32 IFAST_MULT_TYPE;
type FAST_FLOAT (line 74) | typedef FAST_FLOAT FLOAT_MULT_TYPE;
FILE: tess-two/jni/libjpeg/jddctmgr.c
type my_idct_controller (line 44) | typedef struct {
type my_idct_controller (line 55) | typedef my_idct_controller * my_idct_ptr;
type multiplier_table (line 60) | typedef union {
function start_pass (line 89) | METHODDEF(void)
function jinit_inverse_dct (line 361) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdhuff.c
type d_derived_tbl (line 28) | typedef struct {
type INT32 (line 69) | typedef INT32 bit_buf_type;
type bitread_perm_state (line 79) | typedef struct { /* Bitreading state saved across MCUs */
type bitread_working_state (line 84) | typedef struct { /* Bitreading working state within an MCU */
type savable_state (line 198) | typedef struct {
type huff_entropy_decoder (line 222) | typedef struct {
type huff_entropy_decoder (line 257) | typedef huff_entropy_decoder * huff_entropy_ptr;
function jpeg_make_d_derived_tbl (line 322) | LOCAL(void)
function jpeg_fill_bit_buffer (line 464) | LOCAL(boolean)
function jpeg_huff_decode (line 591) | LOCAL(int)
function finish_pass_huff (line 634) | METHODDEF(void)
function process_restart (line 651) | LOCAL(boolean)
function decode_mcu_DC_first (line 707) | METHODDEF(boolean)
function decode_mcu_AC_first (line 778) | METHODDEF(boolean)
function decode_mcu_DC_refine (line 866) | METHODDEF(boolean)
function decode_mcu_AC_refine (line 913) | METHODDEF(boolean)
function decode_mcu_sub (line 1070) | METHODDEF(boolean)
function decode_mcu (line 1198) | METHODDEF(boolean)
function start_pass_huff_decoder (line 1321) | METHODDEF(void)
function jinit_huff_decoder (line 1520) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdinput.c
type my_input_controller (line 22) | typedef struct {
type my_input_controller (line 28) | typedef my_input_controller * my_inputctl_ptr;
function jpeg_core_output_dimensions (line 46) | GLOBAL(void)
function initial_setup (line 207) | LOCAL(void)
function per_scan_setup (line 387) | LOCAL(void)
function latch_quant_tables (line 486) | LOCAL(void)
function start_input_pass (line 520) | METHODDEF(void)
function finish_input_pass (line 537) | METHODDEF(void)
function consume_markers (line 559) | METHODDEF(int)
function reset_input_controller (line 619) | METHODDEF(void)
function jinit_input_controller (line 641) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdmainct.c
type my_main_controller (line 115) | typedef struct {
type my_main_controller (line 135) | typedef my_main_controller * my_main_ptr;
function alloc_funny_pointers (line 157) | LOCAL(void)
function make_funny_pointers (line 195) | LOCAL(void)
function set_wraparound_pointers (line 238) | LOCAL(void)
function set_bottom_pointers (line 266) | LOCAL(void)
function start_pass_main (line 307) | METHODDEF(void)
function process_data_simple_main (line 345) | METHODDEF(void)
function process_data_context_main (line 385) | METHODDEF(void)
function process_data_crank_post (line 459) | METHODDEF(void)
function jinit_d_main_controller (line 476) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdmarker.c
type JPEG_MARKER (line 21) | typedef enum { /* JPEG marker codes */
type my_marker_reader (line 92) | typedef struct {
type my_marker_reader (line 109) | typedef my_marker_reader * my_marker_ptr;
function get_soi (line 198) | LOCAL(boolean)
function get_sof (line 239) | LOCAL(boolean)
function get_sos (line 321) | LOCAL(boolean)
function get_dac (line 412) | LOCAL(boolean)
function get_dht (line 458) | LOCAL(boolean)
function get_dqt (line 531) | LOCAL(boolean)
function get_dri (line 621) | LOCAL(boolean)
function get_lse (line 645) | LOCAL(boolean)
function examine_app0 (line 719) | LOCAL(void)
function examine_app14 (line 796) | LOCAL(void)
function get_interesting_appn (line 827) | METHODDEF(boolean)
function save_marker (line 875) | METHODDEF(boolean)
function skip_variable (line 981) | METHODDEF(boolean)
function next_marker (line 1010) | LOCAL(boolean)
function first_marker (line 1057) | LOCAL(boolean)
function read_markers (line 1093) | METHODDEF(int)
function read_restart_marker (line 1263) | METHODDEF(boolean)
function jpeg_resync_to_restart (line 1342) | GLOBAL(boolean)
function reset_marker_reader (line 1392) | METHODDEF(void)
function jinit_marker_reader (line 1412) | GLOBAL(void)
function jpeg_save_markers (line 1450) | GLOBAL(void)
function jpeg_set_marker_processor (line 1499) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdmaster.c
type my_decomp_master (line 22) | typedef struct {
type my_decomp_master (line 36) | typedef my_decomp_master * my_master_ptr;
function use_merged_upsample (line 44) | LOCAL(boolean)
function jpeg_calc_output_dimensions (line 100) | GLOBAL(void)
function prepare_range_limit_table (line 233) | LOCAL(void)
function master_selection (line 267) | LOCAL(void)
function prepare_for_output_pass (line 419) | METHODDEF(void)
function finish_output_pass (line 479) | METHODDEF(void)
function jpeg_new_colormap (line 496) | GLOBAL(void)
function jinit_master_decompress (line 524) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdmerge.c
type my_upsampler (line 45) | typedef struct {
type my_upsampler (line 71) | typedef my_upsampler * my_upsample_ptr;
function build_ycc_rgb_table (line 83) | LOCAL(void)
function build_bg_ycc_rgb_table (line 123) | LOCAL(void)
function start_pass_merged_upsample (line 167) | METHODDEF(void)
function merged_2v_upsample (line 185) | METHODDEF(void)
function merged_1v_upsample (line 234) | METHODDEF(void)
function h2v1_merged_upsample (line 267) | METHODDEF(void)
function h2v2_merged_upsample (line 329) | METHODDEF(void)
function jinit_merged_upsampler (line 411) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdpostct.c
type my_post_controller (line 26) | typedef struct {
type my_post_controller (line 42) | typedef my_post_controller * my_post_ptr;
function start_pass_dpost (line 72) | METHODDEF(void)
function post_process_1pass (line 125) | METHODDEF(void)
function post_process_prepass (line 157) | METHODDEF(void)
function post_process_2pass (line 201) | METHODDEF(void)
function jinit_d_post_controller (line 249) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdsample.c
type cinfo (line 28) | typedef JMETHOD(void, upsample1_ptr,
type my_upsampler (line 34) | typedef struct {
type my_upsampler (line 62) | typedef my_upsampler * my_upsample_ptr;
function start_pass_upsample (line 69) | METHODDEF(void)
function sep_upsample (line 89) | METHODDEF(void)
function fullsize_upsample (line 157) | METHODDEF(void)
function noop_upsample (line 170) | METHODDEF(void)
function int_upsample (line 189) | METHODDEF(void)
function h2v1_upsample (line 233) | METHODDEF(void)
function h2v2_upsample (line 261) | METHODDEF(void)
function jinit_upsampler (line 293) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jdtrans.c
function jpeg_read_coefficients (line 45) | GLOBAL(jvirt_barray_ptr *)
function transdecode_master_selection (line 97) | LOCAL(void)
FILE: tess-two/jni/libjpeg/jerror.c
function error_exit (line 70) | METHODDEF(noreturn_t)
function output_message (line 98) | METHODDEF(void)
function emit_message (line 128) | METHODDEF(void)
function format_message (line 157) | METHODDEF(void)
function reset_error_mgr (line 212) | METHODDEF(void)
function jpeg_std_error (line 231) | GLOBAL(struct jpeg_error_mgr *)
FILE: tess-two/jni/libjpeg/jfdctflt.c
function jpeg_fdct_float (line 61) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jfdctfst.c
function jpeg_fdct_ifast (line 116) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jfdctint.c
function jpeg_fdct_islow (line 157) | GLOBAL(void)
function jpeg_fdct_7x7 (line 334) | GLOBAL(void)
function jpeg_fdct_6x6 (line 470) | GLOBAL(void)
function jpeg_fdct_5x5 (line 584) | GLOBAL(void)
function jpeg_fdct_4x4 (line 695) | GLOBAL(void)
function jpeg_fdct_3x3 (line 790) | GLOBAL(void)
function jpeg_fdct_2x2 (line 876) | GLOBAL(void)
function jpeg_fdct_1x1 (line 921) | GLOBAL(void)
function jpeg_fdct_9x9 (line 942) | GLOBAL(void)
function jpeg_fdct_10x10 (line 1093) | GLOBAL(void)
function jpeg_fdct_11x11 (line 1257) | GLOBAL(void)
function jpeg_fdct_12x12 (line 1441) | GLOBAL(void)
function jpeg_fdct_13x13 (line 1607) | GLOBAL(void)
function jpeg_fdct_14x14 (line 1807) | GLOBAL(void)
function jpeg_fdct_15x15 (line 2008) | GLOBAL(void)
function jpeg_fdct_16x16 (line 2188) | GLOBAL(void)
function jpeg_fdct_16x8 (line 2398) | GLOBAL(void)
function jpeg_fdct_14x7 (line 2581) | GLOBAL(void)
function jpeg_fdct_12x6 (line 2746) | GLOBAL(void)
function jpeg_fdct_10x5 (line 2886) | GLOBAL(void)
function jpeg_fdct_8x4 (line 3019) | GLOBAL(void)
function jpeg_fdct_6x3 (line 3160) | GLOBAL(void)
function jpeg_fdct_4x2 (line 3261) | GLOBAL(void)
function jpeg_fdct_2x1 (line 3345) | GLOBAL(void)
function jpeg_fdct_8x16 (line 3380) | GLOBAL(void)
function jpeg_fdct_7x14 (line 3574) | GLOBAL(void)
function jpeg_fdct_6x12 (line 3756) | GLOBAL(void)
function jpeg_fdct_5x10 (line 3906) | GLOBAL(void)
function jpeg_fdct_4x8 (line 4053) | GLOBAL(void)
function jpeg_fdct_3x6 (line 4194) | GLOBAL(void)
function jpeg_fdct_2x4 (line 4300) | GLOBAL(void)
function jpeg_fdct_1x2 (line 4380) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jidctflt.c
function jpeg_idct_float (line 70) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jidctfst.c
function jpeg_idct_ifast (line 143) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jidctint.c
function jpeg_idct_islow (line 172) | GLOBAL(void)
function jpeg_idct_7x7 (line 437) | GLOBAL(void)
function jpeg_idct_6x6 (line 588) | GLOBAL(void)
function jpeg_idct_5x5 (line 711) | GLOBAL(void)
function jpeg_idct_4x4 (line 828) | GLOBAL(void)
function jpeg_idct_3x3 (line 935) | GLOBAL(void)
function jpeg_idct_2x2 (line 1026) | GLOBAL(void)
function jpeg_idct_1x1 (line 1081) | GLOBAL(void)
function jpeg_idct_9x9 (line 1112) | GLOBAL(void)
function jpeg_idct_10x10 (line 1285) | GLOBAL(void)
function jpeg_idct_11x11 (line 1482) | GLOBAL(void)
function jpeg_idct_12x12 (line 1678) | GLOBAL(void)
function jpeg_idct_13x13 (line 1896) | GLOBAL(void)
function jpeg_idct_14x14 (line 2126) | GLOBAL(void)
function jpeg_idct_15x15 (line 2354) | GLOBAL(void)
function jpeg_idct_16x16 (line 2598) | GLOBAL(void)
function jpeg_idct_16x8 (line 2861) | GLOBAL(void)
function jpeg_idct_14x7 (line 3138) | GLOBAL(void)
function jpeg_idct_12x6 (line 3337) | GLOBAL(void)
function jpeg_idct_10x5 (line 3517) | GLOBAL(void)
function jpeg_idct_8x4 (line 3682) | GLOBAL(void)
function jpeg_idct_6x3 (line 3842) | GLOBAL(void)
function jpeg_idct_4x2 (line 3956) | GLOBAL(void)
function jpeg_idct_2x1 (line 4047) | GLOBAL(void)
function jpeg_idct_8x16 (line 4089) | GLOBAL(void)
function jpeg_idct_7x14 (line 4313) | GLOBAL(void)
function jpeg_idct_6x12 (line 4500) | GLOBAL(void)
function jpeg_idct_5x10 (line 4668) | GLOBAL(void)
function jpeg_idct_4x8 (line 4824) | GLOBAL(void)
function jpeg_idct_3x6 (line 5011) | GLOBAL(void)
function jpeg_idct_2x4 (line 5119) | GLOBAL(void)
function jpeg_idct_1x2 (line 5206) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemansi.c
function jpeg_get_small (line 35) | GLOBAL(void *)
function jpeg_free_small (line 41) | GLOBAL(void)
function jpeg_get_large (line 55) | GLOBAL(void FAR *)
function jpeg_free_large (line 61) | GLOBAL(void)
function jpeg_mem_available (line 80) | GLOBAL(long)
function read_backing_store (line 96) | METHODDEF(void)
function write_backing_store (line 109) | METHODDEF(void)
function close_backing_store (line 122) | METHODDEF(void)
function jpeg_open_backing_store (line 140) | GLOBAL(void)
function jpeg_mem_init (line 157) | GLOBAL(long)
function jpeg_mem_term (line 163) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemdos.c
type XMScontext (line 98) | typedef struct { /* registers for calling XMS driver */
type EMScontext (line 102) | typedef struct { /* registers for calling EMS driver */
function select_file_name (line 127) | LOCAL(void)
function jpeg_get_small (line 165) | GLOBAL(void *)
function jpeg_free_small (line 171) | GLOBAL(void)
function jpeg_get_large (line 182) | GLOBAL(void FAR *)
function jpeg_free_large (line 188) | GLOBAL(void)
function jpeg_mem_available (line 207) | GLOBAL(long)
function read_file_store (line 242) | METHODDEF(void)
function write_file_store (line 258) | METHODDEF(void)
function close_file_store (line 274) | METHODDEF(void)
function open_file_store (line 287) | LOCAL(boolean)
type XMSPTR (line 316) | typedef union { /* either long offset or real-mode pointer */
type XMSspec (line 321) | typedef struct { /* XMS move specification structure */
function read_xms_store (line 332) | METHODDEF(void)
function write_xms_store (line 365) | METHODDEF(void)
function close_xms_store (line 400) | METHODDEF(void)
function open_xms_store (line 413) | LOCAL(boolean)
type EMSspec (line 466) | typedef union { /* EMS move specification structure */
function read_ems_store (line 490) | METHODDEF(void)
function write_ems_store (line 515) | METHODDEF(void)
function close_ems_store (line 540) | METHODDEF(void)
function open_ems_store (line 553) | LOCAL(boolean)
function jpeg_open_backing_store (line 598) | GLOBAL(void)
function jpeg_mem_init (line 622) | GLOBAL(long)
function jpeg_mem_term (line 629) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemmac.c
function jpeg_get_small (line 81) | GLOBAL(void *)
function jpeg_free_small (line 87) | GLOBAL(void)
function jpeg_get_large (line 101) | GLOBAL(void FAR *)
function jpeg_free_large (line 107) | GLOBAL(void)
function jpeg_mem_available (line 118) | GLOBAL(long)
function read_backing_store (line 153) | METHODDEF(void)
function write_backing_store (line 171) | METHODDEF(void)
function close_backing_store (line 189) | METHODDEF(void)
function jpeg_open_backing_store (line 204) | GLOBAL(void)
function jpeg_mem_init (line 271) | GLOBAL(long)
function jpeg_mem_term (line 285) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemmgr.c
type small_pool_hdr (line 92) | typedef union small_pool_struct {
type large_pool_hdr (line 103) | typedef union large_pool_struct {
type my_memory_mgr (line 117) | typedef struct {
type my_memory_mgr (line 141) | typedef my_memory_mgr * my_mem_ptr;
type jvirt_sarray_control (line 151) | struct jvirt_sarray_control {
type jvirt_barray_control (line 167) | struct jvirt_barray_control {
function print_mem_stats (line 186) | LOCAL(void)
function out_of_memory (line 217) | LOCAL(noreturn_t)
function alloc_small (line 257) | METHODDEF(void *)
function alloc_large (line 342) | METHODDEF(void FAR *)
function alloc_sarray (line 395) | METHODDEF(JSAMPARRAY)
function alloc_barray (line 443) | METHODDEF(JBLOCKARRAY)
function request_virt_sarray (line 523) | METHODDEF(jvirt_sarray_ptr)
function request_virt_barray (line 553) | METHODDEF(jvirt_barray_ptr)
function realize_virt_arrays (line 583) | METHODDEF(void)
function do_sarray_io (line 690) | LOCAL(void)
function do_barray_io (line 723) | LOCAL(void)
function access_virt_sarray (line 756) | METHODDEF(JSAMPARRAY)
function access_virt_barray (line 841) | METHODDEF(JBLOCKARRAY)
function free_pool (line 930) | METHODDEF(void)
function self_destruct (line 1002) | METHODDEF(void)
function jinit_memory_mgr (line 1028) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemname.c
function select_file_name (line 94) | LOCAL(void)
function select_file_name (line 125) | LOCAL(void)
function jpeg_get_small (line 142) | GLOBAL(void *)
function jpeg_free_small (line 148) | GLOBAL(void)
function jpeg_get_large (line 162) | GLOBAL(void FAR *)
function jpeg_free_large (line 168) | GLOBAL(void)
function jpeg_mem_available (line 187) | GLOBAL(long)
function read_backing_store (line 203) | METHODDEF(void)
function write_backing_store (line 216) | METHODDEF(void)
function close_backing_store (line 229) | METHODDEF(void)
function jpeg_open_backing_store (line 246) | GLOBAL(void)
function jpeg_mem_init (line 265) | GLOBAL(long)
function jpeg_mem_term (line 272) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemnobs.c
function jpeg_get_small (line 34) | GLOBAL(void *)
function jpeg_free_small (line 40) | GLOBAL(void)
function jpeg_get_large (line 54) | GLOBAL(void FAR *)
function jpeg_free_large (line 60) | GLOBAL(void)
function jpeg_mem_available (line 72) | GLOBAL(long)
function jpeg_open_backing_store (line 86) | GLOBAL(void)
function jpeg_mem_init (line 99) | GLOBAL(long)
function jpeg_mem_term (line 105) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jmemsys.h
type XMSH (line 121) | typedef unsigned short XMSH;
type EMSH (line 122) | typedef unsigned short EMSH;
type handle_union (line 124) | typedef union {
type backing_store_struct (line 137) | struct backing_store_struct
type backing_store_info (line 139) | typedef struct backing_store_struct {
FILE: tess-two/jni/libjpeg/jmorecfg.h
type JSAMPLE (line 69) | typedef unsigned char JSAMPLE;
type JSAMPLE (line 74) | typedef char JSAMPLE;
type JSAMPLE (line 94) | typedef short JSAMPLE;
type JSAMPLE (line 108) | typedef short JSAMPLE;
type JSAMPLE (line 122) | typedef short JSAMPLE;
type JSAMPLE (line 136) | typedef short JSAMPLE;
type JCOEF (line 151) | typedef short JCOEF;
type JOCTET (line 162) | typedef unsigned char JOCTET;
type JOCTET (line 167) | typedef char JOCTET;
type UINT8 (line 187) | typedef unsigned char UINT8;
type UINT8 (line 190) | typedef char UINT8;
type UINT8 (line 192) | typedef short UINT8;
type UINT16 (line 199) | typedef unsigned short UINT16;
type UINT16 (line 201) | typedef unsigned int UINT16;
type INT16 (line 207) | typedef short INT16;
type INT32 (line 216) | typedef long INT32;
type JDIMENSION (line 229) | typedef unsigned int JDIMENSION;
type noreturn_t (line 280) | typedef void noreturn_t;
type boolean (line 309) | typedef int boolean;
type boolean (line 317) | typedef enum { FALSE = 0, TRUE = 1 } boolean;
FILE: tess-two/jni/libjpeg/jpegint.h
type J_BUF_MODE (line 17) | typedef enum { /* Operating modes for buffer controllers */
type jpeg_comp_master (line 46) | struct jpeg_comp_master {
type jpeg_c_main_controller (line 57) | struct jpeg_c_main_controller {
type jpeg_c_prep_controller (line 65) | struct jpeg_c_prep_controller {
type jpeg_c_coef_controller (line 77) | struct jpeg_c_coef_controller {
type jpeg_color_converter (line 84) | struct jpeg_color_converter {
type jpeg_downsampler (line 92) | struct jpeg_downsampler {
type cinfo (line 103) | typedef JMETHOD(void, forward_DCT_ptr,
type jpeg_forward_dct (line 109) | struct jpeg_forward_dct {
type jpeg_entropy_encoder (line 116) | struct jpeg_entropy_encoder {
type jpeg_marker_writer (line 123) | struct jpeg_marker_writer {
type jpeg_decomp_master (line 140) | struct jpeg_decomp_master {
type jpeg_input_controller (line 149) | struct jpeg_input_controller {
type jpeg_d_main_controller (line 161) | struct jpeg_d_main_controller {
type jpeg_d_coef_controller (line 169) | struct jpeg_d_coef_controller {
type jpeg_d_post_controller (line 180) | struct jpeg_d_post_controller {
type jpeg_marker_reader (line 192) | struct jpeg_marker_reader {
type jpeg_entropy_decoder (line 212) | struct jpeg_entropy_decoder {
type cinfo (line 219) | typedef JMETHOD(void, inverse_DCT_method_ptr,
type jpeg_inverse_dct (line 224) | struct jpeg_inverse_dct {
type jpeg_upsampler (line 231) | struct jpeg_upsampler {
type jpeg_color_deconverter (line 245) | struct jpeg_color_deconverter {
type jpeg_color_quantizer (line 253) | struct jpeg_color_quantizer {
type jvirt_sarray_control (line 423) | struct jvirt_sarray_control { long dummy; }
type jvirt_barray_control (line 424) | struct jvirt_barray_control { long dummy; }
FILE: tess-two/jni/libjpeg/jpeglib.h
type JSAMPLE (line 75) | typedef JSAMPLE FAR *JSAMPROW;
type JSAMPROW (line 76) | typedef JSAMPROW *JSAMPARRAY;
type JSAMPARRAY (line 77) | typedef JSAMPARRAY *JSAMPIMAGE;
type JCOEF (line 79) | typedef JCOEF JBLOCK[DCTSIZE2];
type JBLOCK (line 80) | typedef JBLOCK FAR *JBLOCKROW;
type JBLOCKROW (line 81) | typedef JBLOCKROW *JBLOCKARRAY;
type JBLOCKARRAY (line 82) | typedef JBLOCKARRAY *JBLOCKIMAGE;
type JCOEF (line 84) | typedef JCOEF FAR *JCOEFPTR;
type JQUANT_TBL (line 92) | typedef struct {
type JHUFF_TBL (line 109) | typedef struct {
type jpeg_component_info (line 125) | typedef struct {
type jpeg_scan_info (line 198) | typedef struct {
type jpeg_marker_struct (line 207) | struct jpeg_marker_struct
type jpeg_marker_struct (line 209) | struct jpeg_marker_struct {
type J_COLOR_SPACE (line 220) | typedef enum {
type J_COLOR_TRANSFORM (line 233) | typedef enum {
type J_DCT_METHOD (line 240) | typedef enum {
type J_DITHER_MODE (line 255) | typedef enum {
type jpeg_memory_mgr (line 266) | struct jpeg_memory_mgr
type jpeg_progress_mgr (line 267) | struct jpeg_progress_mgr
type jpeg_common_struct (line 276) | struct jpeg_common_struct {
type jpeg_common_struct (line 284) | struct jpeg_common_struct
type jpeg_compress_struct (line 285) | struct jpeg_compress_struct
type jpeg_decompress_struct (line 286) | struct jpeg_decompress_struct
type jpeg_compress_struct (line 291) | struct jpeg_compress_struct {
type jpeg_decompress_struct (line 459) | struct jpeg_decompress_struct {
type jpeg_error_mgr (line 702) | struct jpeg_error_mgr {
type jpeg_progress_mgr (line 760) | struct jpeg_progress_mgr {
type jpeg_destination_mgr (line 772) | struct jpeg_destination_mgr {
type jpeg_source_mgr (line 784) | struct jpeg_source_mgr {
type jvirt_sarray_control (line 811) | struct jvirt_sarray_control
type jvirt_barray_control (line 812) | struct jvirt_barray_control
type jpeg_memory_mgr (line 815) | struct jpeg_memory_mgr {
type jpeg_error_mgr (line 948) | struct jpeg_error_mgr
type jpeg_error_mgr (line 949) | struct jpeg_error_mgr
type jvirt_sarray_control (line 1136) | struct jvirt_sarray_control { long dummy; }
type jvirt_barray_control (line 1137) | struct jvirt_barray_control { long dummy; }
type jpeg_comp_master (line 1138) | struct jpeg_comp_master { long dummy; }
type jpeg_c_main_controller (line 1139) | struct jpeg_c_main_controller { long dummy; }
type jpeg_c_prep_controller (line 1140) | struct jpeg_c_prep_controller { long dummy; }
type jpeg_c_coef_controller (line 1141) | struct jpeg_c_coef_controller { long dummy; }
type jpeg_marker_writer (line 1142) | struct jpeg_marker_writer { long dummy; }
type jpeg_color_converter (line 1143) | struct jpeg_color_converter { long dummy; }
type jpeg_downsampler (line 1144) | struct jpeg_downsampler { long dummy; }
type jpeg_forward_dct (line 1145) | struct jpeg_forward_dct { long dummy; }
type jpeg_entropy_encoder (line 1146) | struct jpeg_entropy_encoder { long dummy; }
type jpeg_decomp_master (line 1147) | struct jpeg_decomp_master { long dummy; }
type jpeg_d_main_controller (line 1148) | struct jpeg_d_main_controller { long dummy; }
type jpeg_d_coef_controller (line 1149) | struct jpeg_d_coef_controller { long dummy; }
type jpeg_d_post_controller (line 1150) | struct jpeg_d_post_controller { long dummy; }
type jpeg_input_controller (line 1151) | struct jpeg_input_controller { long dummy; }
type jpeg_marker_reader (line 1152) | struct jpeg_marker_reader { long dummy; }
type jpeg_entropy_decoder (line 1153) | struct jpeg_entropy_decoder { long dummy; }
type jpeg_inverse_dct (line 1154) | struct jpeg_inverse_dct { long dummy; }
type jpeg_upsampler (line 1155) | struct jpeg_upsampler { long dummy; }
type jpeg_color_deconverter (line 1156) | struct jpeg_color_deconverter { long dummy; }
type jpeg_color_quantizer (line 1157) | struct jpeg_color_quantizer { long dummy; }
FILE: tess-two/jni/libjpeg/jpegtran.c
function usage (line 45) | LOCAL(void)
function select_transform (line 97) | LOCAL(void)
function parse_switches (line 120) | LOCAL(int)
function main (line 385) | int
FILE: tess-two/jni/libjpeg/jquant1.c
type INT16 (line 129) | typedef INT16 FSERROR;
type LOCFSERROR (line 130) | typedef int LOCFSERROR;
type INT32 (line 132) | typedef INT32 FSERROR;
type INT32 (line 133) | typedef INT32 LOCFSERROR;
type FSERROR (line 136) | typedef FSERROR FAR *FSERRPTR;
type my_cquantizer (line 143) | typedef struct {
type my_cquantizer (line 168) | typedef my_cquantizer * my_cquantize_ptr;
function select_ncolors (line 186) | LOCAL(int)
function output_value (line 245) | LOCAL(int)
function largest_input_value (line 259) | LOCAL(int)
function create_colormap (line 273) | LOCAL(void)
function create_colorindex (line 333) | LOCAL(void)
function make_odither_array (line 396) | LOCAL(ODITHER_MATRIX_PTR)
function create_odither_tables (line 432) | LOCAL(void)
function color_quantize (line 459) | METHODDEF(void)
function color_quantize3 (line 487) | METHODDEF(void)
function quantize_ord_dither (line 515) | METHODDEF(void)
function quantize3_ord_dither (line 565) | METHODDEF(void)
function quantize_fs_dither (line 610) | METHODDEF(void)
function alloc_fs_workspace (line 722) | LOCAL(void)
function start_pass_1_quant (line 741) | METHODDEF(void)
function finish_pass_1_quant (line 798) | METHODDEF(void)
function new_color_map_1_quant (line 810) | METHODDEF(void)
function jinit_1pass_quantizer (line 821) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jquant2.c
type UINT16 (line 148) | typedef UINT16 histcell;
type histcell (line 150) | typedef histcell FAR * histptr;
type histcell (line 152) | typedef histcell hist1d[HIST_C2_ELEMS];
type hist1d (line 153) | typedef hist1d FAR * hist2d;
type hist2d (line 154) | typedef hist2d * hist3d;
type INT16 (line 182) | typedef INT16 FSERROR;
type LOCFSERROR (line 183) | typedef int LOCFSERROR;
type INT32 (line 185) | typedef INT32 FSERROR;
type INT32 (line 186) | typedef INT32 LOCFSERROR;
type FSERROR (line 189) | typedef FSERROR FAR *FSERRPTR;
type my_cquantizer (line 194) | typedef struct {
type my_cquantizer (line 212) | typedef my_cquantizer * my_cquantize_ptr;
function prescan_quantize (line 224) | METHODDEF(void)
type box (line 259) | typedef struct {
type box (line 270) | typedef box * boxptr;
function find_biggest_color_pop (line 273) | LOCAL(boxptr)
function find_biggest_volume (line 293) | LOCAL(boxptr)
function update_box (line 313) | LOCAL(void)
function median_cut (line 424) | LOCAL(int)
function compute_color (line 499) | LOCAL(void)
function select_colors (line 539) | LOCAL(void)
function find_nearby_colors (line 646) | LOCAL(int)
function find_best_colors (line 775) | LOCAL(void)
function fill_inverse_cmap (line 855) | LOCAL(void)
function pass2_no_dither (line 915) | METHODDEF(void)
function pass2_fs_dither (line 949) | METHODDEF(void)
function init_error_limit (line 1108) | LOCAL(void)
function finish_pass1 (line 1143) | METHODDEF(void)
function finish_pass2 (line 1156) | METHODDEF(void)
function start_pass_2_quant (line 1167) | METHODDEF(void)
function new_color_map_2_quant (line 1230) | METHODDEF(void)
function jinit_2pass_quantizer (line 1244) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/jutils.c
function jdiv_round_up (line 123) | GLOBAL(long)
function jround_up (line 132) | GLOBAL(long)
function jzero_far (line 160) | GLOBAL(void)
function jcopy_sample_rows (line 176) | GLOBAL(void)
function jcopy_block_row (line 210) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/rdbmp.c
type U_CHAR (line 33) | typedef unsigned char U_CHAR;
type U_CHAR (line 37) | typedef char U_CHAR;
type U_CHAR (line 40) | typedef char U_CHAR;
type _bmp_source_struct (line 51) | struct _bmp_source_struct
type bmp_source_struct (line 53) | typedef struct _bmp_source_struct {
function read_byte (line 68) | LOCAL(int)
function read_colormap (line 81) | LOCAL(void)
function get_8bit_row (line 119) | METHODDEF(JDIMENSION)
function get_24bit_row (line 150) | METHODDEF(JDIMENSION)
function get_32bit_row (line 181) | METHODDEF(JDIMENSION)
function preload_image (line 218) | METHODDEF(JDIMENSION)
function start_input_bmp (line 275) | METHODDEF(void)
function finish_input_bmp (line 452) | METHODDEF(void)
function jinit_read_bmp (line 463) | GLOBAL(cjpeg_source_ptr)
FILE: tess-two/jni/libjpeg/rdcolmap.c
function add_map_entry (line 45) | LOCAL(void)
function read_gif_map (line 78) | LOCAL(void)
function pbm_getc (line 120) | LOCAL(int)
function read_pbm_integer (line 137) | LOCAL(unsigned int)
function read_ppm_map (line 170) | LOCAL(void)
function read_color_map (line 230) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/rdgif.c
function jinit_read_gif (line 30) | GLOBAL(cjpeg_source_ptr)
FILE: tess-two/jni/libjpeg/rdjpgcom.c
function read_1_byte (line 76) | static int
function read_2_bytes (line 89) | static unsigned int
function next_marker (line 141) | static int
function first_marker (line 176) | static int
function skip_variable (line 198) | static void
function process_COM (line 224) | static void
function process_SOFn (line 281) | static void
function scan_JPEG_header (line 339) | static int
function usage (line 408) | static void
function keymatch (line 424) | static int
function main (line 453) | int
FILE: tess-two/jni/libjpeg/rdppm.c
type U_CHAR (line 43) | typedef unsigned char U_CHAR;
type U_CHAR (line 47) | typedef char U_CHAR;
type U_CHAR (line 50) | typedef char U_CHAR;
type ppm_source_struct (line 72) | typedef struct {
type ppm_source_struct (line 81) | typedef ppm_source_struct * ppm_source_ptr;
function pbm_getc (line 84) | LOCAL(int)
function read_pbm_integer (line 101) | LOCAL(unsigned int)
function get_text_gray_row (line 141) | METHODDEF(JDIMENSION)
function get_text_rgb_row (line 159) | METHODDEF(JDIMENSION)
function get_scaled_gray_row (line 179) | METHODDEF(JDIMENSION)
function get_scaled_rgb_row (line 200) | METHODDEF(JDIMENSION)
function get_raw_row (line 223) | METHODDEF(JDIMENSION)
function get_word_gray_row (line 238) | METHODDEF(JDIMENSION)
function get_word_rgb_row (line 262) | METHODDEF(JDIMENSION)
function start_input_ppm (line 296) | METHODDEF(void)
function finish_input_ppm (line 432) | METHODDEF(void)
function jinit_read_ppm (line 443) | GLOBAL(cjpeg_source_ptr)
FILE: tess-two/jni/libjpeg/rdrle.c
type rle_kind (line 51) | typedef enum
type _rle_source_struct (line 62) | struct _rle_source_struct
type rle_source_struct (line 64) | typedef struct _rle_source_struct {
function start_input_rle (line 80) | METHODDEF(void)
function get_rle_row (line 186) | METHODDEF(JDIMENSION)
function get_pseudocolor_row (line 204) | METHODDEF(JDIMENSION)
function load_image (line 240) | METHODDEF(JDIMENSION)
function finish_input_rle (line 359) | METHODDEF(void)
function jinit_read_rle (line 370) | GLOBAL(cjpeg_source_ptr)
FILE: tess-two/jni/libjpeg/rdswitch.c
function text_getc (line 22) | LOCAL(int)
function read_text_integer (line 39) | LOCAL(boolean)
function read_quant_tables (line 74) | GLOBAL(boolean)
function read_scan_integer (line 130) | LOCAL(boolean)
function read_scan_script (line 159) | GLOBAL(boolean)
function set_quality_ratings (line 267) | GLOBAL(boolean)
function set_quant_slots (line 299) | GLOBAL(boolean)
function set_sample_factors (line 334) | GLOBAL(boolean)
FILE: tess-two/jni/libjpeg/rdtarga.c
type U_CHAR (line 28) | typedef unsigned char U_CHAR;
type U_CHAR (line 32) | typedef char U_CHAR;
type U_CHAR (line 35) | typedef char U_CHAR;
type _tga_source_struct (line 46) | struct _tga_source_struct
type tga_source_struct (line 48) | typedef struct _tga_source_struct {
function read_byte (line 87) | LOCAL(int)
function read_colormap (line 100) | LOCAL(void)
function read_non_rle_pixel (line 122) | METHODDEF(void)
function read_rle_pixel (line 135) | METHODDEF(void)
function get_8bit_gray_row (line 173) | METHODDEF(JDIMENSION)
function get_8bit_row (line 189) | METHODDEF(JDIMENSION)
function get_16bit_row (line 210) | METHODDEF(JDIMENSION)
function get_24bit_row (line 238) | METHODDEF(JDIMENSION)
function get_memory_row (line 272) | METHODDEF(JDIMENSION)
function preload_image (line 299) | METHODDEF(JDIMENSION)
function start_input_tga (line 332) | METHODDEF(void)
function finish_input_tga (line 472) | METHODDEF(void)
function jinit_read_targa (line 483) | GLOBAL(cjpeg_source_ptr)
FILE: tess-two/jni/libjpeg/transupp.c
function do_crop (line 78) | LOCAL(void)
function do_crop_ext (line 116) | LOCAL(void)
function do_wipe (line 194) | LOCAL(void)
function do_flip_h_no_crop (line 226) | LOCAL(void)
function do_flip_h (line 293) | LOCAL(void)
function do_flip_v (line 355) | LOCAL(void)
function do_transpose (line 435) | LOCAL(void)
function do_rot_90 (line 483) | LOCAL(void)
function do_rot_270 (line 564) | LOCAL(void)
function do_rot_180 (line 635) | LOCAL(void)
function do_transverse (line 743) | LOCAL(void)
function jt_read_integer (line 863) | LOCAL(boolean)
function jtransform_parse_crop_spec (line 893) | GLOBAL(boolean)
function trim_right_edge (line 947) | LOCAL(void)
function trim_bottom_edge (line 958) | LOCAL(void)
function jtransform_request_workspace (line 987) | GLOBAL(boolean)
function transpose_critical_parameters (line 1271) | LOCAL(void)
function adjust_exif_parameters (line 1317) | LOCAL(void)
function jtransform_adjust_parameters (line 1479) | GLOBAL(jvirt_barray_ptr *)
function jtransform_execute_transform (line 1575) | GLOBAL(void)
function jtransform_perfect_transform (line 1656) | GLOBAL(boolean)
function jcopy_markers_setup (line 1695) | GLOBAL(void)
function jcopy_markers_execute (line 1720) | GLOBAL(void)
FILE: tess-two/jni/libjpeg/transupp.h
type JXFORM_CODE (line 100) | typedef enum {
type JCROP_CODE (line 118) | typedef enum {
type jpeg_transform_info (line 131) | typedef struct {
type JCOPY_OPTION (line 205) | typedef enum {
FILE: tess-two/jni/libjpeg/wrbmp.c
type bmp_dest_struct (line 44) | typedef struct {
type bmp_dest_struct (line 56) | typedef bmp_dest_struct * bmp_dest_ptr;
function put_pixel_rows (line 70) | METHODDEF(void)
function put_gray_rows (line 105) | METHODDEF(void)
function start_output_bmp (line 141) | METHODDEF(void)
function write_bmp_header (line 156) | LOCAL(void)
function write_os2_header (line 229) | LOCAL(void)
function write_colormap (line 291) | LOCAL(void)
function finish_output_bmp (line 343) | METHODDEF(void)
function jinit_write_bmp (line 389) | GLOBAL(djpeg_dest_ptr)
FILE: tess-two/jni/libjpeg/wrgif.c
type gif_dest_struct (line 48) | typedef struct {
type gif_dest_struct (line 70) | typedef gif_dest_struct * gif_dest_ptr;
function flush_packet (line 81) | LOCAL(void)
function output (line 105) | LOCAL(void)
function compress_init (line 143) | LOCAL(void)
function compress_pixel (line 162) | LOCAL(void)
function compress_term (line 182) | LOCAL(void)
function put_word (line 200) | LOCAL(void)
function put_3bytes (line 209) | LOCAL(void)
function emit_header (line 219) | LOCAL(void)
function start_output_gif (line 302) | METHODDEF(void)
function put_pixel_rows (line 319) | METHODDEF(void)
function finish_output_gif (line 338) | METHODDEF(void)
function jinit_write_gif (line 360) | GLOBAL(djpeg_dest_ptr)
FILE: tess-two/jni/libjpeg/wrjpgcom.c
function read_1_byte (line 92) | static int
function read_2_bytes (line 105) | static unsigned int
function write_1_byte (line 122) | static void
function write_2_bytes (line 128) | static void
function write_marker (line 135) | static void
function copy_rest_of_file (line 142) | static void
function next_marker (line 187) | static int
function first_marker (line 222) | static int
function copy_variable (line 244) | static void
function skip_variable (line 264) | static void
function scan_JPEG_header (line 289) | static int
function usage (line 351) | static void
function keymatch (line 384) | static int
function main (line 413) | int
FILE: tess-two/jni/libjpeg/wrppm.c
type ppm_dest_struct (line 69) | typedef struct {
type ppm_dest_struct (line 79) | typedef ppm_dest_struct * ppm_dest_ptr;
function put_pixel_rows (line 90) | METHODDEF(void)
function copy_pixel_rows (line 105) | METHODDEF(void)
function put_demapped_rgb (line 128) | METHODDEF(void)
function put_demapped_gray (line 153) | METHODDEF(void)
function start_output_ppm (line 176) | METHODDEF(void)
function finish_output_ppm (line 205) | METHODDEF(void)
function jinit_write_ppm (line 219) | GLOBAL(djpeg_dest_ptr)
FILE: tess-two/jni/libjpeg/wrrle.c
type rle_dest_struct (line 53) | typedef struct {
type rle_dest_struct (line 62) | typedef rle_dest_struct * rle_dest_ptr;
function start_output_rle (line 76) | METHODDEF(void)
function rle_put_pixel_rows (line 152) | METHODDEF(void)
function finish_output_rle (line 171) | METHODDEF(void)
function jinit_write_rle (line 276) | GLOBAL(djpeg_dest_ptr)
FILE: tess-two/jni/libjpeg/wrtarga.c
type tga_dest_struct (line 44) | typedef struct {
type tga_dest_struct (line 51) | typedef tga_dest_struct * tga_dest_ptr;
function write_header (line 54) | LOCAL(void)
function put_pixel_rows (line 99) | METHODDEF(void)
function put_gray_rows (line 120) | METHODDEF(void)
function put_demapped_gray (line 144) | METHODDEF(void)
function start_output_tga (line 167) | METHODDEF(void)
function finish_output_tga (line 211) | METHODDEF(void)
function jinit_write_targa (line 225) | GLOBAL(djpeg_dest_ptr)
FILE: tess-two/jni/libpng/arm/arm_init.c
function png_init_filter_functions_neon (line 56) | void
FILE: tess-two/jni/libpng/arm/filter_neon_intrinsics.c
function png_read_filter_row_up_neon (line 42) | void
function png_read_filter_row_sub3_neon (line 63) | void
function png_read_filter_row_sub4_neon (line 110) | void
function png_read_filter_row_avg3_neon (line 139) | void
function png_read_filter_row_avg4_neon (line 207) | void
function uint8x8_t (line 247) | static uint8x8_t
function png_read_filter_row_paeth3_neon (line 274) | void
function png_read_filter_row_paeth4_neon (line 342) | void
FILE: tess-two/jni/libpng/contrib/arm-neon/android-ndk.c
function png_have_neon (line 29) | static int
FILE: tess-two/jni/libpng/contrib/arm-neon/linux-auxv.c
function safe_read (line 38) | static size_t
function png_have_neon (line 96) | static int
FILE: tess-two/jni/libpng/contrib/arm-neon/linux.c
function png_have_neon (line 24) | static int
FILE: tess-two/jni/libpng/contrib/examples/iccfrompng.c
function png_bytep (line 36) | static png_bytep
function extract_one_file (line 90) | static int
function main (line 167) | int
FILE: tess-two/jni/libpng/contrib/examples/pngpixel.c
function component (line 33) | static unsigned int
function print_pixel (line 72) | static void
function main (line 141) | int main(int argc, const char **argv)
FILE: tess-two/jni/libpng/contrib/examples/pngtopng.c
function main (line 26) | int main(int argc, const char **argv)
FILE: tess-two/jni/libpng/contrib/examples/simpleover.c
type sprite (line 50) | struct sprite {
function main (line 62) | int main(void) {
function sprite_op (line 102) | static void
function create_sprite (line 187) | static int
function add_sprite (line 314) | static int
function simpleover_process (line 390) | static int
function main (line 529) | int main(int argc, const char **argv)
FILE: tess-two/jni/libpng/contrib/gregbook/readpng.c
function readpng_version_info (line 77) | void readpng_version_info(void)
function readpng_init (line 88) | int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
function readpng_get_bgcolor (line 156) | int readpng_get_bgcolor(uch *red, uch *green, uch *blue)
function uch (line 208) | uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRo...
function readpng_cleanup (line 305) | void readpng_cleanup(int free_image_data)
FILE: tess-two/jni/libpng/contrib/gregbook/readpng.h
type uch (line 72) | typedef unsigned char uch;
type ush (line 73) | typedef unsigned short ush;
type ulg (line 74) | typedef unsigned long ulg;
FILE: tess-two/jni/libpng/contrib/gregbook/readpng2.c
function readpng2_version_info (line 82) | void readpng2_version_info(void)
function readpng2_check_sig (line 94) | int readpng2_check_sig(uch *sig, int num)
function readpng2_init (line 104) | int readpng2_init(mainprog_info *mainprog_ptr)
function readpng2_decode_data (line 189) | int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg l...
function readpng2_info_callback (line 216) | static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
function readpng2_row_callback (line 389) | static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row,
function readpng2_end_callback (line 436) | static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr)
function readpng2_cleanup (line 467) | void readpng2_cleanup(mainprog_info *mainprog_ptr)
function readpng2_warning_handler (line 480) | static void readpng2_warning_handler(png_structp png_ptr, png_const_char...
function readpng2_error_handler (line 488) | static void readpng2_error_handler(png_structp png_ptr, png_const_charp ...
FILE: tess-two/jni/libpng/contrib/gregbook/readpng2.h
type rpng2_states (line 72) | enum rpng2_states {
type uch (line 78) | typedef unsigned char uch;
type ush (line 79) | typedef unsigned short ush;
type ulg (line 80) | typedef unsigned long ulg;
type mainprog_info (line 82) | typedef struct _mainprog_info {
FILE: tess-two/jni/libpng/contrib/gregbook/readppm.c
function readpng_version_info (line 73) | void readpng_version_info()
function readpng_init (line 81) | int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
function readpng_get_bgcolor (line 133) | int readpng_get_bgcolor(uch *red, uch *green, uch *blue)
function uch (line 143) | uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRo...
function readpng_cleanup (line 177) | void readpng_cleanup(int free_image_data)
FILE: tess-two/jni/libpng/contrib/gregbook/rpng-win.c
function repl_getch (line 96) | int repl_getch( void )
function rpng_win_create_window (line 484) | static int rpng_win_create_window(HINSTANCE hInst, int showmode)
function rpng_win_display_image (line 579) | static int rpng_win_display_image()
function rpng_win_cleanup (line 671) | static void rpng_win_cleanup()
function LRESULT (line 688) | LRESULT CALLBACK rpng_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARA...
FILE: tess-two/jni/libpng/contrib/gregbook/rpng-x.c
function main (line 164) | int main(int argc, char **argv)
function rpng_x_create_window (line 435) | static int rpng_x_create_window(void)
function rpng_x_display_image (line 692) | static int rpng_x_display_image(void)
function rpng_x_cleanup (line 867) | static void rpng_x_cleanup(void)
function rpng_x_msb (line 900) | static int rpng_x_msb(ulg u32val)
FILE: tess-two/jni/libpng/contrib/gregbook/rpng2-win.c
function repl_getch (line 109) | int repl_getch( void )
type rgb_color (line 197) | struct rgb_color {
type background_pattern (line 238) | struct background_pattern {
type background_pattern (line 260) | struct background_pattern
function WinMain (line 276) | int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int s...
function rpng2_win_init (line 643) | static void rpng2_win_init()
function rpng2_win_create_window (line 687) | static int rpng2_win_create_window()
function rpng2_win_load_bg_image (line 833) | static int rpng2_win_load_bg_image()
function rpng2_win_display_row (line 1070) | static void rpng2_win_display_row(ulg row)
function rpng2_win_cleanup (line 1191) | static void rpng2_win_cleanup()
function LRESULT (line 1218) | LRESULT CALLBACK rpng2_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPAR...
FILE: tess-two/jni/libpng/contrib/gregbook/rpng2-x.c
type rgb_color (line 219) | struct rgb_color {
type background_pattern (line 261) | struct background_pattern {
type background_pattern (line 284) | struct background_pattern
function main (line 308) | int main(int argc, char **argv)
function rpng2_x_init (line 773) | static void rpng2_x_init(void)
function rpng2_x_create_window (line 825) | static int rpng2_x_create_window(void)
function rpng2_x_load_bg_image (line 1076) | static int rpng2_x_load_bg_image(void)
function rpng2_x_display_row (line 1372) | static void rpng2_x_display_row(ulg row)
function rpng2_x_finish_display (line 1594) | static void rpng2_x_finish_display(void)
function rpng2_x_redisplay_image (line 1612) | static void rpng2_x_redisplay_image(ulg startcol, ulg startrow,
function rpng2_x_reload_bg_image (line 1864) | static void rpng2_x_reload_bg_image(void)
function is_number (line 2065) | static int is_number(char *p)
function rpng2_x_cleanup (line 2081) | static void rpng2_x_cleanup(void)
function rpng2_x_msb (line 2124) | static int rpng2_x_msb(ulg u32val)
FILE: tess-two/jni/libpng/contrib/gregbook/wpng.c
function main (line 154) | int main(int argc, char **argv)
function wpng_isvalid_latin1 (line 789) | static int wpng_isvalid_latin1(uch *p, int len)
function wpng_cleanup (line 807) | static void wpng_cleanup(void)
FILE: tess-two/jni/libpng/contrib/gregbook/writepng.c
function writepng_version_info (line 70) | void writepng_version_info(void)
function writepng_init (line 84) | int writepng_init(mainprog_info *mainprog_ptr)
function writepng_encode_image (line 259) | int writepng_encode_image(mainprog_info *mainprog_ptr)
function writepng_encode_row (line 297) | int writepng_encode_row(mainprog_info *mainprog_ptr) /* NON-interlaced ...
function writepng_encode_finish (line 327) | int writepng_encode_finish(mainprog_info *mainprog_ptr) /* NON-interla...
function writepng_cleanup (line 356) | void writepng_cleanup(mainprog_info *mainprog_ptr)
function writepng_error_handler (line 369) | static void writepng_error_handler(png_structp png_ptr, png_const_charp ...
FILE: tess-two/jni/libpng/contrib/gregbook/writepng.h
type uch (line 86) | typedef unsigned char uch;
type ush (line 87) | typedef unsigned short ush;
type ulg (line 88) | typedef unsigned long ulg;
type mainprog_info (line 90) | typedef struct _mainprog_info {
FILE: tess-two/jni/libpng/contrib/intel/filter_sse2_intrinsics.c
function __m128i (line 32) | static __m128i load4(const void* p) {
function store4 (line 36) | static void store4(void* p, __m128i v) {
function __m128i (line 40) | static __m128i load3(const void* p) {
function store3 (line 52) | static void store3(void* p, __m128i v) {
function png_read_filter_row_sub3_sse2 (line 65) | void png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
function png_read_filter_row_sub4_sse2 (line 94) | void png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
function png_read_filter_row_avg3_sse2 (line 115) | void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
function png_read_filter_row_avg4_sse2 (line 164) | void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
function __m128i (line 198) | static __m128i abs_i16(__m128i x) {
function __m128i (line 217) | static __m128i if_then_else(__m128i c, __m128i t, __m128i e) {
function png_read_filter_row_paeth3_sse2 (line 225) | void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
function png_read_filter_row_paeth4_sse2 (line 319) | void png_read_filter_row_paeth4_sse2(png_row_infop row_info, png_bytep row,
FILE: tess-two/jni/libpng/contrib/intel/intel_init.c
function png_init_filter_functions_sse2 (line 21) | void
FILE: tess-two/jni/libpng/contrib/libtests/fakepng.c
function put_uLong (line 13) | void
function put_chunk (line 22) | void
function main (line 57) | int
FILE: tess-two/jni/libpng/contrib/libtests/makepng.c
function flooru (line 154) | static unsigned int
function png_byte (line 161) | static png_byte
type chunk_insert (line 171) | typedef struct chunk_insert
function channels_of_type (line 179) | static unsigned int
function pixel_depth_of_type (line 200) | static unsigned int
function image_size_of_type (line 206) | static unsigned int
function set_color (line 237) | static void
function generate_palette (line 248) | static int
function set_value (line 328) | static void
function generate_row (line 389) | static int /* filter mask for row */
function makepng_warning (line 747) | static void PNGCBAPI
function makepng_error (line 762) | static void PNGCBAPI
function write_png (line 769) | static int /* 0 on success, else an error code */
function load_file (line 995) | static size_t
function png_size_t (line 1097) | static png_size_t
function check_param_count (line 1143) | static void
function insert_iCCP (line 1153) | static void
function clear_text (line 1246) | static void
function set_text (line 1258) | static void
function insert_tEXt (line 1298) | static void
function insert_zTXt (line 1309) | static void
function insert_iTXt (line 1321) | static void
function insert_hIST (line 1335) | static void
function png_byte (line 1364) | static png_byte
function insert_sBIT (line 1377) | static void
function insert_sPLT (line 1415) | static void
function find_parameters (line 1422) | static int
function bad_parameter_count (line 1450) | static void
function chunk_insert (line 1457) | static chunk_insert *
function chunk_insert (line 1484) | static chunk_insert *
function png_charp (line 1564) | static png_charp
function png_charp (line 1579) | static png_charp
function chunk_insert (line 1606) | static chunk_insert *
function chunk_insert (line 1619) | static chunk_insert *
function parse_color (line 1639) | static void
function main (line 1677) | int
FILE: tess-two/jni/libpng/contrib/libtests/pngimage.c
type transform_info (line 92) | struct transform_info
function is_combo (line 281) | static int
function first_transform (line 287) | static int
function is_bad_combo (line 293) | static int
function validate_T (line 335) | static void
type buffer_list (line 366) | struct buffer_list
type buffer (line 372) | struct buffer
function buffer_init (line 381) | static void
function buffer_destroy_list (line 390) | static void
function buffer_destroy (line 401) | static void
function buffer_start_write (line 410) | static void
function buffer_start_read (line 419) | static void
type buffer (line 431) | struct buffer
type buffer (line 435) | struct buffer
type buffer_list (line 438) | struct buffer_list
type buffer_list (line 439) | struct buffer_list
type buffer_list (line 441) | struct buffer_list
function buffer_from_file (line 458) | static int
type error_level (line 506) | typedef enum
type display (line 540) | struct display
function display_init (line 588) | static void
function display_clean_read (line 612) | static void
function display_clean_write (line 620) | static void
function display_clean (line 628) | static void
function display_destroy (line 645) | static void
type display (line 656) | struct display
type display (line 660) | struct display
type display (line 660) | struct display
function display_log (line 680) | static void VGATTR
function display_warning (line 767) | static void PNGCBAPI
function display_error (line 773) | static void PNGCBAPI
function display_cache_file (line 781) | static void
function buffer_read (line 808) | static void
function read_function (line 857) | static void PNGCBAPI
function read_png (line 863) | static void
function update_display (line 921) | static void
function compare_read (line 993) | static int
function buffer_write (line 1268) | static void
function write_function (line 1313) | static void PNGCBAPI
function write_png (line 1319) | static void
function skip_transform (line 1368) | static int
function test_one_file (line 1404) | static void
function do_test (line 1556) | static int
function main (line 1574) | int
function main (line 1706) | int
FILE: tess-two/jni/libpng/contrib/libtests/pngstest.c
function make_random_bytes (line 86) | static void
function reseed (line 113) | static void
function random_color (line 120) | static void
function closestinteger (line 129) | static double
function png_byte (line 136) | static png_byte
function png_uint_16 (line 143) | static png_uint_16
function init_sRGB_to_d (line 156) | static void
function png_byte (line 172) | static png_byte
function png_byte (line 178) | static png_byte
function png_byte (line 185) | static png_byte
function png_uint_16 (line 199) | static png_uint_16
function png_uint_16 (line 205) | static png_uint_16
function png_uint_16 (line 211) | static png_uint_16
function png_uint_16 (line 218) | static png_uint_16
function YfromRGBint (line 225) | static double
function power_law_error8 (line 238) | static int
function power_law_error16 (line 256) | static int
function compare_8bit (line 276) | static int
function compare_16bit (line 299) | static int
function print_opts (line 340) | static void
function png_uint_32 (line 452) | static png_uint_32
type format_list (line 473) | typedef struct
function format_init (line 479) | static void format_init(format_list *pf)
function format_clear (line 487) | static void format_clear(format_list *pf)
function format_is_initial (line 495) | static int format_is_initial(format_list *pf)
function format_set (line 505) | static int format_set(format_list *pf, png_uint_32 format)
function format_unset (line 514) | static int format_unset(format_list *pf, png_uint_32 format)
function format_isset (line 523) | static int format_isset(format_list *pf, png_uint_32 format)
function format_default (line 529) | static void format_default(format_list *pf, int redundant)
type Image (line 574) | typedef struct
function newimage (line 593) | static void
function resetimage (line 601) | static void
function freebuffer (line 611) | static void
function freeimage (line 623) | static void
function initimage (line 652) | static void initimage(Image *image, png_uint_32 opts, const char *file_n...
function allocbuffer (line 666) | static void
function check16 (line 692) | static int
function checkbuffer (line 705) | static void
function logerror (line 726) | static int
function logclose (line 749) | static int
function checkopaque (line 761) | static int
type Pixel (line 788) | typedef struct
type Background (line 796) | typedef struct
function gp_g8 (line 813) | static void
function gp_ga8 (line 822) | static void
function gp_ag8 (line 832) | static void
function gp_rgb8 (line 842) | static void
function gp_bgr8 (line 854) | static void
function gp_rgba8 (line 866) | static void
function gp_bgra8 (line 878) | static void
function gp_argb8 (line 891) | static void
function gp_abgr8 (line 904) | static void
function gp_g16 (line 916) | static void
function gp_ga16 (line 925) | static void
function gp_ag16 (line 935) | static void
function gp_rgb16 (line 945) | static void
function gp_bgr16 (line 957) | static void
function gp_rgba16 (line 969) | static void
function gp_bgra16 (line 981) | static void
function gp_argb16 (line 994) | static void
function gp_abgr16 (line 1007) | static void
function gpc_noop (line 1203) | static void
function gpc_nop8 (line 1214) | static void
function gpc_nop6 (line 1233) | static void
function gpc_bckg (line 1253) | static void
function gpc_bckc (line 1273) | static void
function gpc_g8 (line 1303) | static void
function gpc_g8b (line 1319) | static void
function gpc_lin (line 1348) | static void
function gpc_pre (line 1384) | static void
function gpc_preq (line 1420) | static void
function gpc_glin (line 1456) | static void
function gpc_gpre (line 1472) | static void
function gpc_gprq (line 1488) | static void
function gpc_Lin (line 1505) | static void
function gpc_Pre (line 1543) | static void
function gpc_Preq (line 1581) | static void
function gpc_Glin (line 1620) | static void
function gpc_Gpre (line 1640) | static void
function gpc_Gprq (line 1658) | static void
function gpc_sRGB (line 1676) | static void
function gpc_unpg (line 1712) | static void
function gpc_unpc (line 1731) | static void
function gpc_b16g (line 1752) | static void
function gpc_b16c (line 1771) | static void
function gpc_sG (line 1796) | static void
function gpc_sGp (line 1806) | static void
function gpc_sCp (line 1825) | static void
function gpc_gb16 (line 1847) | static void
function gpc_cb16 (line 1869) | static void
function gpc_A (line 1902) | static void
function gpc_g16 (line 1913) | static void
function gpc_g16q (line 1922) | static void
type Transform (line 2024) | typedef struct
function transform_from_formats (line 2063) | static void
function init_error_via_linear (line 2285) | static void
function print_pixel (line 2316) | static void
function logpixel (line 2346) | static int
function cmppixel (line 2419) | static int
function png_byte (line 2527) | static png_byte
function compare_two_images (line 2598) | static int
function read_file (line 2940) | static int
function read_one_file (line 3041) | static int
function write_one_file (line 3124) | static int
function testimage (line 3297) | static int
function test_one_file (line 3435) | static int
function main (line 3478) | int
function else (line 3585) | else if (strcmp(arg, "--touch") == 0)
function main (line 3813) | int main(void)
FILE: tess-two/jni/libpng/contrib/libtests/pngunknown.c
type png_byte (line 60) | typedef png_byte *png_const_bytep;
function clear_keep (line 326) | static void
function find (line 334) | static int
function findb (line 347) | static int
function find_by_flag (line 360) | static int
function ancillary (line 371) | static int
function ancillaryb (line 378) | static int
type display (line 386) | typedef struct
function init_display (line 404) | static void
function clean_display (line 416) | static void
function display_rc (line 446) | static int
function warning (line 462) | static void PNGCBAPI
function png_uint_32 (line 471) | static png_uint_32
function read_callback (line 504) | static int PNGCBAPI
function png_uint_32 (line 577) | static png_uint_32
function png_uint_32 (line 630) | static png_uint_32
function check (line 651) | static int
function check_error (line 868) | static void
function check_handling (line 884) | static void
function perform_one_test (line 1002) | static void
function perform_one_test_safe (line 1067) | static void
function PNG_NORETURN (line 1097) | static PNG_NORETURN void
function main (line 1106) | int
function main (line 1267) | int
function main (line 1278) | int
FILE: tess-two/jni/libpng/contrib/libtests/pngvalid.c
type png_byte (line 78) | typedef png_byte *png_const_bytep;
type png_store (line 171) | struct png_store
type png_store (line 172) | struct png_store
function safecat (line 213) | static size_t safecat(char *buffer, size_t bufsize, size_t pos,
function safecatn (line 226) | static size_t safecatn(char *buffer, size_t bufsize, size_t pos, int n)
function safecatd (line 234) | static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d,
function png_fixed_point (line 254) | static png_fixed_point
function make_random_bytes (line 269) | static void
function make_four_random_bytes (line 294) | static void
function randomize (line 302) | static void
function png_byte (line 312) | static png_byte
function png_uint_16 (line 321) | static png_uint_16
function png_uint_32 (line 331) | static png_uint_32
function random_mod (line 344) | static unsigned int
function random_choice (line 353) | static int
function standard_name (line 379) | static size_t
function standard_name_from_id (line 419) | static size_t
function next_format (line 449) | static int
function sample (line 519) | static unsigned int
function pixel_copy (line 578) | static void
function row_copy (line 621) | static void
function pixel_cmp (line 644) | static int
type png_store_buffer (line 692) | typedef struct png_store_buffer
type store_palette_entry (line 700) | typedef struct store_palette_entry /* record of a single palette entry */
type png_store_file (line 708) | typedef struct png_store_file
type store_pool (line 724) | typedef struct store_pool
type png_store (line 742) | typedef struct png_store
function store_pool_mark (line 804) | static void
function png_uint_32 (line 816) | static png_uint_32
function store_pool_init (line 834) | static void
function store_init (line 846) | static void
function store_freebuffer (line 885) | static void
function store_freenew (line 896) | static void
function store_storenew (line 914) | static void
function store_freefile (line 929) | static void
function bits_of (line 949) | static unsigned int
function store_storefile (line 968) | static void
function store_message (line 1006) | static size_t
function store_verbose (line 1046) | static void
function store_log (line 1061) | static void
function internal_error (line 1079) | static void
function store_error (line 1093) | static void PNGCBAPI
function store_warning (line 1109) | static void PNGCBAPI
function png_bytep (line 1125) | static png_bytep
function store_image_free (line 1140) | static void
function store_ensure_image (line 1162) | static void
function store_image_check (line 1229) | static void
function valid_chunktype (line 1260) | static int
function store_write (line 1281) | static void PNGCBAPI
function store_flush (line 1375) | static void PNGCBAPI
function store_read_buffer_size (line 1382) | static size_t
function store_read_buffer_avail (line 1393) | static size_t
function store_read_buffer_next (line 1417) | static int
function store_read_imp (line 1443) | static void
function png_size_t (line 1467) | static png_size_t
function store_read (line 1701) | static void PNGCBAPI
function store_progressive_read (line 1713) | static void
function store_palette_entry (line 1741) | static store_palette_entry *
function store_palette_entry (line 1766) | static store_palette_entry *
type store_memory (line 1790) | typedef struct store_memory
function store_pool_error (line 1805) | static void
function store_memory_free (line 1818) | static void
function store_pool_delete (line 1852) | static void
function png_voidp (line 1904) | static png_voidp PNGCBAPI
function store_free (line 1953) | static void PNGCBAPI
function store_write_reset (line 1990) | static void
function png_structp (line 2024) | static png_structp
function store_read_reset (line 2077) | static void
function store_read_set (line 2115) | static void
function png_structp (line 2153) | static png_structp
function store_delete (line 2214) | static void
type modifier_state (line 2232) | typedef enum modifier_state
type CIE_color (line 2239) | typedef struct CIE_color
type color_encoding (line 2249) | typedef struct color_encoding
function chromaticity_x (line 2263) | static double
function chromaticity_y (line 2269) | static double
function CIE_color (line 2275) | static CIE_color
function normalize_color_encoding (line 2289) | static void
function safecat_color_encoding (line 2311) | static size_t
type png_modifier (line 2353) | typedef struct png_modifier
function fail (line 2501) | static int fail(png_modifier *pm)
function modifier_init (line 2507) | static void
function digitize (line 2586) | static double digitize(double value, int depth, int do_round)
function abserr (line 2613) | static double abserr(const png_modifier *pm, int in_depth, int out_depth)
function calcerr (line 2625) | static double calcerr(const png_modifier *pm, int in_depth, int out_depth)
function pcerr (line 2638) | static double pcerr(const png_modifier *pm, int in_depth, int out_depth)
function outerr (line 2661) | static double outerr(const png_modifier *pm, int in_depth, int out_depth)
function outlog (line 2693) | static double outlog(const png_modifier *pm, int in_depth, int out_depth)
function output_quantization_factor (line 2731) | static int output_quantization_factor(const png_modifier *pm, int in_depth,
type png_modification (line 2751) | typedef struct png_modification
function modification_reset (line 2770) | static void
function modification_init (line 2782) | static void
function modifier_current_encoding (line 2794) | static void
function safecat_current_encoding (line 2808) | static size_t
function modifier_total_encodings (line 2839) | static unsigned int
function modifier_encoding_iterate (line 2857) | static void
function modifier_reset (line 2888) | static void
function modifier_set_encoding (line 2914) | static void
function modifier_color_encoding_is_sRGB (line 2955) | static int
function modifier_color_encoding_is_set (line 2962) | static int
function modifier_crc (line 2969) | static void
function modifier_setbuffer (line 2982) | static void
function modifier_read_imp (line 2994) | static void
function modifier_read (line 3199) | static void PNGCBAPI
function modifier_progressive_read (line 3214) | static void
function png_structp (line 3269) | static png_structp
type gama_modification (line 3296) | typedef struct gama_modification
function gama_modify (line 3302) | static int
function gama_modification_init (line 3313) | static void
type chrm_modification (line 3328) | typedef struct chrm_modification
function chrm_modify (line 3335) | static int
function chrm_modification_init (line 3353) | static void
type srgb_modification (line 3381) | typedef struct srgb_modification
function srgb_modify (line 3387) | static int
function srgb_modification_init (line 3398) | static void
type sbit_modification (line 3423) | typedef struct sbit_modification
function sbit_modify (line 3429) | static int
function sbit_modification_init (line 3478) | static void
function store_palette_entry (line 3545) | static store_palette_entry *
function init_standard_palette (line 3644) | static void
function set_random_tRNS (line 3691) | static void
function npasses_from_interlace_type (line 3738) | static int
function bit_size (line 3754) | static unsigned int
function transform_rowsize (line 3779) | static size_t
function png_uint_32 (line 3791) | static png_uint_32
function png_uint_32 (line 3825) | static png_uint_32
function png_uint_32 (line 3837) | static png_uint_32
function png_uint_32 (line 3848) | static png_uint_32
function transform_row (line 3859) | static void
function check_interlace_type (line 3988) | static void
function interlace_row (line 4028) | static void
function deinterlace_row (line 4052) | static void
function choose_random_filter (line 4081) | static void
function make_transform_image (line 4102) | static void
function make_transform_images (line 4266) | static void
function size_row (line 4300) | static void
function make_size_image (line 4321) | static void
function make_size (line 4518) | static void
function make_size_images (line 4556) | static void
function standard_row (line 4573) | static void
function sBIT0_error_fn (line 4594) | static void
function sBIT_error_fn (line 4603) | static void
function make_error (line 4636) | static void
function make_errors (line 4775) | static int
function perform_error_test (line 4807) | static void
function perform_formatting_test (line 4836) | static void
type standard_display (line 4933) | typedef struct standard_display
function standard_display_init (line 4968) | static void
function standard_palette_init (line 5009) | static void
function read_palette (line 5041) | static int
function standard_palette_validate (line 5133) | static void
function standard_info_part1 (line 5175) | static void
function standard_info_part2 (line 5339) | static void
function standard_info_imp (line 5365) | static void
function standard_info (line 5394) | static void PNGCBAPI
function progressive_row (line 5406) | static void PNGCBAPI
function sequential_row (line 5468) | static void
function standard_check_text (line 5533) | static void
function standard_text_validate (line 5614) | static void
function standard_row_validate (line 5646) | static void
function standard_image_validate (line 5687) | static void
function standard_end (line 5706) | static void PNGCBAPI
function test_standard (line 5812) | static int
function perform_standard_test (line 5834) | static void
function test_size (line 5858) | static int
function perform_size_test (line 5973) | static void
type image_pixel (line 6008) | typedef struct image_pixel
function image_pixel_setf (line 6043) | static void
function image_pixel_init (line 6074) | static void
function image_pixel_convert_PLTE (line 6188) | static void
function image_pixel_add_alpha (line 6215) | static void
type transform_display (line 6288) | struct transform_display
type image_transform (line 6289) | typedef struct image_transform
type transform_display (line 6346) | typedef struct transform_display
function transform_set_encoding (line 6367) | static void
function UNUSED (line 6398) | UNUSED(this)
function transform_display_init (line 6523) | static void
function transform_info_imp (line 6544) | static void
function transform_info (line 6699) | static void PNGCBAPI
function transform_range_check (line 6706) | static void
function transform_image_validate (line 6751) | static void
function transform_end (line 6915) | static void PNGCBAPI
function transform_test (line 6929) | static void
function image_transform_default_ini (line 7035) | void /* private, but almost always needed */
function image_transform_default_add (line 7043) | static int
function image_transform_png_set_palette_to_rgb_set (line 7059) | static void
function image_transform_png_set_palette_to_rgb_mod (line 7067) | static void
function image_transform_png_set_palette_to_rgb_add (line 7078) | static int
function image_transform_png_set_tRNS_to_alpha_set (line 7097) | static void
function image_transform_png_set_tRNS_to_alpha_mod (line 7112) | static void
function image_transform_png_set_gray_to_rgb_set (line 7175) | static void
function image_transform_png_set_gray_to_rgb_mod (line 7184) | static void
function image_transform_png_set_gray_to_rgb_add (line 7216) | static int
function image_transform_png_set_expand_set (line 7235) | static void
function image_transform_png_set_expand_mod (line 7247) | static void
function image_transform_png_set_expand_add (line 7264) | static int
function image_transform_png_set_expand_gray_1_2_4_to_8_set (line 7288) | static void
function image_transform_png_set_expand_gray_1_2_4_to_8_mod (line 7298) | static void
function image_transform_png_set_expand_gray_1_2_4_to_8_add (line 7315) | static int
function image_transform_png_set_expand_16_set (line 7342) | static void
function image_transform_png_set_expand_16_mod (line 7357) | static void
function image_transform_png_set_expand_16_add (line 7377) | static int
function image_transform_png_set_scale_16_set (line 7397) | static void
function image_transform_png_set_scale_16_mod (line 7409) | static void
function image_transform_png_set_scale_16_add (line 7426) | static int
function image_transform_png_set_strip_16_set (line 7445) | static void
function image_transform_png_set_strip_16_mod (line 7457) | static void
function image_transform_png_set_strip_16_add (line 7497) | static int
function image_transform_png_set_strip_alpha_set (line 7516) | static void
function image_transform_png_set_strip_alpha_mod (line 7524) | static void
function image_transform_png_set_strip_alpha_add (line 7540) | static int
function image_transform_png_set_rgb_to_gray_ini (line 7600) | static void
function image_transform_png_set_rgb_to_gray_set (line 7763) | static void
function image_transform_png_set_rgb_to_gray_mod (line 7890) | static void
function image_transform_png_set_rgb_to_gray_add (line 8227) | static int
function image_transform_png_set_background_set (line 8259) | static void
function image_transform_png_set_background_mod (line 8322) | static void
function image_transform_png_set_invert_alpha_set (line 8407) | static void
function image_transform_png_set_invert_alpha_mod (line 8415) | static void
function image_transform_png_set_invert_alpha_add (line 8426) | static int
function image_transform_png_set_bgr_set (line 8453) | static void
function image_transform_png_set_bgr_mod (line 8461) | static void
function image_transform_png_set_bgr_add (line 8473) | static int
function image_transform_png_set_swap_alpha_set (line 8500) | static void
function image_transform_png_set_swap_alpha_mod (line 8508) | static void
function image_transform_png_set_swap_alpha_add (line 8520) | static int
function image_transform_png_set_swap_set (line 8545) | static void
function image_transform_png_set_swap_mod (line 8553) | static void
function image_transform_png_set_swap_add (line 8564) | static int
function image_transform_png_set_filler_set (line 8599) | static void
function image_transform_png_set_filler_mod (line 8620) | static void
function image_transform_png_set_filler_add (line 8647) | static int
function image_transform_png_set_add_alpha_set (line 8672) | static void
function image_transform_png_set_add_alpha_mod (line 8687) | static void
function image_transform_png_set_add_alpha_add (line 8708) | static int
function image_transform_png_set_packing_set (line 8735) | static void
function image_transform_png_set_packing_mod (line 8744) | static void
function image_transform_png_set_packing_add (line 8759) | static int
function image_transform_png_set_packswap_set (line 8785) | static void
function image_transform_png_set_packswap_mod (line 8794) | static void
function image_transform_png_set_packswap_add (line 8805) | static int
function image_transform_png_set_invert_mono_set (line 8830) | static void
function image_transform_png_set_invert_mono_mod (line 8838) | static void
function image_transform_png_set_invert_mono_add (line 8849) | static int
function image_transform_png_set_shift_set (line 8877) | static void
function image_transform_png_set_shift_mod (line 8899) | static void
function image_transform_png_set_shift_add (line 8931) | static int
function _set (line 8950) | static void
function _mod (line 8958) | static void
function _add (line 8966) | static int
function transform_enable (line 8983) | static void
function transform_disable (line 9016) | static void
function image_transform_reset_count (line 9037) | static void
function image_transform_test_counter (line 9057) | static int
function png_uint_32 (line 9079) | static png_uint_32
function perform_transform_test (line 9157) | static void
type gamma_display (line 9208) | typedef struct gamma_display
function gamma_display_init (line 9233) | static void
function gamma_info_imp (line 9264) | static void
function gamma_info (line 9383) | static void PNGCBAPI
type validate_info (line 9394) | typedef struct validate_info
function init_validate_info (line 9425) | static void
function gamma_component_compose (line 9522) | static double
function gamma_component_validate (line 9589) | static double
function gamma_image_validate (line 10158) | static void
function gamma_end (line 10380) | static void PNGCBAPI
function gamma_test (line 10398) | static void
function gamma_threshold_test (line 10553) | static void gamma_threshold_test(png_modifier *pm, png_byte colour_type,
function perform_gamma_threshold_tests (line 10571) | static void
function gamma_transform_test (line 10609) | static void gamma_transform_test(png_modifier *pm,
function perform_gamma_transform_tests (line 10641) | static void perform_gamma_transform_tests(png_modifier *pm)
function perform_gamma_sbit_tests (line 10665) | static void perform_gamma_sbit_tests(png_modifier *pm)
function perform_gamma_scale16_tests (line 10709) | static void perform_gamma_scale16_tests(png_modifier *pm)
function gamma_composition_test (line 10770) | static void gamma_composition_test(png_modifier *pm,
function perform_gamma_composition_tests (line 10923) | static void
function init_gamma_errors (line 10962) | static void
function print_one (line 10972) | static void
function summarize_gamma_errors (line 10979) | static void
function perform_gamma_test (line 11007) | static void
function png_uint_32 (line 11180) | static png_uint_32
function png_uint_32 (line 11190) | static png_uint_32
function png_pass_row_shift (line 11200) | static int
function png_pass_col_shift (line 11234) | static int
function png_uint_32 (line 11269) | static png_uint_32
function png_uint_32 (line 11288) | static png_uint_32
function png_row_in_interlace_pass (line 11307) | static int
function png_col_in_interlace_pass (line 11320) | static int
function png_uint_32 (line 11333) | static png_uint_32
function png_uint_32 (line 11352) | static png_uint_32
function perform_interlace_macro_validation (line 11371) | static void
function signal_handler (line 11552) | static void signal_handler(int signum)
function main (line 11610) | int main(int argc, char **argv)
function main (line 12210) | int main(void)
FILE: tess-two/jni/libpng/contrib/libtests/readpng.c
function read_png (line 34) | static int
function main (line 110) | int
FILE: tess-two/jni/libpng/contrib/libtests/tarith.c
function png_warning (line 36) | void png_warning(png_const_structrp png_ptr, png_const_charp msg)
function png_fixed_warning (line 43) | void png_fixed_warning(png_const_structrp png_ptr, png_const_charp msg)
function validation_ascii_to_fp (line 75) | int validation_ascii_to_fp(int count, int argc, char **argv)
type checkfp_state (line 275) | typedef enum checkfp_state
type checkfp_command (line 297) | typedef struct
type checkfp_control (line 309) | typedef struct
function check_one_character (line 328) | static int check_one_character(checkfp_command *co, checkfp_control c, i...
function check_all_characters (line 520) | static int check_all_characters(checkfp_command *co, checkfp_control c)
function check_some_characters (line 533) | static int check_some_characters(checkfp_command *co, checkfp_control c,
function validation_checkfp (line 556) | int validation_checkfp(int count, int argc, char **argv)
function validation_muldiv (line 606) | int validation_muldiv(int count, int argc, char **argv)
function png_uint_32 (line 737) | static png_uint_32 png_log8bit(unsigned x)
function png_uint_32 (line 745) | static png_uint_32 png_log16bit(png_uint_32 x)
function png_uint_32 (line 753) | static png_uint_32 png_exp(png_uint_32 x)
function png_byte (line 758) | static png_byte png_exp8bit(png_uint_32 log)
function png_uint_16 (line 763) | static png_uint_16 png_exp16bit(png_uint_32 log)
function validation_gamma (line 769) | int validation_gamma(int argc, char **argv)
function main (line 955) | int main(int argc, char **argv)
FILE: tess-two/jni/libpng/contrib/libtests/timepng.c
type io_data (line 61) | typedef struct
function read_by_row (line 83) | static void read_by_row(png_structp png_ptr, png_infop info_ptr,
function mytime (line 182) | static int mytime(struct timespec *t)
function perform_one_test (line 193) | static int perform_one_test(FILE *fp, int nfiles, png_int_32 transforms)
function add_one_file (line 263) | static int add_one_file(FILE *fp, char *name)
function usage (line 333) | static void
function main (line 363) | int main(int argc, char **argv)
function main (line 607) | int main(void) { return 77; }
FILE: tess-two/jni/libpng/contrib/mips-msa/linux.c
function png_have_msa (line 27) | static int
FILE: tess-two/jni/libpng/contrib/pngminus/png2pnm.c
function main (line 62) | int main(int argc, char *argv[])
function usage (line 169) | void usage()
function BOOL (line 193) | BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file,
FILE: tess-two/jni/libpng/contrib/pngminus/pnm2png.c
function main (line 64) | int main(int argc, char *argv[])
function usage (line 168) | void usage()
function BOOL (line 190) | BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL int...
function get_token (line 514) | void get_token(FILE *pnm_file, char *token)
function png_uint_32 (line 557) | png_uint_32 get_data (FILE *pnm_file, int depth)
function png_uint_32 (line 590) | png_uint_32 get_value (FILE *pnm_file, int depth)
FILE: tess-two/jni/libpng/contrib/tools/checksum-icc.c
function read_one_file (line 18) | static int
function main (line 64) | int main(int argc, char **argv)
FILE: tess-two/jni/libpng/contrib/tools/cvtcolor.c
function usage (line 24) | static void
function component (line 33) | unsigned long
function main (line 48) | int
FILE: tess-two/jni/libpng/contrib/tools/genpng.c
type color (line 84) | struct color
type color (line 110) | struct color
function width_of (line 125) | static double
function coordinate_of (line 144) | static double
type arg (line 157) | struct arg
type arg (line 159) | struct arg
type arg (line 173) | struct arg
function define (line 237) | define sum(x) {
function define (line 246) | define results(x) {
function alpha_calc (line 293) | static double
function square_check (line 346) | static int
function inside_square_filled (line 364) | static int
function square_check_line (line 370) | static int
function check_square_filled (line 406) | static int
function inside_square (line 417) | static int
function check_square (line 426) | static int
function circle_check (line 458) | static int
function inside_circle_filled (line 481) | static int
function circle_check_line (line 487) | static int
function check_circle_filled (line 515) | static int
function inside_circle (line 521) | static int
function check_circle (line 527) | static int
function line_check (line 552) | static int
function inside_line (line 599) | static int
function check_line (line 605) | static int
function shape_fn_ptr (line 652) | static shape_fn_ptr
function parse_arg (line 673) | static void
function png_uint_32 (line 687) | static png_uint_32
function pixel (line 701) | static void
function main (line 746) | int
FILE: tess-two/jni/libpng/contrib/tools/makesRGB.c
function fsRGB (line 42) | double
function sRGB (line 48) | double
function finvsRGB (line 54) | double
function png_uint_16 (line 60) | png_uint_16
function main (line 74) | int
FILE: tess-two/jni/libpng/contrib/tools/png-fix-itxt.c
function main (line 41) | int
FILE: tess-two/jni/libpng/contrib/tools/pngcp.c
type error_level (line 117) | typedef enum
type value_list (line 162) | typedef struct value_list
type option (line 279) | typedef struct option
type display (line 391) | struct display
function display_init (line 481) | static void
function display_clean_read (line 505) | static void
function display_clean_write (line 519) | static void
function display_clean (line 533) | static void
function display_destroy (line 557) | static void
type display (line 564) | struct display
type display (line 568) | struct display
type display (line 568) | struct display
function display_log (line 588) | static void VGATTR
function text_stash (line 642) | static void
function text_restore (line 683) | static void
function png_byte (line 711) | static png_byte
function get_option (line 735) | static int
function set_opt_string_ (line 750) | static int
function set_opt_string (line 777) | static void
function record_opt (line 785) | static void
function opt_list_end (line 812) | static int
function push_opt (line 825) | static void
function next_opt (line 905) | static void
function compare_option (line 1133) | static int
function advance_opt (line 1160) | static int
function getallopts_ (line 1224) | static int
function getallopts (line 1251) | static int
function getsearchopts (line 1257) | static int
function find_val (line 1329) | static int
function opt_check (line 1372) | static int
function set_timer (line 1499) | static void
function start_timer (line 1511) | static void
function end_timer (line 1518) | static void
function print_time (line 1565) | static void
function checkdir (line 1578) | static int
function isdir (line 1590) | static int
function makename (line 1629) | static void
function display_warning (line 1685) | static void PNGCBAPI
function display_error (line 1695) | static void PNGCBAPI
function display_start_read (line 1703) | static void
function read_function (line 1727) | static void PNGCBAPI
function read_png (line 1745) | static void
function display_start_write (line 1855) | static void
function write_function (line 1883) | static void PNGCBAPI
function search_compression (line 1917) | static void
function set_compression (line 1929) | static void
function set_ICC_profile_compression (line 1941) | static void
function set_text_compression (line 1961) | static void
function write_png (line 1975) | static void
function set_windowBits_hi (line 2083) | static void
function better_options (line 2110) | static int
function print_search_results (line 2143) | static void
function log_search (line 2154) | static void
function cp_one_file (line 2166) | static void
function cppng (line 2277) | static int
function main (line 2304) | int
function main (line 2447) | int
FILE: tess-two/jni/libpng/contrib/tools/pngfix.c
type png_uint_16 (line 174) | typedef png_uint_16 udigit;
type png_uint_16p (line 175) | typedef png_uint_16p uarb;
type png_const_uint_16p (line 176) | typedef png_const_uint_16p uarbc;
function uarb_set (line 183) | static int
function uarb_copy (line 200) | static int
function uarb_inc (line 213) | static int
function uarb_add32 (line 253) | static int
function uarb_mult_digit (line 266) | static int
function uarb_mult32 (line 311) | static int
function uarb_shift (line 334) | static int
function uarb_cmp (line 362) | static int
function uarb_eq32 (line 383) | static int
function uarb_printx (line 397) | static void
function uarb_print (line 414) | static void
function make_random_bytes (line 448) | static void
function clear (line 474) | static void
function png_uint_32 (line 551) | static png_uint_32
function png_uint_32 (line 557) | static png_uint_32
function chunk_type_valid (line 574) | static int
type IDAT_list (line 612) | struct IDAT_list
function IDAT_list_init (line 621) | static void
function IDAT_list_size (line 630) | static size_t
function IDAT_list_end (line 641) | static void
type IDAT_list (line 658) | struct IDAT_list
type IDAT_list (line 659) | struct IDAT_list
type IDAT_list (line 662) | struct IDAT_list
type global (line 690) | struct global
function global_end (line 725) | static int
function global_init (line 737) | static void
function skip_chunk_type (line 756) | static int
type chunk (line 831) | struct chunk
type IDAT (line 832) | struct IDAT
type file (line 833) | struct file
function emit_string (line 915) | static void
function emit_error (line 948) | static void
type chunk (line 985) | struct chunk
type IDAT (line 986) | struct IDAT
function file_end (line 988) | static int
function file_init (line 1028) | static int
function log_error (line 1087) | static void
function type_char (line 1095) | static char
function type_name (line 1111) | static void
function type_sep (line 1120) | static void
type file (line 1127) | struct file
function PNG_NORETURN (line 1129) | PNG_NORETURN static void
function PNG_NORETURN (line 1184) | PNG_NORETURN static void
function type_message (line 1190) | static void
function file_getpos (line 1208) | static void
function file_setpos (line 1219) | static void
function getpos (line 1229) | static void
function read_byte (line 1244) | static int
function png_byte (line 1295) | static png_byte
function png_uint_32 (line 1312) | static png_uint_32
function skip_12 (line 1325) | static void
function write_byte (line 1341) | static void
function read_4 (line 1362) | static unsigned int
function crc_read_many (line 1386) | static int
function calc_image_size (line 1413) | static int
type chunk (line 1540) | struct chunk
function chunk_message (line 1567) | static void
function chunk_end (line 1573) | static void
function chunk_init (line 1582) | static void
function png_uint_32 (line 1611) | static png_uint_32
function setpos (line 1639) | static void
type file (line 1661) | struct file
function process_zTXt_iCCP (line 1663) | static int
function process_iTXt (line 1694) | static int
type IDAT (line 1750) | struct IDAT
function IDAT_end (line 1771) | static void
function IDAT_init (line 1791) | static void
function png_uint_32 (line 1826) | static png_uint_32
function process_IDAT (line 1907) | static int
type zlib (line 2011) | struct zlib
type zlib (line 2041) | struct zlib
type zlib (line 2056) | struct zlib
function zlib_message (line 2074) | static void
function zlib_end (line 2093) | static void
function zlib_reset (line 2169) | static int
function zlib_init (line 2195) | static int
function max_window_bits (line 2245) | static int
type zlib (line 2267) | struct zlib
type file (line 2286) | struct file
type chunk (line 2457) | struct chunk
function zlib_run (line 2489) | static int
function zlib_check (line 2607) | static int /* global function; not a member function */
type file (line 2783) | struct file
function process_chunk (line 2784) | static void
function png_uint_32 (line 2952) | static png_uint_32
function sync_stream (line 2964) | static void
function read_chunk (line 3082) | static void
type file (line 3167) | struct file
function error_handler (line 3169) | static void PNGCBAPI
function warning_handler (line 3175) | static void PNGCBAPI
function read_callback (line 3187) | static void PNGCBAPI
type control (line 3523) | struct control
function control_end (line 3530) | static int
type file (line 3536) | struct file
type control (line 3542) | struct control
function allocate (line 3547) | static void
function control_init (line 3565) | static int
function read_png (line 3576) | static int
function one_file (line 3651) | static int
function usage (line 3674) | static void
function main (line 3857) | int
function main (line 4022) | int
function main (line 4034) | int
function main (line 4042) | int
FILE: tess-two/jni/libpng/contrib/tools/sRGB.h
function sRGB_from_linear (line 19) | static double
function linear_from_sRGB (line 31) | static double
function YfromRGB (line 41) | static double
FILE: tess-two/jni/libpng/contrib/visupng/PngFile.c
type exception_context (line 23) | struct exception_context
type exception_context (line 24) | struct exception_context
function png_cexcept_error (line 35) | static void
function PngFileInitialize (line 50) | void PngFileInitialize (HWND hwnd)
function BOOL (line 77) | BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName)
function BOOL (line 87) | BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName)
function BOOL (line 99) | BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
function BOOL (line 295) | BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
function png_read_data (line 408) | static void
function png_write_data (line 425) | static void
function png_flush (line 437) | static void
FILE: tess-two/jni/libpng/contrib/visupng/VisualPng.c
function WinMain (line 79) | int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
function LRESULT (line 147) | LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam,
function BOOL (line 431) | BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message,
function BOOL (line 459) | BOOL CenterAbout (HWND hwndChild, HWND hwndParent)
function BOOL (line 513) | BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount,
function BOOL (line 618) | BOOL SearchPngList (
function BOOL (line 661) | BOOL LoadImageFile (HWND hwnd, PTSTR pstrPathName,
function BOOL (line 705) | BOOL DisplayImage (HWND hwnd, BYTE **ppDib,
function BOOL (line 773) | BOOL InitBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize)
function BOOL (line 807) | BOOL FillBitmap (
FILE: tess-two/jni/libpng/example.c
function check_if_png (line 245) | int check_if_png(char *file_name, FILE **fp)
function hilevel (line 591) | hilevel
function process_data (line 657) | int
function write_png (line 764) | void write_png(char *file_name /* , ... other image information ... */)
FILE: tess-two/jni/libpng/mips/filter_msa_intrinsics.c
function png_read_filter_row_up_msa (line 366) | void png_read_filter_row_up_msa(png_row_infop row_info, png_bytep row,
function png_read_filter_row_sub4_msa (line 457) | void png_read_filter_row_sub4_msa(png_row_infop row_info, png_bytep row,
function png_read_filter_row_sub3_msa (line 496) | void png_read_filter_row_sub3_msa(png_row_infop row_info, png_bytep row,
function png_read_filter_row_avg4_msa (line 541) | void png_read_filter_row_avg4_msa(png_row_infop row_info, png_bytep row,
function png_read_filter_row_avg3_msa (line 592) | void png_read_filter_row_avg3_msa(png_row_infop row_info, png_bytep row,
function png_read_filter_row_paeth4_msa (line 653) | void png_read_filter_row_paeth4_msa(png_row_infop row_info,
function png_read_filter_row_paeth3_msa (line 724) | void png_read_filter_row_paeth3_msa(png_row_infop row_info,
FILE: tess-two/jni/libpng/mips/mips_init.c
function png_init_filter_functions_msa (line 57) | void
FILE: tess-two/jni/libpng/png.c
type png_libpng_version_1_6_25 (line 17) | typedef png_libpng_version_1_6_25 Your_png_h_is_not_version_1_6_25;
function png_set_sig_bytes (line 26) | void PNGAPI
function png_sig_cmp (line 53) | int PNGAPI
function png_zfree (line 97) | void /* PRIVATE */
function png_reset_crc (line 106) | void /* PRIVATE */
function png_calculate_crc (line 118) | void /* PRIVATE */
function png_user_version_check (line 172) | int
function PNG_UNUSED (line 269) | PNG_UNUSED(mem_ptr)
function png_destroy_info_struct (line 365) | void PNGAPI
function png_data_freer (line 431) | void PNGAPI
function png_free_data (line 450) | void PNGAPI
function png_voidp (line 644) | png_voidp PNGAPI
function png_init_io (line 661) | void PNGAPI
function png_save_int_32 (line 684) | void PNGAPI
function png_convert_to_rfc1123_buffer (line 695) | int PNGAPI
function png_const_charp (line 749) | png_const_charp PNGAPI
function png_const_charp (line 769) | png_const_charp PNGAPI
function png_const_charp (line 801) | png_const_charp PNGAPI
function png_const_charp (line 808) | png_const_charp PNGAPI
function png_const_charp (line 816) | png_const_charp PNGAPI
function png_build_grayscale_palette (line 839) | void PNGAPI
function png_handle_as_unknown (line 890) | int PNGAPI
function png_chunk_unknown_handling (line 925) | int /* PRIVATE */
function png_reset_zstream (line 938) | int PNGAPI
function png_uint_32 (line 950) | png_uint_32 PNGAPI
function png_zstream_error (line 962) | void /* PRIVATE */
function png_colorspace_check_gamma (line 1034) | static int
function png_colorspace_set_gamma (line 1078) | void /* PRIVATE */
function png_colorspace_sync_info (line 1133) | void /* PRIVATE */
function png_colorspace_sync (line 1179) | void /* PRIVATE */
function png_xy_from_XYZ (line 1197) | static int
function png_XYZ_from_xy (line 1240) | static int
function png_XYZ_normalize (line 1506) | static int
function png_colorspace_endpoints_match (line 1556) | static int
function png_colorspace_check_xy (line 1582) | static int
function png_colorspace_check_XYZ (line 1608) | static int
function png_colorspace_set_xy_and_XYZ (line 1636) | static int
function png_colorspace_set_chromaticities (line 1684) | int /* PRIVATE */
function png_colorspace_set_endpoints (line 1721) | int /* PRIVATE */
function png_icc_tag_char (line 1750) | static char
function png_icc_tag_name (line 1760) | static void
function is_ICC_signature_char (line 1771) | static int
function is_ICC_signature (line 1778) | static int
function png_chunk_report (line 1821) | PNG_UNUSED(pos)
function icc_check_length (line 1934) | static int /* bool */
function png_compare_ICC_profile_with_sRGB (line 2271) | static int
function png_icc_set_sRGB (line 2392) | void /* PRIVATE */
function png_colorspace_set_ICC (line 2406) | int /* PRIVATE */
function png_colorspace_set_rgb_coefficients (line 2433) | void /* PRIVATE */
function png_gt (line 2502) | static int /* PRIVATE */
function png_check_fp_number (line 2676) | int /* PRIVATE */
function png_check_fp_string (line 2803) | int
function png_pow10 (line 2822) | static double
function png_ascii_from_fp (line 2859) | void /* PRIVATE */
function png_ascii_from_fixed (line 3174) | void /* PRIVATE */
function png_fixed_point (line 3252) | png_fixed_point
function png_muldiv (line 3276) | int
function png_fixed_point (line 3396) | png_fixed_point
function png_fixed_point (line 3412) | png_fixed_point
function png_gamma_significant (line 3433) | int /* PRIVATE */
function png_fixed_point (line 3444) | static png_fixed_point
function png_fixed_point (line 3467) | png_fixed_point
function png_int_32 (line 3563) | static png_int_32
function png_int_32 (line 3620) | static png_int_32
function png_uint_32 (line 3712) | static png_uint_32
function png_byte (line 3760) | static png_byte
function png_uint_16 (line 3775) | static png_uint_16
function png_byte (line 3788) | png_byte
function png_uint_16 (line 3836) | png_uint_16
function png_uint_16 (line 3871) | png_uint_16 /* PRIVATE */
function png_build_16bit_table (line 3896) | static void
function png_build_16to8_table (line 3973) | static void
function png_build_8bit_table (line 4041) | static void
function png_destroy_gamma_table (line 4060) | void /* PRIVATE */
function png_build_gamma_table (line 4120) | void /* PRIVATE */
function png_set_option (line 4256) | int PNGAPI
function png_image_free_function (line 4446) | static int
function png_image_free (line 4506) | void PNGAPI
function png_image_error (line 4522) | int /* PRIVATE */
FILE: tess-two/jni/libpng/png.h
type png_struct (line 475) | typedef struct png_struct_def png_struct;
type png_struct (line 476) | typedef const png_struct * png_const_structp;
type png_struct (line 477) | typedef png_struct * png_structp;
type png_struct (line 478) | typedef png_struct * * png_structpp;
type png_info (line 489) | typedef struct png_info_def png_info;
type png_info (line 490) | typedef png_info * png_infop;
type png_info (line 491) | typedef const png_info * png_const_infop;
type png_info (line 492) | typedef png_info * * png_infopp;
type png_struct (line 505) | typedef png_struct * PNG_RESTRICT
type png_struct (line 506) | typedef const png_struct * PNG_RESTRICT
type png_info (line 507) | typedef png_info * PNG_RESTRICT
type png_info (line 508) | typedef const png_info * PNG_RESTRICT
type png_color (line 514) | typedef struct png_color_struct
type png_color (line 520) | typedef png_color * png_colorp;
type png_color (line 521) | typedef const png_color * png_const_colorp;
type png_color (line 522) | typedef png_color * * png_colorpp;
type png_color_16 (line 524) | typedef struct png_color_16_struct
type png_color_16 (line 532) | typedef png_color_16 * png_color_16p;
type png_color_16 (line 533) | typedef const png_color_16 * png_const_color_16p;
type png_color_16 (line 534) | typedef png_color_16 * * png_color_16pp;
type png_color_8 (line 536) | typedef struct png_color_8_struct
type png_color_8 (line 544) | typedef png_color_8 * png_color_8p;
type png_color_8 (line 545) | typedef const png_color_8 * png_const_color_8p;
type png_color_8 (line 546) | typedef png_color_8 * * png_color_8pp;
type png_sPLT_entry (line 552) | typedef struct png_sPLT_entry_struct
type png_sPLT_entry (line 560) | typedef png_sPLT_entry * png_sPLT_entryp;
type png_sPLT_entry (line 561) | typedef const png_sPLT_entry * png_const_sPLT_entryp;
type png_sPLT_entry (line 562) | typedef png_sPLT_entry * * png_sPLT_entrypp;
type png_sPLT_t (line 569) | typedef struct png_sPLT_struct
type png_sPLT_t (line 576) | typedef png_sPLT_t * png_sPLT_tp;
type png_sPLT_t (line 577) | typedef const png_sPLT_t * png_const_sPLT_tp;
type png_sPLT_t (line 578) | typedef png_sPLT_t * * png_sPLT_tpp;
type png_text (line 598) | typedef struct png_text_struct
type png_text (line 615) | typedef png_text * png_textp;
type png_text (line 616) | typedef const png_text * png_const_textp;
type png_text (line 617) | typedef png_text * * png_textpp;
type png_time (line 636) | typedef struct png_time_struct
type png_time (line 645) | typedef png_time * png_timep;
type png_time (line 646) | typedef const png_time * png_const_timep;
type png_time (line 647) | typedef png_time * * png_timepp;
type png_unknown_chunk (line 658) | typedef struct png_unknown_chunk_t
type png_unknown_chunk (line 674) | typedef png_unknown_chunk * png_unknown_chunkp;
type png_unknown_chunk (line 675) | typedef const png_unknown_chunk * png_const_unknown_chunkp;
type png_unknown_chunk (line 676) | typedef png_unknown_chunk * * png_unknown_chunkpp;
type png_row_info (line 789) | typedef struct png_row_info_struct
type png_row_info (line 799) | typedef png_row_info * png_row_infop;
type png_row_info (line 800) | typedef png_row_info * * png_row_infopp;
type PNG_CALLBACK (line 810) | typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));
type PNG_CALLBACK (line 811) | typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_siz...
type PNG_CALLBACK (line 812) | typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp));
type PNG_CALLBACK (line 813) | typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
type PNG_CALLBACK (line 815) | typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint...
type PNG_CALLBACK (line 819) | typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_...
type PNG_CALLBACK (line 820) | typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_i...
type PNG_CALLBACK (line 832) | typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_b...
type PNG_CALLBACK (line 838) | typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_ro...
type PNG_CALLBACK (line 843) | typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
type PNG_CALLBACK (line 902) | typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
type PNG_CALLBACK (line 904) | typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
type png_control (line 2696) | struct png_control
type png_image (line 2697) | typedef struct
FILE: tess-two/jni/libpng/pngconf.h
type png_byte (line 481) | typedef unsigned char png_byte;
type png_int_16 (line 487) | typedef int png_int_16;
type png_int_16 (line 489) | typedef short png_int_16;
type png_uint_16 (line 495) | typedef unsigned int png_uint_16;
type png_uint_16 (line 497) | typedef unsigned short png_uint_16;
type png_int_32 (line 503) | typedef int png_int_32;
type png_int_32 (line 505) | typedef long int png_int_32;
type png_uint_32 (line 511) | typedef unsigned int png_uint_32;
type png_uint_32 (line 513) | typedef unsigned long int png_uint_32;
type png_size_t (line 521) | typedef size_t png_size_t;
type png_ptrdiff_t (line 522) | typedef ptrdiff_t png_ptrdiff_t;
type png_uint_32 (line 554) | typedef png_uint_32 png_alloc_size_t;
type png_size_t (line 556) | typedef png_size_t png_alloc_size_t;
type png_int_32 (line 573) | typedef png_int_32 png_fixed_point;
type png_byte (line 578) | typedef png_byte * png_bytep;
type png_byte (line 579) | typedef const png_byte * png_const_bytep;
type png_uint_32 (line 580) | typedef png_uint_32 * png_uint_32p;
type png_uint_32 (line 581) | typedef const png_uint_32 * png_const_uint_32p;
type png_int_32 (line 582) | typedef png_int_32 * png_int_32p;
type png_int_32 (line 583) | typedef const png_int_32 * png_const_int_32p;
type png_uint_16 (line 584) | typedef png_uint_16 * png_uint_16p;
type png_uint_16 (line 585) | typedef const png_uint_16 * png_const_uint_16p;
type png_int_16 (line 586) | typedef png_int_16 * png_int_16p;
type png_int_16 (line 587) | typedef const png_int_16 * png_const_int_16p;
type png_fixed_point (line 590) | typedef png_fixed_point * png_fixed_point_p;
type png_fixed_point (line 591) | typedef const png_fixed_point * png_const_fixed_point_p;
type png_size_t (line 592) | typedef png_size_t * png_size_tp;
type png_size_t (line 593) | typedef const png_size_t * png_const_size_tp;
type FILE (line 596) | typedef FILE * png_FILE_p;
type png_byte (line 605) | typedef png_byte * * png_bytepp;
type png_uint_32 (line 606) | typedef png_uint_32 * * png_uint_32pp;
type png_int_32 (line 607) | typedef png_int_32 * * png_int_32pp;
type png_uint_16 (line 608) | typedef png_uint_16 * * png_uint_16pp;
type png_int_16 (line 609) | typedef png_int_16 * * png_int_16pp;
type png_fixed_point (line 612) | typedef png_fixed_point * * png_fixed_point_pp;
FILE: tess-two/jni/libpng/pngerror.c
function png_safecat (line 111) | size_t
function png_charp (line 132) | png_charp
function png_warning (line 215) | void PNGAPI
function png_warning_parameter (line 246) | void
function png_warning_parameter_unsigned (line 254) | void
function png_warning_parameter_signed (line 262) | void
function png_formatted_warning (line 283) | void
function png_benign_error (line 361) | void PNGAPI
function png_app_warning (line 391) | void /* PRIVATE */
function png_app_error (line 404) | void /* PRIVATE */
function png_format_buffer (line 433) | static void /* PRIVATE */
function png_chunk_warning (line 496) | void PNGAPI
function png_chunk_benign_error (line 513) | void PNGAPI
function png_chunk_report (line 530) | void /* PRIVATE */
function png_free_jmpbuf (line 665) | void /* PRIVATE */
function png_default_warning (line 784) | static void /* PRIVATE */
function png_set_error_fn (line 834) | void PNGAPI
function png_voidp (line 855) | png_voidp PNGAPI
function png_set_strip_error_numbers (line 866) | void PNGAPI
function png_safe_warning (line 920) | void /* PRIVATE */ PNGCBAPI
function png_safe_execute (line 935) | int /* PRIVATE */
FILE: tess-two/jni/libpng/pngget.c
function png_uint_32 (line 19) | png_uint_32 PNGAPI
function png_size_t (line 29) | png_size_t PNGAPI
function png_bytepp (line 39) | png_bytepp PNGAPI
function png_uint_32 (line 51) | png_uint_32 PNGAPI
function png_uint_32 (line 60) | png_uint_32 PNGAPI
function png_byte (line 69) | png_byte PNGAPI
function png_byte (line 78) | png_byte PNGAPI
function png_byte (line 87) | png_byte PNGAPI
function png_byte (line 96) | png_byte PNGAPI
function png_byte (line 105) | png_byte PNGAPI
function png_uint_32 (line 114) | png_uint_32 PNGAPI
function png_uint_32 (line 136) | png_uint_32 PNGAPI
function png_uint_32 (line 158) | png_uint_32 PNGAPI
function png_get_pixel_aspect_ratio (line 180) | float PNGAPI
function png_fixed_point (line 204) | png_fixed_point PNGAPI
function png_int_32 (line 235) | png_int_32 PNGAPI
function png_int_32 (line 255) | png_int_32 PNGAPI
function png_int_32 (line 275) | png_int_32 PNGAPI
function png_int_32 (line 295) | png_int_32 PNGAPI
function png_uint_32 (line 316) | static png_uint_32
function png_uint_32 (line 348) | png_uint_32 PNGAPI
function png_uint_32 (line 354) | png_uint_32 PNGAPI
function png_uint_32 (line 360) | png_uint_32 PNGAPI
function png_fixed_point (line 367) | static png_fixed_point
function png_fixed_point (line 378) | png_fixed_point PNGAPI
function png_fixed_point (line 388) | png_fixed_point PNGAPI
function png_get_x_offset_inches (line 398) | float PNGAPI
function png_get_y_offset_inches (line 409) | float PNGAPI
function png_uint_32 (line 420) | png_uint_32 PNGAPI
function png_byte (line 466) | png_byte PNGAPI
function png_const_bytep (line 476) | png_const_bytep PNGAPI
function png_uint_32 (line 487) | png_uint_32 PNGAPI
function png_uint_32 (line 511) | png_uint_32 PNGAPI
function png_uint_32 (line 557) | png_uint_32 PNGAPI
function png_uint_32 (line 603) | png_uint_32 PNGAPI
function png_uint_32 (line 640) | png_uint_32 PNGAPI
function png_uint_32 (line 677) | png_uint_32 PNGAPI
function png_uint_32 (line 696) | png_uint_32 PNGAPI
function png_uint_32 (line 717) | png_uint_32 PNGAPI
function png_uint_32 (line 735) | png_uint_32 PNGAPI
function png_get_sPLT (line 762) | int PNGAPI
function png_uint_32 (line 777) | png_uint_32 PNGAPI
function png_uint_32 (line 794) | png_uint_32 PNGAPI
function png_uint_32 (line 839) | png_uint_32 PNGAPI
function png_uint_32 (line 860) | png_uint_32 PNGAPI
function png_uint_32 (line 890) | png_uint_32 PNGAPI
function png_uint_32 (line 913) | png_uint_32 PNGAPI
function png_uint_32 (line 929) | png_uint_32 PNGAPI
function png_uint_32 (line 947) | png_uint_32 PNGAPI
function png_uint_32 (line 981) | png_uint_32 PNGAPI
function png_uint_32 (line 1000) | png_uint_32 PNGAPI
function png_get_text (line 1018) | int PNGAPI
function png_uint_32 (line 1044) | png_uint_32 PNGAPI
function png_uint_32 (line 1062) | png_uint_32 PNGAPI
function png_get_unknown_chunks (line 1108) | int PNGAPI
function png_byte (line 1123) | png_byte PNGAPI
function png_voidp (line 1131) | png_voidp PNGAPI
function png_uint_32 (line 1164) | png_uint_32 PNGAPI
function png_uint_32 (line 1170) | png_uint_32 PNGAPI
function png_uint_32 (line 1177) | png_uint_32 PNGAPI
function png_alloc_size_t (line 1184) | png_alloc_size_t PNGAPI
function png_uint_32 (line 1193) | png_uint_32 PNGAPI
function png_uint_32 (line 1199) | png_uint_32 PNGAPI
function png_get_palette_max (line 1208) | int PNGAPI
FILE: tess-two/jni/libpng/pnginfo.h
type png_info_def (line 55) | struct png_info_def
FILE: tess-two/jni/libpng/pngmem.c
function png_destroy_png_struct (line 24) | void /* PRIVATE */
function png_voidp (line 108) | static png_voidp
function png_free (line 231) | void PNGAPI
function png_set_mem_fn (line 259) | void PNGAPI
function png_voidp (line 275) | png_voidp PNGAPI
FILE: tess-two/jni/libpng/pngpread.c
function png_process_data (line 35) | void PNGAPI
function png_size_t (line 50) | png_size_t PNGAPI
function png_uint_32 (line 77) | png_uint_32 PNGAPI
function png_process_some_data (line 93) | void /* PRIVATE */
function png_push_read_sig (line 133) | void /* PRIVATE */
function png_push_read_chunk (line 166) | void /* PRIVATE */
function png_push_fill_buffer (line 419) | void PNGCBAPI
function png_push_save_buffer (line 462) | void /* PRIVATE */
function png_push_restore_buffer (line 522) | void /* PRIVATE */
function png_push_read_IDAT (line 532) | void /* PRIVATE */
function png_process_IDAT_data (line 625) | void /* PRIVATE */
function png_push_process_row (line 737) | void /* PRIVATE */
function png_read_push_finish_row (line 967) | void /* PRIVATE */
function png_push_have_info (line 1033) | void /* PRIVATE */
function png_push_have_end (line 1040) | void /* PRIVATE */
function png_push_have_row (line 1047) | void /* PRIVATE */
function png_progressive_combine_row (line 1056) | void PNGAPI
function png_set_progressive_read_fn (line 1072) | void PNGAPI
function png_voidp (line 1087) | png_voidp PNGAPI
FILE: tess-two/jni/libpng/pngpriv.h
type png_double (line 348) | typedef struct png_incomplete png_double;
type png_double (line 349) | typedef png_double* png_doublep;
type png_double (line 350) | typedef const png_double* png_const_doublep;
type png_double (line 351) | typedef png_double** png_doublepp;
type png_uint_16p (line 883) | typedef const png_uint_16p * png_const_uint_16pp;
type png_control (line 1951) | typedef struct png_control
FILE: tess-two/jni/libpng/pngread.c
function png_read_info (line 91) | void PNGAPI
function png_read_update_info (line 261) | void PNGAPI
function png_start_read_image (line 292) | void PNGAPI
function png_do_read_intrapixel (line 315) | static void
function png_read_row (line 377) | void PNGAPI
function png_read_rows (line 638) | void PNGAPI
function png_read_image (line 693) | void PNGAPI
function else (line 804) | else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0)
function else (line 818) | else if (chunk_name == png_IDAT)
function png_read_destroy (line 928) | static void
function png_destroy_read_struct (line 993) | void PNGAPI
function png_set_read_status_fn (line 1019) | void PNGAPI
function png_read_png (line 1031) | void PNGAPI
type png_image_read_control (line 1266) | typedef struct
function png_image_read_init (line 1288) | static int
function png_uint_32 (line 1337) | static png_uint_32
function png_gamma_not_sRGB (line 1370) | static int
function png_image_read_header (line 1389) | static int
function png_image_begin_read_from_stdio (line 1452) | int PNGAPI
function png_image_begin_read_from_file (line 1482) | int PNGAPI
function png_image_memory_read (line 1521) | static void PNGCBAPI
function png_image_begin_read_from_memory (line 1551) | int PNGAPI png_image_begin_read_from_memory(png_imagep image,
function png_image_skip_unused_chunks (line 1589) | static void
function set_file_encoding (line 1646) | static void
function decode_gamma (line 1666) | static unsigned int
function png_uint_32 (line 1705) | static png_uint_32
function png_create_colormap_entry (line 1742) | static void
function make_gray_file_colormap (line 1961) | static int
function make_gray_colormap (line 1972) | static int
function make_ga_colormap (line 1984) | static int
function make_rgb_colormap (line 2039) | static int
function png_image_read_colormap (line 2068) | static int
function png_image_read_and_map (line 2922) | static int
function png_image_read_colormapped (line 3111) | static int
function png_image_read_composite (line 3244) | static int
function png_image_read_background (line 3371) | static int
function png_image_read_direct (line 3650) | static int
function png_image_finish_read (line 4076) | int PNGAPI
FILE: tess-two/jni/libpng/pngrio.c
function png_read_data (line 31) | void /* PRIVATE */
function png_default_read_data (line 49) | void PNGCBAPI
function png_set_read_fn (line 86) | void PNGAPI
FILE: tess-two/jni/libpng/pngrtran.c
function png_set_crc_action (line 24) | void PNGAPI
function png_rtran_ok (line 97) | static int
function png_set_background_fixed (line 124) | void PNGFAPI
function png_set_background (line 154) | void PNGAPI
function png_set_scale_16 (line 170) | void PNGAPI
function png_set_strip_16 (line 184) | void PNGAPI
function png_set_strip_alpha (line 197) | void PNGAPI
function png_fixed_point (line 210) | static png_fixed_point
function png_fixed_point (line 249) | static png_fixed_point
function png_set_alpha_mode_fixed (line 274) | void PNGFAPI
function png_set_alpha_mode (line 387) | void PNGAPI
type png_dsort (line 406) | typedef struct png_dsort_struct
type png_dsort (line 412) | typedef png_dsort * png_dsortp;
type png_dsort (line 413) | typedef png_dsort * * png_dsortpp;
function png_set_quantize (line 415) | void PNGAPI
function png_set_gamma_fixed (line 803) | void PNGFAPI
function png_set_gamma (line 843) | void PNGAPI
function png_set_expand (line 857) | void PNGAPI
function png_set_palette_to_rgb (line 887) | void PNGAPI
function png_set_expand_gray_1_2_4_to_8 (line 899) | void PNGAPI
function png_set_tRNS_to_alpha (line 911) | void PNGAPI
function png_set_expand_16 (line 927) | void PNGAPI
function png_set_gray_to_rgb (line 940) | void PNGAPI
function png_set_rgb_to_gray_fixed (line 955) | void PNGFAPI
function png_set_rgb_to_gray (line 1044) | void PNGAPI
function png_set_read_user_transform_fn (line 1058) | void PNGAPI
function png_gamma_threshold (line 1077) | static int /* PRIVATE */
function png_init_palette_transformations (line 1102) | static void /* PRIVATE */
function png_init_rgb_transformations (line 1191) | static void /* PRIVATE */
function png_init_read_transformations (line 1276) | void /* PRIVATE */
function png_read_transform_info (line 1925) | void /* PRIVATE */
function png_do_unpack (line 2137) | static void
function png_do_unshift (line 2235) | static void
function png_do_scale_16_to_8 (line 2374) | static void
function png_do_chop (line 2432) | static void
function png_do_read_swap_alpha (line 2460) | static void
function png_do_read_invert_alpha (line 2557) | static void
function png_do_read_filler (line 2659) | static void
function png_do_gray_to_rgb (line 2846) | static void
function png_do_rgb_to_gray (line 2985) | static int
function png_do_compose (line 3188) | static void
function png_do_gamma (line 3929) | static void
function png_do_encode_alpha (line 4130) | static void
function png_do_expand_palette (line 4196) | static void
function png_do_expand (line 4349) | static void
function png_do_expand_16 (line 4581) | static void
function png_do_quantize (line 4609) | static void
function png_do_read_transformations (line 4706) | void /* PRIVATE */
FILE: tess-two/jni/libpng/pngrutil.c
function png_uint_32 (line 21) | png_uint_32 PNGAPI
function png_fixed_point (line 40) | static png_fixed_point /* PRIVATE */
function png_read_sig (line 120) | void /* PRIVATE */
function png_uint_32 (line 155) | png_uint_32 /* PRIVATE */
function png_crc_read (line 192) | void /* PRIVATE */
function png_crc_finish (line 207) | int /* PRIVATE */
function png_crc_error (line 247) | int /* PRIVATE */
function png_bytep (line 294) | static png_bytep
function png_inflate_claim (line 337) | static int
function png_zlib_inflate (line 445) | int /* PRIVATE */
function png_inflate (line 476) | static int
function png_decompress_chunk (line 601) | static int
function png_inflate_read (line 765) | static int
function png_handle_IHDR (line 830) | void /* PRIVATE */
function else (line 1018) | else if (png_crc_error(png_ptr) != 0) /* Only if we have a CRC error */
function png_handle_IEND (line 1091) | void /* PRIVATE */
function png_handle_gAMA (line 1111) | void /* PRIVATE */
function png_handle_sBIT (line 1149) | void /* PRIVATE */
function png_handle_cHRM (line 1231) | void /* PRIVATE */
function png_handle_sRGB (line 1303) | void /* PRIVATE */
function png_handle_iCCP (line 1353) | void /* PRIVATE */
function png_handle_sPLT (line 1628) | void /* PRIVATE */
function png_handle_tRNS (line 1805) | void /* PRIVATE */
function png_handle_bKGD (line 1909) | void /* PRIVATE */
function png_handle_hIST (line 2009) | void /* PRIVATE */
function png_handle_pHYs (line 2061) | void /* PRIVATE */
function png_handle_oFFs (line 2107) | void /* PRIVATE */
function png_handle_pCAL (line 2154) | void /* PRIVATE */
function png_handle_sCAL (line 2283) | void /* PRIVATE */
function png_handle_tIME (line 2376) | void /* PRIVATE */
function png_handle_tEXt (line 2422) | void /* PRIVATE */
function png_handle_zTXt (line 2503) | void /* PRIVATE */
function png_handle_iTXt (line 2612) | void /* PRIVATE */
function png_cache_unknown_chunk (line 2762) | static int
function png_check_chunk_name (line 3033) | void /* PRIVATE */
function png_combine_row (line 3058) | void /* PRIVATE */
function png_do_read_interlace (line 3542) | void /* PRIVATE */
function png_read_filter_row_sub (line 3786) | static void
function png_read_filter_row_up (line 3804) | static void
function png_read_filter_row_avg (line 3820) | static void
function png_read_filter_row_paeth_1byte_pixel (line 3847) | static void
function png_read_filter_row_paeth_multibyte_pixel (line 3895) | static void
function png_init_filter_functions (line 3943) | static void
function png_read_filter_row (line 3980) | void /* PRIVATE */
function png_read_IDAT_data (line 3998) | void /* PRIVATE */
function png_read_finish_IDAT (line 4135) | void /* PRIVATE */
function png_read_finish_row (line 4183) | void /* PRIVATE */
function png_read_start_row (line 4248) | void /* PRIVATE */
FILE: tess-two/jni/libpng/pngset.c
function png_set_bKGD (line 24) | void PNGAPI
function png_set_cHRM_fixed (line 39) | void PNGFAPI
function png_set_cHRM_XYZ_fixed (line 68) | void PNGFAPI
function png_set_cHRM (line 101) | void PNGAPI
function png_set_cHRM_XYZ (line 117) | void PNGAPI
function png_set_gAMA_fixed (line 138) | void PNGFAPI
function png_set_gAMA (line 152) | void PNGAPI
function png_set_hIST (line 162) | void PNGAPI
function png_set_IHDR (line 206) | void PNGAPI
function png_set_oFFs (line 247) | void PNGAPI
function png_set_pCAL (line 264) | void PNGAPI
function png_set_sCAL_s (line 369) | void PNGAPI
function png_set_sCAL (line 436) | void PNGAPI
function png_set_sCAL_fixed (line 466) | void PNGAPI
function png_set_pHYs (line 495) | void PNGAPI
function png_set_PLTE (line 511) | void PNGAPI
function png_set_sBIT (line 576) | void PNGAPI
function png_set_sRGB (line 591) | void PNGAPI
function png_set_sRGB_gAMA_and_cHRM (line 603) | void PNGAPI
function png_set_iCCP (line 626) | void PNGAPI
function png_set_text (line 700) | void PNGAPI
function png_set_text_2 (line 711) | int /* PRIVATE */
function png_set_tIME (line 906) | void PNGAPI
function png_set_tRNS (line 932) | void PNGAPI
function png_set_sPLT (line 1000) | void PNGAPI
function png_byte (line 1100) | static png_byte
function png_set_unknown_chunks (line 1137) | void PNGAPI
function png_set_unknown_chunk_location (line 1236) | void PNGAPI
function png_uint_32 (line 1266) | png_uint_32 PNGAPI
function add_one_chunk (line 1281) | static unsigned int
function png_set_keep_unknown_chunks (line 1309) | void PNGAPI
function png_set_read_user_chunk_fn (line 1467) | void PNGAPI
function png_set_rows (line 1482) | void PNGAPI
function png_set_compression_buffer_size (line 1502) | void PNGAPI
function png_set_invalid (line 1562) | void PNGAPI
function png_set_user_limits (line 1572) | void PNGAPI
function png_set_chunk_cache_max (line 1588) | void PNGAPI
function png_set_chunk_malloc_max (line 1596) | void PNGAPI
function png_set_benign_errors (line 1607) | void PNGAPI
function png_set_check_for_invalid_index (line 1637) | void PNGAPI
function png_uint_32 (line 1662) | png_uint_32 /* PRIVATE */
FILE: tess-two/jni/libpng/pngstruct.h
type png_compression_buffer (line 61) | typedef struct png_compression_buffer
type png_xy (line 83) | typedef struct png_xy
type png_XYZ (line 94) | typedef struct png_XYZ
type png_colorspace (line 112) | typedef struct png_colorspace
type png_colorspace (line 128) | typedef const png_colorspace * PNG_RESTRICT
type png_struct_def (line 143) | struct png_struct_def
FILE: tess-two/jni/libpng/pngtest.c
type FILE (line 92) | typedef FILE * png_FILE_p;
function tIME_to_str (line 139) | static int
function read_row_callback (line 181) | static void PNGCBAPI
function write_row_callback (line 206) | static void PNGCBAPI
function read_user_callback (line 220) | static void PNGCBAPI
function count_zero_samples (line 236) | static void PNGCBAPI
function pngtest_check_io_state (line 358) | void
function pngtest_read_data (line 396) | static void PNGCBAPI
function pngtest_flush (line 422) | static void PNGCBAPI
function pngtest_write_data (line 435) | static void PNGCBAPI
type pngtest_error_parameters (line 458) | typedef struct
function pngtest_warning (line 463) | static void PNGCBAPI
function pngtest_error (line 483) | static void PNGCBAPI
type memory_information (line 508) | typedef struct memory_information
type memory_information (line 514) | typedef memory_information *memory_infop;
function png_voidp (line 526) | png_voidp
function png_debug_free (line 581) | void PNGCBAPI
type user_chunk_data (line 647) | struct user_chunk_data
function init_callback_info (line 664) | static void
function set_location (line 671) | static int
function read_user_chunk_callback (line 700) | static int PNGCBAPI
function write_sTER_chunk (line 762) | static void
function write_vpAg_chunk (line 773) | static void
function write_chunks (line 792) | static void
function pngtest_check_text_support (line 823) | static void
function test_one_file (line 861) | static int
function main (line 1776) | int
function main (line 2080) | int
type png_libpng_version_1_6_25 (line 2091) | typedef png_libpng_version_1_6_25 Your_png_h_is_not_version_1_6_25;
FILE: tess-two/jni/libpng/pngtrans.c
function png_set_bgr (line 20) | void PNGAPI
function png_set_swap (line 34) | void PNGAPI
function png_set_packing (line 49) | void PNGAPI
function png_set_packswap (line 69) | void PNGAPI
function png_set_shift (line 83) | void PNGAPI
function png_set_interlace_handling (line 98) | int PNGAPI
function png_set_filler (line 119) | void PNGAPI
function png_set_add_alpha (line 204) | void PNGAPI
function png_set_swap_alpha (line 222) | void PNGAPI
function png_set_invert_alpha (line 236) | void PNGAPI
function png_set_invert_mono (line 249) | void PNGAPI
function png_do_invert (line 261) | void /* PRIVATE */
function png_do_swap (line 318) | void /* PRIVATE */
function png_do_packswap (line 454) | void /* PRIVATE */
function png_do_strip_channel (line 494) | void /* PRIVATE */
function png_do_bgr (line 604) | void /* PRIVATE */
function png_do_check_palette_indexes (line 684) | void /* PRIVATE */
function png_set_user_transform_info (line 787) | void PNGAPI
function png_voidp (line 818) | png_voidp PNGAPI
function png_uint_32 (line 829) | png_uint_32 PNGAPI
function png_byte (line 841) | png_byte PNGAPI
FILE: tess-two/jni/libpng/pngwio.c
function png_write_data (line 32) | void /* PRIVATE */
function png_default_write_data (line 50) | void PNGCBAPI
function png_flush (line 70) | void /* PRIVATE */
function png_default_flush (line 78) | void PNGCBAPI
function png_set_write_fn (line 121) | void PNGAPI
FILE: tess-two/jni/libpng/pngwrite.c
function write_unknown_chunks (line 23) | static void
function png_write_info_before_PLTE (line 83) | void PNGAPI
function png_write_info (line 191) | void PNGAPI
function png_write_end (line 352) | void PNGAPI
function png_convert_from_struct_tm (line 460) | void PNGAPI
function png_convert_from_time_t (line 473) | void PNGAPI
function png_write_rows (line 567) | void PNGAPI
function png_write_image (line 589) | void PNGAPI
function png_do_write_intrapixel (line 622) | static void
function png_write_row (line 686) | void PNGAPI
function png_set_flush (line 896) | void PNGAPI
function png_write_flush (line 908) | void PNGAPI
function png_write_destroy (line 927) | static void
function png_destroy_write_struct (line 967) | void PNGAPI
function png_set_filter (line 988) | void PNGAPI
function PNG_UNUSED (line 1122) | PNG_UNUSED(png_ptr)
function png_set_compression_level (line 1146) | void PNGAPI
function png_set_compression_mem_level (line 1157) | void PNGAPI
function png_set_compression_strategy (line 1168) | void PNGAPI
function png_set_compression_window_bits (line 1185) | void PNGAPI
function png_set_compression_method (line 1212) | void PNGAPI
function png_set_text_compression_level (line 1232) | void PNGAPI
function png_set_text_compression_mem_level (line 1243) | void PNGAPI
function png_set_text_compression_strategy (line 1254) | void PNGAPI
function png_set_text_compression_window_bits (line 1268) | void PNGAPI
function png_set_text_compression_method (line 1289) | void PNGAPI
function png_set_write_status_fn (line 1305) | void PNGAPI
function png_set_write_user_transform_fn (line 1315) | void PNGAPI
function png_write_png (line 1331) | void PNGAPI
function png_image_write_init (line 1456) | static int
type png_image_write_control (line 1494) | typedef struct
function png_write_image_16bit (line 1516) | static int
function png_byte (line 1629) | static png_byte
function png_write_image_8bit (line 1674) | static int
function png_image_set_PLTE (line 1770) | static void
function png_image_write_main (line 1916) | static int
function png_image_write_memory (line 2183) | static int
function png_image_write_to_memory (line 2199) | int PNGAPI
function png_image_write_to_stdio (line 2266) | int PNGAPI
function png_image_write_to_file (line 2315) | int PNGAPI
FILE: tess-two/jni/libpng/pngwtran.c
function png_do_pack (line 24) | static void
function png_do_shift (line 171) | static void
function png_do_write_swap_alpha (line 310) | static void
function png_do_write_invert_alpha (line 404) | static void
function png_do_write_transformations (line 501) | void /* PRIVATE */
FILE: tess-two/jni/libpng/pngwutil.c
function png_save_uint_32 (line 23) | void PNGAPI
function png_save_uint_16 (line 36) | void PNGAPI
function png_write_sig (line 50) | void PNGAPI
function png_write_chunk_header (line 72) | static void
function png_write_chunk_start (line 114) | void PNGAPI
function png_write_chunk_data (line 126) | void PNGAPI
function png_write_chunk_end (line 146) | void PNGAPI
function png_write_complete_chunk (line 175) | static void
function png_write_chunk (line 192) | void PNGAPI
function png_alloc_size_t (line 204) | static png_alloc_size_t
function optimize_cmf (line 250) | static void
function png_deflate_claim (line 292) | static int
function png_free_buffer_list (line 439) | void /* PRIVATE */
type compression_state (line 470) | typedef struct
function png_text_compress_init (line 478) | static void
function png_text_compress (line 488) | static int
function png_write_compressed_data_out (line 637) | static void
function png_write_PLTE (line 837) | void /* PRIVATE */
function png_compress_IDAT (line 926) | void /* PRIVATE */
function png_write_IEND (line 1066) | void /* PRIVATE */
function png_write_gAMA_fixed (line 1077) | void /* PRIVATE */
function png_write_sRGB (line 1092) | void /* PRIVATE */
function png_write_iCCP (line 1110) | void /* PRIVATE */
function png_write_sPLT (line 1172) | void /* PRIVATE */
function png_write_sBIT (line 1257) | void /* PRIVATE */
function png_write_cHRM_fixed (line 1316) | void /* PRIVATE */
function png_write_tRNS (line 1342) | void /* PRIVATE */
function png_write_bKGD (line 1408) | void /* PRIVATE */
function png_write_hIST (line 1471) | void /* PRIVATE */
function png_write_tEXt (line 1502) | void /* PRIVATE */
function png_write_zTXt (line 1545) | void /* PRIVATE */
function png_write_iTXt (line 1596) | void /* PRIVATE */
function png_write_oFFs (line 1696) | void /* PRIVATE */
function png_write_pCAL (line 1716) | void /* PRIVATE */
function png_write_sCAL_s (line 1781) | void /* PRIVATE */
function png_write_pHYs (line 1811) | void /* PRIVATE */
function png_write_tIME (line 1835) | void /* PRIVATE */
function png_write_start_row (line 1862) | void /* PRIVATE */
function png_write_finish_row (line 1977) | void /* PRIVATE */
function png_do_write_interlace (line 2068) | void /* PRIVATE */
function png_size_t (line 2251) | static png_size_t /* PRIVATE */
function png_setup_sub_row_only (line 2290) | static void /* PRIVATE */
function png_size_t (line 2312) | static png_size_t /* PRIVATE */
function png_setup_up_row_only (line 2340) | static void /* PRIVATE */
function png_size_t (line 2356) | static png_size_t /* PRIVATE */
function png_setup_avg_row_only (line 2396) | static void /* PRIVATE */
function png_size_t (line 2418) | static png_size_t /* PRIVATE */
function png_setup_paeth_row_only (line 2479) | static void /* PRIVATE */
function png_write_find_filter (line 2523) | void /* PRIVATE */
function png_write_filtered_row (line 2720) | static void
FILE: tess-two/src/com/googlecode/leptonica/android/AdaptiveMap.java
class AdaptiveMap (line 24) | @SuppressWarnings("WeakerAccess")
method backgroundNormMorph (line 59) | public static Pix backgroundNormMorph(Pix pixs) {
method backgroundNormMorph (line 99) | public static Pix backgroundNormMorph(
method pixContrastNorm (line 122) | public static Pix pixContrastNorm(Pix pixs) {
method pixContrastNorm (line 164) | public static Pix pixContrastNorm(
method nativeBackgroundNormMorph (line 182) | private static native long nativeBackgroundNormMorph(
method nativePixContrastNorm (line 185) | private static native long nativePixContrastNorm(
FILE: tess-two/src/com/googlecode/leptonica/android/Binarize.java
class Binarize (line 26) | @SuppressWarnings("WeakerAccess")
method otsuAdaptiveThreshold (line 67) | public static Pix otsuAdaptiveThreshold(Pix pixs) {
method otsuAdaptiveThreshold (line 121) | public static Pix otsuAdaptiveThreshold(Pix pixs, int sizeX, int sizeY...
method sauvolaBinarizeTiled (line 145) | public static Pix sauvolaBinarizeTiled(Pix pixs) {
method sauvolaBinarizeTiled (line 188) | public static Pix sauvolaBinarizeTiled(Pix pixs, int whsize, @FloatRan...
method nativeOtsuAdaptiveThreshold (line 208) | private static native long nativeOtsuAdaptiveThreshold(
method nativeSauvolaBinarizeTiled (line 211) | private static native long nativeSauvolaBinarizeTiled(
FILE: tess-two/src/com/googlecode/leptonica/android/Box.java
class Box (line 28) | @SuppressWarnings("WeakerAccess")
method Box (line 61) | Box(long nativeBox) {
method Box (line 75) | public Box(int x, int y, int w, int h) {
method getNativeBox (line 95) | public long getNativeBox() {
method getX (line 107) | public int getX() {
method getY (line 119) | public int getY() {
method getWidth (line 131) | public int getWidth() {
method getHeight (line 143) | public int getHeight() {
method getRect (line 156) | public Rect getRect() {
method getGeometry (line 171) | public int[] getGeometry() {
method getGeometry (line 188) | public boolean getGeometry(@Size(min=4) int[] geometry) {
method recycle (line 202) | public void recycle() {
method finalize (line 210) | @Override
metho
Condensed preview — 594 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,120K chars).
[
{
"path": ".gitignore",
"chars": 400,
"preview": ".settings\n.svn\nlocal.properties\nproguard.cfg\nproguard-project.txt\nbin/\ngen/\nlibs/\nobj/\npatches/\ntarget/\nsrc/test/resourc"
},
{
"path": ".gitmodules",
"chars": 174,
"preview": "[submodule \"leptonica\"]\n\tpath = leptonica\n\turl = https://github.com/alexcohn/leptonica\n[submodule \"tesseract\"]\n\tpath = t"
},
{
"path": "BUILDING.md",
"chars": 2604,
"preview": "# Building\n\nThis project may be built manually as an alternative to including the pre-built\nAAR as an external dependenc"
},
{
"path": "CHANGELOG.md",
"chars": 15635,
"preview": "# Change Log\n\n## [9.1.0](https://github.com/rmtheis/tess-two/tree/9.1.0) (2019-10-19)\n[Full Changelog](https://github.co"
},
{
"path": "COPYING",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "ISSUE_TEMPLATE.md",
"chars": 312,
"preview": "Summary:\n\n\n\nSteps to reproduce the issue:\n\n1. \n2. \n3.\n\nExpected result:\n\n\n\nActual result:\n\n\n\nTess-two version:\n\n\n\nAndroi"
},
{
"path": "README.md",
"chars": 3806,
"preview": "## NO LONGER MAINTAINED\n\nThis project won't be receiving further updates or maintenance.\n\nPlease consider trying one of "
},
{
"path": "build.gradle",
"chars": 530,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "eyes-two/.classpath",
"chars": 466,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"con\" path=\"com.android.ide.eclipse.adt.ANDROID"
},
{
"path": "eyes-two/.project",
"chars": 811,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>eyes-two</name>\n\t<comment></comment>\n\t<projects>\n\t</p"
},
{
"path": "eyes-two/AndroidManifest.xml",
"chars": 926,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2009 Google Inc.\n\n Licensed under the Apache License, Vers"
},
{
"path": "eyes-two/COPYING",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "eyes-two/build.gradle",
"chars": 724,
"preview": "apply plugin: 'com.android.library'\n\nandroid {\n compileSdkVersion 30\n\n defaultConfig {\n minSdkVersion 16\n "
},
{
"path": "eyes-two/build.xml",
"chars": 3357,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project name=\"eyes-two\" default=\"help\">\n\n <!-- The local.properties file is c"
},
{
"path": "eyes-two/project.properties",
"chars": 507,
"preview": "# This file is automatically generated by Android Tools.\n# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n#\n# T"
},
{
"path": "eyes-two/src/androidTest/java/OpticalFlowTest.java",
"chars": 446,
"preview": "import android.util.Log;\n\nimport junit.framework.TestCase;\n\nimport androidx.test.filters.SmallTest;\n\nimport com.googleco"
},
{
"path": "eyes-two/src/main/AndroidManifest.xml",
"chars": 713,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2009 Google Inc.\n\n Licensed under the Apache License, Vers"
},
{
"path": "eyes-two/src/main/java/com/googlecode/eyesfree/opticflow/ImageBlur.java",
"chars": 2429,
"preview": "/*\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n "
},
{
"path": "eyes-two/src/main/java/com/googlecode/eyesfree/opticflow/OpticalFlow.java",
"chars": 2825,
"preview": "/*\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n "
},
{
"path": "eyes-two/src/main/java/com/googlecode/eyesfree/textdetect/HydrogenTextDetector.java",
"chars": 6631,
"preview": "/*\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n "
},
{
"path": "eyes-two/src/main/java/com/googlecode/eyesfree/textdetect/Thresholder.java",
"chars": 5639,
"preview": "/*\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n "
},
{
"path": "eyes-two/src/main/jni/Android.mk",
"chars": 306,
"preview": "out_path := $(realpath $(NDK_OUT))\nout_path := $(out_path:$(realpath $(out_path)/../../../..)%=%)\nTESSERACT_TOOLS_PATH :"
},
{
"path": "eyes-two/src/main/jni/Application.mk",
"chars": 96,
"preview": "APP_ABI := armeabi-v7a x86 arm64-v8a x86_64\nAPP_OPTIM := release\nNDK_TOOLCHAIN_VERSION := clang\n"
},
{
"path": "eyes-two/src/main/jni/common/Android.mk",
"chars": 455,
"preview": "LOCAL_PATH:= $(call my-dir)\n\ninclude $(CLEAR_VARS)\n\nLOCAL_SRC_FILES := time_log.cpp\n\nLOCAL_CFLAGS := -Wall \\\n "
},
{
"path": "eyes-two/src/main/jni/common/time_log.cpp",
"chars": 874,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/common/time_log.h",
"chars": 3418,
"preview": "// Copyright 2010 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n//\n// Utility function"
},
{
"path": "eyes-two/src/main/jni/common/types.h",
"chars": 630,
"preview": "// Copyright 2010 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n//\n// This file exists"
},
{
"path": "eyes-two/src/main/jni/common/utils.h",
"chars": 2525,
"preview": "// Copyright 2009 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n\n#ifndef JAVA_COM_GOOG"
},
{
"path": "eyes-two/src/main/jni/hydrogen/Android.mk",
"chars": 748,
"preview": "ifneq ($(TARGET_SIMULATOR),true)\n\nLOCAL_PATH := $(call my-dir)\n\ninclude $(CLEAR_VARS)\n\nLOCAL_MODULE := libhydrogen\n\nLOCA"
},
{
"path": "eyes-two/src/main/jni/hydrogen/jni/common.h",
"chars": 1316,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/jni/hydrogentextdetector.cpp",
"chars": 8603,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/jni/jni.cpp",
"chars": 853,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/jni/thresholder.cpp",
"chars": 3299,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/clusterer.cpp",
"chars": 17016,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/clusterer.h",
"chars": 1425,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/hydrogentextdetector.cpp",
"chars": 7570,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/hydrogentextdetector.h",
"chars": 4005,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/leptonica.h",
"chars": 721,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/thresholder.cpp",
"chars": 10818,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/thresholder.h",
"chars": 1343,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/utilities.cpp",
"chars": 5176,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/utilities.h",
"chars": 916,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/validator.cpp",
"chars": 10023,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/hydrogen/src/validator.h",
"chars": 1377,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/imageutils/Android.mk",
"chars": 548,
"preview": "LOCAL_PATH:= $(call my-dir)\n\ninclude $(CLEAR_VARS)\n\nLOCAL_MODULE := imageutils$(LIB_SUFFIX)\nLOCAL_SRC_FILES := blur-jni."
},
{
"path": "eyes-two/src/main/jni/imageutils/blur-jni.cpp",
"chars": 1565,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/imageutils/blur.cpp",
"chars": 12652,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/imageutils/blur.h",
"chars": 766,
"preview": "// Copyright 2010 Google Inc. All Rights Reserved.\n// Author: xiaotao@google.com (Xiaotao Duan)\n\n#ifndef JAVA_COM_GOOGLE"
},
{
"path": "eyes-two/src/main/jni/imageutils/similar-jni.cpp",
"chars": 2535,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/imageutils/similar.cpp",
"chars": 5293,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/imageutils/similar.h",
"chars": 1068,
"preview": "// Copyright 2010 Google Inc. All Rights Reserved.\n// Author: xiaotao@google.com (Xiaotao Duan)\n\n#ifndef JAVA_COM_GOOGLE"
},
{
"path": "eyes-two/src/main/jni/opticalflow/Android.mk",
"chars": 1110,
"preview": "LOCAL_PATH:= $(call my-dir)\n\ninclude $(CLEAR_VARS)\n\nLOCAL_MODULE := libopticalflow\nLOCAL_MODULE_TAGS := optional\n\nLOCAL_"
},
{
"path": "eyes-two/src/main/jni/opticalflow/feature_detector.cpp",
"chars": 12449,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/opticalflow/feature_detector.h",
"chars": 1914,
"preview": "// Copyright 2010 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n\n#ifndef JAVA_COM_GOOG"
},
{
"path": "eyes-two/src/main/jni/opticalflow/image.h",
"chars": 27816,
"preview": "// Copyright 2009 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n\n#ifndef JAVA_COM_GOOG"
},
{
"path": "eyes-two/src/main/jni/opticalflow/optical_flow-jni.cpp",
"chars": 6319,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/opticalflow/optical_flow.cpp",
"chars": 20732,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "eyes-two/src/main/jni/opticalflow/optical_flow.h",
"chars": 9534,
"preview": "// Copyright 2009 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n\n#ifndef JAVA_COM_GOOG"
},
{
"path": "eyes-two/src/main/jni/opticalflow/optical_flow_utils.h",
"chars": 5070,
"preview": "// Copyright 2010 Google Inc. All Rights Reserved.\n// Author: andrewharp@google.com (Andrew Harp)\n\n#ifndef JAVA_COM_GOOG"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 232,
"preview": "#Mon Dec 28 12:31:23 IST 2020\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "gradle.properties",
"chars": 801,
"preview": "## For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/buil"
},
{
"path": "gradlew",
"chars": 5080,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "preparetests.cmd",
"chars": 860,
"preview": "for /f %%i in ('adb shell echo $EXTERNAL_STORAGE') do set DIR=%%i\n\ngit clone -b 3.04.00 https://github.com/tesseract-ocr"
},
{
"path": "preparetests.sh",
"chars": 818,
"preview": "#!/bin/sh\n\nDIR=\"`adb shell echo \\\\$EXTERNAL_STORAGE`\"\n\ngit clone -b 3.04.00 https://github.com/tesseract-ocr/tessdata.gi"
},
{
"path": "settings.gradle",
"chars": 103,
"preview": "include ':eyes-two'\ninclude ':tess-two'\ninclude ':tess-two-test'\nrootProject.name = 'tess-two.project'\n"
},
{
"path": "tess-two/.classpath",
"chars": 466,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"con\" path=\"com.android.ide.eclipse.adt.ANDROID"
},
{
"path": "tess-two/.gitignore",
"chars": 220,
"preview": "/obj\n/gen\n/libs\n/jni/com_googlecode_tesseract_android/src/config/**\n/jni/com_googlecode_tesseract_android/src/m4/**\n/jni"
},
{
"path": "tess-two/.project",
"chars": 811,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>tess-two</name>\n\t<comment></comment>\n\t<projects>\n\t</p"
},
{
"path": "tess-two/AndroidManifest.xml",
"chars": 680,
"preview": "<!--\n Copyright (C) 2011 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may "
},
{
"path": "tess-two/COPYING",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "tess-two/build.gradle",
"chars": 2567,
"preview": "apply plugin: 'com.android.library'\napply plugin: 'com.github.dcendents.android-maven'\napply plugin: 'com.jfrog.bintray'"
},
{
"path": "tess-two/build.xml",
"chars": 3357,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project name=\"tess-two\" default=\"help\">\n\n <!-- The local.properties file is c"
},
{
"path": "tess-two/jni/Android.mk",
"chars": 286,
"preview": "LOCAL_PATH := $(call my-dir)\nTESSERACT_PATH := $(LOCAL_PATH)/../../tesseract\nLEPTONICA_PATH := $(LOCAL_PATH)/../../lepto"
},
{
"path": "tess-two/jni/Application.mk",
"chars": 181,
"preview": "APP_STL := c++_static\nAPP_ABI := armeabi-v7a x86 arm64-v8a x86_64\nAPP_OPTIM := release\nAPP_PLATFORM := android-16\nAPP_CP"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/Android.mk",
"chars": 1401,
"preview": "LOCAL_PATH := $(call my-dir)\n\ninclude $(CLEAR_VARS)\nLOCAL_MODULE := liblept\n\nLOCAL_SRC_FILES += \\\n box.cpp \\\n boxa.cpp"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/box.cpp",
"chars": 2681,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/boxa.cpp",
"chars": 1652,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/common.h",
"chars": 1933,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/endianness.h",
"chars": 58,
"preview": "/* for Android, this header is intentionally left blank */"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/jni.cpp",
"chars": 853,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/pix.cpp",
"chars": 8334,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/pixa.cpp",
"chars": 7599,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/readfile.cpp",
"chars": 5943,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/utilities.cpp",
"chars": 11698,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_leptonica_android/writefile.cpp",
"chars": 4559,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/Android.mk",
"chars": 3204,
"preview": "LOCAL_PATH := $(call my-dir)\nTESSERACT_PATH := $(TESSERACT_PATH)/src\n\n### jni\n\ninclude $(CLEAR_VARS)\nLOCAL_MODULE := lib"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/common.h",
"chars": 1263,
"preview": "/*\n * Copyright 2010, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/debugpixa.h",
"chars": 819,
"preview": "#ifndef TESSERACT_CCSTRUCT_DEBUGPIXA_H_\n#define TESSERACT_CCSTRUCT_DEBUGPIXA_H_\n\n// dummy DebugPixa for Android\n\n#includ"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/pageiterator.cpp",
"chars": 2127,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/resultiterator.cpp",
"chars": 3983,
"preview": "/*\n * Copyright 2011, Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/tess_version.h",
"chars": 58,
"preview": "/* for Android, this header is intentionally left blank */"
},
{
"path": "tess-two/jni/com_googlecode_tesseract_android/tessbaseapi.cpp",
"chars": 25474,
"preview": "/*\n * Copyright 2011, Google Inc.\n * Copyright 2011, Robert Theis\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "tess-two/jni/libjpeg/Android.mk",
"chars": 1258,
"preview": "LOCAL_PATH := $(call my-dir)\n\ninclude $(CLEAR_VARS)\n\nLOCAL_MODULE := libjpgt_static\n\nLOCAL_EXPORT_C_INCLUDE_DIRS := $(LO"
},
{
"path": "tess-two/jni/libjpeg/Makefile.am",
"chars": 4946,
"preview": "## Process this file with automake to produce Makefile.in\n#\n# Automake Makefile for the JPEG library\n#\n# This file is "
},
{
"path": "tess-two/jni/libjpeg/README",
"chars": 18848,
"preview": "The Independent JPEG Group's JPEG software\n==========================================\n\nREADME for release 9b of 17-Jan-2"
},
{
"path": "tess-two/jni/libjpeg/ar-lib",
"chars": 5826,
"preview": "#! /bin/sh\n# Wrapper for Microsoft lib.exe\n\nme=ar-lib\nscriptversion=2012-03-01.08; # UTC\n\n# Copyright (C) 2010-2014 Free"
},
{
"path": "tess-two/jni/libjpeg/cderror.h",
"chars": 5331,
"preview": "/*\n * cderror.h\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * Modified 2009 by Guido Vollbeding.\n * This file is par"
},
{
"path": "tess-two/jni/libjpeg/cdjpeg.c",
"chars": 4682,
"preview": "/*\n * cdjpeg.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's softw"
},
{
"path": "tess-two/jni/libjpeg/cdjpeg.h",
"chars": 6256,
"preview": "/*\n * cdjpeg.h\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's softw"
},
{
"path": "tess-two/jni/libjpeg/change.log",
"chars": 17233,
"preview": "CHANGE LOG for Independent JPEG Group's JPEG software\n\n\nVersion 9b 17-Jan-2016\n-----------------------\n\nImprovements an"
},
{
"path": "tess-two/jni/libjpeg/cjpeg.1",
"chars": 13907,
"preview": ".TH CJPEG 1 \"26 July 2015\"\n.SH NAME\ncjpeg \\- compress an image file to a JPEG file\n.SH SYNOPSIS\n.B cjpeg\n[\n.I options\n]\n"
},
{
"path": "tess-two/jni/libjpeg/cjpeg.c",
"chars": 21818,
"preview": "/*\n * cjpeg.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2003-2013 by Guido Vollbeding.\n * This file is "
},
{
"path": "tess-two/jni/libjpeg/ckconfig.c",
"chars": 12166,
"preview": "/*\n * ckconfig.c\n *\n * Copyright (C) 1991-1994, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/coderules.txt",
"chars": 5364,
"preview": "IJG JPEG LIBRARY: CODING RULES\n\nCopyright (C) 1991-1996, Thomas G. Lane.\nThis file is part of the Independent JPEG Grou"
},
{
"path": "tess-two/jni/libjpeg/compile",
"chars": 7333,
"preview": "#! /bin/sh\n# Wrapper for compilers which do not understand '-c -o'.\n\nscriptversion=2012-10-14.11; # UTC\n\n# Copyright (C)"
},
{
"path": "tess-two/jni/libjpeg/config.guess",
"chars": 42938,
"preview": "#! /bin/sh\n# Attempt to guess a canonical system name.\n# Copyright 1992-2014 Free Software Foundation, Inc.\n\ntimestamp"
},
{
"path": "tess-two/jni/libjpeg/config.sub",
"chars": 35987,
"preview": "#! /bin/sh\n# Configuration validation subroutine script.\n# Copyright 1992-2014 Free Software Foundation, Inc.\n\ntimesta"
},
{
"path": "tess-two/jni/libjpeg/configure.ac",
"chars": 11873,
"preview": "# IJG auto-configuration source file.\n# Process this file with autoconf to produce a configure script.\n\n#\n# Configure sc"
},
{
"path": "tess-two/jni/libjpeg/depcomp",
"chars": 23566,
"preview": "#! /bin/sh\n# depcomp - compile a program generating dependencies as side-effects\n\nscriptversion=2013-05-30.07; # UTC\n\n# "
},
{
"path": "tess-two/jni/libjpeg/djpeg.1",
"chars": 7748,
"preview": ".TH DJPEG 1 \"26 July 2015\"\n.SH NAME\ndjpeg \\- decompress a JPEG file to an image file\n.SH SYNOPSIS\n.B djpeg\n[\n.I options\n"
},
{
"path": "tess-two/jni/libjpeg/djpeg.c",
"chars": 19553,
"preview": "/*\n * djpeg.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2009-2015 by Guido Vollbeding.\n * This file is "
},
{
"path": "tess-two/jni/libjpeg/example.c",
"chars": 17091,
"preview": "/*\n * example.c\n *\n * This file illustrates how to use the IJG code as a subroutine library\n * to read or write JPEG ima"
},
{
"path": "tess-two/jni/libjpeg/filelist.txt",
"chars": 8474,
"preview": "IJG JPEG LIBRARY: FILE LIST\n\nCopyright (C) 1994-2013, Thomas G. Lane, Guido Vollbeding.\nThis file is part of the Indepe"
},
{
"path": "tess-two/jni/libjpeg/install-sh",
"chars": 14675,
"preview": "#!/bin/sh\n# install - install a program, script, or datafile\n\nscriptversion=2013-12-25.23; # UTC\n\n# This originates from"
},
{
"path": "tess-two/jni/libjpeg/install.txt",
"chars": 53839,
"preview": "INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software\n\nCopyright (C) 1991-2015, Thomas G. Lane, Guido"
},
{
"path": "tess-two/jni/libjpeg/jaricom.c",
"chars": 5082,
"preview": "/*\n * jaricom.c\n *\n * Developed 1997-2011 by Guido Vollbeding.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jcapimin.c",
"chars": 9384,
"preview": "/*\n * jcapimin.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * Modified 2003-2010 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jcapistd.c",
"chars": 5940,
"preview": "/*\n * jcapistd.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2013 by Guido Vollbeding.\n * This file is pa"
},
{
"path": "tess-two/jni/libjpeg/jcarith.c",
"chars": 28227,
"preview": "/*\n * jcarith.c\n *\n * Developed 1997-2013 by Guido Vollbeding.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jccoefct.c",
"chars": 16650,
"preview": "/*\n * jccoefct.c\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * Modified 2003-2011 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jccolor.c",
"chars": 19385,
"preview": "/*\n * jccolor.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * Modified 2011-2013 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jcdctmgr.c",
"chars": 15550,
"preview": "/*\n * jcdctmgr.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2003-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jchuff.c",
"chars": 47971,
"preview": "/*\n * jchuff.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2006-2013 by Guido Vollbeding.\n * This file is"
},
{
"path": "tess-two/jni/libjpeg/jcinit.c",
"chars": 2905,
"preview": "/*\n * jcinit.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2003-2013 by Guido Vollbeding.\n * This file is"
},
{
"path": "tess-two/jni/libjpeg/jcmainct.c",
"chars": 9656,
"preview": "/*\n * jcmainct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2003-2012 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jcmarker.c",
"chars": 18929,
"preview": "/*\n * jcmarker.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2003-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jcmaster.c",
"chars": 31197,
"preview": "/*\n * jcmaster.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2003-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jcomapi.c",
"chars": 3110,
"preview": "/*\n * jcomapi.c\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jconfig.bcc",
"chars": 1416,
"preview": "/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */\n/* see jconfig.txt for explanations */\n\n#defi"
},
{
"path": "tess-two/jni/libjpeg/jconfig.cfg",
"chars": 1605,
"preview": "/* jconfig.cfg --- source file edited by configure script */\n/* see jconfig.txt for explanations */\n\n#undef HAVE_PROTOTY"
},
{
"path": "tess-two/jni/libjpeg/jconfig.dj",
"chars": 1143,
"preview": "/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */\n/* see jconfig.txt for explanations */\n\n#defi"
},
{
"path": "tess-two/jni/libjpeg/jconfig.h",
"chars": 0,
"preview": ""
},
{
"path": "tess-two/jni/libjpeg/jconfig.mac",
"chars": 1199,
"preview": "/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */\n/* see jconfig.txt for explanations */\n\n#define HAVE_"
},
{
"path": "tess-two/jni/libjpeg/jconfig.manx",
"chars": 1197,
"preview": "/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */\n/* see jconfig.txt for explanations */\n\n#"
},
{
"path": "tess-two/jni/libjpeg/jconfig.mc6",
"chars": 1668,
"preview": "/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */\n/* see jconfig.txt for explanations */\n\n#"
},
{
"path": "tess-two/jni/libjpeg/jconfig.sas",
"chars": 1170,
"preview": "/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */\n/* see jconfig.txt for explanations */\n\n#defin"
},
{
"path": "tess-two/jni/libjpeg/jconfig.st",
"chars": 1308,
"preview": "/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */\n/* see jconfig.txt for explanations */\n\n#def"
},
{
"path": "tess-two/jni/libjpeg/jconfig.txt",
"chars": 5821,
"preview": "/*\n * jconfig.txt\n *\n * Copyright (C) 1991-1994, Thomas G. Lane.\n * Modified 2009-2013 by Guido Vollbeding.\n * This file"
},
{
"path": "tess-two/jni/libjpeg/jconfig.vc",
"chars": 1553,
"preview": "/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 9x or NT. */\n/* This file also works for Borland C++ 32-"
},
{
"path": "tess-two/jni/libjpeg/jconfig.vms",
"chars": 979,
"preview": "/* jconfig.vms --- jconfig.h for use on Digital VMS. */\n/* see jconfig.txt for explanations */\n\n#define HAVE_PROTOTYPES\n"
},
{
"path": "tess-two/jni/libjpeg/jconfig.wat",
"chars": 1139,
"preview": "/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */\n/* see jconfig.txt for explanations */\n\n#define HAVE"
},
{
"path": "tess-two/jni/libjpeg/jcparam.c",
"chars": 23811,
"preview": "/*\n * jcparam.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2003-2013 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jcprepct.c",
"chars": 12216,
"preview": "/*\n * jcprepct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jcsample.c",
"chars": 19923,
"preview": "/*\n * jcsample.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jctrans.c",
"chars": 13970,
"preview": "/*\n * jctrans.c\n *\n * Copyright (C) 1995-1998, Thomas G. Lane.\n * Modified 2000-2013 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jdapimin.c",
"chars": 12842,
"preview": "/*\n * jdapimin.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * Modified 2009-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdapistd.c",
"chars": 9393,
"preview": "/*\n * jdapistd.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2002-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdarith.c",
"chars": 24245,
"preview": "/*\n * jdarith.c\n *\n * Developed 1997-2015 by Guido Vollbeding.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jdatadst.c",
"chars": 8712,
"preview": "/*\n * jdatadst.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2009-2012 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdatasrc.c",
"chars": 9373,
"preview": "/*\n * jdatasrc.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2009-2015 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdcoefct.c",
"chars": 25428,
"preview": "/*\n * jdcoefct.c\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * Modified 2002-2011 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdcolor.c",
"chars": 22781,
"preview": "/*\n * jdcolor.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2011-2015 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jdct.h",
"chars": 17932,
"preview": "/*\n * jdct.h\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2002-2015 by Guido Vollbeding.\n * This file is p"
},
{
"path": "tess-two/jni/libjpeg/jddctmgr.c",
"chars": 12380,
"preview": "/*\n * jddctmgr.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2002-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdhuff.c",
"chars": 48549,
"preview": "/*\n * jdhuff.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2006-2013 by Guido Vollbeding.\n * This file is"
},
{
"path": "tess-two/jni/libjpeg/jdinput.c",
"chars": 25087,
"preview": "/*\n * jdinput.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2002-2013 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jdmainct.c",
"chars": 20517,
"preview": "/*\n * jdmainct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2002-2012 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdmarker.c",
"chars": 45939,
"preview": "/*\n * jdmarker.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2009-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdmaster.c",
"chars": 19050,
"preview": "/*\n * jdmaster.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2002-2015 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdmerge.c",
"chars": 15631,
"preview": "/*\n * jdmerge.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2013-2015 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jdpostct.c",
"chars": 9723,
"preview": "/*\n * jdpostct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jdsample.c",
"chars": 11932,
"preview": "/*\n * jdsample.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * Modified 2002-2015 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jdtrans.c",
"chars": 5053,
"preview": "/*\n * jdtrans.c\n *\n * Copyright (C) 1995-1997, Thomas G. Lane.\n * Modified 2000-2009 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jerror.c",
"chars": 7850,
"preview": "/*\n * jerror.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2012-2015 by Guido Vollbeding.\n * This file is"
},
{
"path": "tess-two/jni/libjpeg/jerror.h",
"chars": 14580,
"preview": "/*\n * jerror.h\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * Modified 1997-2012 by Guido Vollbeding.\n * This file is"
},
{
"path": "tess-two/jni/libjpeg/jfdctflt.c",
"chars": 6043,
"preview": "/*\n * jfdctflt.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2003-2015 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jfdctfst.c",
"chars": 8015,
"preview": "/*\n * jfdctfst.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * Modified 2003-2015 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jfdctint.c",
"chars": 158863,
"preview": "/*\n * jfdctint.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * Modification developed 2003-2015 by Guido Vollbeding."
},
{
"path": "tess-two/jni/libjpeg/jidctflt.c",
"chars": 8356,
"preview": "/*\n * jidctflt.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * Modified 2010-2015 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jidctfst.c",
"chars": 12707,
"preview": "/*\n * jidctfst.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * Modified 2015 by Guido Vollbeding.\n * This file is pa"
},
{
"path": "tess-two/jni/libjpeg/jidctint.c",
"chars": 184742,
"preview": "/*\n * jidctint.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modification developed 2002-2015 by Guido Vollbeding."
},
{
"path": "tess-two/jni/libjpeg/jinclude.h",
"chars": 3250,
"preview": "/*\n * jinclude.h\n *\n * Copyright (C) 1991-1994, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jmemansi.c",
"chars": 4610,
"preview": "/*\n * jmemansi.c\n *\n * Copyright (C) 1992-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jmemdos.c",
"chars": 18977,
"preview": "/*\n * jmemdos.c\n *\n * Copyright (C) 1992-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jmemdosa.asm",
"chars": 8314,
"preview": ";\n; jmemdosa.asm\n;\n; Copyright (C) 1992, Thomas G. Lane.\n; This file is part of the Independent JPEG Group's software.\n;"
},
{
"path": "tess-two/jni/libjpeg/jmemmac.c",
"chars": 9507,
"preview": "/*\n * jmemmac.c\n *\n * Copyright (C) 1992-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jmemmgr.c",
"chars": 41035,
"preview": "/*\n * jmemmgr.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 2011-2012 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jmemname.c",
"chars": 8314,
"preview": "/*\n * jmemname.c\n *\n * Copyright (C) 1992-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jmemnobs.c",
"chars": 2772,
"preview": "/*\n * jmemnobs.c\n *\n * Copyright (C) 1992-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's sof"
},
{
"path": "tess-two/jni/libjpeg/jmemsys.h",
"chars": 8230,
"preview": "/*\n * jmemsys.h\n *\n * Copyright (C) 1992-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's soft"
},
{
"path": "tess-two/jni/libjpeg/jmorecfg.h",
"chars": 14925,
"preview": "/*\n * jmorecfg.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 1997-2013 by Guido Vollbeding.\n * This file "
},
{
"path": "tess-two/jni/libjpeg/jpegint.h",
"chars": 17284,
"preview": "/*\n * jpegint.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 1997-2013 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jpeglib.h",
"chars": 49287,
"preview": "/*\n * jpeglib.h\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2002-2015 by Guido Vollbeding.\n * This file i"
},
{
"path": "tess-two/jni/libjpeg/jpegtran.1",
"chars": 9888,
"preview": ".TH JPEGTRAN 1 \"20 September 2015\"\n.SH NAME\njpegtran \\- lossless transformation of JPEG files\n.SH SYNOPSIS\n.B jpegtran\n["
},
{
"path": "tess-two/jni/libjpeg/jpegtran.c",
"chars": 18964,
"preview": "/*\n * jpegtran.c\n *\n * Copyright (C) 1995-2013, Thomas G. Lane, Guido Vollbeding.\n * This file is part of the Independen"
},
{
"path": "tess-two/jni/libjpeg/jquant1.c",
"chars": 31327,
"preview": "/*\n * jquant1.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * Modified 2011 by Guido Vollbeding.\n * This file is par"
},
{
"path": "tess-two/jni/libjpeg/jquant2.c",
"chars": 48471,
"preview": "/*\n * jquant2.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * Modified 2011 by Guido Vollbeding.\n * This file is par"
},
{
"path": "tess-two/jni/libjpeg/jutils.c",
"chars": 6735,
"preview": "/*\n * jutils.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * Modified 2009-2011 by Guido Vollbeding.\n * This file is"
},
{
"path": "tess-two/jni/libjpeg/jversion.h",
"chars": 396,
"preview": "/*\n * jversion.h\n *\n * Copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding.\n * This file is part of the Independen"
},
{
"path": "tess-two/jni/libjpeg/libjpeg.txt",
"chars": 163828,
"preview": "USING THE IJG JPEG LIBRARY\n\nCopyright (C) 1994-2013, Thomas G. Lane, Guido Vollbeding.\nThis file is part of the Independ"
},
{
"path": "tess-two/jni/libjpeg/ltmain.sh",
"chars": 324089,
"preview": "#! /bin/sh\n## DO NOT EDIT - This file generated from ./build-aux/ltmain.in\n## by inline-source v2014-01-03"
},
{
"path": "tess-two/jni/libjpeg/makcjpeg.st",
"chars": 1674,
"preview": "; Project file for Independent JPEG Group's software\n;\n; This project file is for Atari ST/STE/TT systems using Pure C o"
},
{
"path": "tess-two/jni/libjpeg/makdjpeg.st",
"chars": 1674,
"preview": "; Project file for Independent JPEG Group's software\n;\n; This project file is for Atari ST/STE/TT systems using Pure C o"
},
{
"path": "tess-two/jni/libjpeg/makeadsw.vc6",
"chars": 1251,
"preview": "Microsoft Developer Studio Workspace File, Format Version 6.00\n# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEIT"
},
{
"path": "tess-two/jni/libjpeg/makeasln.v10",
"chars": 1856,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 11.00\n# Visual C++ Express 2010\nProject(\"{8BC9CEB8-8B4A-11D0-8D11"
},
{
"path": "tess-two/jni/libjpeg/makecdep.vc6",
"chars": 1138,
"preview": "# Microsoft Developer Studio erstellte Abhngigkeitsdatei, einbezogen von cjpeg.mak\n\n.\\cdjpeg.c : \\\n\t\".\\cderror.h\"\\\n\t\".\\c"
},
{
"path": "tess-two/jni/libjpeg/makecdsp.vc6",
"chars": 3344,
"preview": "# Microsoft Developer Studio Project File - Name=\"cjpeg\" - Package Owner=<4>\n# Microsoft Developer Studio Generated Buil"
},
{
"path": "tess-two/jni/libjpeg/makecfil.v10",
"chars": 2285,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild"
},
{
"path": "tess-two/jni/libjpeg/makecmak.vc6",
"chars": 3272,
"preview": "# Microsoft Developer Studio Generated NMAKE File, Based on cjpeg.dsp\n!IF \"$(CFG)\" == \"\"\nCFG=cjpeg - Win32\n!MESSAGE Kein"
}
]
// ... and 394 more files (download for full content)
About this extraction
This page contains the full source code of the alexcohn/tess-two GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 594 files (7.4 MB), approximately 2.0M tokens, and a symbol index with 3217 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.