hello everyone:
I need to use 3 usb cams with imaqdx .How should I do?
any Example ?
vs2008 C#
VASAugust2010
Thanks for all your help !
已解決! 轉到解決方案。
在 07-12-2011 10:04 PM
Hi McLovin,
Firstly, you need to check whether your USB cams are DirectShow compatible with IMAQdx. If yes, then you might refer to the attached VI example of using 2 cams and extend it to 3 cams similarily.
Best Regards,
cpan
Hello cpan:
Thanks very much for your reply.
But I used vs2008 C# for program with imaqdx,So I wish you have some Example under C#.Thank you very much.
在 07-13-2011 03:32 AM
Hi McLovin,
Even LabVIEW and C# are different programming languages, in terms of programming, the main ideas are pretty similar: use different sessions to access different cameras, with proper allocation of image, then snap images from different cameras based on their corresponding session tokens.
try
{
//-----------------------------------------------------------------------
// Open a session to the camera
//-----------------------------------------------------------------------
IMAQdxError status = IMAQdxOpenCamera (camName, IMAQdxCameraControlModeController, &session);
if (status)
throw status;
//--------------------------------------------------------------------
// We need an image for display purposes.
//--------------------------------------------------------------------
image = imaqCreateImage (IMAQ_IMAGE_U8, 0);
if (!image)
throw VisionError();
//-----------------------------------------------------------------------
// Now it's time to snap and display an image.
//-----------------------------------------------------------------------
status = IMAQdxSnap (session, image);
if (status)
throw status;
//-----------------------------------------------------------------------
// Display the image
//-----------------------------------------------------------------------
imaqDisplayImage(image, 0, true);
}
Hope that could be helpful to you...
Best Regards,
cpan
Thank you very much.