A dashboard identification method, identification device, storage medium and computer equipment
By detecting the dashboard contour and Hough line detection, the pointers on the dashboard are identified, solving the problem that traditional methods cannot identify dashboards without closed curves, and achieving dashboard recognition with high accuracy and wide applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CIENET TECH BEIJING
- Filing Date
- 2022-04-30
- Publication Date
- 2026-07-31
AI Technical Summary
In the existing technology, the traditional Hough circle detection method cannot identify dashboards without closed curves, and the existing dashboard recognition methods have low generalization and high cost.
By performing contour detection based on the uniform similarity of the sub-contours on the dashboard, the dashboard contour, center, and radius are obtained. A rectangular coordinate system is established, and the pointer is identified using Hough line detection. The pointer information is obtained based on the slope and quadrant position of the pointer relative to the rectangular coordinate system.
It improves the accuracy and generalization of dashboard recognition, enabling it to recognize various dashboards, especially those without closed curves, while reducing recognition time and cost.
Smart Images

Figure CN117011833B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a dashboard recognition method, as well as a corresponding dashboard recognition device, storage medium, and computer equipment, belonging to the field of instrumentation technology. Background Technology
[0002] In existing technologies, dashboards are typically displayed on a screen for user convenience, such as on a car's console, providing a good user experience. In practical testing, the Hough circle detection method is often used to identify dashboards that have closed curves. However, dashboards without closed curves present a problem in terms of identification.
[0003] To address the aforementioned issues, Chinese patent application number 201410473352.9 discloses a method for recognizing pointer scales on automotive instrument panels. This method first extracts the moving pointer based on its color characteristics using a hue extraction method in the HSI color space. Then, an improved difference algorithm eliminates pixels of the same color as the moving pointer in the instrument panel background, further retrieving the pointer. Next, the intersection method is used to determine the rotation center of the moving pointer and its direction. Finally, the angle method is used to calculate the pointer reading. This method saves significant computational resources in image preprocessing, reduces the loss of original image information, and improves the recognition speed and accuracy of the moving pointer. However, it is only applicable to colored moving pointers and has low generalization ability for instrument panel recognition.
[0004] Furthermore, Chinese patent application number 202010087078.7 discloses a method for reading pointer-type instruments, comprising the following steps: inputting an image of the pointer-type instrument to be read into a pre-trained pointer-type instrument pointer detection model to identify the position of the pointer; establishing a coordinate system based on the position of the pointer, and calculating the angle of deflection of the pointer in the coordinate system based on the position of the pointer in the coordinate system; determining the reading of the pointer-type instrument image based on the pre-acquired parameter information of the pointer-type instrument and the angle of deflection of the pointer in the coordinate system. This method, through the trained pointer-type instrument pointer detection model, reads the pointer based on the parameter information of the pointer-type instrument and the angle of deflection of the pointer in the coordinate system, and can be applied to various types of pointer-type instruments, thus improving the generalization of instrument panel recognition to a certain extent. However, using the pointer-type instrument pointer detection model requires collecting a large number of training samples for training, which is complex and costly. Summary of the Invention
[0005] The primary technical problem to be solved by this invention is to provide a dashboard recognition method.
[0006] Another technical problem to be solved by the present invention is to provide a dashboard recognition device.
[0007] Another technical problem to be solved by the present invention is to provide a corresponding storage medium and computer device.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] According to a first aspect of the present invention, a dashboard recognition method is provided, comprising the following steps:
[0010] S2: Perform contour detection on the acquired instrument image according to the pre-set recognition area to obtain a first instrument panel contour map, filter the first instrument panel contour map using a pre-set area quantile ratio and output a second instrument panel contour map including multiple sub-contours, and obtain the centroid of each sub-contour.
[0011] S4: Obtain the center and radius of the second instrument panel outline based on the pre-set outline information and the centroid of each sub-outline, and establish a rectangular coordinate system with the center as the origin. The rectangular coordinate system includes four quadrants.
[0012] S6: Perform Hough line detection on the instrument image to obtain at least one first pointer line segment, perform pointer cleaning on the at least one first pointer line segment according to the preset pointer information and obtain a second pointer line segment, and obtain the position information of the second pointer line segment according to the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant of the rectangular coordinate system.
[0013] Preferably, after S4 and before S6, the dashboard recognition method further includes the following steps:
[0014] S5: Obtain the upper boundary of the second instrument profile based on the centroid of each sub-profile, and verify the radius based on the upper boundary and the center of the circle of the second instrument profile.
[0015] Preferably, S6 further includes:
[0016] The pointer reading of the instrument panel in the instrument image is obtained based on the pre-set instrument panel mapping table and the location information.
[0017] Preferably, after S6, the dashboard recognition method further includes:
[0018] S7: Perform optical character recognition on the instrument image to obtain the display data of the instrument panel, determine whether the display data is consistent with the pointer reading, and output the determination result.
[0019] Preferably, prior to S2, the dashboard recognition method further includes:
[0020] S1: Set the recognition area, contour information and pointer information of the instrument panel according to the prior information displayed on the instrument panel.
[0021] According to a second aspect of the present invention, a dashboard recognition device is provided, comprising: an image acquisition device, an image processing device, and a controller, wherein the controller is configured to:
[0022] The image acquisition device acquires images from the display screen and obtains instrument images.
[0023] The image processing device performs contour detection on the instrument image according to a pre-set recognition area to obtain a first instrument panel contour image. The first instrument panel contour image is filtered using a pre-set area quantile ratio, and a second instrument panel contour image including multiple sub-contours is output. The centroid of each sub-contour is obtained.
[0024] The center and radius of the second instrument panel outline are obtained based on the pre-set outline information and the centroid of each sub-outline, and a rectangular coordinate system is established with the center of the outline as the origin. The rectangular coordinate system includes four quadrants.
[0025] The image processing device performs Hough line detection on the instrument image to obtain at least one first pointer line segment. Based on the preset pointer information, the at least one first pointer line segment is cleaned to obtain a second pointer line segment. The position information of the second pointer line segment is obtained based on the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant in which it is located in the rectangular coordinate system.
[0026] Preferably, the controller is further configured as follows:
[0027] The pointer reading of the instrument panel in the instrument image is obtained according to the pre-set instrument panel mapping table and the location information;
[0028] Optical character recognition is performed on the instrument image to obtain the display data of the instrument panel, and it is determined whether the display data is consistent with the pointer reading and the determination result is output.
[0029] Preferably, the device further includes a page switching device for switching the content displayed on the display screen, and the controller is further configured to switch the content displayed on the display screen through the page switching device.
[0030] Preferably, the system also includes a log unit for recording identification information, and the controller is further configured to record the judgment result through the log unit.
[0031] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described dashboard recognition method.
[0032] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described dashboard recognition method.
[0033] Compared with existing technologies, this invention performs contour detection on the dashboard based on the characteristic that the sub-contours on the dashboard have uniform similarity, thereby obtaining the dashboard contour, center, and radius. Then, it identifies the dashboard pointer through Hough line detection and establishes a rectangular coordinate system based on the center of the dashboard contour. The pointer information is obtained based on the slope and quadrant position information of the pointer relative to the rectangular coordinate system. This invention can identify various dashboards, especially those without closed curves, thereby improving the accuracy of dashboard recognition and further enhancing the generalization of dashboard recognition. Attached Figure Description
[0034] Figure 1 A flowchart of a dashboard recognition method provided in one embodiment of the present invention;
[0035] Figure 2 This is a schematic diagram of an instrument image used in one embodiment of the present invention;
[0036] Figure 3 A contour view of the first instrument in one embodiment of the present invention;
[0037] Figure 4 This is a schematic diagram of a rectangular coordinate system with the center of the circle in the second instrument outline as the origin, as shown in one embodiment of the present invention.
[0038] Figure 5 A flowchart of a dashboard recognition method provided for another embodiment of the present invention;
[0039] Figure 6 This is a schematic diagram of an asymmetric instrument panel in one embodiment of the present invention;
[0040] Figure 7 This is a structural block diagram of a dashboard recognition device in one embodiment of the present invention;
[0041] Figure 8 This is a schematic diagram of the structure of a corresponding computer device in one embodiment of the present invention. Detailed Implementation
[0042] The technical content of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0043] like Figure 1 As shown, the first embodiment of the present invention discloses a dashboard recognition method, which includes at least the following steps:
[0044] S2: Perform contour detection on the acquired instrument image according to the pre-set recognition area to obtain a first instrument panel contour map, filter the first instrument panel contour map using a pre-set area quantile ratio and output a second instrument panel contour map including multiple sub-contours, and obtain the centroid of each sub-contour.
[0045] S4: Obtain the center and radius of the second instrument panel outline based on the pre-set outline information and the centroid of each sub-outline, and establish a rectangular coordinate system with the center as the origin. The rectangular coordinate system includes four quadrants.
[0046] S6: Perform Hough line detection on the instrument image to obtain at least one first pointer line segment, perform pointer cleaning on the at least one first pointer line segment according to the preset pointer information and obtain a second pointer line segment, and obtain the position information of the second pointer line segment according to the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant of the rectangular coordinate system.
[0047] This embodiment uses the characteristic that the sub-contours on the dashboard have uniform similarity to perform contour detection on the dashboard to obtain the dashboard contour, center, and radius. Then, it identifies the dashboard pointer through Hough line detection and establishes a rectangular coordinate system based on the center of the dashboard contour. The pointer information is obtained based on the slope and quadrant position information of the pointer relative to the rectangular coordinate system. It can identify whether various dashboards appear, especially dashboards without closed curves. While improving the accuracy of dashboard recognition, it further improves the generalization of dashboard recognition.
[0048] <First Embodiment>
[0049] In a specific embodiment, such as Figure 2 The image shown is an in-vehicle speedometer image captured in this embodiment. The image includes a non-closed circle instrument panel outline 1, a pointer 2, and a specific displayed value 3.
[0050] In this embodiment, the instrument image is a real-time image captured of the content displayed on the screen. It can be a test image from the vehicle production stage or an actual display image while the vehicle is in motion; the present invention does not specifically limit this. The specific identification process is as follows:
[0051] First, contour recognition is performed on the instrument image.
[0052] In this embodiment, based on a pre-set identification region, i.e., a designated ROI (Region of Interest), for example, for... Figure 2 Contour detection is performed on the area 4 where the dashboard is located. Specifically, the dashboard includes multiple sub-contours, such as the first sub-contour 101 that marks the stage scale and the second sub-contour 102 that marks the basic scale. Based on the characteristic that each sub-contour has uniform similarity, contour detection is used to perform contour detection on the ROI area of the dashboard image.
[0053] Based on contour detection, the following is obtained: Figure 3 The first dashboard outline image after binarization is shown, including the detected first sub-outline 101 and second sub-outline 103. In this embodiment, the outline is identified using a Cartesian coordinate system calibrated by OpenCV. Specifically, the area of each sub-outline is obtained based on the zero-order moment, and the centroid coordinates (centroids) of each sub-outline are obtained based on the first-order moment. Then, based on the uniformity of the dashboard scale line outlines, quantile points are extracted for outlines with non-zero areas. In this embodiment, data cleaning is performed based on the univariate outline area. Based on the uniform similarity of the dashboard sub-outlines, outlines from 1 / 4 to 3 / 4 quantile points are extracted to obtain the second dashboard outline image.
[0054] In an optional example, the dashboard recognition method further includes setting the recognition area of the dashboard before performing contour recognition on the dashboard image.
[0055] In this embodiment, a recognition area is set according to the prior information of the instrument panel to be tested in order to facilitate the recognition of the instrument image, thereby improving the accuracy of the instrument panel recognition and reducing the instrument panel recognition time.
[0056] Next, obtain the center and radius of the outline of the second dashboard.
[0057] In this embodiment, the left and right boundaries of each sub-contour are obtained based on the centroid of each sub-contour. At the same time, based on the pre-set upper, lower, left and right boundary ranges of the dashboard, the left and right boundaries of the second dashboard contour map are obtained based on the left and right boundaries of each sub-contour. The center of the second dashboard contour map is then obtained based on the center, left boundary, and / or right boundary of the second dashboard contour map. Finally, the radius of the second dashboard contour map is obtained based on the center, left boundary, and / or right boundary of the second dashboard contour map.
[0058] Specifically, such as Figure 3As shown, the left and right boundary sub-contours of the second instrument panel outline are obtained based on the left and right boundaries of each sub-contour. According to the Cartesian coordinate system calibrated by OpenCV, the coordinates of the left boundary sub-contour are (x1, y1), and the coordinates of the right boundary sub-contour are (x2, y2), thus obtaining the center (x0, y0) of the second instrument panel outline. Specifically: x0 = (x1 + x2) / 2, y0 = (y1 + y2) / 2. The radius is obtained based on the center and left boundary sub-contour of the second instrument panel outline, or based on the center and right boundary sub-contour of the second instrument panel outline, or based on the center, left boundary sub-contour, and right boundary sub-contour of the second instrument panel outline.
[0059] To facilitate subsequent identification of the dashboard pointers, in this embodiment, such as Figure 4 As shown, a rectangular coordinate system is established with the center of the circle in the outline of the second instrument panel as the origin (0, 0), including the x-axis and y-axis. The rectangular coordinate system includes four quadrants, namely the first quadrant 10, the second quadrant 20, the third quadrant 30 and the fourth quadrant 40.
[0060] To further improve recognition accuracy, in an optional example, such as Figure 5 As shown, the dashboard recognition method further includes:
[0061] S5: Obtain the upper boundary of the second instrument profile based on the centroid of each sub-profile, and verify the radius based on the upper boundary and the center of the circle of the second instrument profile.
[0062] In this embodiment, as Figure 3 As shown, it also includes the coordinates (x3, y3) of the upper boundary sub-contour of the second instrument profile, and uses the distance between the upper boundary sub-contour and the center of the circle to perform a regression test on the radius R obtained above.
[0063] In an optional example, the dashboard recognition method further includes setting the dashboard outline information before obtaining the center and radius of the second dashboard outline image.
[0064] In this embodiment, contour information is set based on prior information of the instrument panel to be tested to facilitate the recognition of the instrument image. Specifically, the contour information includes the upper, lower, left, and right boundary ranges of the instrument panel, which can improve the accuracy of the instrument panel recognition and reduce the instrument panel recognition time.
[0065] Finally, the Hough line detection method was used to detect the pointers on the dashboard.
[0066] In this embodiment, the Hough line detection method is used to detect lines in the instrument image, obtaining multiple first pointer line segments. Each first pointer line segment is filtered according to pre-set pointer information. For example, each first pointer line segment is judged based on a pre-set distance threshold from the center of the circle to the pointer. If the distance from the center of the circle to the first pointer line segment is greater than the distance threshold, the first pointer line segment is filtered. Then, each first pointer line segment is judged based on a pre-set positional relationship between the pointer length and the center of the circle. For example, it is judged whether one end of the first pointer line segment is within the outline of the instrument panel and whether the other end is outside the outline of the instrument panel. If the conditions are met, it indicates that the first pointer line segment is the pointer of the instrument; otherwise, the first pointer line segment is filtered. Thus, the pointer of the instrument image, i.e., the second pointer line segment, is obtained.
[0067] The position information of the pointer is obtained based on the slope of the second pointer segment relative to a Cartesian coordinate system based on the center of the circle and the quadrant position of the second pointer segment. For example... Figure 4 As shown, the second pointer segment 2 is in the third quadrant 30 of the rectangular coordinate system. Based on the slope of the second pointer segment relative to the rectangular coordinate system, the angular position pointed to by the second pointer segment in the instrument panel can be obtained. For example, the second pointer segment points to a position of 30 degrees relative to the zero mark 210 of the instrument.
[0068] In an optional example, the dashboard recognition method further includes setting the dashboard pointer information before using the Hough line detection method to detect the dashboard pointer.
[0069] In this embodiment, pointer information is set based on the prior information of the instrument panel to be tested to facilitate the recognition of the instrument image. Specifically, the pointer information includes the distance threshold from the center of the circle to the pointer and the positional relationship between the pointer length and the center of the circle, which can improve the accuracy of the instrument panel recognition and reduce the instrument panel recognition time.
[0070] In an optional example, the pointer reading of the instrument panel in the instrument image is obtained based on a pre-set instrument panel map and the location information.
[0071] In this embodiment, a pre-set instrument mapping table is also included. The instrument mapping table includes the correspondence between the scale and angle position of the instrument panel. Based on the instrument mapping table and the position information, the specific reading of the second pointer line segment can be obtained.
[0072] In a specific example, such as Figure 4 The instrument panel shown is a symmetrical instrument panel. The relationship between the pointer reading and the angle is as follows:
[0073]
[0074] Where N is the pointer reading, M is the range of the instrument panel, α is the angle between the pointer and the zero mark 210, θ is the angle between the zero mark 210 of the instrument panel and the y-axis, and also the angle between the full mark 220 of the instrument panel and the y-axis, then 2θ is the angle between the zero mark 210 of the instrument panel and the full mark 220, and 360°-2θ is the angle corresponding to the pointer at full scale.
[0075] In another specific example, when the dashboard is as follows Figure 6 When the instrument panel is asymmetrical as shown, the relationship between the pointer reading line and the angle is as follows:
[0076]
[0077] Wherein, the initial angle of the zero mark is α, and the angle corresponding to the pointer at full scale is β. N is the reading of the pointer, M is the range of the vehicle instrument, θ is the angle between the current position of the pointer and the zero mark, β-α is the angle between the zero mark and the full scale of the vehicle instrument, and 360°-2θ is the angle corresponding to the pointer at full scale.
[0078] Based on the dashboard identified above, further detection of the dashboard, such as... Figure 5 As shown, in an optional example, the dashboard recognition method further includes:
[0079] S7: Perform optical character recognition on the instrument image to obtain the display data of the instrument panel, determine whether the display data is consistent with the pointer reading, and output the determination result.
[0080] In this embodiment, as Figure 2 As shown, the display data 3 in the instrument image is further identified using an optical character recognition method, namely the vehicle speed displayed on the screen. For example, when the vehicle speed is 60 km / h, the speed read by the identified pointer is compared with the vehicle speed displayed on the screen. If the two are consistent, the accuracy of the recognition of the instrument image is further verified.
[0081] It is worth noting that this embodiment can also verify the speed read from the vehicle's CAN interface and the speed read from the identified pointer, as well as the display speed identified by the optical characters, based on the vehicle speed read from the vehicle's CAN interface. These details will not be elaborated here.
[0082] Thus, the task of... Figure 2The instrument panel recognition method identifies whether the instrument panel appears in the image shown. Based on the characteristic that the sub-contours on the instrument panel have uniform similarity, contour detection is performed on the instrument panel to obtain the instrument panel contour, center, and radius. Then, Hough line detection is used to identify the instrument panel pointer. A rectangular coordinate system is established based on the center of the instrument panel contour. The pointer information is obtained based on the slope and quadrant position information of the pointer relative to the rectangular coordinate system. It can recognize various instrument panels, especially those without closed curves. While improving the accuracy of instrument panel recognition, it also improves the generalization of instrument panel recognition.
[0083] It should be noted that this embodiment uses a display screen on a vehicle that displays instrument information as an example for illustration only. It is not limited to the instrument panel recognition method of the present invention. The instrument panel recognition method can be applied to the detection and recognition of various instrument panels and has a wide range of application prospects.
[0084] <Second Embodiment>
[0085] Another embodiment of the present invention also provides a dashboard recognition device, such as... Figure 7 As shown, it includes: an image acquisition device, an image processing device, and a controller, wherein the controller is configured as follows:
[0086] The image acquisition device acquires images from the display screen and obtains instrument images.
[0087] The image processing device performs contour detection on the instrument image according to a pre-set recognition area to obtain a first instrument panel contour image. The first instrument panel contour image is filtered using a pre-set area quantile ratio, and a second instrument panel contour image including multiple sub-contours is output. The centroid of each sub-contour is obtained.
[0088] The center and radius of the second instrument panel outline are obtained based on the pre-set outline information and the centroid of each sub-outline, and a rectangular coordinate system is established with the center of the outline as the origin. The rectangular coordinate system includes four quadrants.
[0089] The image processing device performs Hough line detection on the instrument image to obtain at least one first pointer line segment. Based on the preset pointer information, the at least one first pointer line segment is cleaned to obtain a second pointer line segment. The position information of the second pointer line segment is obtained based on the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant in which it is located in the rectangular coordinate system.
[0090] In this embodiment, the dashboard recognition device uses an image acquisition device, which is a camera, to acquire the dashboard image in response to the controller's command and transmit it to the controller. The image processing device performs data processing and recognition on the dashboard image. Specifically, it performs contour recognition on the dashboard image and detects and obtains the dashboard contour based on the uniform similarity of the sub-contours of each scale on the dashboard. Then, the controller determines the center and radius of the dashboard circle based on the dashboard contour and establishes a Cartesian coordinate system based on the center of the dashboard circle to facilitate the identification of the dashboard pointer position. Finally, the image processing device performs Hough line detection on the dashboard image and filters the detected line segments, for example, by using a distance threshold from the center to the pointer and by filtering line segments that do not meet the conditions based on the positional relationship between the pointer length and the center of the circle, thereby determining the pointer. The pointer position is further obtained based on the quadrant in which the pointer is located and its slope relative to the Cartesian coordinate system. Specific implementation details are as described in the foregoing embodiments and will not be repeated here.
[0091] In an optional example, the controller is further configured as follows:
[0092] The pointer reading of the instrument panel in the instrument image is obtained according to the pre-set instrument panel mapping table and the location information;
[0093] Optical character recognition is performed on the instrument image to obtain the display data of the instrument panel, and it is determined whether the display data is consistent with the pointer reading and the determination result is output.
[0094] In this embodiment, the pointer reading is further obtained based on the pointer's position using an instrument panel mapping table, thereby completing the instrument panel reading recognition. Simultaneously, optical character recognition (OCR) is used to identify the instrument panel's displayed data, and the data read from the recognized pointer is compared with the data displayed on the screen. If they match, the accuracy of the instrument image recognition is further verified.
[0095] In an optional example, the dashboard recognition device further includes a page switching device for switching the content displayed on the display screen, and the controller is further configured to switch the content displayed on the display screen via the page switching device.
[0096] In this embodiment, the display content of the screen is switched by a page switching device that can trigger the switching of the display content. For example, the display content of the screen is switched from text information, image information or video information to dashboard display, so that the dashboard recognition device can collect the dashboard displayed on the screen and recognize the collected image.
[0097] It's worth noting that when the displayed content is not the instrument panel, the instrument panel recognition device collects and identifies the displayed content. If it cannot identify the outline of the instrument panel, it determines that the displayed content is not the instrument panel, exits the recognition process, and waits for another image to be received before attempting recognition again, or issues a prompt message. For example, in some application scenarios, the instrument panel should not be displayed. In this case, if the instrument panel outline cannot be identified, the recognition process exits; if the instrument panel outline is identified, a prompt message is issued.
[0098] Furthermore, the present invention does not specifically limit the page switching device. It can be a switching device that is connected to the display screen via a wired or wireless network, or a switching device that is connected via the vehicle's own CAN interface. The design principle is to enable the switching of the display content of the display screen, which will not be elaborated here.
[0099] In an optional example, the dashboard recognition device further includes a log unit for recording recognition information, and the controller is further configured to record the judgment result through the log unit.
[0100] In this embodiment, the results of instrument image recognition are recorded through a log unit, such as the comparison results of the display data and pointer readout data in the aforementioned embodiments. It is worth noting that the present invention does not specifically limit the log unit; it can record the recognition results of the instrument recognition device on the display screen, or it can obtain the vehicle's operating records through a log interface connected to the vehicle, such as obtaining sensing data from vehicle sensors, etc., which will not be elaborated further here.
[0101] <Third Embodiment>
[0102] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following: S2: performing contour detection on a collected instrument image according to a pre-set recognition area to obtain a first instrument panel contour image; filtering the first instrument panel contour image using a pre-set area quantile ratio and outputting a second instrument panel contour image including multiple sub-contours; and obtaining the centroid of each sub-contour; S4: obtaining the center and radius of the second instrument panel contour image according to pre-set contour information and the centroid of each sub-contour; and establishing a rectangular coordinate system with the center as the origin, the rectangular coordinate system including four quadrants; S6: performing Hough line detection on the instrument image to obtain at least one first pointer line segment; performing pointer cleaning on the at least one first pointer line segment according to pre-set pointer information to obtain a second pointer line segment; and obtaining the position information of the second pointer line segment according to the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant in which it is located in the rectangular coordinate system.
[0103] In practical applications, the computer-readable storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0104] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0105] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0106] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] <Fourth Embodiment>
[0108] like Figure 8 As shown, another embodiment of the present invention provides a computer device 12. The computer device 12 is manifested in the form of a general-purpose computing device, wherein the components may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0109] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0110] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0111] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 8 Not shown; usually referred to as a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0112] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0113] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 20. Figure 8 As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 8 As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0114] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a dashboard recognition method provided in an embodiment of the present invention.
[0115] Understandable. Figure 8 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0116] Compared with existing technologies, this invention utilizes the uniform similarity of the sub-contours on the dashboard to perform contour detection, obtaining the dashboard contour, center, and radius. Then, it identifies the dashboard pointer using Hough line detection and establishes a Cartesian coordinate system based on the center of the dashboard contour. Pointer information is obtained based on the slope and quadrant position of the pointer relative to the Cartesian coordinate system. This allows for the identification of various dashboard information, especially dashboards without closed curves, improving both the accuracy and generalization of dashboard recognition. Furthermore, this invention can determine whether a dashboard is present, thus preventing erroneous dashboard displays.
[0117] The dashboard recognition method, recognition device, storage medium, and computer equipment provided by this invention have been described in detail above. Any obvious modifications made by those skilled in the art without departing from the essence of this invention will constitute an infringement of the patent rights of this invention and will incur corresponding legal liability.
Claims
1. A method of instrument panel identification, characterized by Includes the following steps: S1: Set the recognition area, contour information and pointer information of the instrument panel according to the prior information displayed on the instrument panel; wherein, the contour information includes the upper, lower and left and right boundary ranges of the instrument panel, and the pointer information includes the distance threshold from the center of the circle to the pointer and the positional relationship between the pointer length and the center of the circle; S2: Perform edge detection on the collected instrument image according to the recognition area to obtain the first instrument panel outline; use the zero-step moment to obtain the area of each sub-contour in the first instrument panel outline, and use the first-step moment to obtain the centroid coordinates of each sub-contour; perform data cleaning based on the univariate contour area, and extract the sub-contours with areas between the quarter point and the third point as the second instrument panel outline. S3: Based on the upper, lower, left, and right boundary ranges in the contour information and the centroid of each sub-contour, obtain the left and right boundaries of each sub-contour, and then determine the left and right boundary sub-contours of the second dashboard contour; calculate the center coordinates of the second dashboard contour based on the coordinates of the left and right boundary sub-contours; obtain the radius of the second dashboard contour based on the distance between the center coordinates and the left or right boundary sub-contour. S4: Establish a rectangular coordinate system with the center of the circle as the origin, and the rectangular coordinate system includes four quadrants; S5: Obtain the upper boundary sub-contour of the second dashboard contour based on the centroid of each sub-contour, calculate the distance between the upper boundary sub-contour and the center of the circle, and perform a regression test on the distance and the radius to verify the radius; S6: Perform Hough line detection on the instrument image to obtain at least one first pointer line segment; based on the distance threshold from the center of the circle to the pointer in the pointer information, filter out the first pointer line segments whose distance from the center of the circle is greater than the distance threshold; for the remaining first pointer line segments, determine whether one end is located within the outline of the second instrument panel outline and the other end is located outside the outline. If the condition is met, retain it as the second pointer line segment; otherwise, filter it. S7: Based on the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant of the rectangular coordinate system in which the second pointer line segment is located, obtain the position information of the second pointer line segment; based on the preset instrument panel mapping table and the position information, obtain the pointer reading of the instrument panel in the instrument image; S8: Perform optical character recognition on the instrument image to obtain the display data of the instrument panel; determine whether the display data is consistent with the pointer reading, and output the determination result.
2. The dashboard recognition method as described in claim 1, characterized in that: The instrument panel mapping table includes the correspondence between the scale of the instrument panel and the angle position; the pointer reading is obtained based on the correspondence and the position information of the second pointer line segment.
3. An instrument panel identification apparatus characterized by It includes an image acquisition device, an image processing device, and a controller, wherein the controller is configured as follows: The image acquisition device acquires images from the display screen and obtains instrument images. The recognition area, contour information, and pointer information of the instrument panel are set according to the prior information displayed on the instrument panel; wherein, the contour information includes the upper, lower, left, and right boundary range of the instrument panel, and the pointer information includes the distance threshold from the center of the circle to the pointer and the positional relationship between the pointer length and the center of the circle; The image processing device performs edge detection on the instrument image based on the recognition area to obtain a first instrument panel outline; the zero-order moment is used to obtain the area of each sub-outline in the first instrument panel outline, and the first-order moment is used to obtain the centroid coordinates of each sub-outline; the data is cleaned based on the univariate outline area, and the sub-outlines with areas between the quarter point and the third point are extracted as the second instrument panel outline. Based on the upper, lower, left, and right boundary ranges in the contour information and the centroid of each sub-contour, the left and right boundaries of each sub-contour are obtained, thereby determining the left and right boundary sub-contours of the second dashboard contour; based on the coordinates of the left and right boundary sub-contours, the center coordinates of the second dashboard contour are calculated; based on the distance between the center coordinates and the left or right boundary sub-contour, the radius of the second dashboard contour is obtained. A rectangular coordinate system is established with the center of the circle as the origin, and the rectangular coordinate system includes four quadrants; The upper boundary sub-contour of the second dashboard contour is obtained based on the centroid of each sub-contour. The distance between the upper boundary sub-contour and the center of the circle is calculated. The distance is then used to perform a regression test on the radius to verify the radius. The image processing device performs Hough line detection on the instrument image to obtain at least one first pointer line segment; based on the distance threshold from the center of the circle to the pointer in the pointer information, the first pointer line segments whose distance from the center of the circle is greater than the distance threshold are filtered out; for the remaining first pointer line segments, it is determined whether one end is located within the outline of the second instrument panel outline and the other end is located outside the outline. If the condition is met, it is retained as the second pointer line segment; otherwise, it is filtered out. Based on the slope of the second pointer line segment relative to the rectangular coordinate system and the quadrant of the rectangular coordinate system in which the second pointer line segment is located, the position information of the second pointer line segment is obtained; based on the preset instrument panel mapping table and the position information, the pointer reading of the instrument panel in the instrument image is obtained; Optical character recognition is performed on the instrument image to obtain the display data of the instrument panel; it is determined whether the display data is consistent with the pointer reading, and the determination result is output.
4. The instrument panel identification apparatus of claim 3, wherein It also includes a page switching device for switching the content displayed on the display screen, and the controller is further configured to switch the display content of the display screen through the page switching device.
5. The dashboard identification apparatus of claim 3 or 4, wherein It also includes a log unit for recording identification information, and the controller is further configured to record the judgment result through the log unit.
6. A computer readable storage medium storing a computer program, characterized in that When the computer program is executed by the processor, it implements the dashboard recognition method as described in claim 1 or 2.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and characterized in that: when the processor executes the program, the instrument panel identification method according to claim 1 or 2 is implemented.