Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: CraftsmanMike on February 14, 2024, 09:18:30 PM
-
Does anyone know if a Video Panel (used to show video from a webcam, available in the screen editor) is available for Wizards? If yes, do you know the class, properties and events? Maybe a link to a document somewhere :). wxWidgets has a control that can play a video file, but I can't figure out a way to display the video from a camera.
I've added a tab to my wx6.set screen that uses a webcam to help calibrate motor steps, but I would really like to make a Wizard for it.
For extra credit... If there is a way to do the Video Panel, is there a way to add a DRO field to a wizard screen?
-
I don't believe it's possible unless you had a lua version of something like OpenCV.
The easiest way to get a webcam feed in another window is to use the remote GUI. You can create a new screenset using all the normal Mach4 controls, and then you can launch it from a button.
They have a youtube video on it:
https://www.youtube.com/watch?v=UpjImHxr3o4
-
Does anyone know if a Video Panel (used to show video from a webcam, available in the screen editor) is available for Wizards? If yes, do you know the class, properties and events? Maybe a link to a document somewhere :). wxWidgets has a control that can play a video file, but I can't figure out a way to display the video from a camera.
fnf (https://fnfgo.org)
I've added a tab to my wx6.set screen that uses a webcam to help calibrate motor steps, but I would really like to make a Wizard for it.
For extra credit... If there is a way to do the Video Panel, is there a way to add a DRO field to a wizard screen?
You can custom Panel with wxMediaCtrl following these steps:
Create a custom panel class that inherits from `wxPanel`.
Inside the panel, embed a `wxMediaCtrl` object. This control can display video from various sources, including webcams.
Implement event handling for the `wxMediaCtrl` to start/stop video capture, adjust settings, etc.
Add this custom panel to your Wizard page instead of a standard Video Panel.
-
You can custom Panel with wxMediaCtrl following these steps:
Create a custom panel class that inherits from `wxPanel`.
Inside the panel, embed a `wxMediaCtrl` object. This control can display video from various sources, including webcams.
Implement event handling for the `wxMediaCtrl` to start/stop video capture, adjust settings, etc.
Add this custom panel to your Wizard page instead of a standard Video Panel.
Hi Natalie, thanks for replying. The wxMediaCtrl is the control I was referring to when I mention "wxWidgets has a control that can play a video file, but I can't figure out a way to display the video from a camera." That control has six properties: "name", "file", "play", "playback_rate", "volume", and "player_controls". Do you know how to set it up to play the video from a webcam?