In the current trend of global warming, China’s natural disasters occur frequently, especially droughts and floods prevention has been our livelihood project of national importance. And the real-time water level data of major rivers for research and prevention of floods and droughts becomes crucial important. In this regard, a variety of different automatic forecasting systems for river-level data have been developed. However, these systems, due to the principles and limitations of the technology, when used in practical applications, present various harsh environmental requirements; thus, they cannot meet the general environmental conditions. With ascendant machine vision technology, application of image sensing device to simulate the human eye to measure water gauge readings on an embedded platform provides a new idea for the intelligent level measurement. This paper presents a river water level sampling system based on digital image processing technology, it is proposed that level image including scale water gauge is captured using CMOS image sensor, and recognition of the tick marks is achieved on the ARM platform, and then the water level data is submitted via GPRS wireless design. Firstly, combined with the river water level measurement techniques commonly used in the field, the background and significance of this topic is introduced, and a summary of the program related to is followed,such as CMOS image sensor, basic theoretical knowledge USB2.0interface, image processing and GPRS communications. Again the functional unit hardware circuit design and scale line recognition software algorithm flow are elaborated, and finally the feasibility of the design is verified through the simulation.The main research work embodied in this paper is:1) conventional image data sampling method is through the FPGA to produce CMOS image sensor control timing, the image data is read out to the cache memory chip,while, the program applies generic USB2.0controller Cy7c8013programmable interface to connect the image sensor and generates a logic signal when the image sensor is working properly, and USB2.0bus to communicate with embedded host USB interface transmission of image data, compared to the timing generation circuit through the use of FPGA, this method spends less,is of high efficiency and simple programming;2) Take a special recognition line detection algorithms-Hough transform to a tick embedded software algorithms, taking fully into account the special nature of the horizontal scale line compared to other general line, and on this basis, an improved Hough transform algorithm is proposed that can quickly and accurately identify the horizontal scale line, the time this improved method compared to the original Hough transform takes significantly shorter and to good effect;3) for the water level fluctuations make measurement bias problem, the use of curve fitting approach gives a measurement solutions to determine the level, i.e., take the time T for a short period of time At, the time T-At within multiple samples and multiple scale line identification, and calculate each level of the image data, and finally the data obtained is used by the least squares method to the synthesis of the sinusoidal function.the balanced position of the vertical axis of the function of the sine wave is obtained as static position of the water at this time T. When there are waves to determine static water level, it can provide a different way of thinking. |