The following properties can be used in the
|Name of the Image Acquisition Toolbox adaptor you are creating, as defined by the constructor.|
|Device ID of the device you are testing with, as defined by the constructor.|
|Video format used for acquisition or camera file.|
|Device name of the device you are testing with, as defined by the constructor.|
|Device driver name.|
|Device driver version.|
|Estimated frame rate.|
Verbosity of log, with a default of
In concise mode, only the following is shown in the log output:
With concise mode set to
You can use these functions with the
imaqkit.AdaptorTest class is used to create an Image
Acquisition Toolbox Adaptor Test object and to test Image Acquisition Toolbox
connectivity with cameras/framegrabbers. This class is not instantiated directly. Call
imaqkit.AdaptorTest.createTest to instantiate.
testObj = imaqkit.AdaptorTest.createTest (AdaptorName, DeviceId, Format, EstimatedAcquisitionFrameRate)
a test object to test a device with specified adaptor, ID and format.
See the example in the next
section for an example of using the
For automated testing, run all automated tests. This runs all test points.
For automated testing, run automated object creation and preview test. This test creates an object with the specified parameters and then previews it. It also checks that the preview can be stopped and then closed.
For automated testing, run automated acquisition test. This test acquires and montages 10 frames. It also checks that continuous image acquisition can be stopped.
For automated testing, run automated region of interest test. The test sweeps the ROI during preview. It divides the frame into four sections and previews each section separately. This test checks setting the Region of Interest to a value different from the default value and then acquiring data. It also checks setting ROI values using X and Y offsets.
For automated testing, run automated repeated acquisition test. This test does 25 acquisitions from the same device.
For automated testing, run automated trigger test for immediate triggering. This test checks acquiring images in Immediate trigger mode. It checks the number of acquired frames for acquisition with immediate trigger.
For automated testing, run automated trigger test for manual
triggering. This test checks acquiring images in Manual trigger mode. It
checks that frames are not acquired when the
For automated testing, run automated trigger test for hardware
triggering. This test checks the
For interactive testing, run interactive device properties test. This tests device-specific property values in the Property Inspector. This test checks device properties interactively. by opening a preview window and the property inspector. You can modify the properties from the property inspector and observe the changes in the preview window.
For interactive testing, run interactive multiple device
acquisition test. This test checks simultaneous acquisition from two
devices. Before running this test, at least two devices should be
connected and their Device ID and Format information obtained using
testObj.runInteractiveMultipleDeviceAcquisition Test(testObj, deviceId1, deviceFormat1, deviceId2, deviceFormat2)
Get the list of tests that can be run.
This example shows the basic workflow of creating and running a test using some of the functions outlined in the previous section.
Get installed hardware information recognizable using the
info = imaqhwinfo('winvideo');
Identify the Device IDs.
Get information about available formats for the camera under test identified in the
last step. If it is the first camera, use
Choose a format, for example
MJPG_800x600, and create the test
object, with an estimated frame rate of 15.
testObj = imaqkit.AdaptorTest.createTest('winvideo', 1, 'MJPG_800x600', 15);
By default, tests create verbose logs. To run tests with concise logs set the
ConciseLog property to
true and then run
testObj.ConciseLog = true;
To run individual tests, call specific test functions, such as:
Run all automated tests.