GithubHelp home page GithubHelp logo

card_scan's People

Contributors

chrismeyersfsu avatar webmaven avatar yenthefirst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

card_scan's Issues

python -m utils.run_scan fails

run_scan seems to fail for me

meyers@tinylappy:~/Dropbox/Code/card_scan$ python -m utils.run_scan
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/meyers/Dropbox/Code/card_scan/utils/run_scan.py", line 45, in
next_box = session.query(func.max(sqlalchemy.cast(InvCard.box, sqlalchemy.Integer))).first()[0] + 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Minor Glitches

Hi there YenTheFirst, just like to thank you for this great code :)

Im no programmer, but i have spotted some minor glitches that you might wanna do something with.

requirements.txt has flask stated twice which PIP does not like.

in scan_card line 8, coeff_normed is missing in the def.

I have been trying to get the code to scan in some card, althou it seems to be stuck in
STATE: has moved. waiting for stable
So i have tried tuning biggest_diff variable a little to either side, but does not seem to help.
I know that this description is kinda slim, but i thought maybe you would have some advice for me.

Method used for ignoring background is either unneccessary or counter productive

Subtracting the image from the 'empty state' image works when the empty state is an even color or smooth gradient, but it is actually unnecessary in that case (no edges anyway!).

OTOH, if the background has a high-contrast pattern, simply subtracting the empty state may actually be counter-productive and introduce a lot of extra edges to the card area.

I'm not sure if this matters in practice, but if so, what you probably want to do instead to deal with a wide variety of backgrounds is something like this:

For each pixel, check to see if it is identical (or nearly identical below some threshold of difference) to the empty image, and whether half or more of its surrounding pixels are as well. If so, make the pixel white. Otherwise, leave it alone (you can get a lot fancier with this rule, checking for whether the surrounding identical pixels are contiguous, etc., but you probably won't need to).

That should mask out the background reasonably well even if there is a strong pattern without adding any extra edges inside the card itself, and still perform just as well in the simple case of a smooth background

Contact

Hey man, couldn't figure out how else to contact you. I checked out your code and started making a bunch of changes to better fit my work flow. https://github.com/chrismeyersfsu/python_card_scan

I'd like to contribute back to your repo but think the changes are so drastic that might only be possible in certain areas.

My work flow is does not disconnect the card recognition and card matching portions. It eliminates the database and replaces it with a Magic Assistant csv file.

I'd like to at least contribute back an optimization I made with regards to the set processing. I serialize/deserialize the processes sets. This results in a huge speed up with regards to the reload time.

[email protected]

Scanning working incorrectly on Windows

from #8 (comment)

scanning 01
OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize, fil
e ......\opencv-2.4.7.2\modules\core\src\array.cpp, line 1238
Traceback (most recent call last):
File "G:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "G:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "D:\Projects\3rd Party\card_scan\utils\run_scan.py", line 53, in

capture_box(cam, next_box)

File "D:\Projects\3rd Party\card_scan\utils\run_scan.py", line 18, in capture_
box
captures = scan_card.watch_for_card(cam)
File "scan_card.py", line 51, in watch_for_card
size = cv.GetSize(img)
cv2.error: Array should be CvMat or IplImage

I'm on Windows, not sure if I installed incorrect versions of anything (I did have to manually edit Elixir because it was importing incorrectly from SQLAlchemy)

Python 3 / OpenCV

Dear YenTheFirst,

Thanks for your amazing code, the video looks awesome. Since I am a total beginner in regards to programming I am currently struggeling to get your code to work with Python3 and the current OpenCV Version.

Did you eventually updated your code? Or would you give a helping hands, which parts need to be updated in order to get it work?

Would be great if you would come back to me.

Regards

Readme, dependency

A small note. I had to install python2.7-dev in ubuntu in order for the pip install -r requirements.txt command to succeed. Further, I had to add the following line to requirements.txt
elixir==0.7.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.