Document-Scanner | Source code for the Capstone Project | Computer Vision library

 by   Aniruddha-Tapas Java Version: Current License: GPL-3.0

kandi X-RAY | Document-Scanner Summary

kandi X-RAY | Document-Scanner Summary

Document-Scanner is a Java library typically used in Artificial Intelligence, Computer Vision, OpenCV applications. Document-Scanner has no bugs, it has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

This app turns your mobile into a portable scanner, which can be used for scanning handwritten notes and printed documents. It automatically detect the edge of the paper over a contrasting surface. When using the printed special page template it automatically detects the QR Code printed on the bottom right corner and scans the page immediately. After the page is detected, it compensates any perspective from the image adjusting it to a 90 degree top view and saves it on a folder on the device. It also incorporates OCR functionality which the user can use to detect text from documents and save them as editable text files in the external storage of the device. It is possible to launch the application from any other application that asks for a picture.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Document-Scanner has a low active ecosystem.
              It has 352 star(s) with 136 fork(s). There are 27 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 13 open issues and 3 have been closed. On average issues are closed in 45 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Document-Scanner is current.

            kandi-Quality Quality

              Document-Scanner has no bugs reported.

            kandi-Security Security

              Document-Scanner has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              Document-Scanner is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              Document-Scanner releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed Document-Scanner and discovered the below as its top functions. This is intended to give you an instant insight into Document-Scanner implemented functionality, and help decide if they suit your requirements.
            • Initializes the view
            • Handle OCR capture activity
            • Sets the flash state of the camera
            • Dialog with stats optin dialog
            • Initializes the event handler
            • Creates text list
            • Request the camera permission
            • Called when the surface is created
            • Returns the maximum resolution of the image with the specified previewRatio ratio
            • Sets the camera preview size
            • Called when an item is selected
            • Draw the text block
            • Initialize view
            • Registers an install dialog
            • Called when a menu item is selected
            • Initialize the shared constructor
            • Delivers the camera frame
            • Performs the zoom level of the camera
            • Convert a vector to a matrix
            • Initializes the gallery
            • Opens camera
            • Called when a context item is selected
            • Initializes the ImageLoader
            • Set the values of this matrix from a double array
            • Set the view width and height
            • Initializes the dialog
            Get all kandi verified functions for this library.

            Document-Scanner Key Features

            No Key Features are available at this moment for Document-Scanner.

            Document-Scanner Examples and Code Snippets

            No Code Snippets are available at this moment for Document-Scanner.

            Community Discussions

            QUESTION

            How to read images uploaded via post request using opencv
            Asked 2021-Jan-13 at 16:05

            I have an opencv script on document scanner and I want to create a post request that returns the scanned image as a response.

            I get the below error when I tried to read the image(using opencv) via post request.

            ...

            ANSWER

            Answered 2021-Jan-13 at 16:05

            I was able to get around this by using PIL library in python

            Below is the code snippet on how I was able to read my image from django database using for opencv preprocessing

            Source https://stackoverflow.com/questions/65603624

            QUESTION

            Finding the contour closest to image center in OpenCV2
            Asked 2020-May-01 at 16:24

            I am trying to use openCV2 to automatically delineate the contours of churches and cathedrals from static maps.

            In a nutshell, I am:

            • scraping the building's coordinates from this Wikipedia page.
            • creating a map centered on those coordinates using Folium, a Python library.
            • saving the map as a jpg image.
            • applying openCV2's findContours method to delineate the contours of the buildings.

            I initially assumed that the cathedrals would be the largest building within a few hundred meters, so I sorted the contours by area following this PyImageSearch tutorial:

            ...

            ANSWER

            Answered 2020-May-01 at 16:24

            I used cv2.moments(contour) as shown in this article to get the center of each contour. Then you can use distance.euclidian from the scipy.spatial module to calculate the distance of each contour to the image center.

            Sample Image:

            Code:

            Source https://stackoverflow.com/questions/61541559

            QUESTION

            Why everybody convert image to gray-scale before performing operations on openCV
            Asked 2020-Jan-15 at 02:10

            been trying to find the answer to why everybody converts an image to grayscale before processing?

            For example, this website with instructions teaching people how to build a simple scanning program converts photo to greyscale first before passing commands to manipulate the image itself.

            In the second example, this thread on stackoverflow shows a person also converts the image to grayscale before extracting text from his image.

            Does this process make the image easier to manipulate? Or does it give better results when extracting text? If so, shouldn't a binary image give the best result in the case of extracting text?

            ...

            ANSWER

            Answered 2020-Jan-15 at 02:10

            More often than not, grayscale has all the relevant information to complete a particular task. So reducing the image to grayscale greatly simplifies calculations and removes redundancies.

            Binary image is great too but it sacrifices too many information for it to be useful in many cases. And most library supports a minimum of 8 bit image processing anyway for a true binary data structure to be useful.

            Imagine having to create a program to recognize text on paper. Having a color image doesn't help you to better read the text. The text can be in various color but you can read the text even if its in black and white. You can argue that binary image should also give the same performance and that is true IF there are no noise such as shadow on the paper.

            Once there are noise elements exist on the image, you will need more information to separate text from noise and that is when grayscale is useful.

            Moreover the most used and reliable information for advanced image processing is the edges and its textures. Both which can be obtained from a grayscale image.

            Source https://stackoverflow.com/questions/59729902

            QUESTION

            OpenCV Drawing Contour Error Assertion Failed
            Asked 2019-Dec-29 at 04:49

            So I am trying to follow guide on how to scan a document in https://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/ exactly on the step 2 process where i am supposed to find the contour and draw it to the image, i got an "Assertion Failed" error on drawContour function

            The guide did not have

            screenCnt = None

            so at first i got Error like screenCnt did not exist

            after i add it, got Assertion Failed instead even though i used the same image as the guide and tried another image too

            ...

            ANSWER

            Answered 2019-Jul-14 at 07:39

            Try printing all the inputs to the function that you are providing. I guess you may find something wrong. Let me know in the comments below.

            Source https://stackoverflow.com/questions/57025443

            QUESTION

            How to warp a rectangular object to fit its larger bounding box
            Asked 2019-Oct-17 at 20:08

            Given this image:

            I'd like to make it such that it will rotate and stretch to fully fit in the bounding box with no whitespace on the outside of the largest rectangular box. It should also account for worse perspective case, like in the links I list later on.

            Basically, while it is not noticeable, the rectangle is rotated a little bit, and I'd like to fix that distortion.

            However, I got an error when attempting to retrieve the four points of the contour. I have made sure and utilized contour approximation to isolate and get only relevant looking contours and as you can see in the image it's successful, though I can't use perspective warp on it.

            I've already tried the links here:

            And followed them, with only minor modifications (like not downscaling the image and then upscaling it) and different input image.

            There is a similar error encountered by a reader there in the comments, but the author just said to use contour approximation. I did that but I still receive the same error.

            I have already retrieved the contour (which along with its bounding box, is the image illustrated earlier), and used this code to attempt persective warp:

            ...

            ANSWER

            Answered 2019-Oct-17 at 20:08

            Try this approach:

            • Convert image to grayscale and blur with bilateral filter
            • Otsu's threshold
            • Find contours
            • Perform contour approximation for largest square contour
            • Perspective transform and rotate

            Result

            Source https://stackoverflow.com/questions/58422868

            QUESTION

            How to avoid "The job exceeded the maximum time limit for jobs, and has been terminated." when accessing mvnsearch.org on Travis CI?
            Asked 2019-Mar-13 at 17:41

            Since approx. 72h I'm getting The job exceeded the maximum time limit for jobs, and has been terminated. on TravisCI which seems to be related requesting artifacts from mvnsearch.org, e.g. https://travis-ci.org/document-scanner/document-scanner-aggregator/builds/266942578. I assume it's a remote repository which I'm not using, but some of the project's dependencies are.

            mavensearch.org seems to be unreachable or responding very slowly. I don't find any news on their operational status. It's odd that the issues isn't fixed within 72h, so I assume a long-time issue.

            The only possible solution I could imagine would be to add the download and installation of a maven proxy to the Travis CI build script and proxy mavensearch.org in a Maven settings.xml file. Is there any way to avoid this?

            It doesn't work to use the mirror element in ~/.m2/settings.xml because it references the repository id in referenced POMs which can be those of transitive dependencies and can change if snapshots are used and need to be checked and eventually adjusted after every version change.

            ...

            ANSWER

            Answered 2017-Sep-01 at 19:46

            A couple of actions may be done:

            1. The Common Build Problems: My builds are timing out - Travis CI answer provides a couple of solutions. One of them is «to extend the wait time» for the Maven process.
            2. Enable caching of the Maven dependencies: Caching Dependencies and Directories: Caching directories (Bundler, dependencies): Arbitrary directories - Travis CI.
            3. Use a repository manager: «act as dedicated proxy server for public Maven repositories».
              Additional references:
              1. Nexus example:
              2. The general question: How does one mirror a maven repository?.

            Source https://stackoverflow.com/questions/45817256

            QUESTION

            NgZone or ChangeDetectorRef not working in Ionic 3
            Asked 2018-Jun-16 at 14:10

            I´m using the cordova-plugin-document-scanner plugin in my ionic 3 iOS App which allows me to take a photo with some additional features. Everything works fine and I get the fileURI in the success callback (file:///...).

            After taking a Photo, I´m not able to update the DOM to show the image in my view home.html. I tried also to update a simple text (test), but it also do not work.

            I´ve tried it with ngZone and also with ChangeDetectorRef. Both give me:

            ...

            ANSWER

            Answered 2018-Jun-16 at 09:57

            I found a working solution:

            Source https://stackoverflow.com/questions/50886041

            QUESTION

            How to avoid issues with Maven builds on Travis CI which don't occur locally?
            Asked 2017-Jul-28 at 22:30

            I'm regularily using Travis CI and noticed multiple issues with forked projects the last weeks when building on Travis which do not occur locally or on the Travis instance of the forked project. I made sure that I used the the same Maven version which imo is all that can be different from the Travis CI environment since both Maven and Java are portable across platforms. Travis runs Ubuntu 12.04 or 14.04 which I do as well (17.04).

            In detail I experienced:

            I'm not looking for solutions to the issues here, but to any explanation how this could make any sense in order to broaden my understanding of Travis and Maven in a cross-platform environment.

            ...

            ANSWER

            Answered 2017-Jul-28 at 22:30

            Have you pinned all plugins you use in Maven? You should first fix your build issues like : [WARNING] 'parent.relativePath' of POM org.apache.commons:commons-numbers-parent:1.0-SNAPSHOT (/home/travis/build/document-scanner/document-scanner-aggregator/commons-numbers/pom.xml) points at richtercloud:document-scanner-aggregator instead of org.apache.commons:commons-parent, please verify your project structure @ org.apache.commons:commons-numbers-parent:1.0-SNAPSHOT, /home/travis/build/document-scanner/document-scanner-aggregator/commons-numbers/pom.xml, line 19, column 11?

            Is there a good reason why you rebuild apache-commons-numbers and not using the released versions of them?

            Source https://stackoverflow.com/questions/45359149

            QUESTION

            Why fails Travis CI to retrieve a SNAPSHOT artifact when retrieval works locally?
            Asked 2017-Jul-28 at 00:59

            I'm suffering for a Could not find artifact org.apache.commons:commons-numbers-core:jar:1.0-SNAPSHOT Maven error on Travis CI which I can't explain because I ran the exact same build command locally after deleting ~/.m2/repository and moving ~/.m2/settings.xml to a backup location.

            The error message is

            ...

            ANSWER

            Answered 2017-Jul-28 at 00:59

            QUESTION

            OpenCv c++ cropping image
            Asked 2017-Mar-17 at 12:01

            So, I managed to detect document borders with opencv c++ code. Now, I need to crop that image and make it look decent.

            Border detection looks good as you can see in this picture:

            But now, when I try to crop it, it looks like this:

            Now, this is the code im using:

            ...

            ANSWER

            Answered 2017-Mar-14 at 09:30

            Looks like you'd need to get the rotatedRect instead of rectangle. Then perform a warpAffine (http://docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html?highlight=warpaffine)

            Then use getRotationMatrix2D (http://docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html#getrotationmatrix2d) to get the angle of rotation, rotate the image as such, crop as usual and then rotate back to normal.

            Source https://stackoverflow.com/questions/42781626

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Document-Scanner

            You can download it from GitHub.
            You can use Document-Scanner like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Document-Scanner component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Aniruddha-Tapas/Document-Scanner.git

          • CLI

            gh repo clone Aniruddha-Tapas/Document-Scanner

          • sshUrl

            git@github.com:Aniruddha-Tapas/Document-Scanner.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link