phrack / ShootOFF-legacy

An open source framework to enhance laser dry fire training.
BSD 4-Clause "Original" or "Old" License
30 stars 17 forks source link

PS3Eye Camera is not detected #61

Closed shafror closed 9 years ago

shafror commented 10 years ago

Running Win7, the program fails to detect PS3Eye Webcam. The webcam works with other soft.

phrack commented 10 years ago

Do you have another webcam plugged in that it is detecting, or is it not detecting a camera at all? It doesn't actually matter if the camera works with other software, it only matters if your camera works with the computer vision library we use (OpenCV).

Apparently there are solutions to get them working together that you can try:

http://stackoverflow.com/questions/5023158/opencv-and-the-latest-ps3-eye-driver

Please let me know how it goes.

shafror commented 10 years ago

Thanks, but I already am using the latest CL-Eye driver. Still, I get a 'Video capturing could not be initialized' error - webcam is not being detected. There's only one video device in the system.  


From: phrack notifications@github.com To: phrack/ShootOFF ShootOFF@noreply.github.com Cc: shafror shafror@yahoo.com Sent: Subject: Re: [ShootOFF] PS3Eye Camera is not detected (#61)

Do you have another webcam plugged in that it is detecting, or is it not detecting a camera at all? It doesn't actually matter if the camera works with other software, it only matters if your camera works with the computer vision library we use (OpenCV). Apparently there are solutions to get them working together that you can try: http://stackoverflow.com/questions/5023158/opencv-and-the-latest-ps3-eye-driver Please let me know how it goes. — Reply to this email directly or view it on GitHub.

MisterOuchie commented 10 years ago

I tried getting that webcam to work as well, with no luck, CL-Eye driver or not. I think the driver requires using their libraries to get it going with opencv.

It would be a great camera to use though.

gohtar commented 10 years ago

I also tried the PS3Eye with no luck, ended up buying a crappy $6 camera from amazon.

shafror commented 10 years ago

That's pretty much what I did: dug up an old Logitech cam. I set the rate at 10ms, just to give it a chance to run at the highest rate, whatever the cam supports. That's where PS3 cam would have been useful at 100fps.

My main use for this soft is to work on trigger control: if I jerk the trigger while shooting, I see multiple hits. So, the higher the frame rate, the better it is for my purpose. I don't even use a target, just shoot at a blank wall.

Many thanks for developing this program & making it available for free. - Roman


From: gohtar notifications@github.com To: phrack/ShootOFF ShootOFF@noreply.github.com Cc: shafror shafror@yahoo.com Sent: Thursday, February 6, 2014 8:43 PM Subject: Re: [ShootOFF] PS3Eye Camera is not detected (#61)

I also tried the PS3Eye with no luck, ended up buying a crappy $6 camera from amazon. — Reply to this email directly or view it on GitHub.

phrack commented 10 years ago

It's kind of annoying because Googling "opencv ps3eye" makes it clear others have had the same issue, but there is never a confirmed, reasonable solution.

https://xkcd.com/979/

I have two thoughts that might be worth trying (in this order):

A. If you're using the Windows package, stop and use the manual install process instead so you can try a patch. Open shootoff.py and go to line 644:

    self._cv = cv2.VideoCapture(0)

In theory, this will always open the default camera (i.e. whatever is plugged in and registered with the OS), however it's entirely possible that some voodoo is happening due to the ps3eye's driver that is causing the default capture device number to be off. Try changing the 0 to -1, 1, 2, and 3 (try one at a time) and see if it gets it.

B. If you're using the Windows package, stop and use the manual install process instead so you can try different versions of OpenCV. Give a few different versions of OpenCV a go and see if one of them works.

Unfortunately, I cannot do this for you because I do not have a ps3eye and have no intention of getting one.

If neither of these work, it's probably best to open an issue regarding ps3eye with the OpenCV project.

gohtar commented 10 years ago

I was not able to get the PS3eye to work with shootoff by changing the camera index number. I was using the opencv 2.4.8 package.

When setting the value to -1, and I have only the PS3Eye plugged in, I still get the "Video capturing could not be initialized..." error message. When I have my working camera plugged in, a dialog box appears and asks me to "select a video device". I select the camera and press okay and shootoff gives me the same error. When I have both the working camera and the ps3eye plugged in, I still only have the one option to select from in the drop down list and still get the error when I press okay. Two conclusions for this test are:

  1. It seems that the cl-eye driver does not present the PS3Eye hardware in a usable way.
  2. It seems the results of the dialog box are not handled in the shootoff software.

I tried setting the camera index value from -1 -> 6, with no luck. Seems it is a ps3eye driver issue for sure.

phrack commented 9 years ago

I am going to go ahead and close this since it's not the fault of ShootOFF and the discussion has been dead for a year.