Asked — Edited

Camera Control From My Plugin

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 .


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

#9  

ptp

yup , i still need ur help . I've run ur code but it gave me the following error in the image ,

User-inserted image

for that i asked u to control the camera from my windows form . for example i try to put ur code in a button in my form but unfortunately , it didn't work

PRO
Synthiam
#11  

Are you sure that you're creating a plugin? Or a standalone application?

Also, do not use ptp's code. Use the tutorial that i posted.

In the tutorial, to draw on a Panel, for example...


void Camera_OnNewFrame() {

  if (_cameraControl == null)
    return;

  using (Graphics pnlG = panel2.CreateGraphics())
    pnlG.DrawImage(_cameraControl.Camera.GetOutputBitmap.ToManagedImage(false), 0, 0, panel2.Width, panel2.Height);
}

#12  

DJ. He is not building an ARC plugin. Needs SDK instructions (I would provide but answering from phone).

PRO
Synthiam
#13  

If you're not building a plugin, then read the README.TXT that is included in the SDK. You're not following the instructions. All files from the SDK package must be copied into your output folder. Read the instructions.

If you are making a plugin, then read the tutorial and use the code i presented.

PRO
USA
#15  

Attention to:

DJ wrote:

Quote:

read the README.TXT that is included in the SDK. You're not following the instructions. All files from the SDK package must be copied into your output folder. Read the instructions.

User-inserted image

Platform target: must be x86 (32 bits)

Some dlls are needed in the application folder you have two options:

  1. copy the dlls "packages/EZ_B.dll.2015.05.20.00" to the application folder i.e. (bin/debug or bin/release)

  2. add application references to the missing dlls: e.g. VS>Project>Add Existing Item>(look for the missing DLL)>ADD VS>Project>dll properties>"Copy to Output Directory" Change to "Copy if newer"

personally i like the option 2, you are aware of the dlls needed, but the safest option is the 1).

#16  

thanks ptp for your help ,I appreciate you effort ^_^