CN106324708A - Digitization method and device of rainfall recording paper - Google Patents

Digitization method and device of rainfall recording paper Download PDF

Info

Publication number
CN106324708A
CN106324708A CN201510355671.4A CN201510355671A CN106324708A CN 106324708 A CN106324708 A CN 106324708A CN 201510355671 A CN201510355671 A CN 201510355671A CN 106324708 A CN106324708 A CN 106324708A
Authority
CN
China
Prior art keywords
rainfall
image
point
line
binaryzation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510355671.4A
Other languages
Chinese (zh)
Other versions
CN106324708B (en
Inventor
李士进
朱海晨
郝立
高祥涛
柏屏
胡金龙
王声特
王亚明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hao Li
Li Shijin
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201510355671.4A priority Critical patent/CN106324708B/en
Publication of CN106324708A publication Critical patent/CN106324708A/en
Application granted granted Critical
Publication of CN106324708B publication Critical patent/CN106324708B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a digitization method of rainfall recording paper. The method comprises a step of extracting a binary grid image and a rainfall line image from the digital images of the rainfall recording paper, a step of correcting the binary grid image and the rainfall line image, a step of using a method of row projection to determine the boundary of a grid area from the grid image which is subjected to tilt correction and setting the area outside the boundary in the grid image and the rainfall line image which are subjected to tilt correction as a binarization background, a step of allowing the rainfall line image to be corresponding to the grid image, calculating each peak point in a rainfall line and the maximum value point of a rightmost peak point right side extension line, and finally summing the rainfall values corresponding to the above points to obtain rainfall. The invention also discloses a digitization device of rainfall recording paper. The recorded rainfall data can be rapidly, accurately and automatically extracted from the rainfall recording paper images, and convenience is brought to subsequent data query analysis.

Description

The digitizing solution of rainfall record drawing, device
Technical field
The present invention relates to the digitizing solution of a kind of rainfall record drawing, device, utilize Computer Automatic Recognition rain The amount record rainfall data that recorded of drawing, belong to hydrometeorology, digitized image processes, image recognition and The technical field that data base intersects.
Background technology
Before computer is not universal, in fields such as water conservancy, meteorology, biomedicine, petroleum geologies, it is all By particular instrument or manually the valid data information of observation is plotted on papery engineering drawing.These paperys Data on hydrological data are all the historical summaries that comparison is precious, record flow, water level, precipitation, evaporation capacity Can be frequently used to and analyze Deng, the most a lot of data further and process, to the utilization of these effective informations with Share theory and the foundation by providing science for China's hydraulic engineering construction, it will greatly promote China's water conservancy Development.
But this kind of hydrology papery data be not preserve completely complete, over time, can by storage condition, Temperature, environment etc. affect, and cause papery such as to grind away breakage, time after the most aging, thin out fuzzy, the papery of writing Data writing infiltrations etc. are polluted, and the safety of historical data and value all can be brought impact by these.Therefore to this Class papery data is digitized, and transfers to the important data in papery hydrological data to carry out in computer point Class storage and process are necessary.
Owing to hydrology papery data type is various and data are diversified, these data are saved in computer During, it is usually based on manually, selects representational node and data, it is intended that interpolation or curve matching Method, calculate the data such as water level information sometime.But tracing pattern is different, matching or interpolation are also Can not be general.Another way is by manual entry data and to set up large database, owing to data type is numerous Many data volumes are big, and workload is huge and error-prone, and data need could put in storage with checking through strict examination, And need to provide various different retrieval mode, and do not guarantee that and can accurately find needs in the shortest time Data.
In miscellaneous hydrology papery data, rainfall record drawing has again its particularity.Every Pluviogram The rainfall of more than 1 day will be recorded, be a horizontal linear without the recording curve that the sky of rainfall is corresponding. And to when should have the curve record same day 8 of rainfall to rainfall line when second day 8, it is from a certain relatively low Scale starts, if this in 24 hours rainfall exceeded measuring cup (full measuring cup be 10mm), just by the rain of measuring cup Water pours out continuation metering, and therefore curve can form several peaks, and peak value is between 9-10mm.Last secondary amounts Rainfall in Bei goes up always, but as long as measuring cup less than, then the measuring cup on homologous thread is less than call wire.Calculate The rainfall of this day, needs the sum trying to achieve each peak value and measuring cup less than record value, finally gives rainfall.Right In rainfall record paper, there is following feature: owing to needing to record the rainfall of 24 hours, therefore record Paper web width is relatively big, and the image pixel that camera shooting obtains is many, easily produces the even phenomenon of uneven illumination, shows same A piece curve different piece color is inconsistent;Owing to rainfall is complicated, when raining in torrents continuously, peak is closeer Collection, shows that rainfall line drops suddenly and skyrockets;And owing to have recorded many days rainfall datas on a piece of paper, call wire it Between both may be parallel to each other, it is also possible to intermeshing, traditional images processing method is difficult to trace analysis every line Change in process.
Summary of the invention
The technical problem to be solved is to overcome prior art not enough, it is provided that a kind of rainfall record drawing Digitizing solution, it is possible to from rainfall record line drawing, automatically extract out the fall recorded quickly and accurately Rainfall data, it is simple to follow-up data query analysis.
The present invention solves above-mentioned technical problem the most by the following technical solutions:
The digitizing solution of rainfall record drawing, utilizes the rain that Computer Automatic Recognition rainfall record drawing is recorded Amount data, comprise the following steps:
Step A, from the digital picture of rainfall record drawing, extract the grid image of binaryzation, rainfall line chart respectively Picture;
Step B, grid image, rainfall line image are carried out slant correction;
Step C, utilize the border determining net region method that ranks the project grid image after slant correction, And the border exterior domain in the grid image after slant correction, rainfall line image is set to binaryzation background;
Step D, the straight line in rainfall line image is set to binaryzation background;
Step E, rainfall line image is corresponded to grid image, obtain each peak point and peak, the rightmost side on rainfall line On the right side of value point, the maximum of points of extended line, finally sues for peace to the rainfall value corresponding to above each point, obtains rainfall.
Preferably, make to extract from the digital picture of rainfall record drawing using the following method the rainfall line of binaryzation Image:
Step 1, digital picture to rainfall record drawing carry out gaussian pyramid resampling process, obtain described numeral The low-resolution image of image;
Step 2, described low-resolution image is carried out preliminary binary conversion treatment, obtain the rainfall line chart of preliminary binaryzation Picture;
Step 3, the digital picture by rainfall record drawing, low-resolution image, the rainfall line image of preliminary binaryzation Being divided into N number of subimage from left to right according to same dividing mode respectively, N is the integer more than 1;
Step 4, the rainfall line image finding out preliminary binaryzation i-th subimage in each target pixel points at low point Corresponding pixel points in the i-th subimage of resolution image, i=1,2 ..., N, and at CIE Lab color space In calculate the maximum space distance between these pixels Yu its average point (L_avg, a_avg, b_avg) dTh;
Step 5, traversal rainfall record drawing digital picture i-th subimage in all pixels, will meet The pixel of following condition is set to binaryzation target, and rest of pixels point is set to binaryzation background: at CIE Lab In color space with average point (L_avg, a_avg, b_avg) between distance less than dTh, and in HSI color H component in space is the default H component threshold value more than or equal to 180 more than hTh, hTh;Thus Rainfall line image to final binaryzation.
Further, described grid image, rainfall line image are carried out slant correction, specific as follows: from tentatively The rainfall line image of binaryzation is found out the longest straight line, then utilizes Hough transformation method to detect this straight line Angle of inclination, finally carries out rotation correction according to the angle of inclination detected to grid image, rainfall line image.
Preferably, use the Niblack algorithm improved that low-resolution image is carried out preliminary binary conversion treatment, tool Body is as follows: first by described low-resolution image gray processing;Then below equation is utilized to determine the two of each pixel Value threshold value:
T ( x , y ) = m ( x , y ) · [ 1 + k · ( s ( x , y ) R - 1 ) ]
Wherein (x is y) that ((x is y) that (x y) around presets point in size template to point to m to point for x, binary-state threshold y) to T Gray average;S (x, y) standard deviation of pixel gray value in expression template;The span of parameter k be [0.4, 0.6], R is 128;
Such as point, (x, y) less than T, (x, y), then arrange it is background to the gray value at place, otherwise, is set to target.
Techniques below scheme can also be obtained according to identical invention thinking:
The digitalizer of rainfall record drawing, including:
Grid image extraction unit, for extracting the grid image of binaryzation from the digital picture of rainfall record drawing; Rainfall line image extraction unit, for extracting the rainfall line of binaryzation from the digital picture of rainfall record drawing Image;
Tilt corrector unit, for the grid chart being exported grid image extraction unit and rainfall line image extraction unit Picture, rainfall line image carry out slant correction;
Grid clipping unit, determines grid regions for utilizing method that ranks the project grid image after slant correction The border in territory, and the border exterior domain in the grid image after slant correction, rainfall line image is set to two-value Change background;
Line removal unit, for being set to binaryzation background by the straight line in rainfall line image;
Rainfall computing unit, for rainfall line image is corresponded to grid image, obtains each peak point on rainfall line And the maximum of points of extended line on the right side of the peak point of the rightmost side, finally the rainfall value corresponding to above each point is sued for peace, Obtain rainfall.
Preferably, described rainfall line image extraction unit specifically includes:
Gaussian pyramid resampling module, for carrying out gaussian pyramid resampling to the digital picture of rainfall record drawing Process, obtain the low-resolution image of described digital picture;
Preliminary binary conversion treatment module, for described low-resolution image is carried out preliminary binary conversion treatment, obtains preliminary The rainfall line image of binaryzation;
Image division module, for by the digital picture of rainfall record drawing, low-resolution image, preliminary binaryzation Rainfall line image is divided into N number of subimage from left to right according to same dividing mode respectively, and N is more than 1 Integer;
Threshold value acquisition module, each target picture in the i-th subimage of the rainfall line image finding out preliminary binaryzation Vegetarian refreshments corresponding pixel points in the i-th subimage of low-resolution image, i=1,2 ..., N, and at CIE Lab Color space calculates the maximum space between these pixels Yu its average point (L_avg, a_avg, b_avg) Distance dTh;
Rainfall line image output module, the institute in the i-th subimage of the digital picture traveling through rainfall record drawing Having pixel, the pixel meeting following condition is set to binaryzation target, rest of pixels point is set to two-value Change background: in CIE Lab color space with average point (L_avg, a_avg, b_avg) between distance be less than DTh, and the H component in HSI color space more than hTh, hTh be the default H more than or equal to 180 Component threshold value;Thus obtain the rainfall line image of final binaryzation.
Further, described tilt corrector unit makes using the following method to grid image extraction unit and rainfall line chart The grid image, the rainfall line image that are exported as extraction unit carry out slant correction: from the rainfall of preliminary binaryzation Line image utilize Hough transformation method detect the angle of inclination of the longest straight line, finally according to the inclination detected Angle carries out rotation correction to grid image, rainfall line image.
Preferably, described preliminary binary conversion treatment module uses the Niblack algorithm improved to low-resolution image Carry out preliminary binary conversion treatment, specific as follows: first by described low-resolution image gray processing;Then utilize with Lower formula determines the binary-state threshold of each pixel:
T ( x , y ) = m ( x , y ) · [ 1 + k · ( s ( x , y ) R - 1 ) ]
Wherein (x is y) that ((x is y) that (x y) around presets point in size template to point to m to point for x, binary-state threshold y) to T Gray average;S (x, y) standard deviation of pixel gray value in expression template;The span of parameter k be [0.4, 0.6], R is 128;
Such as point, (x, y) less than T, (x, y), then arrange it is background to the gray value at place, otherwise, is set to target.
Further, this device also includes the image acquisition unit of the digital picture for obtaining rainfall record drawing, And for storing the data storage cell of the exported rainfall product data of rainfall computing unit.
Compared to existing technology, the method have the advantages that
The present invention can automatically extract out the rainfall recorded from rainfall record line drawing quickly and accurately Amount data, it is simple to follow-up data query analysis, are greatly improved the digitized efficiency of rainfall data, reduce Manpower and time cost;
The present invention, when carrying out rainfall line image and extracting, obtains low-resolution image first with gaussian pyramid model, Then low-resolution image is carried out preliminary binary conversion treatment, finally combine rainfall record line drawing CIE Lab color space and HSI color space feature, optimize further to preliminary binary conversion treatment result, Effectively reduce amount of calculation, improve extraction rate, and the result obtained is more accurate;
The present invention with the longest straight line in the rainfall line image of preliminary binaryzation as a reference to carry out Hough transformation Slant correction, algorithm is simpler, and accuracy is more preferable.
Accompanying drawing explanation
Fig. 1 is actual rainfall record drawing;
Fig. 2 is the schematic flow sheet of digitizing solution of the present invention in detailed description of the invention;
Fig. 3 is the rainfall line image of preliminary binaryzation;
Fig. 4 is the rainfall line image after double optimization;
Fig. 5 is the grid image of the binaryzation extracted;
Fig. 6 is the rainfall line image after slant correction;
Fig. 7 is the grid image after slant correction;
Fig. 8 is the rainfall line image after cutting;
Fig. 9 is the grid image after cutting;
Figure 10 is the rainfall line image after removing straight line.
Detailed description of the invention
Below in conjunction with the accompanying drawings technical scheme is described in detail:
Fig. 1 shows a actual rainfall record drawing, as it can be seen, every Pluviogram all can record 1 day with On rainfall, be a horizontal linear without the recording curve that the sky of rainfall is corresponding.And to there being rainfall The curve record same day 8 time to rainfall line when second day 8, it is from the beginning of a certain relatively low scale, as Really this in 24 hours rainfall exceeded measuring cup, just the water of measuring cup is poured out continuation metering, therefore curve can be formed Several peaks, peak value is between 9-10mm.Rainfall in last measuring cup goes up always, but as long as measuring cup Less than, then the measuring cup on homologous thread is less than call wire.Calculate the rainfall of this day, need to try to achieve each peak value with And measuring cup is less than the sum of record value, finally gives rainfall.
The present invention extracts grid first with digital image processing techniques from the digital picture of rainfall record drawing Then the correct image extracted, denoising etc. are processed, then according to rain by image and rainfall line image Amount line peak value and extension line extreme value calculate rainfall value.Fig. 2 shows the basic procedure of the inventive method, specifically Comprise the following steps:
Step A, from the digital picture of rainfall record drawing, extract the grid image of binaryzation, rainfall line chart respectively Picture.
1, rainfall line drawing:
Owing to rainfall record drawing is bigger, the Pluviogram resolution with digital camera shooting is the highest, generally up to Pixel scale to 4000*3000.As directly artwork (the usually RGB bitmap of standard) processed, The most computationally intensive, extraction rate is slow, has a strong impact on rainfall record digitalized drawing efficiency.Ask for solving this Topic, the present invention does not directly utilize rainfall record artwork I when extracting rainfall line0Process, but pass through structure Make image gaussian pyramid model to obtain lower resolution image, i.e. the digital picture of rainfall record drawing is entered Row gaussian pyramid resampling processes, and then processes low-resolution image.The pyramid specifically used Progression can determine according to artwork resolution, such as, for the artwork of 4000*3000 yardstick, can use three grades high This pyramid model, thus obtain low-resolution image I2.Image gaussian pyramid is existing mature technology, for Saving space, here is omitted, and detail refers to document (Rafale C Gonzalez, Richard E Woods writes. Digital Image Processing [M]. and Ruan Qiuqi, Ruan Yuzhi etc. translate. Beijing: Electronic Industry Press, 2004.).
To low-resolution image I2Carry out preliminary binary conversion treatment, obtain the rainfall line image of preliminary binaryzation. Existing Niblack algorithm, gray scale expected value method, Otsu method etc. can be used to carry out preliminary binarization segmentation, Present invention preferably employs Niblack algorithm (J.Sauvola, the M.Pietikainen.Adaptive document of improvement Image binarization.Pattern Recognition, 33 (2000), pp.225 236), specific as follows:
First by low-resolution image I2Carry out gray processing, then utilize the following Niblack formula improved to carry out two Value processes:
T ( x , y ) = m ( x , y ) · [ 1 + k · ( s ( x , y ) R - 1 ) ]
Wherein (x is y) that ((x is y) that (x y) around presets size template (generally to point to m to point for x, threshold value y) to T Choose between 9*9~15*15, preferably 11*11) the interior gray average put;(x y) represents picture in template to s The standard deviation of vegetarian refreshments gray value;The span of parameter k is [0.4,0.6], preferably 0.5;Owing to we are by coloured silk Color image is converted into 8 gray level images, so R can be set to 128.When point, (x, y) gray value at place is less than (x, y), then the value of its bianry image is set to 0 to T, is otherwise set to 255, thus obtains bianry image I2 B, by This can extract the major part of rainfall curve.Fig. 3 shows that employing improves obtained by Niblack algorithm preliminary two One example of value rainfall line image.
The preliminary rainfall curve extracted is due to very big, so the bianry image obtained contains much by ambient interferences Noise and redundant information, if rainfall curve is thinner simultaneously, then white pixel point large percentage in a template, Making threshold value bigger than normal, thus obtained curve breakpoint is more, and therefore preliminary bianry image is entered one by the present invention Step optimizes, and extracts more complete rainfall line image with this.Optimization method of the present invention is specific as follows:
1. relatively big due to rainfall record figure paper length, easily produce uneven illumination, in order to reduce illumination when shooting Impact on rainfall curve, first by image I0、I2、I2 BIt is divided into from left to right according to same dividing mode Multiple subimages, image is divided into three, left, center, right part by the present embodiment;
2. as a example by left 1/3rd, by image I2Three component normalization in CIE Lab color space;
3. bianry image is mapped to CIE Lab coloured image I2In, statistics is tried to achieve and the black color dots in bianry image The L of the point corresponding to (point on the i.e. preliminary rainfall line obtained), the average of a, b component L_avg,a_avg,b_avg;
4. CIE Lab coloured image I is calculated2Middle each point to Euclidean distance dis of (L_avg, a_avg, b_avg), Determining threshold value dTh that can extract curve, the present invention uses the point on the rainfall line of preliminary acquisition to arrive The ultimate range of (L_avg, a_avg, b_avg) is as dTh;
5. finding through a large amount of analysis and observations, the rainfall curve H component value in original image HSI color model is usual Both greater than 180, therefore the present invention is further using this value or somewhat larger value as the H component of HSI color space Threshold value hTh, the value of the preferred hTh of the present invention is 200;
6. traversal original image I0In institute a little, the pixel meeting following condition is set to binaryzation target, Rest of pixels point is set to binaryzation background: with average point in CIE Lab color space Euclidean distance between (L_avg, a_avg, b_avg) is less than dTh, and the H in HSI color space divides Amount is more than hTh;If that is distance dis<dTh and H>hTh, then the value of this pixel is set to 0, otherwise It is set to 255;
In repeating the most according to the method described above to realize 1/3rd, right three/part, obtain the rain of double optimization Discharge curve.After the preliminary rainfall line image employing said method optimization of Fig. 3 as shown in Figure 4.
2, grid image extracts
Owing to the extraction of grid lines needs to extract all of horizontal graduation mark and longitudinal graduation mark, be the most all Artwork I0On process, present invention preferably employs Chinese invention patent application (Publication No. 103971367A, Filing date 2014/4/28) in disclosed grid image extracting method, specifically comprise the following steps that
(1) utilize Sobel gradient operator that the image of gray processing is carried out the gradient distribution of level, vertical direction, it is thus achieved that Gradient map in both direction is to obtain the marginal information of target lines;
(2) in gradient map both horizontally and vertically, be respectively processed (as a example by this sentences horizontal direction, The processing mode of vertical direction is identical):
1. in order to reduce the impact of uneven illumination, horizontal gradient figure is divided into three pieces, left, center, right, at corresponding fritter In, the curve position that binding curve extracts, weed out the impact of the Grad of homologous thread, in computing block Belong to gradient mean value Th of grid lines;
2. utilize gradient mean value Th that horizontal gradient image is carried out binaryzation, in horizontal gradient gradient distribution side Upwards, the condition that the horizontal gradient of another addition pixel is bigger than vertical gradient so that horizontal gradientization is more accurate, The positional information belonging to orange-yellow lines is tentatively obtained according to this binaryzation result;
3. according to the acquisition yellow line positional information in 2., it is thus achieved that the pixel on correspondence position in horizontal direction Point is in a and the b component size of CIE Lab space, and adds up a, b average of these location points
4. obtain in utilizing 3.If a, b component of pixel meetsIt it is then mesh Mark, is otherwise background, splits original image.
5. horizontal direction binary picture is obtained;Same method obtains the binary picture of vertical direction.
(3) binary picture both horizontally and vertically is carried out or computing merges, obtain whole image binaryzation figure;
(4) binary picture for obtaining in (4) carries out the corrosion of horizontal direction 1 × 5 respectively and preserves result, Preserve result with the corrosion of 5 × 1 in vertical direction, get rid of more discrete point;
(5) binary picture obtained in horizontal and vertical directions is merged, obtain final grid chart Picture.Fig. 5 shows the grid image extracted.
Step B, grid image, rainfall line image are carried out slant correction.
In the image process obtaining rainfall record drawing, owing to its breadth is relatively big, frequently can lead to image and occur Inclination in various degree, it is therefore necessary to image is carried out slant correction.Existing slant correction is typically with The method of Hough transformation, tries to achieve the angle of picture deflection, then rotation correction.In view of meeting in rainfall line image There is thick long straight line (without the rainfall curve of rainfall), it is simple to identifying processing, therefore the present invention is from preliminary two-value The rainfall line image changed finds out the longest straight line, then utilizes Hough (Hough) alternative approach to detect this The angle of inclination of straight line, finally rotates grid image, rainfall line image according to the angle of inclination detected Correction;Its detailed process is as follows:
(1) at the bianry image I of smaller scale2 B(i j), utilizes | i*cos α+j*sin α | to try to achieve to upper traversal black pixel point (i j) to the distance of initial point, and is saved in accumulator array;
(2) maximum of accumulator array, i.e. bianry image I are found2 BIn the longest straight line, try to achieve corresponding deflection Angle [alpha];
(3) according to angle [alpha], artwork is turned clockwise, conversion formula: i1=i*cos α+j*sin α, j1=i*cos α- J*sin α, wherein (i j) is respectively artwork and pixel coordinate of rotated image with (i1, j1), obtains angle slant correction After rainfall line image and grid image, respectively the most as shown in Figure 6, Figure 7.
Step C, utilize the border determining net region method that ranks the project grid image after slant correction, And the border exterior domain in the grid image after slant correction, rainfall line image is set to binaryzation background.
Postrotational rainfall line image and grid image contain a lot of record drawing information with outer portion, because of This needs by meshing cutting out, it is to avoid the interference of other information.Its concrete grammar is as follows:
(1) grid image row, column is projected, add up the black pixel point number of each row (column);
(2) setting threshold value according to the statistics of row (column) projection, row threshold value takes 200 herein, and row threshold value takes 400;
(3) grid lines border up and down is found according to the ranks threshold value set;
(4) part outside net boundary is all set to white, obtains the image after cutting;Rainfall after cutting Line image, grid image are the most as shown in Figure 8, Figure 9.
Step D, the straight line in rainfall line image is set to binaryzation background.
Rainfall record figure generally all comprises the rainfall data of some days, and is the most a few days ago there is no rainfall , its rainfall record is exactly a straight line, therefore can be erased by the straight line in rainfall line image, thus avoids The follow-up rainfall record identification having rainfall is produced interference.Specifically can adopt with the following method:
(1) 450 row started rainfall line image from grid left end in the range of grid do floor projection, statistics The number of black pixel point;
(2) set threshold value Th, when certain row floor projection statistical value more than Th then assert straight line on this journey, and Occur that the line number more than Th is left the record of rainy day for the first time;
(3) in the statistical value upper and lower 20 row of line number more than Th, the gray value of all pixels is set to 255, To erasing the rainfall line image after straight line, as shown in Figure 10.
Step E, rainfall line image is corresponded to grid image, obtain each peak point and peak, the rightmost side on rainfall line On the right side of value point, the maximum of points of extended line, finally sues for peace to the rainfall value corresponding to above each point, obtains rainfall.
Utilize the binaryzation rainfall line image obtained by above each step, grid image, rainfall can be sought out Value.Rainfall value includes two parts: one is the record value corresponding to each peak point of rainfall curve, two be measuring cup not The value of full call wire (i.e. the maximum of points of extended line on the right side of the peak point of the rightmost side).Ask for the method tool of rainfall value Body is as follows:
(1) the wide high of each scale of grid lines is calculated
1. 300*300 region, the grid lines upper left corner is done ranks projection, adds up each row (column) black pixel point Number;
2. set threshold value Th, find the horizontal and vertical graduation mark of grid;
3. calculate horizontal stroke (erecting) meansigma methods of pixel between graduation mark, be denoted as height (wide) degree of grid.
(2) curve peak is found
1. the interval of scale 9-10 is divided into some fritters by mesh width, adds up each fritter inner curve point respectively Number;
2. set threshold value Th, in assert this region when step 1. statistical value is more than Th, there is the peak of curve;
3. in the grid block comprising curve peak that 2. step obtains, find peak, and judge on the right of this point 25 Whether there is the point higher than it in pixel, if it is not, assert that this point is a peak point, its coordinate is protected Deposit;
(3) measuring cup peak less than call wire is found
The region turning right last peak point deals with, and finds in this panel region measuring cup less than call wire By adding up about this some the number of black pixel point in one mesh width, high point, judges that this point is on curve Point or isolated noise.If the point on curve, then this point is preserved.
(4) rainfall value is calculated
1. in grid image, and extreme point (x, y) in next grid altitude range, 100 pictures each to about y Floor projection is done in the region of element, adds up the number of often row black pixel point, and the minimum abscissa more than 140 is recognized It is set to (x, lower graduation mark y);
2. similar with step, from (x, y) up in the range of the top of grid, each to about y 100 Floor projection is done in the region of pixel, obtains (x, y) each bar graduation mark of upper end;
3. take near ((x, y) between the height h and upper and lower graduation mark of lower graduation mark in calculating for x, graduation mark up and down y) Height H, calculate h/H.
4. statistics (x, y) the bar number i of upper end graduation mark, calculate (x, y) corresponding to value (10-i)+h/H;
5. utilize above-mentioned steps to calculate the value of each extreme point, and measuring cup is looked for less than the peak on record line Go out, add some peak values above, finally give rainfall.
The digitalizer of rainfall record drawing of the present invention is can get according to the inventive method, including:
Grid image extraction unit, for extracting the grid image of binaryzation from the digital picture of rainfall record drawing; Rainfall line image extraction unit, for extracting the rainfall line of binaryzation from the digital picture of rainfall record drawing Image;
Tilt corrector unit, for the grid chart being exported grid image extraction unit and rainfall line image extraction unit Picture, rainfall line image carry out slant correction;
Grid clipping unit, determines grid regions for utilizing method that ranks the project grid image after slant correction The border in territory, and the border exterior domain in the grid image after slant correction, rainfall line image is set to two-value Change background;
Line removal unit, for being set to binaryzation background by the straight line in rainfall line image;
Rainfall computing unit, for rainfall line image is corresponded to grid image, obtains each peak point on rainfall line And the maximum of points of extended line on the right side of the peak point of the rightmost side, finally the rainfall value corresponding to above each point is sued for peace, Obtain rainfall.
The digitalizer of the present invention can use the rainfall note obtained beforehand through the equipment such as scanner, digital camera The image of record drawing is as input, and the rainfall data that rainfall computing unit obtains is stored in external data base, So as follow-up analysis inquiry;The present invention can also be further by image acquisition equipment and/or data storage device Integration is come in, it is achieved full-automatic rainfall data extracts.
Test result indicate that, the rainfall record drawing using digital camera shooting can automatically be carried out by the present invention Digital assay, has outstanding identification ability to common rainfall record figure, it is thus achieved that the value of rainfall accurate Spend the highest.

Claims (10)

1. the digitizing solution of rainfall record drawing, utilizes the rain that Computer Automatic Recognition rainfall record drawing is recorded Amount data, it is characterised in that comprise the following steps:
Step A, from the digital picture of rainfall record drawing, extract the grid image of binaryzation, rainfall line chart respectively Picture;
Step B, grid image, rainfall line image are carried out slant correction;
Step C, utilize the border determining net region method that ranks the project grid image after slant correction, And the border exterior domain in the grid image after slant correction, rainfall line image is set to binaryzation background;
Step D, the straight line in rainfall line image is set to binaryzation background;
Step E, rainfall line image is corresponded to grid image, obtain each peak point and peak, the rightmost side on rainfall line On the right side of value point, the maximum of points of extended line, finally sues for peace to the rainfall value corresponding to above each point, obtains rainfall.
2. the digitizing solution of rainfall record drawing as claimed in claim 1, it is characterised in that make using the following method The rainfall line image of binaryzation is extracted from the digital picture of rainfall record drawing:
Step 1, digital picture to rainfall record drawing carry out gaussian pyramid resampling process, obtain described numeral The low-resolution image of image;
Step 2, described low-resolution image is carried out preliminary binary conversion treatment, obtain the rainfall line chart of preliminary binaryzation Picture;
Step 3, the digital picture by rainfall record drawing, low-resolution image, the rainfall line image of preliminary binaryzation Being divided into N number of subimage from left to right according to same dividing mode respectively, N is the integer more than 1;
Step 4, the rainfall line image finding out preliminary binaryzation i-th subimage in each target pixel points at low point Corresponding pixel points in the i-th subimage of resolution image, i=1,2 ..., N, and at CIE Lab color space In calculate maximum space distance dTh between these pixels Yu its average point (L_avg, a_avg, b_avg);
Step 5, traversal rainfall record drawing digital picture i-th subimage in all pixels, will meet The pixel of following condition is set to binaryzation target, and rest of pixels point is set to binaryzation background: at CIE Lab In color space with average point (L_avg, a_avg, b_avg) between distance less than dTh, and in HSI color H component in space is the default H component threshold value more than or equal to 180 more than hTh, hTh;Thus Rainfall line image to final binaryzation.
3. the digitizing solution of rainfall record drawing as claimed in claim 2, it is characterised in that the value of N is 3.
4. the digitizing solution of rainfall record drawing as claimed in claim 2, it is characterised in that described to grid chart Picture, rainfall line image carry out slant correction, specific as follows: to utilize suddenly from the rainfall line image of preliminary binaryzation Husband's alternative approach detects the angle of inclination of the longest straight line, finally according to the angle of inclination detected to grid image, Rainfall line image carries out rotation correction.
5. the digitizing solution of rainfall record drawing as claimed in claim 2, it is characterised in that use improvement Niblack algorithm carries out preliminary binary conversion treatment to low-resolution image, specific as follows: first by described low point Resolution image gray processing;Then below equation is utilized to determine the binary-state threshold of each pixel:
T ( x , y ) = m ( x , y ) &CenterDot; &lsqb; 1 + k &CenterDot; ( s ( x , y ) R - 1 ) &rsqb;
Wherein (x is y) that ((x is y) that (x y) around presets point in size template to point to m to point for x, binary-state threshold y) to T Gray average;S (x, y) standard deviation of pixel gray value in expression template;The span of parameter k be [0.4, 0.6], R is 128;
Such as point, (x, y) less than T, (x, y), then arrange it is background to the gray value at place, otherwise, is set to target.
6. the digitalizer of rainfall record drawing, it is characterised in that including:
Grid image extraction unit, for extracting the grid image of binaryzation from the digital picture of rainfall record drawing;
Rainfall line image extraction unit, for extracting the rainfall line of binaryzation from the digital picture of rainfall record drawing Image;
Tilt corrector unit, for the grid chart being exported grid image extraction unit and rainfall line image extraction unit Picture, rainfall line image carry out slant correction;
Grid clipping unit, determines grid regions for utilizing method that ranks the project grid image after slant correction The border in territory, and the border exterior domain in the grid image after slant correction, rainfall line image is set to two-value Change background;
Line removal unit, for being set to binaryzation background by the straight line in rainfall line image;
Rainfall computing unit, for rainfall line image is corresponded to grid image, obtains each peak point on rainfall line And the maximum of points of extended line on the right side of the peak point of the rightmost side, finally the rainfall value corresponding to above each point is sued for peace, Obtain rainfall.
7. the digitalizer of rainfall record drawing as claimed in claim 6, it is characterised in that described rainfall line chart As extraction unit specifically includes:
Gaussian pyramid resampling module, for carrying out gaussian pyramid resampling to the digital picture of rainfall record drawing Process, obtain the low-resolution image of described digital picture;
Preliminary binary conversion treatment module, for described low-resolution image is carried out preliminary binary conversion treatment, obtains preliminary The rainfall line image of binaryzation;
Image division module, for by the digital picture of rainfall record drawing, low-resolution image, preliminary binaryzation Rainfall line image is divided into N number of subimage from left to right according to same dividing mode respectively, and N is more than 1 Integer;
Threshold value acquisition module, each target picture in the i-th subimage of the rainfall line image finding out preliminary binaryzation Vegetarian refreshments corresponding pixel points in the i-th subimage of low-resolution image, i=1,2 ..., N, and at CIE Lab Color space calculates the maximum space between these pixels Yu its average point (L_avg, a_avg, b_avg) Distance dTh;
Rainfall line image output module, the institute in the i-th subimage of the digital picture traveling through rainfall record drawing Having pixel, the pixel meeting following condition is set to binaryzation target, rest of pixels point is set to two-value Change background: in CIE Lab color space with average point (L_avg, a_avg, b_avg) between distance be less than DTh, and the H component in HSI color space more than hTh, hTh be the default H more than or equal to 180 Component threshold value;Thus obtain the rainfall line image of final binaryzation.
8. the digitalizer of rainfall record drawing as claimed in claim 7, it is characterised in that described slant correction Unit makes the grid chart exported grid image extraction unit and rainfall line image extraction unit using the following method Picture, rainfall line image carry out slant correction: utilize Hough transformation method from the rainfall line image of preliminary binaryzation Detect the angle of inclination of the longest straight line, finally according to the angle of inclination detected to grid image, rainfall line chart As carrying out rotation correction.
9. the digitalizer of rainfall record drawing as claimed in claim 7, it is characterised in that described preliminary two-value Changing processing module uses the Niblack algorithm improved low-resolution image to be carried out preliminary binary conversion treatment, specifically As follows: first by described low-resolution image gray processing;Then below equation is utilized to determine the two-value of each pixel Change threshold value:
T ( x , y ) = m ( x , y ) &CenterDot; &lsqb; 1 + k &CenterDot; ( s ( x , y ) R - 1 ) &rsqb;
Wherein (x is y) that ((x is y) that (x y) around presets point in size template to point to m to point for x, binary-state threshold y) to T Gray average;S (x, y) standard deviation of pixel gray value in expression template;The span of parameter k be [0.4, 0.6], R is 128;
Such as point, (x, y) less than T, (x, y), then arrange it is background to the gray value at place, otherwise, is set to target.
10. the digitalizer of rainfall record drawing as described in any one of claim 6~9, it is characterised in that should Device also includes the image acquisition unit of the digital picture for obtaining rainfall record drawing, and is used for storing fall The data storage cell of the exported rainfall product data of rainfall computing unit.
CN201510355671.4A 2015-06-24 2015-06-24 Digitizing solution, the device of rainfall record drawing Expired - Fee Related CN106324708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510355671.4A CN106324708B (en) 2015-06-24 2015-06-24 Digitizing solution, the device of rainfall record drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510355671.4A CN106324708B (en) 2015-06-24 2015-06-24 Digitizing solution, the device of rainfall record drawing

Publications (2)

Publication Number Publication Date
CN106324708A true CN106324708A (en) 2017-01-11
CN106324708B CN106324708B (en) 2018-08-14

Family

ID=57729778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510355671.4A Expired - Fee Related CN106324708B (en) 2015-06-24 2015-06-24 Digitizing solution, the device of rainfall record drawing

Country Status (1)

Country Link
CN (1) CN106324708B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107765348A (en) * 2017-10-23 2018-03-06 成都信息工程大学 Precipitation meteorological telegraphic messages data error modification method, glaze landscape forecast method
CN110533036A (en) * 2019-08-28 2019-12-03 湖南长城信息金融设备有限责任公司 A kind of bill scan image quick slant correction method and system
CN111738208A (en) * 2020-07-16 2020-10-02 江苏省气象信息中心 Method for extracting tracks in meteorological self-recording paper
CN113359216A (en) * 2021-06-03 2021-09-07 山东捷瑞数字科技股份有限公司 Method, system and storage medium for identification of recorded data of tipping-bucket rain gauge

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930594A (en) * 2010-04-14 2010-12-29 山东山大鸥玛软件有限公司 Rapid correction method for scanning document image
WO2011014138A1 (en) * 2009-07-27 2011-02-03 Utc Fire & Security Corporation System and method for video-quality enhancement
EP2381416A1 (en) * 2009-01-20 2011-10-26 Honda Motor Co., Ltd. Image restoration method in computer vision system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2381416A1 (en) * 2009-01-20 2011-10-26 Honda Motor Co., Ltd. Image restoration method in computer vision system
WO2011014138A1 (en) * 2009-07-27 2011-02-03 Utc Fire & Security Corporation System and method for video-quality enhancement
CN101930594A (en) * 2010-04-14 2010-12-29 山东山大鸥玛软件有限公司 Rapid correction method for scanning document image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龚压西等: "降雨自记曲线的计算机图象处理与统计", 《电波科学学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107765348A (en) * 2017-10-23 2018-03-06 成都信息工程大学 Precipitation meteorological telegraphic messages data error modification method, glaze landscape forecast method
CN107765348B (en) * 2017-10-23 2020-06-02 成都信息工程大学 Precipitation weather message data error correction method and rime landscape prediction method
CN110533036A (en) * 2019-08-28 2019-12-03 湖南长城信息金融设备有限责任公司 A kind of bill scan image quick slant correction method and system
CN110533036B (en) * 2019-08-28 2022-06-07 长城信息股份有限公司 Rapid inclination correction method and system for bill scanned image
CN111738208A (en) * 2020-07-16 2020-10-02 江苏省气象信息中心 Method for extracting tracks in meteorological self-recording paper
CN113359216A (en) * 2021-06-03 2021-09-07 山东捷瑞数字科技股份有限公司 Method, system and storage medium for identification of recorded data of tipping-bucket rain gauge

Also Published As

Publication number Publication date
CN106324708B (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN108364280B (en) Method and equipment for automatically describing structural crack and accurately measuring width
CN109446992B (en) Remote sensing image building extraction method and system based on deep learning, storage medium and electronic equipment
CN111626190B (en) Water level monitoring method for scale recognition based on clustering partition
CN108960198A (en) A kind of road traffic sign detection and recognition methods based on residual error SSD model
CN101599120B (en) Identification method of remote sensing image building
CN110263717B (en) Method for determining land utilization category of street view image
CN107358260B (en) Multispectral image classification method based on surface wave CNN
CN110084241B (en) Automatic ammeter reading method based on image recognition
CN101916373B (en) Road semiautomatic extraction method based on wavelet detection and ridge line tracking
CN103839265A (en) SAR image registration method based on SIFT and normalized mutual information
CN105354832B (en) A kind of method on mountain area satellite image autoregistration to geographical base map
CN112766184B (en) Remote sensing target detection method based on multi-level feature selection convolutional neural network
CN106324708A (en) Digitization method and device of rainfall recording paper
CN109727279B (en) Automatic registration method of vector data and remote sensing image
CN110619258B (en) Road track checking method based on high-resolution remote sensing image
CN107392929A (en) A kind of intelligent target detection and dimension measurement method based on human vision model
CN106326818A (en) Method and device for digitizing paper hydrological data
CN114419430A (en) Cultivated land plot extraction method and device based on SE-U-Net +model
CN110246139A (en) Planktonic organism in-situ image ROI rapid extracting method based on dual threshold
CN109410233A (en) A kind of accurate extracting method of high-definition picture road of edge feature constraint
CN103065296B (en) High-resolution remote sensing image residential area extraction method based on edge feature
CN103455798B (en) Histogrammic human body detecting method is flowed to based on maximum geometry
CN109886988B (en) Method, system, device and medium for measuring positioning error of microwave imager
CN105894501A (en) Single-tree detection and crown describing method for high-resolution remote sensing image
CN103366376B (en) A kind of image characteristic extracting method based on neighborhood dimensional variation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180629

Address after: 210036 room 3-1302, moonlight Plaza, Longjiang District, Gulou District, Nanjing, Jiangsu.

Applicant after: Hao Li

Applicant after: Li Shijin

Address before: 210036 room 3-1302, moonlight Plaza, Longjiang District, Gulou District, Nanjing, Jiangsu.

Applicant before: Li Shijin

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180814

Termination date: 20200624