| Measuring instruments are very common in the field of industrial measurement and control and mainly been used to measure a variety of power or non-power signal, the common instruments can be divided into digital meter and pointer meter. With the development of the growing popularity of automation and automated image processing technology, automatic identification of the instruments is becoming increasingly important in the industrial field. We want to identify the instrument dials, but the collected images are often the entire instrument, and may contain a complex background, these useless information would interfere with the image processing, so how to exclude these useless information and obtain our interest area become a key for subsequent identification. So before the instrument identification, whether or not obtain the accurate instrument plate position will directly affect the identification of follow-meter data, so the instrument positioning technology is the basis of the instrument identification. This paper mainly used the functions of the OpenCV library, OpenCV is an open source cross-platform computer vision library with light weight and efficient features.It consists of a series of C functions and C++ classes that forms the general algorithm of image processing and computer vision. This paper uses OpenCV library functions to design a practical rectangular instrument positioning method.Currently automatic positioning technology includes genetic algorithms based on texture features, mathematical morphology and neural network algorithms. In intelligent monitoring instrument identification system, because the the instrument has geometric characteristics of obvious rectangular outline, the paper designs a positioning technology based on the rectangular profile matching to position the rectangular instrument. This principle of the method is straightforward, relatively easy to implement and the amount of the calculation is small, resource-intensive is less and the positioning accuracy of the rectangle meter is high and so on.This paper designs a practical rectangular instrument positioning method using the idea of matching rectangular outline. The acquired meter image is preprocessed and the image of the outline is get, then the contours are quadrilateral estimation, rectangular matching and aspect ratio matching, substandard outline of requirements are eliminated in order to gain the final of the instrument dials. It realizes the exact location of a particular instrument which has a rectangular border effectively.At the same time, in the process of obtain an image of the instrument, there is the interference of the external environment, such as uneven illumination, etc. Also, the acquired image quality is not ideal in poor light conditions and poor imaging environment, the valid information will lose after image preprocessing, and ultimately the exact location of the instrument dial can not been get. It directly affects the subsequent recognition, so we need to preprocess the image before operating. This paper presents an effective method for image preprocessing and can better achieve instrumentation binarization, thus finish the positioning of uneven illumination instrument via the positioning technology. Meanwhile, since the image-capturing angle and the placement of the instrument, the obtained dial is not necessarily in standard horizontal position, but the subsequent identification is based on the basis of the horizontal position, so we will be tilt such images. This paper uses the idea of affine transformation to tilt the dial and split out of the interest area which is the dial area.After getting the dial area, further pre-treatment for the interest region is needed, this paper preprocess the uneven illumination image ROI frequency domain filter based on the homomorphic filtering, incident and reflection components are separated, image detail is enhanced by high-frequency filter to, noise and other interference information are filtered to obtain a better binary image. |