CN115272664A - Instrument panel display method and device, electronic equipment and storage medium - Google Patents
Instrument panel display method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115272664A CN115272664A CN202211078573.7A CN202211078573A CN115272664A CN 115272664 A CN115272664 A CN 115272664A CN 202211078573 A CN202211078573 A CN 202211078573A CN 115272664 A CN115272664 A CN 115272664A
- Authority
- CN
- China
- Prior art keywords
- instrument panel
- image
- dashboard
- reading
- display
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 98
- 230000011218 segmentation Effects 0.000 claims abstract description 122
- 238000003709 image segmentation Methods 0.000 claims abstract description 26
- 238000012545 processing Methods 0.000 claims description 73
- 238000012937 correction Methods 0.000 claims description 27
- 230000009466 transformation Effects 0.000 claims description 23
- 238000001914 filtration Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000001514 detection method Methods 0.000 claims description 13
- 238000003708 edge detection Methods 0.000 claims description 12
- 239000003086 colorant Substances 0.000 claims description 11
- 238000000605 extraction Methods 0.000 claims description 9
- 238000010606 normalization Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims 2
- 230000008569 process Effects 0.000 description 23
- 230000005540 biological transmission Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 12
- 230000006854 communication Effects 0.000 description 11
- 230000000694 effects Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000012706 support-vector machine Methods 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000004438 eyesight Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 235000002566 Capsicum Nutrition 0.000 description 1
- 239000006002 Pepper Substances 0.000 description 1
- 235000016761 Piper aduncum Nutrition 0.000 description 1
- 235000017804 Piper guineense Nutrition 0.000 description 1
- 244000203593 Piper nigrum Species 0.000 description 1
- 235000008184 Piper nigrum Nutrition 0.000 description 1
- 238000012952 Resampling Methods 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 150000003839 salts Chemical class 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 238000004800 variational method Methods 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the application discloses a method and a device for displaying the reading number of an instrument panel, electronic equipment and a storage medium. Acquiring an instrument panel image of equipment to be identified; the dashboard image includes dashboard readings; performing image segmentation on the instrument panel image, and determining the reading segmentation result of the instrument panel reading in the instrument panel image; identifying the reading segmentation result to obtain the reading of the instrument panel to be displayed; and sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display number of the instrument panel to be displayed. The embodiment of the application improves the accuracy of the identification of the dial indicator.
Description
Technical Field
The embodiment of the application relates to the technical field of data processing, in particular to a method and a device for displaying the indication number of an instrument panel, electronic equipment and a storage medium.
Background
The meter reading system is used for collecting the readings of the instrument panel and displaying the collection result. The acquisition meter reading device is equipment for acquiring the reading number of an instrument panel in a meter reading system, has excellent storage capacity and communication function, and has the defects of high cost, large volume, unchangeable program and the like.
With the development of image processing technology, meter reading systems gradually apply image processing technology to obtain the readings of instrument panels. However, the identification accuracy of the reading of the current instrument panel number identification system is low.
Disclosure of Invention
The application provides a method and a device for displaying the reading number of a dashboard, electronic equipment and a storage medium, so as to improve the accuracy of reading number identification of the dashboard.
In a first aspect, an embodiment of the present application provides a dashboard display method, which is applied to edge equipment, and the dashboard display method includes:
acquiring an instrument panel image of equipment to be identified; the dashboard image comprises a dashboard display;
performing image segmentation on the instrument panel image, and determining the reading segmentation result of the instrument panel reading in the instrument panel image;
identifying the reading segmentation result to obtain the reading of the instrument panel to be displayed;
and sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display number of the instrument panel to be displayed.
In a second aspect, an embodiment of the present application further provides an instrument panel display device configured at an edge device, where the instrument panel display device includes:
the image acquisition module is used for acquiring an instrument panel image of the equipment to be identified; the dial image comprises a gauge panel reading;
the image segmentation module is used for carrying out image segmentation on the instrument panel image and determining the reading segmentation result of the instrument panel reading in the instrument panel image;
the number reading identification module is used for identifying the number reading segmentation result to obtain the number reading of the instrument panel to be displayed;
and the connection request sending module is used for sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer and indicating the upper computer to display the display number of the instrument panel to be displayed.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement any of the dashboard display methods provided by the embodiments of the present application.
In a fourth aspect, embodiments of the present application further provide a storage medium including computer-executable instructions, which when executed by a computer processor, are configured to perform any one of the dashboard indicia presentation methods provided by the embodiments of the present application.
The method comprises the steps that an instrument panel image of equipment to be identified is obtained through edge equipment; the dashboard image includes a dashboard indication. The method comprises the steps that image segmentation is carried out on an instrument panel image by an edge device, a reading segmentation result of an instrument panel reading in the instrument panel image is determined, an interested area is obtained in the instrument panel image, the reading segmentation result is identified by the edge device, the reading of an instrument panel to be displayed is obtained, identification of the instrument panel reading in the instrument panel image is completed, and accuracy of instrument panel reading identification is improved by firstly segmenting and then identifying the instrument panel image. The edge device sends a connection request to the upper computer, and the indicating number of the instrument panel to be displayed is sent to the upper computer, so that the data volume transmitted in the communication process is reduced, the data transmission pressure is reduced, the communication quality is guaranteed, the possibility of being polluted by noise in the data transmission process is reduced, the accuracy of information transmission is improved, and the accuracy of the identified indicating number of the instrument panel is guaranteed. The edge device instructs the upper computer to display the indicating number of the instrument panel to be displayed, so that the workload of the upper computer is reduced, the accuracy of the indicating number of the instrument panel to be displayed is improved, and the accuracy of identifying the indicating number of the instrument panel by an instrument panel number identification system consisting of the edge device and the upper computer is further ensured.
Drawings
Fig. 1 is a flowchart of a dashboard display method according to a first embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a display result of an indication number of an instrument panel to be displayed according to a first embodiment of the present application;
fig. 3 is a flowchart of a dashboard display method in the second embodiment of the present application;
FIG. 4 is a schematic diagram of Hough transform under polar coordinates according to a second embodiment of the present application;
fig. 5 is a flowchart of a dashboard display method in the third embodiment of the present application;
FIG. 6 is a schematic diagram of a Hellink kernel transformation according to a third embodiment of the present application;
fig. 7 is a schematic structural diagram of an instrument panel display device according to a fourth embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device in a fifth embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first" and "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a dashboard display method according to an embodiment of the present disclosure, where the method is applicable to the case of identifying and displaying a display in a dashboard image, and the method can be executed by a dashboard display device, which can be implemented by software and/or hardware and is specifically configured in an edge device, such as a microcomputer.
Referring to fig. 1, the instrument panel display method is applied to edge equipment, and specifically includes the following steps:
s110, acquiring an instrument panel image of the equipment to be identified; the dashboard image includes a dashboard indication.
The device to be identified may be a device requiring the edge device to perform image acquisition. The device to be identified is provided with an instrument panel, and the number is displayed on the instrument panel. The instrument panel image is an image obtained by photographing or recording an area where an instrument panel in the equipment to be identified is located. The dial indication is the indication displayed on the dial in the dial image.
In some special scenes, equipment which is inconvenient to install the intelligent instrument panel may exist, so that the equipment cannot directly send some data in the equipment to an upper computer for displaying through communication, and corresponding readings can only be displayed through the instrument panel of the equipment. In the scene, the instrument panel of the equipment to be identified needs to be subjected to image acquisition and identification through the edge equipment so as to be displayed on the upper computer. Specifically, the edge device may be an intelligent terminal that implements edge calculation, for example, various microcomputers. The edge device has a photographing or video recording function, and a camera is configured in the edge device. For example, the dashboard image may be obtained by opening a camera in the edge device for taking a picture in a Python program through OpenCV (Open Source Computer Vision Library).
And S120, performing image segmentation on the instrument panel image, and determining a reading segmentation result of the instrument panel reading in the instrument panel image.
Image segmentation is an image processing method for acquiring a region of interest. Illustratively, the image segmentation may be a threshold-based segmentation method, a region-based segmentation method, an edge-based segmentation method, and the like. The display division result is a division result which is obtained by carrying out image division on the instrument panel image and comprises a display area. Illustratively, the indicator segmentation result can be obtained by performing character segmentation on the position of the indicator through projection segmentation.
The dashboard image includes background information beyond the dashboard display. In order to improve the accuracy of the instrument panel reading identification, the obtained instrument panel reading needs to be subjected to image segmentation. The image segmentation is carried out on the instrument panel image, an area only containing the dial number of the instrument panel can be obtained, the complexity of identifying the dial number of the instrument panel is reduced, and the identification accuracy and efficiency are improved.
And S130, identifying the reading segmentation result to obtain the reading of the instrument panel to be displayed.
The identification may be a process of classifying the readings in the reading segmentation result, and may be used to obtain the readings of the dashboard to be displayed. And the display of the instrument panel to be displayed is a display obtained by identifying the display segmentation result and is used for sending the display to an upper computer for displaying. Illustratively, the indication segmentation result can be identified through a machine learning algorithm to obtain the indication of the instrument panel to be displayed. For example, the machine learning algorithm may be a support vector machine, a neural network, a decision tree, and the like.
And S140, sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display number of the instrument panel to be displayed.
The upper computer is equipment for displaying the display number of the instrument panel to be displayed. The connection request may be a request for establishing a communication connection sent by the edge device to the upper computer, and is used to establish a communication connection between the edge device and the upper computer. Specifically, the edge device and the upper computer may communicate with each other through Socket (Socket, a communication method). And the upper computer monitors the edge equipment in real time, and sends a connection request to the upper computer through the internet protocol address and the port address after the edge equipment acquires the instrument panel image and obtains the indication number of the instrument panel to be displayed. And after receiving the connection request of the edge equipment, the upper computer establishes connection with the edge equipment, receives the display number of the instrument panel to be displayed and displays the display number of the instrument panel to be displayed.
Specifically, a digital twin system can be constructed in the upper computer. Digital twins provide a way to project physical objects into the digital world that can be used to view the state of actual physical objects. A digital twin is an up-to-date and accurate replication of the attributes and states of a physical object. The display of the instrument panel to be displayed is displayed through the digital twin system, so that immersive experience is provided for a user, and the user experience is improved.
See a display result schematic diagram shown in fig. 2, which is used for displaying the indicating number of the instrument panel to be displayed in the upper computer. Fig. 2 shows how the dashboard index of one of the devices named a, including 3 devices named A, B and C, is shown. After the user selects the device to be checked from the device names on the right side, the upper computer displays the image of the device selected by the user in the middle area of the screen, and displays the name of the device below the device, for example, a is displayed below the image of the device named as a. And displaying the corresponding instrument panel display number on the left side of the equipment through a rectangular frame, wherein other parameters of the equipment can be included in the rectangular frame. And a display button and a display closing button are displayed on the right lower side of the screen of the upper computer. Specifically, when a display button is clicked, displaying the display number of the instrument panel to be displayed; and when the display closing button is clicked, closing the display of the indicating number of the instrument panel to be displayed.
In the prior art, the edge device collects an instrument panel image, sends the instrument panel image to an upper computer in a picture or data stream mode, and the upper computer performs image recognition and displays the instrument panel display number. The instrument panel image comprises background information except the instrument panel display, the acquired instrument panel image is directly sent to the upper computer, the data volume in the transmission process is large, the possibility of noise pollution in the transmission process is increased, and the accuracy of identification of the display in the instrument panel image can be reduced. Generally, an upper computer usually communicates with a plurality of edge devices, so data transmission pressure is big, may cause the time delay of data, and the work load of upper computer is great simultaneously, also can cause the reduction of registration discernment accuracy in the panel board image.
According to the technical scheme of the embodiment, the instrument panel image of the equipment to be identified is obtained through the edge equipment; the dashboard image includes a dashboard indication. The method comprises the steps that image segmentation is carried out on an instrument panel image by an edge device, a reading segmentation result of an instrument panel reading in the instrument panel image is determined, an interested area is obtained in the instrument panel image, the reading segmentation result is identified by the edge device, the reading of an instrument panel to be displayed is obtained, identification of the instrument panel reading in the instrument panel image is completed, and accuracy of instrument panel reading identification is improved by firstly segmenting and then identifying the instrument panel image. The edge device sends a connection request to the upper computer, and the indicating number of the instrument panel to be displayed is sent to the upper computer, so that the data volume transmitted in the communication process is reduced, the data transmission pressure is reduced, the communication quality is guaranteed, the possibility of being polluted by noise in the data transmission process is reduced, the accuracy of information transmission is improved, and the accuracy of the identified indicating number of the instrument panel is guaranteed. The edge device instructs the upper computer to display the indicating number of the instrument panel to be displayed, so that the workload of the upper computer is reduced, the accuracy of the indicating number of the instrument panel to be displayed is improved, and the accuracy of identifying the indicating number of the instrument panel by an instrument panel number identification system consisting of the edge device and the upper computer is further ensured.
Example two
Fig. 3 is a flowchart of a dashboard display method provided in the second embodiment of the present application, and the technical solution of the present embodiment is further refined on the basis of the above technical solution.
Further, the image segmentation is carried out on the instrument panel image, the reading segmentation result of the reading of the instrument panel in the instrument panel image is determined, and the method is refined into the following steps: performing binarization processing on an instrument panel image to obtain an instrument panel binary image; performing inclination correction on the instrument panel binary image to obtain a target binary image; and performing character segmentation on the target binary image to obtain a reading segmentation result of the reading of the instrument panel in the instrument panel image so as to improve the accuracy of the reading segmentation result.
Referring to fig. 3, a method for displaying the dial indicator of the instrument panel includes:
s210, acquiring an instrument panel image of the equipment to be identified; the dashboard image includes a dashboard indication.
And S220, carrying out binarization processing on the instrument panel image to obtain an instrument panel binary image.
The binarization processing may be a processing procedure of converting the dashboard image into an image including only two colors of pure black and pure white, and may be used to simplify the dashboard image. Specifically, the foreground color and the background color can be distinguished by selecting a proper threshold value, so that binarization processing is realized. Illustratively, the binarization processing may be implemented by a global threshold method, a local threshold method, a dynamic threshold method, and the like. The instrument panel binary image can be an image obtained after binarization processing is performed on the instrument panel image.
In the application, an instrument panel image acquired by a camera in the edge device is a color image. The color image has an aesthetic feature for human vision. However, in the image segmentation process of the present application, a large amount of color information in the dashboard image is meaningless for obtaining the indication segmentation result in the later period, which may greatly reduce the speed of processing the dashboard image in the edge device, and may also cause the waste of storage space. Therefore, before the instrument panel image is divided, the colorful instrument panel image is converted into an instrument panel binary image through binarization processing.
In an optional embodiment, the binarizing the dashboard image to obtain the dashboard binary image includes: performing Gaussian filtering on the instrument panel image to obtain a denoised instrument panel image; carrying out graying processing on the denoised instrument panel image to obtain an instrument panel grayscale image; and carrying out binarization processing on the instrument panel gray level image to obtain an instrument panel binary image.
The gaussian filtering is a denoising algorithm used for denoising the instrument panel image. The denoised instrument panel image is an image obtained by performing Gaussian filtering on the instrument panel image.
The dashboard image may be affected by some noise during the acquisition process. These noises can reduce the accuracy of the late-stage image recognition. Exemplary, common filtering methods include linear mean filtering, gaussian filtering, and nonlinear median filtering. Specifically, the mean filtering is to use the mean value of all pixel values in the neighborhood of each pixel point in the image as the pixel value after transformation. Specifically, the gaussian filtering uses a weighted average of all pixel values in each pixel neighborhood in the image as the transformed pixel value, and the closer the pixel neighborhood is to the center, the higher the weight is. Specifically, the median filtering is to use the median of all pixel values in the neighborhood of each pixel in the image as the transformed pixel value.
The median filtering can well filter isolated noise, the most typical application is to process salt and pepper noise, but the filtering effect on a large number of reflected lights or fouling common on instruments cannot be ideal. The average filtering operation is simple, which can cause image blurring and weaken the edge information of the image. Therefore, considering that the final purpose is to identify the indicating number of the instrument panel, the required edge information is reserved as much as possible and useless noise information is filtered out.
The graying process can be an image processing process for converting the denoised instrument panel image into a grayscale image, and is used for reducing the information content of the image. Specifically, each pixel point in the denoised instrument panel image is divided into 255 levels according to the gray level, wherein 0 represents pure black, and 255 represents pure white. The instrument panel gray level image is an image obtained after the de-noising instrument panel image is subjected to gray level processing.
Graying is the conversion of a color image into a grayscale image. After graying, the contrast of the image of the de-noising instrument panel is expanded, the dynamic range of pixels is expanded, and the image of the whole de-noising instrument panel becomes finer and clearer and is easy to identify, so that the de-noising instrument panel is more suitable for being processed by a computer.
In an optional embodiment, performing graying processing on the denoised dashboard image to obtain a dashboard grayscale image includes: and carrying out weighted calculation processing on the three primary colors of the pixel points in the denoised instrument panel image to obtain an instrument panel gray level image.
The three primary colors may be the three primary colors of a color image in a computer. Specifically, according to the principle of three primary colors, all colors of a digital image in a computer can be obtained by mixing three colors of red, green and blue in different proportions. Therefore, each pixel of the color digital image contains information of three color components, red, green and blue.
Graying is a process of performing weighted average on three color components of red, green, and blue. The gray-scale image is obtained by performing weighted calculation processing on the three primary colors. Each pixel point in the grayed image only contains one color information, namely, the gray level.
Determining a dashboard grayscale image according to the following formula:
Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j);
wherein Gray (i, j) is the Gray value of a pixel point with the position coordinate (i, j) in the Gray image of the instrument panel; r (i, j) is a red pixel value of a pixel point with the image position coordinate (i, j) in the denoised instrument panel image; g (i, j) is a green pixel value of a pixel point with a position coordinate (i, j) in the denoised instrument panel image; and B (i, j) is a blue pixel value of a pixel point with the position coordinate (i, j) in the denoised instrument panel image.
And performing weighted calculation processing on the three primary colors of the pixel points in the de-noising instrument panel image to obtain an instrument panel gray level image. According to the fact that human vision is the highest in green sensitivity and the blue perception is relatively slow, the green is endowed with relatively large weight, the blue is endowed with relatively small weight, a gray scale image which is more in line with visual perception is obtained, the contrast of a dashboard gray scale image is expanded, and the contrast of a subsequent binarized image is improved.
The dashboard gray-scale image is free of a large amount of useless color information in the dashboard image, but is still complex and not beneficial to large-scale image processing operation. Therefore, in order to further simplify the image processing and strengthen the indication number of the instrument panel to be segmented subsequently, the image needs to be binarized.
Illustratively, considering the requirement of identifying the real-time property of the instrument panel display and the complexity of the instrument panel image, an Ostu method (the Otsu threshold method or the maximum inter-class variance method, a classical algorithm in the global threshold method) may be used to perform binarization processing on the instrument panel image.
The Ostu method is derived by using the least square idea. The Ostu method is a global threshold method based on image histograms, and the threshold has the characteristic of self-adaption. The basic principle of the Ostu method is as follows: assuming that a threshold can be found, the image is divided into two parts, namely a target part and a background part, and the two parts are required to satisfy the condition that the inter-class variance is maximum, and the threshold is considered as the optimal threshold. Note grayscale M =256.
Determining the pixel fraction of the background according to the following formula:
wherein N is 1 The number of background pixels; sum is the total number of pixels; omega 1 Pixel to background.
Determining a pixel fraction of the foreground according to the following formula:
wherein N is 2 The number of background pixels; omega 2 The pixel fraction that is foreground.
The average gray value of the background is determined according to the following formula:
wherein, P i The number of pixels with the pixel gray level i; mu.s 1 Average gray value of background; t is a pixel threshold; μ (t) is the pixel value with a pixel gray level of t.
Determining an average gray value of the foreground according to the following formula:
wherein, mu 2 μ is the average gray scale value of the foreground, and μ is the gray scale integrated value.
The gray scale integrated value μ of the entire image may be determined according to the following formula:
μ=μ 1 *ω 1 +μ 2 *ω 2 。
determining the inter-class variance according to the following formula:
g=ω 1 *(μ-μ 1 ) 2 +ω 2 *(μ-μ 2 ) 2 ;
wherein g is the between-class variance.
Further, μ will be determined 1 、μ 2 Substituting the formula of mu into the formula for determining the variance between classes, and simplifying to obtain:
g=ω 1 *ω 2 *(μ 1 -μ 2 ) 2 ;
the merits of the background and foreground division results can be distinguished by g, so that the threshold with the minimum g is regarded as the optimal threshold.
The instrument panel image is subjected to Gaussian filtering to obtain a de-noised instrument panel image, noise in the instrument panel image is removed, and accuracy of the obtained image is improved. Carrying out graying processing on the denoised instrument panel image to obtain an instrument panel grayscale image; the instrument panel gray level image is subjected to binarization processing to obtain an instrument panel binary image, so that the data volume of the image is reduced, the efficiency of the registration identification in the subsequent instrument panel image is improved, the contrast between pixels in the image is improved, and the accuracy of the registration identification in the subsequent instrument panel image is improved.
And S230, performing inclination correction on the instrument panel binary image to obtain a target binary image.
The inclination correction can be performed on the outline of the instrument panel binary image, and is used for rotating the instrument panel binary image when the instrument panel binary image has an inclination condition. Specifically, the inclination angle of the image contour in the instrument panel binary image is detected, and the instrument panel binary image is reversely rotated by the same angle according to the detected inclination angle to obtain a target binary image. The target binary image is an image obtained by performing inclination correction on the instrument panel binary image. In the actual shooting process of the instrument panel image, due to the fact that the position of the edge device is unstable, the collected image can incline, if the inclination angle is too large, the accuracy of subsequent segmentation can be seriously influenced, and then the adverse effect can be generated on the identification of subsequent instrument panel readings, so that when the instrument panel binary image inclines seriously, the inclination correction of the instrument panel binary image is needed.
In general, in the prior art, the inclination correction of the image is performed before the binarization processing is performed on the image. In the present application, since it is considered that the final purpose is to recognize the dial indicator, and the image in the region other than the dial indicator is not concerned, the inclination correction is performed after the binarization processing. The original instrument panel image data volume is large, the interference information is large, the calculation speed of the inclination angle detection can be reduced, and even the accuracy of the inclination angle detection can be reduced due to the interference of certain noises, so that the accuracy of the inclination angle is reduced. Therefore, after the instrument panel image is subjected to binarization processing, the edge detection is performed, so that only part of contour lines of the image are reserved, the data volume of the instrument panel image is reduced to the maximum extent, and the real-time performance of the edge device can be greatly improved by detecting at the moment. Meanwhile, the selection is completed before the character segmentation is carried out on the target binary image, so that the risk of data loss can be reduced.
In an optional embodiment, performing tilt correction on the instrument panel binary image to obtain a target binary image, includes: performing edge detection on the instrument panel binary image to obtain an instrument panel edge image; determining instrument panel edge the angle of inclination of the image; and if the inclination angle is larger than a preset inclination angle threshold value, rotating the edge image of the instrument panel to obtain a target binary image.
The edge detection can be used for detecting the edge of the instrument panel binary image and acquiring the instrument panel edge image. For example, hough transform (term, hough transform) can be used to detect the angle of the edge straight line of the instrument panel binary image, and the inclination angle of the whole instrument panel binary image can be comprehensively deduced according to the straight line angle, so that the operation load of the inclination correction method can be reduced. The instrument panel edge image can be an image obtained by performing edge detection on a binary image of the instrument panel. The inclination angle may be an inclination angle of an instrument panel binary image obtained according to edge detection. The preset inclination angle threshold may be a preset inclination angle threshold, and may be used to determine whether inclination correction needs to be performed on the instrument panel binary image. The predetermined tilt angle threshold may be determined experimentally and empirically, and is not specifically limited in this application.
After the inclination angle of the instrument panel binary image is obtained, if the inclination angle is smaller than or equal to a preset inclination angle threshold value, the inclination of a small angle can be considered, and the accuracy of a subsequent index segmentation result cannot be influenced; if the inclination angle is larger than or equal to the preset inclination angle threshold, the inclination with a large angle can be considered to influence the accuracy of a subsequent index segmentation result, and at this moment, the edge image of the instrument panel needs to be rotated to obtain a target binary image. Specifically, if the inclination angle is greater than or equal to the preset inclination angle threshold, the image at the edge of the instrument panel is rotated in the opposite direction by the same angle according to the inclination angle to obtain a target binary image.
Specifically, the two-valued dashboard image may be regarded as a binary function, and the edge contour in the two-valued dashboard image may be a portion of the two-valued dashboard image where the corresponding function value is discontinuous. Thus, edge detection can be performed on the dashboard binary map by first or second derivatives. That is, each pixel point in the two-value chart of the instrument panel can be subjected to difference processing towards the surrounding neighborhood, and when the absolute value of the difference is greater than a certain threshold value, the difference can be regarded as the edge of the image. For example, canny operator (term, an edge detection algorithm) can be used to extract edges in the two-value chart of the dashboard. The Canny operator rationale is: and detecting the gray gradients in each direction in the image, and obtaining an optimized approximation operator by using a variational method.
Specifically, the basic flow of edge extraction by the Canny operator is as follows:
(1) And carrying out smooth denoising processing on the instrument panel binary image through a filter.
(2) The gray scale gradient in the binary image of the instrument panel is found, the gray scale gradient is detected from the horizontal direction, the vertical direction and the diagonal direction respectively, and the direction of the edge generated on each pixel is identified.
(3) And continuously tracking and connecting edges by using a double threshold method, and finally extracting the edges of the instrument panel binary image to obtain an instrument panel edge image.
The Hough transform is an efficient algorithm for recognizing geometric shapes. The basic principle is to transform points on a straight line into the coefficient domain of the straight line. That is, a point is changed into a straight line associated with the coefficient, according to the nature of the intersection of the straight lines. The problem of detecting geometry in the image is translated into the problem of counting points in the parameter space. For example, there is a straight line y = kx + b in the xy plane, and the point (x, y) on the straight line will appear as a straight line b = y-xk in the parameter space Okb plane. Obviously, each point on a straight line will correspond to a straight line in the parameter space, which straight lines must meet at a point. Therefore, the length of the line segment can be detected from the number of crossing straight lines. Since the y = kx + b form is constrained by the slope of the straight line, the Hough transform is typically performed in polar coordinates.
The transformation in polar coordinates is similar to rectangular coordinates, and each point on a straight line appears as a sine curve in the parameter space of polar coordinates, so all points on the straight line appear as sine curve clusters in the parameter space, and the curve clusters also intersect at a point, and the point corresponds to a straight line on the xy plane. See figure 4 for a schematic illustration of the Hough transform in polar coordinates. The Hough transformation input space is 3 points on one straight line y = kx + b in a rectangular coordinate system, and the Hough transformation is carried out to transform the input space into a parameter space, namely 3 curves intersecting with one point p in a polar coordinate system.
Specifically, a two-dimensional accumulator array can be created that records the number of occurrences of all points in space in polar coordinates. The more the number of occurrences of the points is, the longer the straight line of the Oxy plane corresponding to the points is, and the inclination angle of the instrument panel edge image is determined by analyzing and comparing the values of theta of the straight lines.
The inclination angle of the instrument panel edge image is obtained through Hough transformation, and if the inclination angle is larger than a preset inclination angle threshold value, inclination correction is needed, namely, the instrument panel edge image is rotated.
Specifically, the rotation of the image is generally divided into two steps, and the first step is to find the coordinates of the rotated pixel points, which is equivalent to mapping transformation in a matrix. Setting point (x) 0 ,y 0 ) The point (x, y) is the coordinate of the original image 0 ,y 0 ) The rotated coordinate, theta, is (x) 0 ,y 0 ) Corresponding angle under polar coordinates, alpha is the angle to be rotated, rho is (x) 0 ,y 0 ) Distance from the origin in polar coordinates.
The transformed coordinates are determined according to the following formula:
correspondingly, the matrix form is expressed as:
and the second step is to determine the gray value of each pixel point after rotation. Because the digital image is discrete, each pixel point in the instrument panel edge image is distributed under a fixed integer coordinate. However, the coordinates of the dashboard edge image after rotation may no longer be an integer. Therefore, for the rotated image, the gray value of each pixel point is mostly not directly obtained, and interpolation processing is required.
The interpolation processing is to calculate the pixel value of a certain pixel point according to the pixel values around the pixel point. The interpolation may be, for example, zeroth order interpolation, linear interpolation, curved interpolation, and the like. Specifically, the zeroth-order interpolation may also be called nearest neighbor interpolation, so that the output pixel value is equal to the input pixel value closest to the output pixel value, the calculation of the algorithm is simple, but the processing effect is often poor; linear interpolation considers that the gray value between any two pixels is uniformly changed, the algorithm is common, but blurring can be caused for small pictures; the curve interpolation considers that the gray values among pixels are not uniformly changed but follow a certain curve rule, the interpolation effect is ideal, but the calculation amount is large. Preferably, a bilinear interpolation algorithm in linear interpolation may be used. Four pixels around the pixel point are respectively subjected to linear interpolation twice, the calculation is simple, and a relatively ideal effect can be achieved.
And performing edge detection on the dial binary image to obtain an instrument panel edge image, and determining the inclination angle of the instrument panel edge image. The Hough transformation has large calculation amount, and a large amount of calculation resources are occupied by directly transforming the binary image of the instrument panel. Therefore, the edge of the instrument panel binary image is extracted by performing edge detection on the instrument panel binary image, and the instrument panel edge image is obtained. The calculation amount in the inclination angle detection process can be reduced. If the inclination angle is larger than the preset inclination angle threshold, the accuracy of the pixel value in the target binary image is improved by adopting a bilinear interpolation algorithm to obtain the rotated pixel value, the calculated amount is reduced, and the inclination correction efficiency is improved.
S240, performing character segmentation on the target binary image to obtain a reading segmentation result of the reading of the instrument panel in the instrument panel image.
The character segmentation is an image segmentation method which is used for segmenting the readings in the target binary image to obtain the reading segmentation result of the reading of the instrument panel. And the reading segmentation result is a character obtained by performing character segmentation on the reading of the instrument panel in the target binary image, namely the reading segmentation result of the reading of the instrument panel in the instrument panel image is obtained.
In an optional embodiment, the character segmentation is performed on the target binary image to obtain a reading segmentation result of the reading of the instrument panel in the instrument panel image, and the method includes: performing open operation processing on the target binary image, and performing closed operation processing on an open operation result to obtain a roughly-divided instrument panel image; carrying out contour detection on the roughly-divided instrument panel image according to a preset rectangle to obtain an instrument panel image to be positioned; carrying out character positioning segmentation on a dial image of a to-be-positioned instrument to obtain a character segmentation result of an instrument panel; and normalizing the character segmentation result of the instrument panel to obtain the index segmentation result of the index of the instrument panel.
An on operation is an image processing method, which can be understood as a filter for geometrically eliminating tiny patches. Specifically, the opening operation processing is a process of corroding the target binary image first and then expanding the target binary image, and two slightly connected regions in the target binary image can be separated. By performing the opening operation processing on the target binary image, isolated noise, fine involvement or burrs in the target binary image can be removed without changing the shape and relative position of the original image as a whole. The rough division instrument panel image is an image obtained by performing open operation processing on the target binary image and performing closed operation processing on an open operation result.
The closed-loop operation is an image processing method, which can be understood as a filter for geometrically filling the concave angles of an image. Specifically, the closing operation processing is a process of expanding and then corroding the target binary image, and two slightly connected image blocks in the target binary image can be closed. The action effects of the closing operation and the opening operation are completely opposite, and the small hole can be filled and leveled and the small crack can be closed by performing the closing operation processing on the target binary image, so that burrs cannot be processed, and the overall position and the shape are still kept unchanged.
The digital parts corresponding to the instrument panel readings in the instrument panel image in the target binary image are connected into a whole block by carrying out opening operation processing on the target binary image and carrying out closing operation processing on the opening operation result, and the edges are optimized to obtain the indication part in the roughly-divided instrument panel image which is in a rectangular approximate shape, so that the contour detection can be conveniently carried out in the follow-up process.
Contour detection may be used to detect rectangular contours of portions in the rough-segmented dashboard image. The whole instrument panel corresponding to the instrument panel image in the roughly divided instrument panel image can be roughly divided into a plurality of parts, and at the moment, outline detection is carried out through a preset rectangle, so that the part which accords with the outline of the preset rectangle in the roughly divided instrument panel image can be detected. The preset rectangle is a preset rectangle outline, and the specific rectangle outline can be a rectangle outline range. The instrument panel image to be positioned can be an image obtained by detecting the outline of the roughly divided instrument panel image according to a preset rectangle.
The display portion of the dial indicator generally has a black substrate and is substantially rectangular, and therefore this characteristic can be utilized to detect the display portion by presetting the rectangle. The portion that does not conform to the preset rectangle may not be the display portion. For example, the preset rectangle may be set according to the area and the aspect ratio of the rectangle. Specifically, the area of the preset rectangle cannot be too small, and the possibility of being a display part can be eliminated if the area of the preset rectangle is too small, so that the area of the preset rectangle has a minimum threshold value; meanwhile, the display portion is generally composed of four to five digits, and the aspect ratio of the overall circumscribed rectangle thereof is about 2.5 to 4, and rectangles exceeding this range may also be excluded, so that the aspect ratio of the predetermined rectangle may be about 2.5 to 4. Through two times of elimination of the preset rectangle, a unique display part can be obtained almost, and if other parts still interfere with each other, the unique display part can be eliminated in subsequent character segmentation.
The character positioning segmentation is a character segmentation algorithm which can be used for performing character positioning on the dial plate image of the position indicator to further segment each character. Because the identification of the instrument panel display may include information such as decimal point, division value, and noise. Therefore, the accuracy of character positioning and segmentation directly affects the accuracy of dashboard index recognition, and once a positioning error occurs, the recognition will also fail. For example, character localization may include image texture feature methods, fractal theory methods, and projection histogram methods. And the instrument panel character segmentation result is an image obtained by performing character positioning segmentation on the dial image of the to-be-positioned instrument.
Texture may refer to the gray scale variation rule of consecutive pixels in an image, and may be determined by the spatial arrangement of the pixels. For example, the texture features may include position, hue, shape, and the like. The image texture feature method can overcome the interference of noise, but the operation degree is too complex, and the real-time requirement is difficult to meet. Fractal theory law introduces fractal concept to describe roughness of irregular and nonlinear signals, but generally only can select threshold value by experience, and has no self-adaptability and certain limitation. The projection histogram method projects images in horizontal and vertical directions, and divides characters according to the projection conditions of the images in horizontal and vertical dimensions. Preferably, the character positioning segmentation can be performed by adopting a projection histogram method. The sequence of horizontal projection and vertical projection may affect the segmentation effect and the final recognition effect, and as the reading number of the instrument panel is four to five characters in one line, the line interval where the reading number is located can be segmented by horizontal projection, so that the loss of a display part can be avoided, and then the instrument panel image to be positioned is segmented into independent characters by vertical projection, so that the instrument panel character segmentation result is obtained.
Specifically, horizontal projection is carried out on an instrument panel image to be positioned, the minimum value and the average value are counted, the average value of the minimum value and the average value is used as a threshold value, then searching is carried out from top to bottom, and the upper edge is considered to be the upper edge if the average value is larger than the threshold value; then searching from bottom to top, and considering the lower edge as being less than or equal to the threshold value. The vertical direction can be obtained in a similar way. It should be noted that the threshold in the vertical direction should be adjusted to be small enough to avoid dividing the number 0 in half.
The normalization processing is used for performing normalization processing on the size of the shape of the instrument panel character segmentation result. The character images to be segmented are influenced by the original images, and are different in size and shape, so that subsequent identification is not facilitated. Specifically, the information quantity is insufficient due to the fact that the segmentation result of the characters of the instrument panel is too small, and accurate identification is difficult; and too large character segmentation results of the instrument panel can aggravate the operation and influence the real-time performance of the system. Therefore, the dashboard character segmentation results need to be normalized to the same size. For example, the dashboard character segmentation result may be normalized to 20 × 20 characters. The size of the normalized character may be determined experimentally or empirically, and is not particularly limited in this application. And the index segmentation result is a character obtained by normalizing the character segmentation result of the instrument panel.
The process of normalization processing may be a process of stroking and scaling processing on the image. Since the dashboard character segmentation result is rectangular, the stroke processing is performed first, and the dashboard character segmentation result is converted into a square. Specifically, the process of the stroking treatment comprises the following steps: and calculating the length and width of the division result of the dashboard characters, and adding background pixels on two sides of the width until the length and the width are consistent. The scaling process belongs to the geometric transformation of the image. Specifically, the scaling process is as follows: and multiplying the abscissa and the ordinate corresponding to each pixel point in the square subjected to edge tracing processing on the instrument panel character segmentation result by the transformation coefficient respectively to realize the corresponding pixel point scaling. After the scaling process is performed, the number of pixels needs to be uniformly reduced or increased, i.e., the interpolation is performed. Specifically, the interpolation can adopt a resampling method according to the pixel interval relation, so that the characteristics of the index segmentation result are kept as much as possible, and the image is guaranteed not to be distorted.
The method comprises the steps of carrying out opening operation processing on a target binary image and carrying out closing operation processing on an opening operation result to obtain a roughly-divided instrument panel image, and dividing the target binary image into a rough area. And carrying out contour detection on the roughly divided instrument panel image according to a preset rectangle to obtain an instrument panel image to be positioned, and further determining a display part of the instrument panel display. The method comprises the steps of carrying out character positioning segmentation on a dial image to be positioned to obtain a character segmentation result of a dashboard, carrying out character segmentation on readings of a display part to obtain a character segmentation result of each reading, reducing the calculation amount of subsequent identification and improving the real-time performance of identification. And the instrument panel character segmentation result is normalized, so that the instrument panel character segmentation result is normalized under the condition that the image is not true, and the accuracy of subsequent identification is improved.
And S250, identifying the reading division result to obtain the reading of the instrument panel to be displayed.
And S260, sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display number of the instrument panel to be displayed.
According to the technical scheme of the embodiment, the instrument panel binary image is obtained by performing binarization processing on the instrument panel image, so that the data volume in the image is reduced, and the calculation amount in the subsequent segmentation and identification processes is reduced; and performing tilt correction on the instrument panel binary image to obtain a target binary image, and improving the accuracy of subsequent character segmentation. And performing character segmentation on the target binary image to obtain a reading segmentation result of the reading of the instrument panel in the instrument panel image, so that the computation amount of subsequent recognition is reduced, and the real-time performance of the subsequent recognition is improved.
EXAMPLE III
Fig. 5 is a flowchart of a flowchart method of a dashboard indicating number display method provided in the third embodiment of the present application, and the technical solution of the present embodiment is further refined on the basis of the above technical solution.
Further, identifying the registration segmentation result to obtain the registration of the instrument panel to be displayed, and refining into: ' performing distortion correction on the registration segmentation result to obtain a corrected registration segmentation result; performing feature extraction on the corrected registration segmentation result to obtain registration features; performing linear transformation on the registration features to obtain registration features to be identified; and determining the display number of the instrument panel to be displayed according to the display number characteristics to be identified so as to improve the accuracy of the display number of the instrument panel to be displayed.
Referring to fig. 5, a method for displaying the dial indicator of the instrument panel includes:
s310, acquiring an instrument panel image of the equipment to be identified; the dashboard image includes a dashboard indication.
And S320, performing image segmentation on the instrument panel image, and determining a reading segmentation result of the instrument panel reading in the instrument panel image.
S330, distortion correction is carried out on the registration division result to obtain a corrected registration division result.
The distortion correction can be mapping transformation of a matrix on the index segmentation result according to the center distance of the index segmentation result. Distortion correction is used to solve the problem of image distortion caused by the non-parallelism of the camera and the dial. The corrected exponent dividing result is the exponent dividing result after the exponent dividing result is subjected to distortion correction.
And S340, performing feature extraction on the corrected index segmentation result to obtain index features.
And the characteristic extraction is to extract the characteristic of the corrected reading segmentation result and is used for identifying and determining the reading of the instrument panel to be displayed according to the extracted reading characteristic. The registration feature is feature data obtained by extracting features of the corrected registration segmentation result.
The background included in the correction index segmentation result is useless information, and the gradient detection can well filter out the background. Therefore, a gradient detection method can be adopted for feature extraction. Illustratively, feature extraction may be performed by HOG (Histogram of Oriented Gradients). Specifically, sobel (a term of art, a discrete differential operator) derivative values in the horizontal and vertical directions of the corrected index segmentation result are calculated, the gradient direction and the gradient magnitude of each pixel point in the corrected index segmentation result are obtained according to the Sobel derivative values, and then the gradient direction is converted into an integer angle from one to sixteen. The image was then divided into 410 x 10 squares and a histogram of the gradient angle for each tile was calculated using the gradient magnitude of the pixels as weights. Thus each small square can be represented by a vector containing 16 data, and the whole image is represented by the feature vectors of four tiles, for a total of 64 dimensions. That is, 64 index features are extracted by HOG.
And S350, performing linear transformation on the registration features to obtain registration features to be identified.
The linear transformation may be a linear transformation of the indexing features for reducing the distance of data in the indexing features without changing feature information of the indexing features. The characteristic of the registration to be identified can be a characteristic obtained by performing linear transformation on the characteristic of the registration.
The 64 characteristic values extracted by the HOG are large in value and not beneficial to subsequent identification, so that the characteristic of the index is linearly transformed. Illustratively, the linear transformation may be performed using a helling (a term of art, a name of kernel function) kernel function. The helling kernel function is a linear kernel function, and can better process data without increasing the dimension of input data. See fig. 6 for a schematic representation of the helling kernel transformation. After the data before transformation in fig. 5 is processed by the helling kernel function, the transformed data is changed from a large numerical value to a small number which is not much different from each other, and the characteristic information is well preserved.
And S360, determining the display number of the instrument panel to be displayed according to the display number characteristics to be identified.
And according to the characteristic of the display number to be recognized, the display number of the instrument panel to be displayed can be determined through an image recognition algorithm. Illustratively, an SVM (Support Vector Machine) can be used to determine the dashboard display to be displayed. Specifically, labeled training data are produced according to the index segmentation result, and the SVM is supervised and trained through the labeled training data to obtain the target SVM. And inputting the registration features to be recognized into the target SVM as input data to obtain the registration of the instrument panel to be displayed. By testing the 150 index segmentation results, the identification accuracy of the target SVM can reach 97.33%.
And S370, sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display number of the instrument panel to be displayed.
According to the technical scheme, the corrected sign segmentation result is obtained by performing distortion correction on the sign segmentation result, and the problem that the accuracy of subsequent identification is reduced due to distortion in the sign segmentation result is avoided. And performing feature extraction on the corrected registration segmentation result to obtain registration features, extracting registration features in the registration segmentation result, removing the influence of a background, and improving the accuracy of subsequent identification. And linear transformation is carried out on the registration features to obtain registration features to be identified, so that the operand in the identification process is reduced, and the real-time performance of identification is improved. And determining the display number of the instrument panel to be displayed according to the display number characteristics to be identified, and improving the accuracy of the display number of the instrument panel to be displayed.
Example four
Fig. 7 is a schematic structural diagram of an instrument panel display device according to a fourth embodiment of the present disclosure, which is applicable to the case of identifying and displaying the number in the image of the instrument panel, and is configured on an edge device, for example, a microcomputer, and the instrument panel display device has a specific structure as follows:
the image acquisition module 410 is used for acquiring an instrument panel image of the equipment to be identified; the dial image includes a gauge panel reading;
the image segmentation module 420 is configured to perform image segmentation on the dashboard image and determine a reading segmentation result of a dashboard reading in the dashboard image;
the reading identification module 430 is configured to identify a reading segmentation result to obtain a reading of the instrument panel to be displayed;
and the connection request sending module 440 is configured to send a connection request to the upper computer, send the display of the dashboard to be displayed to the upper computer, and instruct the upper computer to display the display of the dashboard to be displayed.
According to the technical scheme of the embodiment, the edge device acquires an instrument panel image of the device to be identified through an image acquisition module; the dashboard image includes a dashboard indication. The edge device carries out image segmentation on the instrument panel image through the image segmentation module, the registration segmentation result of the instrument panel registration in the instrument panel image is determined, an interested area is obtained in the instrument panel image, the edge device identifies the registration segmentation result through the registration identification module, the instrument panel registration to be displayed is obtained, identification of the instrument panel registration in the instrument panel image is completed, the instrument panel image is segmented firstly and then identified, and the accuracy of instrument panel registration identification is improved. The edge device sends a connection request to the upper computer through the connection request sending module, and sends the indication number of the instrument panel to be displayed to the upper computer, so that the data volume transmitted in the communication process is reduced, the data transmission pressure is reduced, the communication quality is guaranteed, the possibility of being polluted by noise in the data transmission process is reduced, the accuracy of information transmission is improved, and the accuracy of the identified indication number of the instrument panel is guaranteed. The edge device instructs the upper computer to display the indicating number of the instrument panel to be displayed, the workload of the upper computer is reduced, the indicating number accuracy of the instrument panel to be displayed is improved, and then the indicating number identification accuracy of the instrument panel number identification system composed of the edge device and the upper computer is guaranteed. Therefore, through the technical scheme, the problem that the identification accuracy of the indicating number of the conventional instrument panel number identification system is low is solved, and the effect of improving the identification accuracy of the indicating number of the instrument panel is achieved.
Optionally, the image segmentation module 420 includes:
an image binarization unit for performing binarization processing on the instrument panel image, obtaining a binary image of the instrument panel;
the image inclination correction unit is used for carrying out inclination correction on the instrument panel binary image to obtain a target binary image;
an image character segmentation unit for performing character segmentation on the target binary image to obtain the indication segmentation result of the instrument panel indication in the instrument panel image
Optionally, the image binarization unit includes:
the image denoising subunit is used for carrying out Gaussian filtering on the instrument panel image to obtain a denoised instrument panel image;
the graying processing subunit is used for performing graying processing on the denoised instrument panel image to obtain an instrument panel grayscale image;
and the binarization processing subunit is used for performing binarization processing on the instrument panel gray level image to obtain an instrument panel binary image.
Optionally, the graying processing subunit is specifically configured to: and carrying out weighted calculation processing on the three primary colors of the pixel points in the denoised instrument panel image to obtain an instrument panel gray level image.
Optionally, the image segmentation module 420 includes:
the edge detection subunit is used for carrying out edge detection on the instrument panel binary image to obtain an instrument panel edge image;
the inclination angle determining subunit is used for determining the inclination angle of the instrument panel edge image;
and the image rotation subunit is used for rotating the edge image of the instrument panel to obtain a target binary image if the inclination angle is larger than a preset inclination angle threshold.
Optionally, the binarization processing subunit includes:
the opening operation processing subunit is used for performing opening operation processing on the target binary image and performing closing operation processing on an opening operation result to obtain a roughly-divided instrument panel image;
the contour detection subunit is used for carrying out contour detection on the roughly-divided instrument panel image according to a preset rectangle to obtain an instrument panel image to be positioned;
the character positioning and dividing subunit is used for performing character positioning and dividing on the dial plate image of the to-be-positioned instrument to obtain an instrument panel character dividing result;
and the normalization processing subunit is used for performing normalization processing on the character segmentation result of the instrument panel to obtain the reading segmentation result of the reading of the instrument panel.
Optionally, the reading identification module 430 includes:
the distortion correction unit is used for performing distortion correction on the registration division result to obtain a corrected registration division result;
the characteristic extraction unit is used for extracting the characteristics of the corrected registration segmentation result to obtain registration characteristics;
the linear transformation unit is used for carrying out linear transformation on the registration features to obtain registration features to be identified;
and the display number determining unit is used for determining the display number of the instrument panel to be displayed according to the display number characteristics to be identified.
The device for displaying the indicating number of the instrument panel provided by the embodiment of the application can execute the method for displaying the indicating number of the instrument panel provided by any embodiment of the application, and has the corresponding functional modules and the beneficial effects for executing the method for displaying the indicating number of the instrument panel.
EXAMPLE five
Fig. 8 is a schematic structural diagram of an electronic apparatus according to a fifth embodiment of the present application, as shown in fig. 8, the electronic apparatus includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of the processors 510 in the electronic device may be one or more, and one processor 510 is taken as an example in fig. 8; the processor 510, the memory 520, the input device 530 and the output device 540 in the electronic apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 8.
The memory 520 may be used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules (e.g., the image obtaining module 410, the image segmentation module 420, the indication number recognition module 430, and the connection request sending module 440) corresponding to the dashboard indication number display method in the embodiment of the present application. The processor 510 executes software programs, instructions and modules stored in the memory 520 to execute various functional applications and data processing of the electronic device, that is, to implement the dashboard display method.
The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 520 may further include memory located remotely from processor 510, which may be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 540 may include a display device such as a display screen.
EXAMPLE six
A sixth embodiment of the present application further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a dashboard display method, where the method includes: acquiring an instrument panel image of equipment to be identified; the dashboard image includes dashboard readings; performing image segmentation on the instrument panel image, and determining the indication segmentation result of the instrument panel indication in the instrument panel image; identifying the reading segmentation result to obtain the reading of the instrument panel to be displayed; and sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display number of the instrument panel to be displayed.
Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the method operations described above, and may also perform related operations in the instrument panel display method provided in any embodiment of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It should be noted that, in the embodiment of the above-mentioned search device, the included units and modules are merely divided according to the functional logic, but is not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It is to be noted that the foregoing is only illustrative of the presently preferred embodiments and application of the principles of the present invention. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims (10)
1. A method for displaying the dial indicator of a dashboard is applied to edge equipment and comprises the following steps:
acquiring an instrument panel image of equipment to be identified; the dashboard image comprises a dashboard display;
performing image segmentation on the instrument panel image, and determining a display segmentation result of the display of the instrument panel in the instrument panel image;
identifying the reading segmentation result to obtain the reading of the instrument panel to be displayed;
and sending a connection request to an upper computer, sending the display of the instrument panel to be displayed to the upper computer, and indicating the upper computer to display the display of the instrument panel to be displayed.
2. The method of claim 1, wherein the image segmenting the dashboard image, determining the indication segmentation result for the dashboard indication in the dashboard image, comprises:
performing binarization processing on the instrument panel image to obtain an instrument panel binary image;
performing inclination correction on the instrument panel binary image to obtain a target binary image;
and performing character segmentation on the target binary image to obtain a reading segmentation result of the reading of the instrument panel in the instrument panel image.
3. The method according to claim 2, wherein the binarizing the dashboard image to obtain a dashboard binary image comprises:
performing Gaussian filtering on the instrument panel image to obtain a de-noising instrument panel image;
performing graying processing on the denoised instrument panel image to obtain an instrument panel grayscale image;
and carrying out binarization processing on the instrument panel gray level image to obtain an instrument panel binary image.
4. The method of claim 3, wherein graying the denoised dashboard image to obtain a dashboard grayscale image comprises:
and carrying out weighted calculation processing on the three primary colors of the pixel points in the de-noising instrument panel image to obtain the instrument panel gray level image.
5. The method according to claim 2, wherein the performing tilt correction on the dashboard binary image to obtain a target binary image comprises:
performing edge detection on the instrument panel binary image to obtain an instrument panel edge image;
determining the inclination angle of the instrument panel edge image;
and if the inclination angle is larger than a preset inclination angle threshold value, rotating the instrument panel edge image to obtain the target binary image.
6. The method according to claim 2, wherein the character segmentation of the target binary image to obtain the indication segmentation result of the instrument panel indication in the instrument panel image comprises:
performing open operation processing on the target binary image, and performing closed operation processing on an open operation result to obtain a roughly-divided instrument panel image;
carrying out contour detection on the roughly-divided instrument panel image according to a preset rectangle to obtain an instrument panel image to be positioned;
performing character positioning segmentation on the instrument panel image to be positioned to obtain an instrument panel character segmentation result;
and carrying out normalization processing on the character segmentation result of the instrument panel to obtain the number indication segmentation result of the instrument panel.
7. The method according to any one of claims 1 to 6, wherein the identifying the indication segmentation result to obtain the indication of the instrument panel to be displayed comprises:
performing distortion correction on the registration segmentation result to obtain a corrected registration segmentation result;
performing feature extraction on the corrected registration segmentation result to obtain registration features;
performing linear transformation on the registration features to obtain registration features to be identified;
and determining the display number of the instrument panel to be displayed according to the display number characteristics to be identified.
8. An instrument panel display device, configured to an edge device, comprising:
the image acquisition module is used for acquiring an instrument panel image of the equipment to be identified; the dashboard image comprises a dashboard reading;
the image segmentation module is used for carrying out image segmentation on the instrument panel image and determining the reading segmentation result of the instrument panel reading in the instrument panel image;
the reading identification module is used for identifying the reading segmentation result to obtain the reading of the instrument panel to be displayed;
and the connection request sending module is used for sending a connection request to the upper computer, sending the display number of the instrument panel to be displayed to the upper computer and indicating the upper computer to display the display number of the instrument panel to be displayed.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the dashboard indicia presentation method of any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a dashboard indicia presentation method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211078573.7A CN115272664A (en) | 2022-09-05 | 2022-09-05 | Instrument panel display method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211078573.7A CN115272664A (en) | 2022-09-05 | 2022-09-05 | Instrument panel display method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115272664A true CN115272664A (en) | 2022-11-01 |
Family
ID=83754502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211078573.7A Pending CN115272664A (en) | 2022-09-05 | 2022-09-05 | Instrument panel display method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115272664A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115877993A (en) * | 2023-02-21 | 2023-03-31 | 北京和利时系统工程有限公司 | Three-dimensional view display method and device based on digital twins |
CN117079262A (en) * | 2023-10-16 | 2023-11-17 | 北京睿企信息科技有限公司 | Instrument panel display method for request times |
-
2022
- 2022-09-05 CN CN202211078573.7A patent/CN115272664A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115877993A (en) * | 2023-02-21 | 2023-03-31 | 北京和利时系统工程有限公司 | Three-dimensional view display method and device based on digital twins |
CN117079262A (en) * | 2023-10-16 | 2023-11-17 | 北京睿企信息科技有限公司 | Instrument panel display method for request times |
CN117079262B (en) * | 2023-10-16 | 2023-12-26 | 北京睿企信息科技有限公司 | Instrument panel display method for request times |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113450307B (en) | Product edge defect detection method | |
CN114972329B (en) | Image enhancement method and system of surface defect detector based on image processing | |
CN115908269B (en) | Visual defect detection method, visual defect detection device, storage medium and computer equipment | |
CN110781885A (en) | Text detection method, device, medium and electronic equipment based on image processing | |
CN115272664A (en) | Instrument panel display method and device, electronic equipment and storage medium | |
WO2018145470A1 (en) | Image detection method and device | |
CN111612781A (en) | Screen defect detection method and device and head-mounted display equipment | |
CN111161222B (en) | Printing roller defect detection method based on visual saliency | |
CN103971126A (en) | Method and device for identifying traffic signs | |
CN107871137B (en) | Material matching method based on image recognition | |
CN110648330B (en) | Defect detection method for camera glass | |
CN111382658B (en) | Road traffic sign detection method in natural environment based on image gray gradient consistency | |
CN111680690A (en) | Character recognition method and device | |
CN111539980B (en) | Multi-target tracking method based on visible light | |
CN113537037A (en) | Pavement disease identification method, system, electronic device and storage medium | |
CN109522768A (en) | The recognition methods of QR code and device | |
CN118275449A (en) | Copper strip surface defect detection method, device and equipment | |
CN114723728A (en) | Method and system for detecting CD line defects of silk screen of glass cover plate of mobile phone camera | |
CN114821274A (en) | Method and device for identifying state of split and combined indicator | |
CN117765287A (en) | Image target extraction method combining LWR and density clustering | |
CN117496532A (en) | Intelligent recognition tool based on 0CR | |
JP2012048326A (en) | Image processor and program | |
CN112329572B (en) | Rapid static living body detection method and device based on frame and flash point | |
CN115063578A (en) | Method and device for detecting and positioning target object in chip image and storage medium | |
CN111626299A (en) | Outline-based digital character recognition method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |