
shaimaabes
Egypt
Asked
— Edited
Hello , I want to control the JD camera from my visual studio plugin , I've try the following code but it doesn't work EZ_B.Camera.GetVideoCaptureDevices();
plz I need ur help as soon as possible .
All of my plugins are open source, so you can look to see how to do various things.
Look at the source code of this plugin: https://synthiam.com/redirect/legacy?table=plugin&id=50
In order to get the current active camera device, you need to get the current active camera control. The code in that example plugin will scan all controls and get the first instance of a camera control. The "attach" button will attach to the first camera control and use its video frame event.
Make sure you unregister the video frame event when your control disposes or closes.
sample code to connect to an EZB Camera, save the picture in the desktop.
don't forget to change ezbAddress variable to your EZB IP address.
ptp, that is for creating a standalone application. The OP is asking about creating a plugin. A plugin runs in the ARC environment, which will have a project with an existing camera control.
The plugin will search and locate an existing camera control and attach itself to it.
you are right, my bad!
No problem
Here's a tutorial step i created for the plugin to use the existing camera control: https://synthiam.com/Tutorials/UserTutorials/146/17
thanks ptp you give my what I need ,that's to control the JD camera from visual studio but i need to control it from my form . would you help me to do that ?
DJ Sures you didn't get what I mean . I need to control the camera from my plugin . I mean ,I want to display what the robot see from my own windows form ,Did you get it ?
you have both examples, standalone application and ARC skill plugin.
There are more advantages if you migrate to an ARC skill plugin: you will have more robust ecosystem, you can mix custom scripting (EZ-Script) you can communicate with other plugins you have more API's, and you have a modular approach, for example breaking a complex problem in multiple plugins.
Also DJ's plugins are open source, so it's easy to improve an existing idea.
Whatever road you choose, it's ok.
If you are using a Form, the standalone code still works, let us know if you need more help.