This application scans book covers to extract the title and fetches book details from a JSON database.
Demo video link: link
- Docker installed
-
Build the Docker image:
docker build -t book-scanner .
-
Run the Docker container:
docker run -d -p 5001:5001 book-scanner
-
Test the application:
Upload an image of a book cover using tools like Postman or curl:
curl -X POST -F "file=@path_to_book_cover.jpg" http://localhost:5001/upload
- Enable the Google Vision API in your Google Cloud project.
- Download the JSON key file for your Google Cloud service account and rename it to
google_credentials.json
. - Place the
google_credentials.json
file in the root directory of the project.
- Flask: API framework
- OpenCV: Image processing
- pytesseract: OCR engine
- Google Vision API: OCR engine
Extract text from an uploaded image using Optical Character Recognition (OCR).
- Method:
POST
- Form Data:
file
: Image file to process
- 200 OK:
{"extracted_text": ["line1", "line2", ...], "matches": [BooksMetaData] }