Page 1 of 1

Vrep as system Camera

Posted: 01 Oct 2015, 15:13
by dds
Hello. It would be interesting a function that allows VREP cheat the system to recognize the image of the simulator as an input video (webcam) so you could visualize the environment from other programs (Video Recorders, Skype, Matlab, etc ) or compress it to send it via internet.

Re: Vrep as system Camera

Posted: 01 Oct 2015, 16:57
by coppelia
Hello,

this is already possible. There is a model that illustrates this on Windows: Models/other/webcam.ttm. It however seems that on some systems the plugin can't correctly initialize the webcam. The source code for that plugin is located in programming/windowsOnlyProjects/v_repExtCam.

The basic idea is to create a plugin that reads an external image, then applies it to a passive vision sensor: the vision sensor should be flagged as External input. Filters can then operate on that image too. Applying an image to the vision sensor is done with simSetVisionSensorCharImage.

Cheers

Re: Vrep as system Camera

Posted: 02 Oct 2015, 18:58
by dds
Hi. I do not mean to see an external webcam inside V-REP, I mean a V-REP vision sensor that is recognized as a webcam by the operating system, thus image could be seen from skype for example.This would involve a dedicated driver.

Re: Vrep as system Camera

Posted: 03 Oct 2015, 17:24
by coppelia
Oh, I see.

That could be an interesting development, but probably not that easy to implement in an elegant way on all platforms..

Cheers