Matrox Imaging Library Mil 9.0 C: A Comprehensive Toolkit for Machine Vision and Image Analysis Appl
- halfprofapexupic
- Aug 15, 2023
- 7 min read
Matrox Imaging Library (MIL) X1 is a comprehensive collection of software tools for developing machine vision, image analysis, and medical imaging applications. MIL X includes tools for every step in the process, from application feasibility to prototyping, through to development and ultimately deployment.
Matrox Imaging Library Mil 9.0 C
While this is quite useful for exchangeability (despite the fact that some functions have changed), it is a big issue for parallel use.I could not reference both DLLs in the same assembly due to the identical file name and namespace, so I created one assembly for each,imaging-system_mil9 andimaging-system_mil10.This is necessary, but quite useless so far. What I needed was a base class in a common assembly so that I could use inheritance, therefore I created the assemblyimaging-system.Inside this assembly I added my own wrappers for the MIL commands.This seemed to be a pretty nice solution and worked really well when I initially developed and tested on my development computer where MIL 9 is installed. When I moved to another computer and developed and tested with MIL 10, I found that some commands in my wrapper need to be adapted because they had changed in the MIL 10 C# DLL. So far so good.
Today I moved back to my MIL 9 computer and wanted to test more things, but my test program failed to start, saying MissingMethodException. After some search I found that I completely forgot to find a solution for one point: The identical file names:My test program references imaging-system, imaging-system_mil9, and imaging-system_mil10. The last two both reference a file Matrox.MatroxImagingLibrary.dll, thus the output in the bin folder looked like:
The first idea that I had to solve this problem was renaming the files intoMatrox.MatroxImagingLibrary9.dll andMatrox.MatroxImagingLibrary10.dll.This works on the first compilation level when theimaging-system_mil9.dll andimaging-system_mil10.dllare compiled because they directly reference the respective files. The output in one of the bin folders:
This was the reason why my test program always tried to load the v10 library. My next question was: How the hell did this get in there?Therefore I searched for "c# compiler adds assembly version redirect" and found How to: Enable and Disable Automatic Binding Redirection, which says:
Matrox Morphis Cost-effective family of boards for standard video capture and/or real-time JPEG2000 compression/ decompression1. Versatile design Key features PCIe x1, PCI (-X2) or PCI-104 form factor captures from NTSC, PAL, RS-170 and CCIR video sources dual/quad video decoder architecture for ultra-fast channel switching connect and switch between up to 16 CVBS, up to 8 Y/C or a combination of inputs two trigger inputs1 real-time JPEG2000 image compression and decompression1 16 TTL auxiliary I/Os and RS-485 serial interface watchdog timer for monitoring overall system integrity programmed using Matrox Imaging Library (MIL) sold separately supports 32/64-bit Microsoft Windows XP/Vista/7 and 32/64-bit Linux Matrox Morphis is a family of cost-effective peripheral boards based on a truly versatile design. As a frame grabber board, the Matrox Morphis is ideal for video surveillance applications that require sequential capture from multiple standard sources with minimum latency. A modular design and simple standard connections provide additional flexibility and cost savings for video surveillance applications that require a scalable number of inputs. A real-time standard image compression and decompression accelerator for video archiving and/or transmission further qualifies Matrox Morphis for video surveillance applications. As an image compression and decompression board, Matrox Morphis is perfectly adapted for standard medical image archiving and transmission. Dual/quad video decoder architecture An elaborate and finely tuned design featuring up to four video decoders working in tandem enables Matrox Morphis to rapidly switch between multiple video sources for sequential capture. The design also allows for the simultaneous capture from up to four independent standard video sources. A large dedicated buffer guarantees reliable image capture to the on-board compression accelerator1 or the host PC, including display. Moreover, video images can be formatted in real-time during capture. Formatting features include cropping (ROI), horizontal and/or vertical flipping and subsampling. Real-time JPEG20001 Matrox Morphis integrates a hardware accelerator for JPEG2000 image compression and decompression. JPEG2000 is an industry standard from the Joint Photographic Experts Group for wavelet-based compression and decompression. This new standard was developed to provide a superior compression ratio without compromising quality, or superior quality at a given compression ratio when compared to conventional JPEG. An intricate algorithm makes JPEG2000 computationally intensive, so hardware acceleration is required for real-time performance at typical video rates. For video surveillance applications, the JPEG2000 hardware accelerator can handle up to two standard video streams, whether monochrome or color, in lossy or lossless mode. It can also handle high resolution monochrome formats with high dynamic range found in medical imaging applications.
We used standard agriculture illumination designed for growth improvement. It comprises two panels based on Light-Emitting Diode (LED) technology that provide light at different wavelengths according to a day/night period scheme that is reproduced inside the chamber. The panel emitting visible light is made up of an array of 48 LEDs, combining different wavelengths (see Figure 3(c)). This reproduces the wavelengths necessary to activate photosystem I and II ensuring a proper vegetative and reproductive growth of the plants. Indeed there are at least four types of photoreceptors that play a role in light signalling as inputs during plant development [21]. These include UV-light receptors, red-light, far-red light and at least two additional that have not been characterized in terms of absorption wavelength. The night panel is formed by an array of LEDs with a wavelength of 948 nm (see Figure 3(b)). The far-red light wavelengths were switched on during the dark signalling capture for a few seconds. Nevertheless, far-red light does not interfere with the subjective night and is extensively used in night imaging of photoperiod sensitive experiments [22]. Figure 3(a,b) show light spectra (wavelength vs. light intensity). IR peaks for day and night lighting systems do not match because during the night period spectrum must be far-red to avoid any interference in plant's growth.Figure 3(a) shows how the light system is activated and deactivated in the day/night periods of 16 h/8 h. During the night period, the control system activates the night panel for a period of 2 s, enough time for the night-camera to integrate the image without interfering with plant performance or morphogenesis. During the day period, the day panel remains active providing the radiation to allow proper development.
2 Overview Matrox Imaging Library (MIL) is a modular programming library with commands for image capture, image processing, pattern recognition, blob analysis, edge extraction and analysis, measurement, character recognition, 1D and 2D code reading, calibration, graphics, image compression, image display and archiving. Included with MIL is ActiveMIL, a collection of ActiveX controls (OCXs) for managing image capture, processing, analysis, display and archiving. This guide has been designed to complement the Matrox Imaging Library (MIL) brochure by providing a list of benchmarks on different platforms and a comprehensive overview of the MIL and ActiveMIL APIs. Included with the command and parameter descriptions of MIL are real programming examples for each module. Also included are brief descriptions of some of the control methods, events and properties available in ActiveMIL. For additional information on MIL commands and parameters, as well as ActiveMIL control methods, events, and properties, refer to the MIL and ActiveMIL Command Reference respectively. Software Architecture Matrox Imaging Library (MIL) and ActiveMIL Application Control Blob Analysis Buffer Control Calibration Code Reader Digitizer Control Display Edge Finder Geometric Model Finder Graphics Image Processing Measurement OCR Pattern Matching String Reader Board-Level Drivers Matrox CronosPlus Matrox Meteor-II family Matrox Orion family Matrox Corona-II Future Matrox Hardware IEEE 1394* IIDC Driver Matrox Morphis family Matrox Solios family Matrox Helios family Matrox Odyssey family** * Matrox Meteor-II/1394, 4Sight-II or third-party adapter. ** Matrox Odyssey family supported through Matrox Odyssey SDK. MIL/ActiveMIL has a common API across Matrox Imaging's entire hardware line. 2
4 MIL/ActiveMIL Benchmarks The following benchmarks provide a performance overview for a range of imaging operations running on different platforms. A brief description of all functions, parameters and images used are included. Note that the benchmarks assume full processor and memory bandwidth (i.e., no other system activity), and include command overheads. Note: Operations executed on 512 x 512 images 1. Image Processing Point-to-point Add two 8-bit images and store results in an 8-bit destination image. Edge Detection (sobel) Perform an edge detection (sobel) on an 8-bit source image and store results in an 8-bit destination image. Convolution (3 x 3) Perform a general 3 x 3 convolution with arbitrary coefficients on an 8-bit source image and store results in an 8-bit destination image. Results are saturated. Convolution (5 x 5) Same as above except with a 5 x 5 kernel. Convolution (11 x 11) Same as above except with a 11 x 11 kernel. Erosion/Dilation (3 x 3, predefined, binary) Perform a binary erosion/dilation on a 1-bit source image using a predefined 3 x 3 structuring element and store results in a 1-bit destination image. Erosion/Dilation (3 x 3, predefined, grayscale) Same as above except perform a grayscale operation. Erosion/Dilation (3 x 3, user-defined, binary) Perform a binary erosion/dilation on a 1-bit source image using an arbitrary 3 x 3 structuring element and store results in a 1-bit destination image. Erosion/Dilation (3 x 3, user-defined, grayscale) Same as above except perform a grayscale erosion/dilation operation. Erosion/Dilation (5 x 5, user-defined, binary) Perform a binary erosion/dilation on a 1-bit source image using an arbitrary 5 x 5 structuring element and store results in a 1-bit destination image. Erosion/Dilation (5 x 5, user-defined, grayscale) Same as above except perform a grayscale erosion/dilation. LUT map Perform a point-to-point LUT mapping operation for an 8-bit source image and store results in an 8-bit destination image. Histogram Calculate the histogram of an 8-bit source image and store result in a 32-bit buffer. Lossy JPEG Compression (monochrome) Perform lossy JPEG compression on an 8-bit source image and store results in an 8-bit destination image. 1.3 GHz Celeron M 512KB L2 Cache 400 MHz FSB PC2700 SDRAM (Matrox 4Sight M) 2.0 GHz Pentium M 2MB L2 Cache 400 MHz FSB PC2700 SDRAM (Matrox 4Sight M) 2.6 GHz Opteron 1 MB L2 Cache DDR1-400 SDRAM 3.6 GHz Xeon 1 MB L2 Cache 800 MHz FSB DDR2-400 SDRAM Helios XA / XCL 133 MHz PA (with 3.6 GHz Xeon ) 0.58 ms 0.08 ms 0.08 ms 0.05 ms 0.23 ms ms 0.74 ms 0.51 ms 0.74 ms 0.17 ms ms 1.1 ms 0.63 ms 0.54 ms 0.15 ms ms 2.9 ms 1.6 ms 1.5 ms 0.21 ms ms 12.7 ms 7.1 ms 5.8 ms 0.96 ms ms 0.05 ms 0.04 ms 0.04 ms 0.09 ms ms 0.17 ms 0.13 ms 0.16 ms 0.16 ms ms 0.22 ms 0.15 ms 0.14 ms 0.10 ms ms 0.51 ms 0.39 ms 0.51 ms 0.16 ms ms 0.88 ms 0.58 ms 0.55 ms 0.09 ms ms 1.1 ms 0.75 ms 1.1 ms 0.22 ms ms 0.33 ms 0.54 ms 0.24 ms 0.28 ms ms 0.38 ms 0.28 ms 0.31 ms 0.31 ms 2.5 ms 1.6 ms 1.2 ms 1.5 ms 1.5 ms 2ff7e9595c
Comments