woojiahao / bookit

Book searching application
MIT License
8 stars 0 forks source link

Book Recognition OCR #16

Open woojiahao opened 6 years ago

woojiahao commented 6 years ago

Goes hand in hand with #14

We need to save a copy of the image into the private app storage so as to get a HD rendering of the image to be used for the scanner. Tutorial

The image processing will be done in the class ScannerLauncher.java. It is a blank activity whose main purpose is to launch the camera and act as an intermediary between the Container class and the Scanner feature.

As such, ideally, the ScannerLauncher.java activity should return:

  1. Successful scan: Book object that has been received (Book object to be made a parcelable) with a boolean for hasMatch as true
  2. Failing scan: hasMatch as false and extractedText as the text the OCR tried to pick up

Successful:

Book book = processImage();
Intent i = new Intent();
i.putExtra("matchedBook", book);
i.putExtra("hasMatch", true);
setResult(Activity.RESULT_OK, i);
finish();

Failure:

Intent i = new Intent();
i.putExtra("extractedText", extractedText);
i.putExtra("hasMatch", true);
setResult(Activity.RESULT_OK, i);
finish();
woojiahao commented 6 years ago

Add progress bar when scanning image

woojiahao commented 6 years ago

Apply a filter over the image in order to convert it to black and white