Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot select webcam #9

Open
marek-br opened this issue Aug 28, 2017 · 9 comments
Open

Cannot select webcam #9

marek-br opened this issue Aug 28, 2017 · 9 comments

Comments

@marek-br
Copy link

Hello Philip
I just went through your instructions to install beams. The only part which failed on me was installing "opencv" with the following error:
PackageNotFoundError: Package not found: Conda could not find '
VideoCapture installation worked though so I thought I do not need opencv anyways.
I have a webcam with optics removed plugged in. When I open the "camera" menu in beams the only option I have there is the dummy gaussian.
Am I missing something?
Regards

Marek

@ptomato
Copy link
Owner

ptomato commented Aug 29, 2017

Is your operating system by any chance not Windows? VideoCapture will only work on Windows.

If that's not the problem, try running the small script under "Trying it out" on the VideoCapture website inside your Conda environment, and see if it works. Please post any error messages here if it doesn't.

@marek-br
Copy link
Author

Thank you Philip for your reply.
My operating system is Windows, but I poked around and found some other problems. Most of them come from the fact that I am exactly a python guru. :)
I am using Python 3.6 and VideoCapture runs under Python 2.7 because it ned PIL.
Am I on the right track here?

@ptomato
Copy link
Owner

ptomato commented Aug 29, 2017

That's probably it. Beams only supports Python 2 until someone can maintain it again.

@marek-br
Copy link
Author

So I learned a ton since yesterday. Since I created beams environment with
conda create -n beams python=2.7 scipy chaco=4.4.1
it installed python 2.7 inside that environment. Therefore python version was not the problem. However, when I installed VideoCapture I placed the libraries inside the main python 3.6 libs directories. Moving them to the location inside beams environment seems to have fixed the problem.
Well, kind of.
Inside "choose camera" window I now have an option "DirectShow - Video camera interfacing through DirectShow". Selecting that and clicking "Take Video" or "Take Photo" results in the image changing in the main window but it changes into something which seems to have nothing to do with what camera sees. I know that because pointing camera in any direction results in exactly the same image. Also "Take Video" updates the image once and then does not do anything. It is also worth noting that that image which shows up is exactly the same as the one which I get by running the script from "Try it out" section on "VideoCapture Website"
now I am stuck. No more ideas. Any help greatly appreciated.

@ptomato
Copy link
Owner

ptomato commented Aug 29, 2017

Can you post the image that you get?

Otherwise I would suggest trying to get opencv working after all. If the opencv in the instructions isn't working, maybe another Conda repository provides it?

@marek-br
Copy link
Author

marek-br commented Aug 29, 2017

Here is the image I got after running the few lines of script from VideoCapture website:
camtest
and a screenshot of beams after clicking "Take Photo"
beamscapture
Thanks for your help. Will try getting opencv working. Is it ok to leave VideoCapture in place or should I remove it?
EDIT: It is taking images from my back facing build in camera not from the USB one. I just rotated my surface and I got a different image there. Take video still is not working though. Just acquires single image. So now the question is how do I switch to the USB camera?

@marek-br
Copy link
Author

marek-br commented Aug 29, 2017

I also did the following test.

  1. Position my Surface (i.e. camera) in one orientation and click "Take Video"; The image in beams changes;
  2. Rotating the camera does not result in any changes in the image area in beams;
  3. Clicking "Take Video" second time (i.e. turning the video off) results in updated image in the image area in beams;
    That would suggest that the camera might be actually taking images at whatever rate it set for but beams is not refreshing the image area at any other time but when I click "Take Video" button.
    EDIT: Installed opencv from menpo channel: conda install -c menpo opencv. No difference. Removed VideoCapture libraries and with opencv installed cannot select any camera but the dummy gaussian.

@ptomato
Copy link
Owner

ptomato commented Aug 29, 2017

It's OK to leave VideoCapture installed. Are you sure you installed opencv inside the Conda environment for Beams?

@marek-br
Copy link
Author

activate beams
then
conda list
results in
opencv 2.4.11 py27_1 menpo
among others

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

No branches or pull requests

2 participants