Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Scanning working incorrectly on Windows #10

Open
YenTheFirst opened this issue Jan 20, 2014 · 3 comments
Open

Scanning working incorrectly on Windows #10

YenTheFirst opened this issue Jan 20, 2014 · 3 comments

Comments

@YenTheFirst
Copy link
Owner

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)

@dampete
Copy link

dampete commented Jan 23, 2014

Ok, thanks Yen. I'll subscribe to this :)

@YenTheFirst
Copy link
Owner Author

ok, I finally got some time to look into this.
I was unable to reproduce your error.
On my Windows machine, with opencv 2.3.1, numpy 1.6.1, and python 2.7, it was able to start scanning, and recognize cards.

What versions of numpy and opencv are you using?

Also, what model is your webcam? it's possible, though unlikely, that your webcam is incompatible with opencv. try opening a python shell, and running this code. you should see your webcam output.

import cv

cv.NamedWindow(";camera")
capture = cv.CaptureFromCAM(0)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(10) == 27:
        break
cv.DestroyWindow("camera")

@dampete
Copy link

dampete commented Mar 11, 2014

Will try that later, thanks for inspecting this!

I don't know the exact model of my webcam, but it's Philips brand, if that info serves for anything. I'll post if this test is successful or not once I'm able to run it :)

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

No branches or pull requests

2 participants