CN105893943B - Method and system for detecting oil level - Google Patents
Method and system for detecting oil level Download PDFInfo
- Publication number
- CN105893943B CN105893943B CN201610187567.3A CN201610187567A CN105893943B CN 105893943 B CN105893943 B CN 105893943B CN 201610187567 A CN201610187567 A CN 201610187567A CN 105893943 B CN105893943 B CN 105893943B
- Authority
- CN
- China
- Prior art keywords
- oil level
- level gauge
- image
- response
- straight line
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01F—MEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
- G01F23/00—Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Fluid Mechanics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a kind of oil level detection method and system, according to the geometrical characteristic of the cursor line of oil level gauge and oil level gauge dial plate grayscale information characteristic distributions, Ha Er response computation is carried out to oil level gauge dial plate image, obtain Ha Er response diagram, since there is higher Ha Er response in cursor line region relative to non-pointer region, therefore the present invention counts the distribution of Ha Er response by histogram, and using the corresponding Ha Er response of the quantile for meeting preset requirement as threshold value, the Local modulus maxima in Ha Er response diagram is filtered out;And the method for passing through straight line fitting, using the maximum straight line of the sum of Ha Er response as the cursor line in oil level gauge dial plate image, finally according to the parameter information of cursor line and the calibration points of oil level gauge dial plate image tagged, the scale value that cursor line is directed toward in oil level gauge dial plate image is obtained.Therefore, the present invention has liberated manpower, reduces security risk.
Description
Technical field
The present invention relates to oil level gauge technical fields, more specifically, being related to a kind of oil level detection method and system.
Background technique
Oil level gauge is a kind of instrument how many for the oil mass in displaying target fuel tank, by currently reading the oil level gauge
Several monitoring can understand the oil liquid amount in target fuel tank in time, to prevent from causing equipment because the oil mass in target fuel tank is very few
It is burned out or problem out of service.Therefore, to oil level gauge carry out Daily Round Check be in the artificial O&M of substation it is very important
One of project.
Currently, mainly being detected by way of manual inspection to the instruction state of oil level list index.But passing through people
There are inspection is dangerous and the problems such as routing inspection efficiency is low for work inspection.Therefore, how a kind of oil level detection method and system are provided
Patrol task is completed, is those skilled in the art's technical problem urgently to be resolved to liberate manpower, reduce security risk.
Summary of the invention
In view of this, the present invention discloses a kind of oil level detection method and system, to realize while completing patrol task,
Manpower is liberated, security risk is reduced.
A kind of oil level detection method, comprising:
Obtain oil level gauge image, according to the gradient angle descriptor information of oil level gauge dial plate, to the oil level gauge image into
Row template-matching operation obtains oil level gauge dial plate image;
Ha Er response computation is carried out to the oil level gauge dial plate image and obtains the Ha Er response diagram of oil level gauge dial plate image;
Histogram information statistics is carried out to each Ha Er response in the Ha Er response diagram, finds the Kazakhstan of high numerical value
The percentage of your response quantity Zhan Haer response total quantity is the quantile of preset percentage, and the quantile is corresponding
Ha Er response is as threshold value;
Obtain each Local modulus maxima in the Ha Er response diagram;
Each initial straight is obtained using line fitting method to each Local modulus maxima, according to the threshold value to each
The initial straight is fitted amendment, obtains one group of straight line, most by the sum of Ha Er response of pixel in each straight line
Big straight line is as the cursor line in oil level gauge dial plate image;
Two different points of position in the cursor line are chosen, respectively as the first mark point and the second mark point;
On straight line that is perpendicular to the cursor line and passing through first mark point and Ha Er response is obtained to be greater than
The number of the continuous image vegetarian refreshments of the threshold value, is denoted as N1;
On straight line that is perpendicular to the cursor line and passing through second mark point and Ha Er response is obtained to be greater than
The number of the continuous image vegetarian refreshments of the threshold value, is denoted as N2;
The size for judging the N1 and N2, when the N1 is greater than N2, using first mark point as the starting point of pointer
Position, using second mark point as the final position of pointer, when the N1 is less than N2, using first mark point as
The final position of pointer, using second mark point as the start position of pointer;
According to the start position and the final position, the slope and intercept of the cursor line is calculated;
According to the training stage in advance in the calibration points of oil level gauge dial plate image tagged and the start position, the end
Point position, the slope and the intercept, are calculated the scale value that the cursor line is directed toward in oil level gauge dial plate image.
Preferably, described that the Kazakhstan of oil level gauge dial plate image is obtained to oil level gauge dial plate image progress Ha Er response computation
That response diagram, comprising:
The color of the oil level gauge dial plate image is converted into YCbCr color space from RGB color;
Difference Calculation is carried out using red color component value and luminance component, obtains corresponding color difference diagram;
Ha Er response computation is carried out to the color difference diagram, obtains the Ha Er response diagram of oil level gauge dial plate image.
Preferably, described that Ha Er response computation is carried out to the color difference diagram, obtain the Ha Er of oil level gauge dial plate image
The process of response diagram includes:
Using predetermined angle as step-length, the color difference diagram is rotated, and to the color difference of each rotation angle
Image is once traversed, and the Ha Er response of each pixel is calculated;
Successively choose maximum Ha Er response of each pixel under different rotary angle, and by the maximum
Final Ha Er response of the Ha Er response as the pixel;
The final Ha Er response of each pixel is combined, the Ha Er response of oil level gauge dial plate image is formed
Figure.
Preferably, the process for obtaining each Local modulus maxima in the Ha Er response diagram includes:
The Ha Er response diagram is traversed, the pixel that Ha Er response is greater than the threshold value is searched;
Successively in the local neighborhood of each pixel, judge whether the corresponding Ha Er response of the pixel is office
Portion's maximum point;
If it is, pixel and Local modulus maxima are stored in the form of corresponding relationship.
Preferably, described that each initial straight is obtained using line fitting method to each Local modulus maxima, according to
The threshold value is fitted amendment to each initial straight, obtains one group of straight line, by the Ha Er of pixel in each straight line
The maximum straight line of the sum of response includes: as the process of the cursor line in oil level gauge dial plate image
Using random sampling unification algorism, from all Local modulus maximas, each optionally two of them local maximum
Point carries out straight line fitting, obtains initial straight;
It is less than the Local modulus maxima of the threshold value using the remaining distance to the initial straight, to described initial straight
Line is fitted amendment, obtains a candidate straight line;
After being traversed to the Local modulus maxima, all candidate straight line set are obtained comprising a plurality of candidate straight
One group of straight line of line;
The sum of the Ha Er response of pixel on every straight line is successively calculated, and the sum of described Ha Er response is made
For the confidence level of the straight line, and using the highest straight line of confidence level as the cursor line in oil level gauge dial plate image.
A kind of oil level detection system, comprising:
Dial plate image acquisition unit is believed for obtaining oil level gauge image according to the gradient angle descriptor of oil level gauge dial plate
Breath carries out template-matching operation to the oil level gauge image, obtains oil level gauge dial plate image;
Ha Er response unit carries out Ha Er response computation for the oil level gauge dial plate image, obtains oil level gauge dial plate figure
The Ha Er response diagram of picture;
Statistic unit is looked into for carrying out histogram information statistics to each Ha Er response in the Ha Er response diagram
The percentage for finding the Ha Er response quantity Zhan Haer response total quantity of high numerical value is the quantile of preset percentage, by institute
The corresponding Ha Er response of quantile is stated as threshold value;
Local modulus maxima acquiring unit, for obtaining each Local modulus maxima in the Ha Er response diagram;
Cursor line acquiring unit is each initial straight for being obtained to each Local modulus maxima using line fitting method
Line is fitted amendment to each initial straight according to the threshold value, obtains one group of straight line, by pixel in each straight line
The maximum straight line of the sum of Ha Er response as the cursor line in oil level gauge dial plate image;
Pointer position acquiring unit as first is marked respectively for choosing two different points of position in the cursor line
Note point and the second mark point;On straight line that is perpendicular to the cursor line and passing through first mark point and Ha Er is obtained to ring
The number of the continuous image vegetarian refreshments greater than the threshold value should be worth, be denoted as N1;It obtains perpendicular to the cursor line and passes through described the
On the straight line of two mark points and Ha Er response is greater than the number of the continuous image vegetarian refreshments of the threshold value, is denoted as N2;Described in judgement
The size of N1 and N2, using first mark point as the start position of pointer, described second is marked when the N1 is greater than N2
It final position of the note point as pointer, will using first mark point as the final position of pointer when the N1 is less than N2
Start position of second mark point as pointer;
First computing unit, for the cursor line to be calculated according to the start position and the final position
Slope and intercept;
Second computing unit, for according to the training stage in advance in the calibration points of oil level gauge dial plate image tagged, Yi Jisuo
Start position, the final position, the slope and the intercept are stated, the cursor line is calculated in oil level gauge dial plate image
The scale value of middle direction.
Preferably, in above-mentioned oil level detection system, the Ha Er response unit, comprising:
Color conversion subunit, for the color of the oil level gauge dial plate image to be converted to YCbCr from RGB color
Color space;
Difference diagram converting unit obtains corresponding face for carrying out Difference Calculation using red color component value and luminance component
Color difference component;
Sub- response unit obtains oil level gauge dial plate image for carrying out Ha Er response computation to the color difference diagram
Ha Er response diagram.
Preferably, in above-mentioned oil level detection system, the sub- response unit includes:
Ha Er response computing unit, for being rotated to the color difference diagram, and right using predetermined angle as step-length
The color difference image of each rotation angle is once traversed, and the Ha Er response of each pixel is calculated;
Subelement is chosen, for successively choosing maximum Ha Er response of each pixel under different rotary angle
Value, and using the maximum Ha Er response as the final Ha Er response of the pixel;
Subelement is combined, for the final Ha Er response of each pixel to be combined, forms oil level gauge dial plate
The Ha Er response diagram of image.
Preferably, in above-mentioned oil level detection system, the Local modulus maxima acquiring unit includes:
Subelement is searched, for traversing the Ha Er response diagram, searches the pixel that Ha Er response is greater than the threshold value;
Judgment sub-unit, for successively in the local neighborhood of each pixel, judging the corresponding Kazakhstan of the pixel
Whether your response is Local modulus maxima, if it is, executing storing sub-units;
The storing sub-units, for storing pixel and Local modulus maxima in the form of corresponding relationship.
Preferably, in above-mentioned oil level detection system, the cursor line acquiring unit includes:
Straight line fitting subelement, for using random sampling unification algorism, from all Local modulus maximas, every time optionally
Two of them Local modulus maxima carries out straight line fitting, obtains initial straight;
Revise subelemen, for being less than the local maximum of the threshold value using the remaining distance to the initial straight
Point is fitted amendment to the initial straight, obtains a candidate straight line;
Gather subelement, for after traversing to the Local modulus maxima, all candidate straight line set to obtain
One group of straight line comprising a plurality of candidate straight line;
Cursor line obtains subelement, for successively calculating the sum of the Ha Er response of pixel on every straight line, and
Confidence level by the sum of described Ha Er response as the straight line, and using the highest straight line of confidence level as oil level gauge dial plate image
In cursor line.
It can be seen from the above technical scheme that the invention discloses a kind of oil level detection method and system, according to oil level
The geometrical characteristic and oil level gauge dial plate grayscale information characteristic distributions of the cursor line of table carry out Ha Er response to oil level gauge dial plate image
It calculates, obtains corresponding Ha Er response diagram, since there is higher Ha Er response in cursor line region relative to non-pointer region, because
This, the present invention counts the distribution of Ha Er response by histogram, and the quantile for meeting preset requirement is corresponding
Ha Er response filters out the Local modulus maxima in Ha Er response diagram as threshold value.Due in the set of Local modulus maxima
It include some points as straight line fitting in cursor line, therefore, the present invention is by the method for straight line fitting, by Ha Er response
The sum of maximum straight line as the cursor line in oil level gauge dial plate image, finally according to the start position of cursor line, final position,
Slope, intercept and training stage obtain cursor line in oil level gauge dial plate in the calibration points of oil level gauge dial plate image tagged in advance
The scale value being directed toward in image.As can be seen that the present invention is compared to existing technologies, collection in worksite number is removed without patrol officer
According to, therefore reached while completing patrol task, manpower is liberated, the purpose of security risk is reduced.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
Disclosed attached drawing obtains other attached drawings.
Fig. 1 is a kind of oil level detection method flow diagram disclosed by the embodiments of the present invention;
Fig. 2 is a kind of structural schematic diagram of oil level detection system disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of oil level detection method and system, to realize while completing patrol task,
Manpower is liberated, security risk is reduced.
Basic scheme of the invention are as follows: demand is detected based on oil level gauge instruction state, it is first determined oil level gauge is in acquisition
Position in oil level gauge image;Then after oil level table object determines, pointer line position is found within the scope of oil level gauge dial plate;Most
Afterwards according to dial reading rule, the current instruction state of oil level gauge is calculated.
Concrete scheme is as follows:
Referring to Fig. 1, a kind of oil level detection method flow diagram disclosed by the embodiments of the present invention, comprising steps of
Step S10, Image Acquisition is carried out to target oil level gauge, using the image collected as oil level gauge image;
Step S11, according to the gradient angle descriptor information of oil level gauge dial plate, template is carried out to the oil level gauge image
With operation, oil level gauge dial plate image is obtained;
Wherein, oil level gauge image is obtained using video camera.
Gradient angle descriptor is a kind of feature for describing image detail, is obtained in the training stage.
The acquisition process of gradient angle descriptor is specific as follows:
(1) training image of oil level gauge is obtained using video camera, and is obtained only from the training image comprising oil level gauge table
The dial plate subject area of disk;
(2) apply for one piece and training image memory headroom of the same size, for storing the mould obtained according to training image
Plate image (i.e. Mask figure), the template image are a black and white binary image, and white area indicates dial plate subject area, black region
Other background areas other than domain representation dial plate subject area;
(3) it for dial plate subject area, presses from left to right, then sequence from top to bottom, successively calculates each pixel
Thus gradient value and angle value obtain the gradient angle descriptor information of oil level gauge dial plate, and save into memory.
Step S12, Ha Er response computation is carried out to the oil level gauge dial plate image and obtains the Ha Er of oil level gauge dial plate image
Response diagram;
It is covered it should be noted that the Lis Hartel in Ha Er response diagram levies (haar) You Haer template filled black region
The difference of the sum of the pixel value that is covered with white filling region of the sum of pixel value sum (black) sum (white) indicate:
Sum (black)-sum (white) or sum (white)-sum (black).
Step S13, threshold value is obtained according to the Ha Er response diagram;
Specifically, carrying out histogram information statistics to each Ha Er response in the Ha Er response diagram, height is found
The percentage of the Ha Er response quantity Zhan Haer response total quantity of numerical value is the quantile of preset percentage, by the quartile
The corresponding Ha Er response of point is as threshold value;
Wherein, depending on the numerical value concrete foundation actual needs of preset percentage, such as 75%, the present invention does not limit herein
It is fixed.
Step S14, each Local modulus maxima in the Ha Er response diagram is obtained;
It should be noted that step S13 and step S14 in practical implementation, do not fix sequencing, Ke Yixian
Step S13 is executed, it is rear to execute step S14, or step S14 is first carried out, rear execution step S13 or two steps are held simultaneously
Row.
Step S15, the cursor line in oil level gauge dial plate image is obtained according to Local modulus maxima and threshold value;
Specifically, each initial straight is obtained using line fitting method to each Local modulus maxima, according to described
Threshold value is fitted amendment to each initial straight, obtains one group of straight line, and the Ha Er of pixel in each straight line is responded
The maximum straight line of the sum of value is as the cursor line in oil level gauge dial plate image.
Step S16, start position and the final position of cursor line are obtained;
Specifically, obtaining the pixel for being greater than the threshold value perpendicular to the continuous and Ha Er response of the cursor line
Number, using the position of the cursor line with most pixels as the start position of pointer, by the position with minimum pixel
Final position as pointer;Or two different positions point in the cursor line is intercepted at random, it is denoted as the first mark point
With the second mark point, on straight line that is perpendicular to the cursor line and passing through first mark point and Ha Er response is obtained
Greater than the number of the continuous image vegetarian refreshments of the threshold value, it is denoted as N1;It obtains perpendicular to the cursor line and passes through second mark
Remember that on the straight line selected and Ha Er response is greater than the number of the continuous image vegetarian refreshments of the threshold value, is denoted as N2;Judge the N1 and
The size of N2, when the N1 is greater than N2, using first mark point as the start position of pointer, by second mark point
It,, will be described using first mark point as the final position of pointer when the N1 is less than N2 as the final position of pointer
Start position of second mark point as pointer.
Step S17, according to the start position and the final position, the slope of the cursor line is calculated and cuts
Away from;
Step S18, according to the training stage in advance in the calibration points of oil level gauge dial plate image tagged and the parameter of cursor line
The scale value that the cursor line is directed toward in oil level gauge dial plate image is calculated in information.
The parameter information of cursor line includes: start position, final position, slope and intercept.
Wherein, process of the training stage in oil level gauge dial plate image tagged calibration points are as follows: on the training image of oil level gauge
The calibration points in dial plate are marked, and the position of each calibration points is recorded, then, according to the calibration points of label, are manually entered
Corresponding scale value, and saved.
It in summary it can be seen, the present invention is according to the geometrical characteristic and oil level gauge dial plate grayscale information of the cursor line of oil level gauge point
Cloth feature carries out Ha Er response computation to oil level gauge dial plate image, obtains corresponding Ha Er response diagram, and primary filtration background is dry
It disturbs;Since there is higher Ha Er response in cursor line region relative to non-pointer region, the present invention is by histogram to Kazakhstan
You are counted in the distribution of response, and using the corresponding Ha Er response of the quantile for meeting preset requirement as threshold value, screening
Local modulus maxima in Ha Er response diagram out, further filter background interference;Due to including in the set of Local modulus maxima
There are some points as straight line fitting in cursor line, therefore, the present invention is by the method for straight line fitting, by the sum of Ha Er response
Maximum straight line as the cursor line in oil level gauge dial plate image, finally according to the start position of cursor line, final position, tiltedly
Rate, intercept and training stage obtain cursor line in oil level gauge dial plate figure in the calibration points of oil level gauge dial plate image tagged in advance
The scale value being directed toward as in.As can be seen that the present invention is compared to existing technologies, collection in worksite data are gone without patrol officer,
Therefore reached while completing patrol task, liberated manpower, reduce the purpose of security risk.
Of course, it should be understood that if oil level is too low or when oil liquid cannot be replenished in time, may will affect equipment just
It is often used, therefore, when oil level is too low, in order to make prompting in time to user, after the step S18, can also wrap
It includes: judging whether cursor line scale value pointed in oil level gauge dial plate is greater than preset value, if not, outputting alarm is believed
Number.
In order to further optimize the above embodiments, step S12 is specifically included:
It step S121, is that YCbCr color is empty from RGB (RGB) color space conversion by the color of oil level gauge dial plate image
Between;
Wherein, YCbCr can be sometimes written as: YCBCR or Y'CBCR, be one kind of color space, it will usually be used for
In image continuous processing or digital photographic systems in film.Y' is brightness (luma) ingredient of color and CB and CR are then
Blue and red concentration excursion amount composition.Y' and Y are different, and Y is exactly so-called lumen, are indicated the concentration of light and are non-
Linearly, using gamma-corrected (gamma correction) coded treatment.
Step S122, Difference Calculation is carried out using red color component value and luminance component, obtains corresponding color difference diagram;
Step S123, Ha Er response computation is carried out to the color difference diagram, the Ha Er for obtaining oil level gauge dial plate image is rung
Ying Tu.
In order to further optimize the above embodiments, step S123 is specifically included:
Step S1231, using predetermined angle as step-length, the color difference diagram is rotated, and to each rotation angle
Color difference image once traversed, the Ha Er response of each pixel is calculated;
Depending on the numerical value concrete foundation actual needs of the predetermined angle, such as 10 °.
It should be noted that the oil level list index of practical substation field may be directed toward any angle, refer in order to allow
Needlework and Ha Er template matching, can rotate the color difference diagram, and using predetermined angle as step-length to each rotation angle
The color difference image of degree is once traversed, and the Ha Er response of each pixel is calculated.
Step S1232, maximum Ha Er response of each pixel under different rotary angle is successively chosen, and
Using the maximum Ha Er response as the final Ha Er response of the pixel;
Step S1233, the final Ha Er response of each pixel is combined, forms oil level gauge dial plate image
Ha Er response diagram.
In order to further optimize the above embodiments, step S14 is specifically included:
Step S141, Ha Er response diagram is traversed, the pixel that Ha Er response is greater than threshold value is searched;
Step S142, successively in the local neighborhood of each pixel, judge the corresponding Ha Er response of the pixel
Whether value is Local modulus maxima, if so, thening follow the steps S143;
Step S143, pixel and Local modulus maxima are stored in the form of corresponding relationship.
It should be noted that then excluding the pixel when the corresponding Ha Er response of pixel is not Local modulus maxima
Point.
In order to further optimize the above embodiments, step S15 is specifically included:
Step S151, using random sampling unification algorism, from all Local modulus maximas, each optionally two of them office
Portion's maximum point carries out straight line fitting, obtains initial straight;
Wherein, random sampling unification algorism (RANdom Sample Consensus, RANSAC) is a kind of according to one group of packet
Sample data set containing abnormal data calculates the mathematical model parameter of data, obtains the algorithm of effective sample data.
The basic assumption of RANSAC algorithm is in sample comprising correct data (inliers, the number that can be described by model
According to), also comprising abnormal data (outliers, deviation normal range (NR) is far, can not adapt to the data of mathematical model), i.e. data set
In contain noise.These abnormal datas may be due to generations such as wrong measurement, the calculating of hypothesis, mistake of mistake.Together
When RANSAC also assume that, give one group of correct data, there is the method that can calculate the model parameter for meeting these data.
Step S152, it is less than the Local modulus maxima of the threshold value using the remaining distance to the initial straight, it is right
The initial straight is fitted amendment, obtains a candidate straight line;
Wherein, by judging whether Local modulus maxima is less than threshold value to the distance of initial straight, to judge the local pole
Whether big value point is in initial straight.
Step S153, after being traversed to the Local modulus maxima, all candidate straight line set are obtained comprising more
One group of straight line of item candidate's straight line;
Step S154, the sum of the Ha Er response of pixel on every straight line is successively calculated, and the Ha Er is rung
It the sum of should be worth the confidence level as the straight line, and using the highest straight line of confidence level as the cursor line in oil level gauge dial plate image.
It in summary it can be seen, the present invention is according to the geometrical characteristic and oil level gauge dial plate grayscale information of the cursor line of oil level gauge point
Cloth feature carries out Ha Er response computation to the oil level gauge dial plate after progress color space conversion, obtains corresponding Ha Er response diagram,
Primary filtration background interference;Since there is higher Ha Er response in cursor line region relative to non-pointer region, the present invention
The distribution of Ha Er response is counted by histogram, and by the corresponding Ha Er response of the quantile for meeting preset requirement
As threshold value, the Local modulus maxima in Ha Er response diagram, further filter background interference are filtered out;Due to Local modulus maxima
Set in include some points as straight line fitting in cursor line, therefore, the present invention will be breathed out by the method for straight line fitting
The maximum straight line of the sum of your response as the cursor line in oil level gauge dial plate image, finally according to the start position of cursor line,
Final position, slope, intercept and training stage obtain cursor line in oil in the calibration points of oil level gauge dial plate image tagged in advance
The scale value being directed toward in the table dial plate image of position.As can be seen that the present invention is compared to existing technologies, scene is gone to without patrol officer
Data are acquired, therefore have been reached while completing patrol task, manpower is liberated, reduces the purpose of security risk.
Corresponding with above method embodiment, the invention also discloses a kind of oil level detection systems.
Referring to fig. 2, the structural schematic diagram of a kind of oil level detection system disclosed by the embodiments of the present invention, comprising:
Dial plate image acquisition unit 21, for obtaining oil level gauge image, according to the gradient angle descriptor of oil level gauge dial plate
Information carries out template-matching operation to the oil level gauge image, obtains oil level gauge dial plate image;
Wherein, oil level gauge image is obtained using video camera.
Gradient angle descriptor is a kind of feature for describing image detail, is obtained in the training stage.
The acquisition process of gradient angle descriptor is specific as follows:
(1) training image of oil level gauge is obtained using video camera, and is obtained only from the training image comprising oil level gauge table
The dial plate subject area of disk;
(2) apply for one piece and training image memory headroom of the same size, for storing the mould obtained according to training image
Plate image (i.e. Mask figure), the template image are a black and white binary image, and white area indicates dial plate subject area, black region
Other background areas other than domain representation dial plate subject area;
(3) it for dial plate subject area, presses from left to right, then sequence from top to bottom, successively calculates each pixel
Thus gradient value and angle value obtain the gradient angle descriptor information of oil level gauge dial plate, and save into memory.
Ha Er response unit 22 carries out Ha Er response computation for the oil level gauge dial plate image, obtains oil level gauge dial plate
The Ha Er response diagram of image;
It is covered it should be noted that the Lis Hartel in Ha Er response diagram levies (haar) You Haer template filled black region
The difference of the sum of the pixel value that is covered with white filling region of the sum of pixel value sum (black) sum (white) indicate:
Sum (black)-sum (white) or sum (white)-sum (black).
Statistic unit 23, for carrying out histogram information statistics to each Ha Er response in the Ha Er response diagram,
The percentage for finding the Ha Er response quantity Zhan Haer response total quantity of high numerical value is the quantile of preset percentage, will
The corresponding Ha Er response of the quantile is as threshold value;
Wherein, depending on the numerical value concrete foundation actual needs of preset percentage, such as 75%, the present invention does not limit herein
It is fixed.
Local modulus maxima acquiring unit 24, for obtaining each Local modulus maxima in the Ha Er response diagram;
Cursor line acquiring unit 25, it is each initial for being obtained to each Local modulus maxima using line fitting method
Straight line is fitted amendment to each initial straight according to the threshold value, obtains one group of straight line, by pixel in each straight line
The maximum straight line of the sum of the Ha Er response of point is as the cursor line in oil level gauge dial plate image;
Pointer position acquiring unit 26, for being respectively for choosing two different points of position in the cursor line
First mark point and the second mark point;Obtain perpendicular to the cursor line and pass through first mark point straight line on and
Ha Er response is greater than the number of the continuous image vegetarian refreshments of the threshold value, is denoted as N1;It obtains perpendicular to the cursor line and passes through
On the straight line of second mark point and Ha Er response is greater than the number of the continuous image vegetarian refreshments of the threshold value, is denoted as N2;Sentence
The size of the N1 and N2 of breaking regard first mark point as the start position of pointer when the N1 is greater than N2, will described in
Final position of second mark point as pointer, when the N1 is less than N2, using first mark point as the terminal of pointer
Position, using second mark point as the start position of pointer or pointer position acquiring unit 26 for obtain perpendicular to
The continuous and Ha Er response of the cursor line is greater than the number of the pixel of the threshold value, by the position with most pixels
The start position as pointer is set, using the position with minimum pixel as the final position of pointer;
First computing unit 27, for the cursor line to be calculated according to the start position and the final position
Slope and intercept;
Second computing unit 28, for according to the training stage in advance in the calibration points of oil level gauge dial plate image tagged, and
The cursor line is calculated in oil level gauge dial plate figure in the start position, the final position, the slope and the intercept
The scale value being directed toward as in.
Wherein, process of the training stage in oil level gauge dial plate image tagged calibration points are as follows: on the training image of oil level gauge
The calibration points in dial plate are marked, and the position of each calibration points is recorded, then, according to the calibration points of label, are manually entered
Corresponding scale value, and saved.
It in summary it can be seen, the present invention is according to the geometrical characteristic and oil level gauge dial plate grayscale information of the cursor line of oil level gauge point
Cloth feature carries out Ha Er response computation to the oil level gauge dial plate after progress color space conversion, obtains corresponding Ha Er response diagram,
Primary filtration background interference;Since there is higher Ha Er response in cursor line region relative to non-pointer region, the present invention
The distribution of Ha Er response is counted by histogram, and by the corresponding Ha Er response of the quantile for meeting preset requirement
As threshold value, the Local modulus maxima in Ha Er response diagram, further filter background interference are filtered out;Due to Local modulus maxima
Set in include some points as straight line fitting in cursor line, therefore, the present invention will be breathed out by the method for straight line fitting
The maximum straight line of the sum of your response as the cursor line in oil level gauge dial plate image, finally according to the start position of cursor line,
Final position, slope, intercept and training stage obtain cursor line in oil in the calibration points of oil level gauge dial plate image tagged in advance
The scale value being directed toward in the table dial plate image of position.As can be seen that the present invention is compared to existing technologies, scene is gone to without patrol officer
Data are acquired, therefore have been reached while completing patrol task, manpower is liberated, reduces the purpose of security risk.
In order to further optimize the above embodiments, Ha Er response unit 22 includes:
Color conversion subunit 221, for being converted to the color of the oil level gauge dial plate image from RGB color
YCbCr color space;
First computation subunit 222 obtains corresponding for carrying out Difference Calculation using red color component value and luminance component
Color difference diagram;
Sub- response unit 223 obtains oil level gauge dial plate image for carrying out Ha Er response computation to the color difference diagram
Ha Er response diagram.
In order to further optimize the above embodiments, sub- response unit 223 includes:
Second computation subunit 2231, for being rotated to the color difference diagram, and right using predetermined angle as step-length
The color difference image of each rotation angle is once traversed, and the Ha Er response of each pixel is calculated;
Depending on the numerical value concrete foundation actual needs of predetermined angle, such as 10 °.
It should be noted that the oil level list index of practical substation field may be directed toward any angle, refer in order to allow
Needlework and Ha Er template matching, can rotate the color difference diagram, and using predetermined angle as step-length to each rotation angle
The color difference image of degree is once traversed, and the Ha Er response of each pixel is calculated.
Subelement 2232 is chosen, for successively choosing maximum Ha Er of each pixel under different rotary angle
Response, and using the maximum Ha Er response as the final Ha Er response of the pixel;
Subelement 2233 is combined, for the final Ha Er response of each pixel to be combined, forms oil level gauge
The Ha Er response diagram of dial plate image.
In order to further optimize the above embodiments, Local modulus maxima acquiring unit 24 includes:
Subelement 241 is searched, for traversing the Ha Er response diagram, searches the pixel that Ha Er response is greater than the threshold value
Point;
Judgment sub-unit 242, for successively in the local neighborhood of each pixel, judging that the pixel is corresponding
Whether Ha Er response is Local modulus maxima, if it is, executing storing sub-units 243;
Storing sub-units 243, for storing pixel and Local modulus maxima in the form of corresponding relationship.
It should be noted that then excluding the pixel when the corresponding Ha Er response of pixel is not Local modulus maxima
Point.
In order to further optimize the above embodiments, cursor line acquiring unit 25 includes:
Straight line fitting subelement 251, for using random sampling unification algorism, from all Local modulus maximas, every time
Optional two of them Local modulus maxima carries out straight line fitting, obtains initial straight;
Wherein, random sampling unification algorism (RANdom Sample Consensus, RANSAC) is a kind of according to one group of packet
Sample data set containing abnormal data calculates the mathematical model parameter of data, obtains the algorithm of effective sample data.
The basic assumption of RANSAC algorithm is in sample comprising correct data (inliers, the number that can be described by model
According to), also comprising abnormal data (outliers, deviation normal range (NR) is far, can not adapt to the data of mathematical model), i.e. data set
In contain noise.These abnormal datas may be due to generations such as wrong measurement, the calculating of hypothesis, mistake of mistake.Together
When RANSAC also assume that, give one group of correct data, there is the method that can calculate the model parameter for meeting these data.
Revise subelemen 252, for being less than the local pole of the threshold value using the remaining distance to the initial straight
Big value point, is fitted amendment to the initial straight, obtains a candidate straight line;
Wherein, by judging whether Local modulus maxima is less than threshold value to the distance of initial straight, to judge the local pole
Whether big value point is in initial straight.
Gather subelement 253, for after being traversed to the Local modulus maxima, by all candidate straight line set,
Obtain one group of straight line comprising a plurality of candidate straight line;
Cursor line obtains subelement 254, for successively calculating the sum of the Ha Er response of pixel on every straight line,
And the confidence level by the sum of described Ha Er response as the straight line, and using the highest straight line of confidence level as oil level gauge dial plate figure
Cursor line as in.
It in summary it can be seen, the present invention is according to the geometrical characteristic and oil level gauge dial plate grayscale information of the cursor line of oil level gauge point
Cloth feature carries out Ha Er response computation to the oil level gauge dial plate after progress color space conversion, obtains corresponding Ha Er response diagram,
Primary filtration background interference;Since there is higher Ha Er response in cursor line region relative to non-pointer region, the present invention
The distribution of Ha Er response is counted by histogram, and by the corresponding Ha Er response of the quantile for meeting preset requirement
As threshold value, the Local modulus maxima in Ha Er response diagram, further filter background interference are filtered out;Due to Local modulus maxima
Set in include some points as straight line fitting in cursor line, therefore, the present invention will be breathed out by the method for straight line fitting
The maximum straight line of the sum of your response as the cursor line in oil level gauge dial plate image, finally according to the start position of cursor line,
Final position, slope, intercept and training stage obtain cursor line in oil in the calibration points of oil level gauge dial plate image tagged in advance
The scale value being directed toward in the table dial plate image of position.As can be seen that the present invention is compared to existing technologies, scene is gone to without patrol officer
Data are acquired, therefore have been reached while completing patrol task, manpower is liberated, reduces the purpose of security risk.
It should be noted that the concrete operating principle of each component part refers to embodiment of the method pair in system embodiment
Part is answered, details are not described herein again.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610187567.3A CN105893943B (en) | 2016-03-28 | 2016-03-28 | Method and system for detecting oil level |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610187567.3A CN105893943B (en) | 2016-03-28 | 2016-03-28 | Method and system for detecting oil level |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105893943A CN105893943A (en) | 2016-08-24 |
CN105893943B true CN105893943B (en) | 2019-05-07 |
Family
ID=57014036
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610187567.3A Active CN105893943B (en) | 2016-03-28 | 2016-03-28 | Method and system for detecting oil level |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105893943B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107895365B (en) * | 2017-11-01 | 2020-08-18 | 国网山东省电力公司电力科学研究院 | Image matching method and monitoring system for power transmission channel external damage protection |
CN111272256B (en) * | 2020-01-15 | 2021-05-18 | 南京智鹤电子科技有限公司 | Data processing method and device for oil level abnormity monitoring |
CN113483849B (en) * | 2021-07-01 | 2023-10-17 | 上海申瑞继保电气有限公司 | Dynamic monitoring method for liquid level of transformer |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620268A (en) * | 2008-06-30 | 2010-01-06 | 巨鸥科技股份有限公司 | Remote tracking system and method thereof |
CN103759758A (en) * | 2014-01-26 | 2014-04-30 | 哈尔滨工业大学 | Method for detecting position of automobile meter needle based on mechanical angle and scale identification |
-
2016
- 2016-03-28 CN CN201610187567.3A patent/CN105893943B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620268A (en) * | 2008-06-30 | 2010-01-06 | 巨鸥科技股份有限公司 | Remote tracking system and method thereof |
CN103759758A (en) * | 2014-01-26 | 2014-04-30 | 哈尔滨工业大学 | Method for detecting position of automobile meter needle based on mechanical angle and scale identification |
Non-Patent Citations (2)
Title |
---|
基于CANNY算子的自适应双阈值油罐油位红外成像检测;李滚;《电子测量与仪器学报》;20090930;第44-50页 |
基于图像处理的罐体液位检测方法的研究;杨秀君;《中国优秀硕士学位论文全文数据库信息科技辑》;20100115;I140-231 |
Also Published As
Publication number | Publication date |
---|---|
CN105893943A (en) | 2016-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105869164A (en) | Method and system for detecting on/off state of switch | |
US11587337B2 (en) | Intelligent image segmentation prior to optical character recognition (OCR) | |
JP6336117B2 (en) | Building height calculation method, apparatus and storage medium | |
CN112926685A (en) | Industrial steel oxidation zone target detection method, system and equipment | |
CN105893943B (en) | Method and system for detecting oil level | |
CN109447186A (en) | Clustering method and Related product | |
WO2021082428A1 (en) | Semi-supervised learning-based image classification method and apparatus, and computer device | |
JP2018017570A (en) | Rock mass strength determination device, rock mass strength determination method, and rock mass strength determination program | |
CN108470195A (en) | Video identity management method and device | |
WO2016199662A1 (en) | Image information processing system | |
CN107909544B (en) | Image correction method and system | |
CN110136196B (en) | Automatic bridge crack width measuring method | |
CN111044149A (en) | Method and device for detecting temperature abnormal point of voltage transformer and readable storage medium | |
CN105893938A (en) | Oil temperature gauge reading method and system | |
CN105095181A (en) | Spam comment detection method and device | |
CN106157298B (en) | A kind of circle detection method based on straightway | |
WO2016062259A1 (en) | Transparency-based matting method and device | |
CN114140747B (en) | Detection method of objects placed on the ground in elevators in multiple scenarios | |
CN109724993A (en) | Detection method, device and the storage medium of the degree of image recognition apparatus | |
CN109447902A (en) | A kind of image split-joint method, device, storage medium and equipment | |
CN107018380B (en) | A method and device for detecting the effectiveness of a preset position of a camera | |
CN105102607A (en) | Image processing device, program, storage medium, and image processing method | |
CN118982650A (en) | A state detection method, device and electronic equipment of a power supply lightning arrester | |
CN114235815A (en) | Method for detecting surface defects of outdoor electrical equipment of converter station based on scene filtering | |
CN105868763A (en) | Method and system for reading oil gauge |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |