ptomato / Beams

Open-source laser beam profiling software designed for cheap webcams
MIT License
23 stars 13 forks source link

Cannot select webcam #9

Open marek-br opened 7 years ago

marek-br commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

marek-br commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

marek-br commented 7 years ago

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