A virtual instrumentation (VI) system called VI localized corrosion image analyzer (LCIA) based on LabVIEW 2010 was developed allowing rapid automatic and subjective error-free determination of the pits number on large sized corroded specimens. The VI LCIA controls synchronously the digital microscope image taking and its analysis, finally resulting in a map file containing the coordinates of the detected probable pits containing zones on the investigated specimen. The pits area, traverse length, and density are also determined by the VI using binary large objects (blobs) analysis. The resulting map file can be used further by a scanning vibrating electrode technique (SVET) system for rapid (one pass) “true/false” SVET check of the probable zones only passing through the pit’s centers avoiding thus the entire specimen scan. A complete SVET scan over the already proved “true” zones could determine the corrosion rate in any of the zones.
The increased application of self-constructed LabVIEW-based chemical virtual instruments (VIs) is due to their flexibility and ability to satisfy all the specific user requirements combined with the simplicity of the construction. Many configurations of LabVIEW-based VI have been reported until now corresponding to their specific chemical application defined by the user needs. Meng et al. [
The flexibility of the VIs allows their application practically in any branch of the chemical technology. For example, the quality control of the conversion coating on aluminum alloys requires the determination of the pits number appearing on the 3 × 10 inches control specimens after their testing in saline chamber at extreme conditions: high temperature, high relative humidity, and high saline concentration, according to the standard ASTM B117. According to this standard, the number of the appearing pits is the measure of the corrosion resistance of the protective coating. The pits counting however actually made by simple specimen observation results in subjective errors due to the bad distinction of the pits from some “pits-like” simple stains and hence false results about the corrosion resistance of the conversion coatings. That is why a rapid and subjective error-free method for pits counting is necessary. Thus, the purpose of the present work is to develop such a VI and to test it on real specimens for express and objective pits counting.
Such a VI must determine the pit centers coordinates, pit areas, their traverse lengths, and the densities using blobs analysis resulting in a map file which can be used further by a SVET system [
The specimen optical scan performed by a digital microscope connected to a PC yields a database file (a map file) containing the coordinates of all the surface defects similar to pits, not only the ones caused by corrosion. Image analysis performed by LabVIEW 2010 was applied for preliminary image recognition and distinction of the pits. The created map must be actualized by “true/false” SVET test application allowing the distinction of the true corroded (pit containing) zones from the “corroded-like” ones to be used further from a SVET system for corrosion rate determination. The true/false test is a rapid single linear SVET scan over the centers of the probable zones in which coordinates are saved in the created by the VI LCIA map file. The simple linear SVET scan will result in a specific and easy recognizable peaks contained curve in coordinates: current intensity/coordinate.
The scanning vibrating electrode technique (SVET) which was developed for biological applications [
The LabVIEW-based VI subject of the present paper employs the first main point of the approach developed by the authors based on the following two main points: computer vision application for video inspection by digital microscope of the surface of interest and database (map file) creation of the probable pits containing areas; rapid “true/false” test by single linear SVET scan for real pits distinction followed by a map file actualization.
Additionally, a complete SVET scanning of the recognized real pits areas can be performed if the corrosion rate determination is necessary. The VI performing the video inspection and the creation of the map file only is the subject of the present work, while the SVET VI is the subject of another publication.
Three main devices were involved in the system hardware configuration: a video inspection mighty scope near infrared 10x–200x, 1.3 MP,
VI LCIA system configuration.
The optical inspection by a digital microscope allows the capturing of full images from 4 mm² to 1700 mm² (optical zoom in the range from 10x to 200x), respectively, of the studied surface with a resolution of 1600 to 1200 effective pixels at shot speed user controllable from 1 to 1/1000 sec. The focus adjusting mechanism (
The homemade SVET device [
The LCIA focuses, captures the image of the specimen surface, and analyzes it creating a database file in real time containing the exact coordinates, area, and transverse length of probable pits. This file is employed by a SVET system with its own control software, performing the true/false test to distinguish the true pits coordinates. In “true” case, a complete SVET scan of the probable area can be performed and the corrosion rate be determined, if preliminary chosen by the operator in the interface screen. In “false” case, the SVET electrode goes to the next probable area up to the last using optimized trajectory. In both cases, after the true/false test performance, an updating of the already existing database file takes place.
The flow diagram of VI LCIA system shown in Figure
Flow diagram for VI LCIA.
The
Digitizing sub-VI: image preview and focusing.
The image preview is made by using the LabVIEW Ni IMAQdx libraries, tools that allow the reading of camera or microscope through a USB port. This job is performed within an “event” structure (see Figure
The image preview is taken by the application of the LabVIEW Ni IMAQdx tool [
Once the “capture” button, located on the sub-VI front panel is pressed, the
Sub-VI for image caption.
Image’s caption front panel.
In the image analysis applied by VI LCIA to metal samples for pitting corrosion determination, described on this document, the blob analysis of IMAQ library from LabVIEW 2010 [
The basic structure of an image recognition VI by the application of blob analysis in IMAQ LabVIEW consists of image acquisition, histogram calculation, thresholding, and blob’s filtering and analysis.
The image recognition VI for pitting corrosion application has all these components as well as the morphology and particle labeling to improve the shape and definition of pits under investigation. The programming diagram of the image analysis sub-VI is shown in Figure
Blobs analysis and pixel conversion to metric units.
By means of the icons IMAQ create and IMAQ read file the precaptured images are acquired into the sub-VI for digitizing. After that, the color threshold process is performed to turn the image into binary format in the first section. Once the threshold process is done, the desired morphology of pitting is predefined by IMAQ morphology, and then a filtering process is performed by IMAQ particle filter which can be used to clean up the image deleting the nondesired particles defined as noise. The pitting spots in the already clean image are labeled and highlighted in different colors, by IMAQ label, so they can be easily distinguished. Finally, the pitting spots which are pixels are counted to be converted in real metric units by IMAQ particle analysis, and saved together with the LCIA generated parameters as: pit location, area, and transverse length.
Once the blob analysis is performed, the system proceeds to convert pixels to metric units for all the parameters determined by the blob analysis (program process shown in Figure
The system VI LCIA was applied for image recognition in localized corrosion studies of aluminum alloys AA6061-T3 specimens determining the number, density, and coordinates of probable pits areas together with their dimensions. Then, the created database file was employed for real-time scanning of the affected by the corrosion areas only employing SVET improving thus the scanning time more than ten times compared with the time for complete SVET scan of the entire surface. In Figure
(a) Left: specimen microscope image; (a) right: map of the probable pits areas created by LCIA using the microscope image; (b) the LCIA user interface.
A virtual instrumentation system called VI LCIA based on LabVIEW 2010 was developed allowing rapid determination of the pits number on large metal specimens. The VI LCIA controls synchronously the focus adjustment and the image taking by a digital microscope and the image analysis, resulting in detection and the mapping of the probable pits containing zones on the corroded metal specimen with their traverse length and density using blobs analysis. The created map is further used by a homemade SVET VI system with its own LabVIEW 2010 software to control a rapid performing (one pass scan) “true/false” check of the probable pits containing zones and also is able to perform a complete SVET scan of the already recognized “true” zones to determine the corrosion rate.
The authors are pleased to acknowledge the Materials and Corrosion Laboratory and the Automatization and Virtual Instrumentation Laboratory of the Engineering Institute of the Autonomous University of Baja California, Mexico, for the support in the development and experimentation related to the present work.