Matrox Imaging Library (MIL)
Complete application development environment
In addition to image processing, analysis, and archiving tools, MIL X includes image capture, annotation, and display functions, which form a cohesive API. The API and accompanying utilities are recognized by the large installed base of users for facilitating and accelerating application development.
The MIL X C/C++ API is not only intuitive and straightforward to use but it is also portable. It allows applications to be easily moved from one supported video interface or operating system to another, providing platform flexibility and protecting the original development investment.
Included in MIL X is a low-overhead API layer for developing Windows applications using .NET written in Visual C# code.
JIT compilation and scripting
MIL X supports C# compilation and CPython scripting, facilitating experimentation and prototyping. Such code can even be executed from within a compiled MIL X-based application, providing a simpler way to tailor an already-deployed application.
Simplified platform management
With MIL X, a developer does not require in-depth knowledge of the underlying platform. MIL X is designed to deal with the specifics of each platform and provide simplified management (e.g., hardware detection, initialization, and buffer copy). MIL X gives developers direct access to certain platform resources such as the physical address of a buffer. MIL X also includes debugging services (e.g., function parameter checking, tracing, and error reporting), as well as configuration and diagnostic tools.
Designed for multi-tasking
MIL X supports multi-processing and multi-tasking programming models, namely, multiple MIL X applications not sharing MIL X data or a single MIL X application with multiple threads sharing MIL X data. It provides mechanisms to access shared MIL X data and ensure that multiple threads using the same MIL X resources do not interfere with each other. MIL X also offers platform-independent thread management for enhancing application portability.
Buffers and containers
MIL X manipulates data stored in buffers, such as monochrome images arranged in 1-, 8-, 16-, and 32-bit integer formats, as well as 32-bit floating point formats. It also handles color images laid out in packed or planar RGB/YUV formats. Commands for efficiently converting between buffer types are included. MIL X additionally operates on containers, which combine related buffers into a cohesive whole. Containers simplify working with multi-component data such as point clouds for 3D processing and analysis as well as display.
Saving and loading data
MIL X supports the saving and loading of individual images, image sequences, and data containers to and from disks. Supported file formats are AVI (Audio Video Interleave), BMP (bitmap), JPG (JPEG), JP2 (JPEG2000), MP4 (MPEG-4 Part 14), PLY, MIM (native), PNG, STL, and TIF (TIFF), as well as a raw format.
Industrial and robot communication
MIL X lets applications interact directly with automation controllers using the CC-Link IE Field Basic, EtherNet/IP™, Modbus®, and PROFINET® (with appropriate Matrox Imaging I/O card, smart camera, or vision controller) industrial communication protocols. It also supports native communication with robot controllers from ABB, DENSO, EPSON, FANUC, KUKA, and Stäubli.
Flexible and dependable data capture
For greater determinism and the fastest response, MIL X provides multi-buffered data capture control performed in the operating system’s kernel mode. Data capture is secured for frame rates measured in the thousands per second even when the host CPU is heavily loaded with tasks such as HMI management, networking, and archiving to disk. The multi-buffered mechanism supports callback functions for simultaneous capture and processing even when the processing time occasionally exceeds the capture time.
Matrox Capture Works
MIL X includes Matrox Capture Works, a utility for verifying the connection to one or more GenICam™-based cameras or 3D sensors and testing acquisition from these. Matrox Capture Works can obtain CoaXPress, GenTL, GigE Vision, and USB3 Vision device information; collect and present acquisition statistics; and provide access to acquisition properties. The built-in Feature Browser allows the user to configure and control devices with ease. Device settings can be saved for future reuse. Captured data from multiple devices can be displayed efficiently in 2D and 3D where applicable, with the option to view histograms, 3D and profile data, real-time pixel profiles, memory values, MIL code snippets, and much more. Matrox Capture Works can also be used to apply firmware updates to devices provided these follow the GenICam FWUpdate standard. Another utility, Matrox Intellicam, is provided to set up and test acquisition from cameras with analog, Camera Link, and other digital interfaces.
Matrox Capture Works configuration and test tool for GenICam-based interface standards
Simplified 2D image display
MIL X also supports multi-screen display configurations that are in an extended desktop mode (i.e., desktop across multiple monitors), exclusive mode (i.e., monitor not showing desktop but dedicated to MIL X display), or a combination.
Graphics, regions, and fixtures
MIL X provides a feature-rich graphics facility to annotate images and define regions of operation. This capability is used by the MIL X analysis tools to draw settings and results onto an image. It is also available to the programmer for creating application-specific image annotations. The graphics facility supports different shapes—dot, line, polyline, polygon, arc, and rectangle—and text with selectable font. It takes image calibration into account, specifically the unit, reference coordinate system, and applicable transformations. The graphics scale smoothly when zooming to sub-pixel. An interactive mode is available to easily allow developers to provide user editing of graphics, and the ability to add, move, resize, and rotate graphic elements. Moreover, the application can hook to interactivity-related events to automatically initiate underlying actions. The graphics facility can further be used to define regions to guide or confine subsequent MIL X analysis operations. Regions can also be repositioned automatically by tying their reference coordinate system to the positional results of a MIL X analysis operation.
Native 3D display
MIL X can natively display point clouds. A 3D display can be panned, tilted, and zoomed in all directions. Visual guides appear to help orient the view. In addition to showing individual points, a 3D display can be supplemented with geometric shapes (i.e., box, cylinder, line, plane, point, sphere, text, coordinate system axes, grid (on reference plane), and orientation box). MIL X allows control over appearance (solid or wireframe), opacity, color (including point cloud colorization using jet or turbo lookup tables), visibility, and thickness. The facility is used by the various 3D processing and analysis tools to display results. A box shape can be user-editable, useful for interactively specifying a region to view and subsequently work with.
MIL X offers a flexible licensing model for application deployment. Only the components required to run the application need to be licensed. License fulfillment is achieved using a pre-programmed dongle or an activation code tied to Matrox Imaging hardware (i.e., smart camera, vision controller, I/O card, frame grabber, or dongle). Some components are pre-licensed with certain Matrox Imaging hardware; please consult the individual Matrox Imaging hardware datasheets for details. The use of Distributed MIL X within the same physical system does not require the additional specific license. The installation of MIL X for redistribution can even be hidden from the end user.
Documentation, IDE integration, and examples
MIL X’s online help provides developers with comprehensive and easy-to-find documentation, and online help can even be tailored to match the environment in use. The online help can be called up from within Visual Studio to provide contextual information on the MIL API. Also supported is Visual Studio’s intelligent code-completion facility, giving a programmer on-the-spot access to relevant aspects of the MIL API. An extensive set of categorized and searchable example programs allow developers to quickly get up to speed with MIL X, with more available on GitHub® repositories.
MIL-Lite X is licensed for both application development and deployment with Matrox Imaging hardware and is available as a free download. MIL-Lite X users gain unfettered access to applicable Matrox Vision Academy training content and software updates.