Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set number of columns scan as default, avoiding asking every time. #102

Open
ltlombardi opened this issue Feb 14, 2016 · 2 comments

Comments

@ltlombardi
Copy link

Issue: When scanning multiple pages, like a whole book or chapter, it's tiresome to have to select single or double columns every scan.

Enhancement: Allow user to flag "don't ask again", and tell the user that he can change it back in the settings menu.
Enhancement 2: If in another scan, the same user tries to scan a two columns page, the OCR could detect it and ask the user if the document has more than one column.

@ltlombardi ltlombardi changed the title Ability to set one columns scan as default, avoiding asking every time. Ability to set number of columns scan as default, avoiding asking every time. Mar 6, 2016
@renard314
Copy link
Owner

Good points. Thank you.

@vergaramikel
Copy link

Sorry if it is old but I hope it helps people with the same needs, I did this in this way:

In the OCRActivity.java, handlemessage() at the end of the
case OCR.MESSAGE_LAYOUT_ELEMENTS: {

I managed to pass a selected template before (in my case there are several), so if it is just columns view, you can order the rects and add them. Some of this variables were private so I changed to public in not the best way I guess, but just for a fast solution.

                   Collections.sort(lstRects, new Comparator<RectF>() {
                        @Override
                        public int compare(RectF r1, RectF r2) {
                            return (int) r1.left - (int) r2.left;
                        }
                    });


                    for (RectF r : lstRects) {
                        mImageView.mTouchedTextRects.add(r);
                    }

                    mButtonStartOCR.callOnClick();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants