Point Grey Research Knowledge Base

Article 218 - Using MATLAB with Point Grey cameras.

Issue:
Using MATLAB with Point Grey cameras.

Solution:

Customers who wish to use MATLAB with Point Grey cameras have the following two options for acquiring images from the camera:

Image Acquisition Toolbox

The Image Acquisition Toolbox from MATLAB is a full image acquisition software library and includes the Carnegie Mellon University (CMU) camera driver. Most Point Grey FireWire cameras (except Digiclops, Firefly and Firefly 2) are compatible with the CMU driver.

Although Point Grey USB cameras are not compatible with the CMU driver, the Image Acquisition Toolbox can be used with USB cameras through the DirectShow interface. Only IIDC standard image formats are supported. Format_7 modes are not supported.

Wrap Point Grey Software Libraries

The second option that some customers have had success with involves developing MATLAB wrappers for Point Grey DLLs (e.g. pgrflycapture.dll) and libraries that allow them to interface with Point Grey cameras. In this case, the cameras are using Point Grey camera drivers. As a starting point for customers interested in doing this, the following experimental sample code was developed to demonstrate how to use MATLAB to access FlyCapture DLLs while using the FlyCapture camera drivers. This code may be downloaded from here: 

MATLAB PGR FlyCapture Source Code (.zip)

Important Notes

  • We do not support MATLAB and are therefore unable to provide any real troubleshooting for problems encountered running this code. Advanced programming knowledge is recommended.
  • This version was built against an earlier 1.4 Alpha version of FlyCapture. If you are running newer or older versions than this, some compilation errors may occur as a result of function deprecations/changes. See the PGR FlyCapture header documentation for function declaration information.
  • The pgrmex.bat file will need to be modified so that the directory paths are pointing at valid PGR FlyCapture directories on your system. e.g. set FLYCAPDir=C:\PROGRAM FILES\POINT GREY RESEARCH\PGR FLYCAPTURE. Once you have modified it, run the pgrmex.bat file.
  • Compile matGetFlyGain.c using: mex -g -f "pgrmex.bat" matGetFlyGain.c

Related Articles:
1.) PGR Imaging Products compatibility with third-party software and drivers.


Article ID:
218
Published:
8/12/2005 4:22:32 PM
Last Modified:
1/14/2010 10:52:28 AM
Keywords:
MATLAB, Mathworks, wrapper, third, 3rd, toolbox, CMU, Carnegie Mellon, wrap
Issue Type:
Customization

Copyright © 2004 Point Grey Research Inc.