Hobbyist Toolkit

Showing results for 
Search instead for 
Did you mean: 

Libcamera or RPI camera functioning inside of a VI


I am currently in the midst of running an RPI inside of a Vacuum chamber at the university I work at. I have a LED and camera setup inside the chamber so we can veiw our samples and experiments. I am using labview to control our PLC system and our RPI which allows us to remote the controls for LEDs and valves via a PC, however I still need to use VLC player to run the camera.

I have seen a few tutorials about setting up a webcam and or USB cam through labVIEW, however I have not found anything that supports the Libcamera or RPI camera to run through a VI.


The questions are...

Is this possible to do?

and is running a camera through labVIEW better than VLC?

0 Kudos
Message 1 of 4

I'm not familiar with the RPI situation but under normal Linux you would have to interface to V4L (Video for Linux). The webcam samples you saw are all for Windows, usually using the VERY old VFW (Video for Windows) API, sometimes also some .Net component. Neither of them will work in any way on Linux or RPI.


There used to be some experimental interfaces for V4L in the past by creating an external shared library to make the V4L API more LabVIEW Call Library Node friendly but I'm not sure if that ever got anywhere.


Video handling is a very complicated matter when you have to start hacking APIs (with or without intermediate shared library) and most users never get further than the "Look Mom it works" state, which is about 10% of the total work.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4

You won't really do this easily through LabVIEW on the Pi. When I want to use a cam with a raspberry pi and view it remotely I typically use mjpg-streamer and then you can open that video stream in a browser or repeatedly grab stills from it on another system. Mjpg-streamer can work with both pi cameras through the CSI connector and USB cameras https://github.com/jacksonliam/mjpg-streamer You'll need to be comfortable SSHing into the pi and working with the command line to do the build and configure the options for how you'd need to use it.

~ The wizard formerly known as DerrickB ~
Gradatim Ferociter
0 Kudos
Message 3 of 4

Yes, at the moment I am using VLC and we are using VLC and a labVIEW window with a screen recording device to record our research... seems this may have to be the way to go

0 Kudos
Message 4 of 4