Hello Guest it is April 28, 2024, 06:37:10 PM

Author Topic: Video Panel (for Webcam) in wizard  (Read 279 times)

0 Members and 1 Guest are viewing this topic.

Video Panel (for Webcam) in wizard
« 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?
Re: Video Panel (for Webcam) in wizard
« Reply #1 on: February 17, 2024, 04:41:52 AM »
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
Re: Video Panel (for Webcam) in wizard
« Reply #2 on: February 22, 2024, 11:00:41 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?

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.
Re: Video Panel (for Webcam) in wizard
« Reply #3 on: February 27, 2024, 08:34:04 PM »
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?