Hi all can you help me :

My camera ( Lifecam HD 3000 ) is not detected in mrl / opencv

When I start the capture the video widget didnt show up

And open cv give me an error 

org.bytedeco.javacv.FrameGrabber$Exception: videoInput.getPixels() Error: Could not get pixels.
at org.bytedeco.javacv.VideoInputFrameGrabber.grab(VideoInputFrameGrabber.java:171)
at org.myrobotlab.opencv.VideoProcessor.run(VideoProcessor.java:412)
at java.lang.Thread.run(Unknown Source)
 
I send a noworky.
 
The webcam is worky under other softwares. and drivers are up to date
I just do a fresh mrl install ( 1742 )
I use :
Lattepanda computer
Windows 64
Java 64
 
thanks

kwatters

8 years 1 month ago

Hi Grattounet,

  I saw your no worky, and it does appear that you're using windows 64 bit, and java 64 bit.  So, normally this should "just work"  

  There are other options for different frame grabbers that you might be able to try.  On windows it's defaulting to the "VideoInput" one, but perhaps, depending on your hardware, you might have better luck with the "OpenCV" or the "Sarxos" video input options.

  Question, is it possible that you originally were using java 32 bit when you installed the services of MRL and then switched to 64 bit?  (If that's the case, then you would have the wrong libraries downloaded and installed..) 

  It's definitely curious..  Another thing to try is the "camera index" , perhaps you have multiple camera devices plugged in, and the camera that you want might be index 0, or 1 or something?

Good luck & hope this helps!

  -Kevin

moz4r

8 years 1 month ago

In reply to by kwatters

Hi Kevin !! ( I send the noworky from his computer )

Thanks for him. the "Sarxos" is the only input that works . and it's great !

But what is the good syntaxe from python , I try i01.opencv.setInputSource("Sarxos") but it give me an error

 

Thank you

 

Hi Moz4r!  
  Try the following method   "setFrameGrabber"  and pass it the name of the class that you want to use as the frame grabber.  Below is an example that worked for me locally to use Sarxos as the frame grabber..  hopefully it works for you too!
 
 
opencv = Runtime.createAndStart("opencv", "OpenCV")
opencv.setFrameGrabberType("org.myrobotlab.opencv.SarxosFrameGrabber")
opencv.setCameraIndex(0)
opencv.capture()
 
Good luck!
  -Kevin

Thanl Kevin it works ! But I Think we have lost the function : opencv.recordSingleFrame() when I use the setFrameGrabberType to opencv.SarxosFrameGrabber

 
    opencv.setInputSource("camera")
    opencv.setCameraIndex(0)
    opencv.capture()
    sleep(0.5)
    photoFileName = opencv.recordSingleFrame()