Jump to content

How to Embed Camera App in Front Panel


Recommended Posts

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:

748913888_LaunchCameraviaSystemExec.png.ed54bba6c07365504e7290540036b076.png
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.
 

Link to comment

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.

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.