A reading method of a pointer of a high-speed air gauge in a coal mine
By using video image processing algorithms to detect and upload the readings of high-speed ventilation gauges in coal mines in real time, the problem of manual recording methods has been solved. This enables non-contact real-time detection and uploading, reducing labor costs. The system hardware is simple and easy to maintain.
Patent Information
- Application Number
- CN202310005739.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-01-04
AI Technical Summary
The readings of high-speed ventilation gauges in underground coal mines need to be recorded manually, making it impossible to store and upload images in real time, which increases labor costs.
A video image processing-based approach, including grayscale processing, template matching, K-means clustering, and Hough transform algorithm, is used to detect and upload the readings of the high-speed wind gauge pointer in real time.
It achieves contactless real-time detection and uploading, reduces the intensity of manual recording, and features simple hardware, easy maintenance, and excellent algorithm robustness.
Smart Images

Figure CN115965610B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of visual image processing algorithms in coal mines, and in particular to a method for reading the pointer indication of a high-speed anemometer in a coal mine. BACKGROUND
[0002] At present, machine vision has relatively mature application cases in multiple fields, such as industrial visual detection, medical image diagnosis, intelligent driving and video analysis, etc. High-efficiency and accurate detection can be achieved by using visual image processing algorithms. In the coal industry, machine visual image processing algorithms are gradually applied to multiple scenes in coal mines. Since machine visual algorithms are the leading technology for non-contact identification and measurement of objects, and have the advantages of low cost and easy maintenance, they gradually replace traditional sensors in the coal field.
[0003] The pointer indication of the high-speed anemometer in the coal mine is currently recorded by manual operation, and it is impossible to store real-time images and upload the pointer indication of the high-speed anemometer to the database, and the labor cost is increased.
[0004] In order to improve the intelligent transcription and upload of the pointer indication of the high-speed anemometer in the coal mine and reduce the labor cost, a method for reading the pointer indication of the high-speed anemometer in the coal mine is proposed. SUMMARY
[0005] The present application aims to at least solve one of the technical problems existing in the prior art.
[0006] To this end, the present application proposes a method for reading the pointer indication of the high-speed anemometer in the coal mine, which can realize real-time detection and upload of the high-speed anemometer indication, greatly reduce the labor cost, and the system hardware is simple and easy to maintain, and the algorithm robustness is relatively good.
[0007] The method for reading the pointer indication of the high-speed anemometer in the coal mine according to the embodiment of the present application comprises the following steps:
[0008] Step 1, the front-end intelligent camera acquires real-time video frames;
[0009] Step 2, image preprocessing operation is performed on the acquired real-time video frames, and the image preprocessing operation includes grayscale processing of the image;
[0010] Step 3, a template matching algorithm is used to preliminarily judge whether there is a high-speed anemometer in the image picture after grayscale processing; when it is judged that there is no high-speed anemometer in the picture, the stage of acquiring real-time video frames by the front-end intelligent camera is returned to; when it is judged that there is a high-speed anemometer in the picture, the next step is entered;
[0011] Step 4, the specific position of the template matching high-speed anemometer is matched;
[0012] Step 5, the image of the high-speed anemometer is binarized and segmented by using the K-means clustering algorithm;
[0013] Step 6, the circles and the circle centers of the binarized and segmented high-speed anemometer image are found by using the Hough transform algorithm;
[0014] Step 7, two circle centers meeting the requirements are screened out by using the prior knowledge of the circle center of the minute dial and the prior knowledge of the circle center of the second dial in the high-speed anemometer;
[0015] Step 8, the minute dial angle value and the second dial angle value are respectively calculated by taking the screened-out two circle centers as the pointer origin;
[0016] Step 9, the minute dial angle value and the second dial angle value are converted into the actual total dial scale value;
[0017] Step 10, the actual total dial scale value is displayed in the real-time frame picture, and is uploaded to the database, and the real-time frame picture is saved to the local.
[0018] The present application has the advantages that the detection algorithm based on video image processing belongs to a non-contact recognition algorithm, can realize real-time detection and uploading of the high-speed anemometer reading, can realize accurate reading of the high-speed anemometer pointer reading and uploading of the reading to the database, has simple system hardware structure, is easy to install and maintain, reduces the strength of manual patrol and recording of the pointer reading, greatly reduces the labor cost, and has good robustness.
[0019] According to one embodiment of the present application, in Step 3, when it is preliminarily judged by using the template matching algorithm that there is no high-speed anemometer in the image picture after the grayscale processing, the next frame of image after the grayscale processing is re-acquired for matching.
[0020] According to one embodiment of the present application, in Step 3, when it is preliminarily judged by using the template matching algorithm that there is a high-speed anemometer in the image picture after the grayscale processing, and the matched high-speed anemometer meets the threshold value set by the template matching algorithm, the next step is entered.
[0021] According to one embodiment of the present application, in Step 4, the template matching algorithm is used for fine matching, the rectangular image coordinates of the template matching are acquired, and the rectangular image is taken as the input part of the K-means clustering algorithm processing in the next stage.
[0022] According to one embodiment of the present application, in Step 5, the K-means clustering algorithm is used for binarization and segmentation processing of the rectangular image after the template matching.
[0023] According to one embodiment of the present application, in Step 6, the Hough transform algorithm is used to find all the circles and the circle centers in the rectangular image after the binarization and segmentation.
[0024] According to one embodiment of the present application, the specific process of the K-means clustering algorithm is as follows:
[0025] Step 5.1, randomly selecting clustering centers;
[0026] Step 5.2, according to the current clustering centers, using the selected measurement method, classifying all sample points;
[0027] Step 5.3, calculating the mean of the sample points of each class at the current time as the clustering center of the next iteration;
[0028] Step 5.4, calculating the gap between the clustering center of the next iteration and the current clustering center;
[0029] Step 5.5, when the gap in step 5.4 is less than the given iteration threshold, the iteration ends; when the gap in step 5.4 is greater than or equal to the given iteration threshold, then go back to step 5.2 to continue the next iteration.
[0030] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and attained by the structure particularly pointed out in the description, claims, and drawings.
[0031] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0033] Figure 1 is a flow chart of the present application;
[0034] Figure 2 is a high-speed anemometer template diagram;
[0035] Figure 3 is a high-speed anemometer gray-scale diagram after gray-scale processing;
[0036] Figure 4 is a specific position diagram of the high-speed anemometer template matching;
[0037] Figure 5 is an image after the high-speed anemometer is segmented by the K-means algorithm;
[0038] Figure 6 is a minute hand rotating instantaneous image;
[0039] Figure 7 is a second hand rotating instantaneous image;
[0040] Figure 8 is a total scale value image of a real-time frame picture. DETAILED DESCRIPTION
[0041] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0042] In the description of the present application, it should be understood that the terms "one side", "the other side", "both sides", "between", "middle", "upper end", "lower end" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0043] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the terms "set", "connected" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrally connected, it can be directly connected, or it can be indirectly connected through an intermediate medium. For a person of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0044] The coal mine underground high-speed air gauge pointer reading method according to the embodiments of the present application will be described in detail below with reference to the drawings.
[0045] See Figures 1-8 The coal mine underground high-speed air gauge pointer reading method according to the embodiments of the present application will be described in detail below with reference to the drawings.
[0046] Step 1, the front-end intelligent camera acquires real-time video frames; the front-end intelligent camera is a hardware device integrating data acquisition and analysis.
[0047] Step 2, image preprocessing operation is performed on the acquired real-time video frames, and the image preprocessing operation includes grayscale processing of the image, that is, grayscale processing of the image collected by the front-end intelligent camera.
[0048] Step 3, using a template matching algorithm to preliminarily determine whether there is a high-speed anemometer in the image frame after the grayscale processing; when it is determined that there is no high-speed anemometer in the image frame, return to the stage of acquiring real-time video frames by the front-end intelligent camera; when it is determined that there is a high-speed anemometer in the image frame, proceed to the next step.
[0049] Specifically, in Step 3, when it is preliminarily determined by the template matching algorithm that there is no high-speed anemometer in the image frame after the grayscale processing, the next frame of the image after the grayscale processing is re-acquired for matching.
[0050] In Step 3, when it is preliminarily determined by the template matching algorithm that there is a high-speed anemometer in the image frame after the grayscale processing, and the matched high-speed anemometer meets the threshold set by the template matching algorithm, proceed to the next step.
[0051] R(x, y) =∑ x′,y′ (T(x', y')·I(x+x', y+y')) (1)
[0052] In formula (1), the meanings of the symbols are as follows:
[0053] T represents a template image;
[0054] I represents a to-be-matched image;
[0055] (x, y) represents the coordinates of the top-left element of the current search frame in the to-be-matched image matrix;
[0056] (x', y') represents the element coordinates of the matrix of the template image and the to-be-matched image framed by the search frame;
[0057] w represents the width of the picture;
[0058] h represents the height of the picture.
[0059] The method uses a multiplication operation between the template and the image, and the greater the value of R(x, y) is, the higher the matching degree is, and the smaller the value of R(x, y) is, the worse the matching result is.
[0060] Step 4, specific location of the template-matched high-speed anemometer;
[0061] Specifically, in Step 4, a fine matching is performed by using the template matching algorithm, the rectangular image coordinates of the template matching are acquired, and the rectangular image is taken as the input part of the K-means clustering algorithm processing in the next stage.
[0062] Step 5, binarization and segmentation of the image of the high-speed anemometer by using the K-means clustering algorithm;
[0063] Specifically, in the fifth step, the K-means clustering algorithm is used to perform binary segmentation on the rectangular image matched with the template.
[0064] The specific process of the K-means clustering algorithm is as follows:
[0065] Step 5.1, randomly select a cluster center;
[0066] Step 5.2, according to the current cluster center, use the selected measurement method to classify all sample points;
[0067] Step 5.3, calculate the mean of the sample points of each class as the cluster center for the next iteration;
[0068] Step 5.4, calculate the difference between the cluster center for the next iteration and the current cluster center;
[0069] Step 5.5, when the difference in step 5.4 is less than a given iteration threshold, the iteration ends; when the difference in step 5.4 is greater than or equal to the given iteration threshold, return to step 5.2 for the next iteration, and the formula is as follows:
[0070]
[0071] In formula (2), the meanings of the symbols are as follows:
[0072] c (i) represents the most similar class of the sample point, i.e. the sample point is classified into this class;
[0073] x (i) represents a sample point, i = 1, 2, 3, …, n, a total of n sample points, i is a positive integer;
[0074] μ j represents a cluster center, j = 1, 2, 3, …, k, a total of k classes, k is a positive integer.
[0075] Step 6, use the Hough transform algorithm to find the circle and the center of the high-speed anemometer image after binary segmentation;
[0076] Specifically, in the sixth step, the Hough transform algorithm is used to find all circles and centers in the rectangular image after binary segmentation.
[0077] The principle of the Hough transform algorithm is as follows:
[0078] Step 6.1, the equation of a circle can be expressed as: The parameters x0, y0, r0 determine a circle; where (x, y) represents the coordinates of a point on the circumference; (x0, y0) represents the coordinates of the center; r0 represents the radius of the circle.
[0079] Step 6.2, discretize parameters x0, y0, r0, traverse each point on the planar image, accumulate possible formed circle x0, y0, r0 parameters, find global maximum or local maximum in x0, y0, r0 parameter space to detect valid circle;
[0080] Step 6.3, the equation of the circle can also be expressed as: x = x0 + r0cos(θ), y = y0 + r0sin(θ), parameters x0, y0, r0 determine a circle; wherein, θ represents the angle between the radius of the circle and the horizontal x axis;
[0081] Step 6.4, fix r0, traverse each point on the planar image, accumulate x0, y0 parameter space according to the formula x0 = x - r0cos(θ), y0 = y - r0sin(θ), find global maximum or local maximum in parameter space x0, y0 to detect valid circle with radius r0;
[0082] Step 6.5, multiple traversal of the planar image and selection of different radius r0 can detect any radius circle on the planar image.
[0083] Step 7, use the prior knowledge of the center of the minute dial in the high-speed anemometer and the prior knowledge of the center of the second dial to screen out two circle centers meeting the requirements;
[0084] Step 8, taking the two circle centers screened out as the origin of the pointer, respectively calculate the minute dial angle value θ m And the second dial angle value θ s ;
[0085] The calculation formula of the minute dial angle value θ m Is as follows:
[0086]
[0087] In formula (3), the meanings of various symbols are as follows:
[0088] (c mx , c my ) represents the origin coordinates of the minute pointer;
[0089] (x m1 , y m1 ) represents the end coordinates of the minute pointer.
[0090] The calculation formula of the second dial angle value θ s Is as follows:
[0091]
[0092] In the formula (4), the meaning of each symbol is as follows:
[0093] (c sx , c sy ) represents the origin coordinate of the second hand;
[0094] (x s1 , y s1 ) represents the end coordinate of the minute hand.
[0095] Step 9, first convert the angle in Step 8 into radians, and then convert the minute scale angle value and the second scale angle value into the actual total scale value of the watch face;
[0096] The calculation formula of the radian rad m corresponding to the minute scale is as follows:
[0097]
[0098] In the formula (5), the meaning of each symbol is as follows:
[0099] minute_scale represents the minute scale.
[0100] The calculation formula of the radian rad s corresponding to the second scale is as follows:
[0101]
[0102] In the formula (6), the meaning of each symbol is as follows:
[0103] second_scale represents the second scale.
[0104] The calculation formula of the actual total scale value Total_scale is as follows:
[0105] Total_scale = floor(minute_scale * 100) + second_scale (7)
[0106] In the formula (7), the meaning of each symbol is as follows:
[0107] minute_scale represents the minute scale;
[0108] second_scale represents the second scale.
[0109] Step 10, display the actual total scale value in the real-time frame picture, upload the database, and save the real-time frame picture to the local.
[0110] The above steps are cyclically executed to obtain the high-speed wind gauge pointer real-time indication information.
[0111] The coal mine underground high-speed wind gauge pointer indication reading method, aiming at the factors such as small proportion of high-speed wind gauge in image and much background noise, adopts a template matching algorithm to realize coarse positioning and accurate positioning of the high-speed wind gauge position; aiming at the problem that the high-speed wind gauge binary segmentation threshold is difficult to determine under different scenes, a K-means clustering algorithm is adopted to obtain the threshold of real-time high-speed wind gauge binary segmentation; aiming at the problem that the Hough transform algorithm can find multiple circles and circle centers, the prior knowledge of the minute dial and second dial circle centers in the high-speed wind gauge is fully utilized to screen out two circle centers meeting the requirements; the obtained minute and second angle with the horizontal direction x-axis is converted into the actual dial scale value, and the sum of the minute scale value and the second scale value is calculated, and the total scale value is displayed in the high-speed wind gauge real-time picture, and the data is uploaded to the database. The present application can adapt to real-time detection of high-speed wind gauge indication under different scenes, and can meet the field requirements.
[0112] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can make equivalent replacement or change according to the technical solution and inventive concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for reading the pointer indication of a high speed air gauge in a coal mine underground, characterized in that, The method comprises the following steps: Step 1: a front-end intelligent camera acquires a real-time video frame; Step 2: image preprocessing is performed on the acquired real-time video frame, and the image preprocessing comprises grayscale processing on the image; Step 3: a template matching algorithm is used to preliminarily determine whether there is a high-speed anemometer in the image frame after grayscale processing; when it is determined that there is no high-speed anemometer in the image frame, the process returns to the stage of acquiring a real-time video frame by the front-end intelligent camera; when it is determined that there is a high-speed anemometer in the image frame, the process proceeds to the next step; Step 4: the specific position of the high-speed anemometer is matched by using a template matching algorithm; Step 5: a K-means clustering algorithm is used to binarize and segment the image of the high-speed anemometer; Step 6: a Hough transform algorithm is used to find the circles and the circle centers of the high-speed anemometer image after binarization and segmentation; Step 7: two circle centers meeting the requirements are screened out by using the prior knowledge of the minute hand dial circle center and the prior knowledge of the second hand dial circle center in the high-speed anemometer; Step 8: the two screened circle centers are taken as the pointer origin, and the minute hand dial angle value and the second hand dial angle value are calculated respectively; Step 9: the minute hand dial angle value and the second hand dial angle value are converted into actual dial total scale values; Step 10: the actual dial total scale values are displayed in the real-time frame image, and are uploaded to a database, and the real-time frame image is saved to a local.
2. The method for reading the pointer of the high-speed air gauge in the coal mine according to claim 1, characterized in that: In Step 3, when it is preliminarily determined by using the template matching algorithm that there is no high-speed anemometer in the image frame after grayscale processing, the next frame of image after grayscale processing is re-acquired for matching.
3. The method of reading the pointer of a high speed air gauge in a coal mine according to claim 1, characterized in that: In Step 3, when it is preliminarily determined by using the template matching algorithm that there is a high-speed anemometer in the image frame after grayscale processing, and the matched high-speed anemometer meets the threshold value set by the template matching algorithm, the process proceeds to the next step.
4. The method of reading the pointer of a high speed air gauge in a coal mine according to claim 3, characterized in that: In Step 4, a template matching algorithm is used for fine matching, the rectangular image coordinates of the template matching are acquired, and the rectangular image is taken as the input part of the K-means clustering algorithm in the next stage.
5. The method of reading the dial of a high speed air gauge according to claim 4, wherein: In Step 5, the K-means clustering algorithm is used to perform binarization and segmentation processing on the rectangular image after template matching.
6. The method of reading the indication of a high speed air gauge pointer in a coal mine according to claim 5, characterized in that: In Step 6, the Hough transform algorithm is used to find all the circles and the circle centers in the rectangular image after binarization and segmentation.
7. The method of reading the pointer of a high speed anemometer in a coal mine according to claim 1, characterized in that: The specific process of the K-means clustering algorithm is as follows: Step 5.1: a clustering center is randomly selected; Step 5.2: according to the current clustering center, all sample points are classified by using a selected measurement method; Step 5.3: the mean value of the sample points of each class is calculated, and is taken as the clustering center of the next iteration; Step 5.4: the difference between the clustering center of the next iteration and the current clustering center is calculated; Step 5.5: when the difference in Step 5.4 is less than a given iteration threshold value, the iteration ends; when the difference in Step 5.4 is greater than or equal to the given iteration threshold value, the process returns to Step 5.2 for the next iteration.
Citation Information
Patent Citations
Automatic pointer type instrument reading identification method based on scale searching
CN109993166A
Instrument pointer count reading method based on machine vision, and medium
CN113657339A