Steve.Eggo.SA Posted January 27 Report Share Posted January 27 Windows 10, LabVIEW 2020 I wish to embed the Microsoft Camera App into a LabVIEW front panel. It needs to show the live pictures coming from the camera. Eventually I want to embed 2 camera pictures. I wish to do this to avoid using the DAQmx drivers that require a license for deployment. I can launch the Camera App by passing the following to the command line via the System Exec vi cmd /c start microsoft.windows.camera: This opens the Camera App in a separate window, I need it to be embedded in the front panel. I have tried using an active X container and Insert ActiveX object, Camera is not listed. The Camera exe can be found in "C:\Program Files\WindowsApps\Microsoft.WindowsCamera_2023.2312.3.0_x64__8wekyb3d8bbwe\WindowsCamera.exe". This folder is protected and when I remove the protection and call it directly there are errors about missing dlls (mrt100_app.dll and then SharedLibrary.dll) Anyone have any bright ideas. Quote Link to comment
Lior Bilia Posted January 29 Report Share Posted January 29 There are some computer vision libraries out there (OpenCV, Emgu, AForge etc.) that make capturing a camera feed easy. 1 Quote Link to comment
Zou Posted January 30 Report Share Posted January 30 If you can't get ActiveX to work, you can always use Windows API. https://forums.ni.com/t5/LabVIEW/How-to-run-an-exe-as-a-window-inside-a-VI/m-p/4096356 Quote Link to comment
Steve.Eggo.SA Posted January 30 Author Report Share Posted January 30 Thanks to Lior Bilia I have found this on GitHub https://github.com/barrowsb/labview_opencv With some modification, it allows me to use the OpenCV project to open the camera and display its video feed in a picture box. This avoids having to use ActiveX and more importantly for my application avoids the use of DAQmx drivers that require a license for deployment. Quote Link to comment
hooovahh Posted January 30 Report Share Posted January 30 If you want to just plop a window inside another one you can do that using some Windows API calls. Here is an example I made putting notepad on the front panel of a VI. https://forums.ni.com/t5/LabVIEW/How-to-run-an-exe-as-a-window-inside-a-VI/m-p/3113729#M893102 Also there isn't any DAQmx runtime license cost. If you built your application then the EXE runs without anything extra. There is a NI Vision runtime license cost so maybe that is what you are thinking? If you have a camera stream you can also view it by using VLC. VLC can view a camera stream, and then you can use an ActiveX container to get VLC on your front panel. USB cameras are a bit trickier but if you can get the stream to work in VLC, you can get it to work in LabVIEW. Here is an example of that. https://forums.ni.com/t5/Example-Code/VLC-scripting-in-LabVIEW/ta-p/3515450 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.