This document describes the sample code that is included in the SDK and can be found in C:\Aptina Imaging\samples.
They use VS2013, and Qt 5.7 where applicable. Also, for some samples VS2008/VS2010/VS2012 solutions files are available.
NOTE: for Qt application set a System Variable of "QTDIR" set to the Qt installation location; for example, C:\Qt\Qt5.7.0\5.7\msvc2013. And in VS2013, set the QT Properties with "msvc2013".
Most pre-built executables are in C:\Aptina Imaging.
...
Also, the Python script "create_new_dlg.py" can be used to make a copy of the BlankQtDlg source into the DevWare directory, while making all necessary file name changes and string substitutions to create a new plug-in project.
NOTE: for Qt applications, ensure that you have a System Variable of "QTDIR" set to the location of your Qt installation files; for example, C:\Qt\Qt5.4.0\5.4\msvc2012_opengl
Csharp_ApBase_COM_Sample
Csharp_ApBaseCOM.exe is a Command Line based C# sample of using ApBase's COM interface built using Visual Studio C#. The sample performs the following actions:
1. Starts ApBase_COM and then displays the sensor name found.
2. Loads the default initialization preset.
3. Sets up the capture/save parameters.
4. Grab the frame and saves it, and verifies there were no errors.
5. Exits ApBase_COM.
...
Csharp_Samples.exe is a Command Line based C# sample of using DevSuite's COM interface built using Visual Studio C#. The sample expects an A-2020SOC sensor to be connected, and performs the following actions:
1. Starts DevWare and then verifies that a SOC2020 is connected.
2. Loads the default initialization preset.
3. Verifies that the sensor is outputting valid frames.
4. Captures a default image.
5. Adjusts AE exposure via a FW variable.
6. Captures the adjusted image.
7. Exits DevWare.
Please refer to the DevWare COM Interface document for usage details
DelphiSample
DelphiSample.exe is a GUI based Sample Delphi Pascal MIDLIB application that displays the image sensor data in a window and can read/write registers. It allows the user to input the image size if it is not the default image size.
DialogDll
This is a sample Devware Plugin Dialog which is built using Visual Studio C++. The plugin demonstrates how to modify sensor registers, general registers and interact with image data. Please refer to the The Dialog Plug-in API for DevWare document for more information on developing Devware Plugins. Note that the DLL must reside in the C:\Aptina Imaging\Plugins directory.
...
For more information on creating a transportDLL please refer to the "Transport DLL Development Guide".
JPEGcapture_SOC
This Visual Studio C++ Command Line based MIDLIB application demonstrates how to capture a JPEG images from the MT9T111 (SOC3130), MT9T112 (SOC3132) and the MT9S311 (A-R20B). The image/sensor information will output to stdout and image data will be saved to supplied output filename (default is img.jpg). Thumbnail dimensions, timeout value and camera to use can also be supplied as optional parameters.
Usage:
JPEGcapture_SOC [-output <filename>] [-thumbnail <w> <h>] [-cam <num>] [-timeout <iterations>] [-help]
Output Example:
sensorName = A-3130SOC
width = 1600
height = 1200
bufferSize = 3840512
imageType = 15
Grabbing frame
Saving frame to "filename"...[done]
JPEGcapture_SOC2010
This Visual Studio C++ Command Line based MIDLIB application demonstrates how to capture a JPEG images from the MT9D111 (MI-2010SOCJ).
Usage:
JPEGcapture_SOC2010
Output Example:
sensorName = A-2010SOCJ
sensorType = 16
width = 1600
height = 1200
pixelBytes = 2
pixelBits = 16
bufferSize = 3840512
imageType = 15
shipAddr = 186
num_regs = 1055
Grabbing frame G[done]
Saving frames to "img.jpg"...[done]
LabVIEW
Sample LabVIEW Applications demonstrate how to use LabVIEW with DevWare's COM interface (folder DevWare_COM_sample), ApBase COM interface (folder ApBase_COM_sample), and ApBase API interface (folder ApBase_API_sample).
...
SimpleCapture is a Command Line based Visual Studio C++ ApBase API application that can capture one or several continuous raw images and save in a file. Some image/sensor information will output to the console.
Usage:
SimpleCapture
SimpleCapture <num_frames>
SimpleCapture <num_frames> <width> <height>
Output Example:
Log file: ship_log0.txt
sensorName = A-1000ERS
sensorType = 65
width = 1280
height = 720
pixelBytes = 2
pixelBits = 10
bufferSize = 1843712
imageType = Bayer 10
shipAddr = 32
num_regs = 503
Saving frames to img.raw...Grabbing frame
.[done]
...
This is a sample of using the LibUSB transport for Linux and MacOS. It opens the camera, initializes it, captures 1 or more images and exits.
The file "readme.txt" has usage information.
SimpleCaptureAVI
SimpleCaptureAVI is a Command Line based Visual Studio C++ MIDLIB application can capture one or several continuous raw images and saves them as a .avi file. Some image/sensor information will output to the stdout. Note that the application assumes the sensor has already been programmed to stream data.
Usage:
SimpleCaptureAVI
SimpleCaptureAVI <num_frames>
SimpleCaptureAVI <num_frames> <width> <height>
Output Example:
sensorName = A-1000ERS
sensorType = 65
width = 1280
height = 720
pixelBytes = 2
pixelBits = 10
bufferSize = 1843712
imageType = Bayer 10
shipAddr = 32
num_regs = 503
Opening AVI file – img.avi…
Grabbing frames
[done]
...
SimpleCSharp is the C# .NET version of SimpleCapture.
SimpleDualContext
SimpleDualContext is a GUI-based based Visual Studio C++ MIDLIB application that demonstrates rapid switching of two contexts for MI-351.
SimpleOpenCL
SimpleOpenCL is a sample plugin that uses OpenCL.
...
Simple is a GUI-based QT Visual Studio C++ ApBase application that can display image output for all Aptina sensors. It has a very simple demosaic algorithm in order to display output for Bayer only parts. It also includes examples of how to read and write registers.
Note that the application expects the width and height to match the SDAT's values of "Width" and "Height".
NOTE: for Qt applications, ensure that you have a System Variable of "QTDIR" set to the location of your Qt installation files; for example, C:\Qt\Qt5.4.0\5.4\msvc2012_opengl
TransportDLL
TransportDLL is a sample Visual Studio C++ transport DLL. A transport DLL allows a user to use non-Aptina Hardware to run with Devware or any other MIDLIB application. For more information on creating a transportDLL please refer to the "Transport DLL Development Guide"