OpenNoteScanner icon indicating copy to clipboard operation
OpenNoteScanner copied to clipboard

Not getting the green square anymore

Open callegar opened this issue 5 years ago • 12 comments

Today I have tried using open note scanner after some time, and to my surprise I cannot see the green square indicating the paper boundaries anymore.

I do not believe that the app itself received any update since the last time when it worked. Hence I must assume that something else has happened on my device breaking the app (a system update?)

I see the issue on a Moto G6 with android 9.

Any help in trying to understand what is going on? Would it make sense to add some self-check in the app to help recognize if something in the platform does not let the app work correctly?

callegar avatar Feb 06 '20 16:02 callegar

I've noticed related odd behavior developing recently as well. The green highlight flickers and jumps around a lot recently and autocapture no longer works. When pressing the capture button, I get the "press again for whole image" popup, and if I do I usually get a properly cropped document, but occasionally get the entire image. Running on a Note 9.

cilynx avatar Mar 01 '20 23:03 cilynx

For me, the situation has gone back to normal in the last days. Wonder what the reason may have been. I have a feeling that flickering neon lighting may create issues with the border detection. If this is the case, for me the bug can be closed (and sorry for the noise).

callegar avatar Mar 02 '20 12:03 callegar

Hi @callegar and @cilynx

@callegar there is not a chance that the green box mess with border detection, it is screen only, it doesn't change the image being analized.

One thing that may be happening is that the surface behind the target doesn't have a solid color, but the algorithm doesn't changed since the very first version of the app, so it is very probable that is something with the image being fed to it.

allgood avatar Mar 02 '20 12:03 allgood

Hi, I know the green box is screen only, but I guess it indicates that border detection works correctly. When I cannot get the green box, the whole image is saved, not just the page, and I do not get any geometry correction.

After some more experiments, I get a feeling that (at least with my phone) flickering lights prevent the correct perception of the solid background color. So, most likely, it is not a software problem in the end. Please, consider closing and again sorry for the noise. Initially I thought that some Android update was messing with opencv.

callegar avatar Mar 02 '20 12:03 callegar

@callegar , yes, some type of lights can mess with the image algorithm. Unfortunately there is not much to be done with this.

allgood avatar Mar 02 '20 12:03 allgood

@ctodobom , indeed. Possibly if I had a stronger flash that would help in some lighting conditions... On the software side some LP filtering may provide some benefit, but may also bring other disadvantages.

callegar avatar Mar 02 '20 12:03 callegar

In my case it rarely works. It just takes the whole picture and then I will have to crop it with other softwares. Why, instead, not offer a cropping option from within the app. Other apps do it this way. They let you take a picture, without post processing, and then they try to autocrop it, and the user can adjust the cropping marks. After that the post processing takes place, just on the selected area. You can have a look at "tiny scanner" on the play store, just to see what I mean.

nicoursi avatar Mar 11 '20 08:03 nicoursi

Hello @ctodobom, Here is a suggestion, although I could try this myself, I do not have an android development setup.

Suggestion: It is a very simple and easy fix. See the following image - It has been scanned using Open Note Scanner without cropping the image: DOC-20200504-154546

The enhanceDocument() function is clearly able to highlight the outlines of the page even though i had lots of background noise.

Therefore, I think we can solve this problem to some extent by changing the detectDocument() function to enhance the document first and then finding the quadrilatteral and cropping the image.

Just try it. Hope the fix helps 😃 !

n33rj avatar May 04 '20 11:05 n33rj

Exactly the same behaviour here. No light or background configuration changes that. Still no green square.

otede avatar May 14 '20 08:05 otede

I am having the same problem. The green square flickers even with a different background.

legendofa avatar Jun 15 '20 12:06 legendofa

I haven't been able to make the green square come up either. I've tried many different backgrounds, even a completely black one. OpenCV is installed.

Ploonet avatar Feb 08 '21 16:02 Ploonet

The only luck I've had with this app was when I put my notes on a black background so that they're surrounded by black. Other backgrounds such as light brown simply don't work.

kyoforkshomebrews avatar May 05 '21 02:05 kyoforkshomebrews