Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: ApBaseCOM does not use Matlab itself, but if you are using DevWare plug-ins that use Matlab, you must install the MatLab Runtime library via this link.
http://www.onsemi.com/pub/Collateral/MCRINSTALLER.ZIP

ApBaseCom.DLL Registration

Although the software installer registersapbaseCom.dll, it is possible that the registration process fails without warning.

If you experience errors regarding server creation, please perform the following;

  1. Search for “Command Prompt” from Start menu, right click on it and select “Run as administrator”.
  2. Navigate to the installation folder, usually “C:\Aptina Imaging\bin”.
  3. Enter; %SystemRoot%\system32\regsvr32 apbasecom.dll
  4. A “RegSvr32” dialog will appear with “DllRegisterServer in apbasecom.dll succeeded”.

Quick Start

To use ApBase COM, create an object of type apbaseCom.ApBase. The details will depend on the tool or language you are using. The following example is in Matlab.
Here is a minimal procedure to open a demo kit camera, initialize the Aptina ON Semiconductor device, grab an image and convert it to RGB.


% open ApBase and Camera, and initialize via "Demo Initialization" preset
apbase = actxserver('apbaseCom.ApBase');
camera = apbase.Create(0);
camera.LoadIniPreset('', '');

% Throw-away the first frame after initialization
raw = camera.GrabFrame;

% grab a frame, convert to RGB
raw = camera.GrabFrame;
rgb = camera.ColorPipe(raw);


Note: The call to LoadIniPreset() with blank parameters is only applicable in situations where the default initialization is sufficient. For demo kits with multiple possible configurations, such as ISP + sensor combinations or different connection options, you will need to specify the particular initialization preset for the configuration.preset for the configuration.

Note: The rgb image is one long line; this is for performance reasons.
In Matlab you will need to reshape it for display

apbaseCom.ApBase Methods and Properties

...


Remarks

Search the system for Aptina ON Semiconductor demo kit devices or other ApBase compatible camera devices, identify the type of sensor or ISP, and build a set of internal data structures for each device. Use Create() to create a camera object.

...

Property Value

Path to the Aptina ON Semiconductor Imaging installation folder.

...

Get the next image from the camera.
Use LastError for the error code.

Note: after initialization via "LoadIniPreset('', '')", do a call to GrabFrame() to throw-away the first frame due to possibility it will be a partial frame - first-waffle kind of thing.
Frames after that will be full frames.

VARIANT ColorPipe(VARIANT inImage, ULONG *outWidth, ULONG *outHeight, ULONG *outBitDepth)

...

Get the value of an integer-valued color pipe state variable. See the State STATE Variables for a list of color pipe variables.

...

Set the value of an integer-valued color pipe state variable.  See the State STATE Variables for a list of color pipe variables.

...

Get the value of a string-valued color pipe state variable.  See the State STATE Variables for a list of color pipe variables.

...

Set the value of a string-valued color pipe state variable.  See the State STATE Variables for a list of color pipe variables.

...