OV-580 in Windows

Is there a way to display the slam cameras in windows?

Hi @postaldude I have a little windows app that shows the slam and rgb cameras. It uses DirectShow-2005, which can read USB cameras. You can get it here:

2 Likes

Ok this is cool, I thought it would be more difficult than sampling the camera with directshow. Do you know why the slam cameras don’t show up in the built-in windows camera app?

So now if we get the imu data then we have most of the features necessary to have windows support.

Not 100% sure why it won’t work in the camera app… It could be the resolution, the device reports 640x481, so the height might be throwing off any thing that depends on an even number. Not sure about IMU yet. There is a fourth USB device after cameras and audio, so must come from there…

Hmm now that you say that… that odd line, wouldn’t it contain some form of data? Could it be a piggyback way of sending IMU data?

So I’ve been playing around with that last line and … ok nevermind it looks like there’s a counter in there and some value change but I don’t think it’s acceleration.

Hard to say what exactly it is, but it’s related to the position for sure. However it needs an image, if it’s all black it’s not outputting anything… so it looks like there is some internal processing of the image that derives the angles of the galsses. And in the script posted by cadmium, there’s the magnetometer data there. Looks like using both would provide enough information to have the headset orientation…

Maybe it’s just related to luminosity though…

Hello, could you open the source code of SensorStreamer.exe?

The following code works in windows. The trick is setting camera_id to 701, so opencv will use directshow to deal with the video data.

import cv2
cap = cv2.VideoCapture(701)
while True:
    ret, frame = cap.read()
    cv2.imshow("Video", frame)

    if cv2.waitKey(10) == ord("q"):
        break
cap.release()
cv2.destroyAllWindows()

2 Likes

So late to this (~1 year!) - apologies. I really like @neolee 's example - so simple. I am also adding the sensor stream code too, which is a .NET console app that opens a window showing the stream, when the glasses are plugged in.

martinpgrayson/nreal-sensor-streamer (github.com)