Metadata-Version: 2.1
Name: nkocr
Version: 2.0.0
Summary: This is a module to make specifics OCRs          at food products and nutricional tables.
Home-page: https://github.com/Lucs1590/Nkocr
Author: NK Sistemas de Informacao em Saude
Author-email: ti@nkodontologia.com.br
License: Apache License 2.0
Download-URL: https://github.com/Lucs1590/Nkocr
Keywords: ocr,tesseract-ocr,nk,python3,python-3,food-products
Platform: UNKNOWN
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Healthcare Industry
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: tesseract (==0.1.3)
Requires-Dist: pytesseract (==0.3.7)
Requires-Dist: requests (==2.25.1)
Requires-Dist: wheel (==0.36.2)
Requires-Dist: pillow (==8.1.2)
Requires-Dist: numpy (==1.20.0)
Requires-Dist: opencv-contrib-python (>=4.*)
Requires-Dist: scikit-learn (==0.24.1)
Requires-Dist: gdown (==3.12.2)
Requires-Dist: imutils (==0.5.4)
Requires-Dist: symspellpy (==6.5.2)
Provides-Extra: dev
Requires-Dist: pytest (>=3.7) ; extra == 'dev'
Requires-Dist: pytest-socket (==0.3.5) ; extra == 'dev'

![Nkocr_logo](https://raw.githubusercontent.com/Lucs1590/Nkocr/master/logo.jpg)

--------------------------------------

[![CodeFactor](https://www.codefactor.io/repository/github/lucs1590/nkocr/badge)](https://www.codefactor.io/repository/github/lucs1590/nkocr)
[![codecov](https://codecov.io/gh/Lucs1590/Nkocr/branch/master/graph/badge.svg?token=DRGVRJMNBP)](https://codecov.io/gh/Lucs1590/Nkocr)
![Python Test](https://github.com/Lucs1590/Nkocr/workflows/Python%20Test/badge.svg)
![Upload Python Package](https://github.com/Lucs1590/Nkocr/workflows/Upload%20Python%20Package/badge.svg?branch=v0.2.2)
![OSSAR](https://github.com/Lucs1590/Nkocr/workflows/OSSAR/badge.svg)
![CodeQL](https://github.com/Lucs1590/Nkocr/workflows/CodeQL/badge.svg)

This is a module to make specifics OCRs at food products and nutritional tables.


As a prerequisite of this project, we have the tesseract library which can be found in more detail at

https://github.com/tesseract-ocr/tesseract

# Installation of prerequisites
## Tesseract OCR
The installation of tesseract on the **Linux** system can be done in a few commands:

```bash
$ sudo apt install tesseract-ocr tesseract-ocr-por libtesseract-dev
```

And the same goes for **macOS**. There is a variation between MacPorts and Homebrew, but in this post I will only quote the version of Homebrew:
```
$ brew install tesseract
```
After performing the tesseract installation, it is possible to perform OCR in just one command, thus already extracting some words from the image.
> The default language is English, depending on the text, it will not be possible to capture the word/phrase.
If you want to work with another language, you need to make some additional installations. (https://github.com/tesseract-ocr/tesseract/wiki#other-languages)
---
## OpenCV
The installation of OpenCV on the **Linux** system can be done in a command:

```bash
$ sudo apt install python3-opencv
```
 > To more informations, access: https://docs.opencv.org/master/da/df6/tutorial_py_table_of_contents_setup.html
---
# Installation
You can install this package with:
```bash
$ pip install nkocr --user
```

# Operating Pipeline
![Pipeline_Nkocr](https://raw.githubusercontent.com/Lucs1590/Nkocr/master/pipeline.png)

# How to use
To use this package, after do installation, do:
```python
from nkocr import OcrTable, OcrProduct
```

# Example
```python
from nkocr import OcrTable

text = OcrTable("paste_image_url_here")
print(text) # or print(text.text)
```


