savannahar68 / camscanner-python Goto Github PK
View Code? Open in Web Editor NEWReplicating CamScanner in Python using OpenCV2
Replicating CamScanner in Python using OpenCV2
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required = True, help = "Path to the image to be scanned")
args = vars(ap.parse_args())
when I running this part I am getting errors. how can I fix it?
usage: ipykernel_launcher.py [-h] -i IMAGE
ipykernel_launcher.py: error: the following arguments are required: -i/--image
An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
runfile('/home/frohro/Downloads/CamScanner-Python/scannerApp.py', args='-i images/receipt.jpg', wdir='/home/frohro/Downloads/CamScanner-Python')
Reloaded modules: imutils, imutils.convenience, imutils.meta
STEP 1: Edge Detection
Traceback (most recent call last):
File "", line 1, in
runfile('/home/frohro/Downloads/CamScanner-Python/scannerApp.py', args='-i images/receipt.jpg', wdir='/home/frohro/Downloads/CamScanner-Python')
File "/usr/lib/python3/dist-packages/spyder_kernels/customize/spydercustomize.py", line 678, in runfile
execfile(filename, namespace)
File "/usr/lib/python3/dist-packages/spyder_kernels/customize/spydercustomize.py", line 106, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/frohro/Downloads/CamScanner-Python/scannerApp.py", line 72, in
cnts = sorted(cnts, key = cv2.contourArea, reverse = True)[:5]
error: OpenCV(4.1.0-dev) /home/frohro/Projects/opencv/modules/imgproc/src/shapedescr.cpp:274: error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function 'contourArea'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.