Wheel target image recognition method and device, electronic equipment and readable storage medium
By performing perspective transformation, circular fitting and eccentric compensation on the wheel target image, the recognition accuracy of the wheel target image is improved, and the problem of low recognition accuracy in the prior art is solved.
Patent Information
- Application Number
- CN202510246077.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-27
AI Technical Summary
The existing wheel target image recognition methods have low recognition accuracy under the influence of factors such as shooting angle.
By obtaining the original image taken by the target installed on the wheel of the camera, identifying the center coordinates of the concentric circle, performing perspective transformation, performing circle fitting, mapping back to the original image, and performing eccentric compensation to improve the recognition accuracy.
The recognition accuracy of wheel target images is improved, and the problem of low recognition accuracy in the prior art is solved.
Smart Images

Figure CN120220099A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer vision technology, and particularly relates to a method, device, electronic device, and readable storage medium for identifying a wheel target image. Background Art
[0002] By using a camera to photograph a target installed on a wheel, a wheel target image is obtained. Through image recognition technology, the obtained wheel target image is recognized, and the position and angle information of the wheel can be obtained. These data provide a detailed and reliable basis for subsequent four-wheel alignment adjustment, ensuring that the angle and position of the wheel are restored to the factory state, thereby improving driving stability and safety.
[0003] However, affected by shooting factors such as the shooting angle, when recognizing the wheel target image obtained by the camera, there is a problem of low recognition accuracy. Summary of the Invention
[0004] This application provides a method, device, electronic device, and readable storage medium for identifying a wheel target image, which can solve the technical problem of low recognition accuracy of the existing wheel target image.
[0005] In the first aspect of the embodiments of this application, a method for identifying a wheel target image is provided. The method for identifying a wheel target image includes:
[0006] Obtain an original wheel target image obtained by a camera photographing a target installed on a wheel; in the target pattern of the target, there are ordinary circles and concentric circles located in the vertex area of the polygon;
[0007] Perform image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image;
[0008] Based on the center coordinates of the concentric circles, perform perspective transformation on the original wheel target image to obtain a perspective-transformed wheel target image;
[0009] Perform circle fitting on the concentric circles and ordinary circles in the perspective-transformed wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image;
[0010] Map the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image back to the original wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation;
[0011] Based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, obtain the recognition result of the original wheel target image.
[0012] In the second aspect of the embodiments of the present application, a wheel target image recognition device is further provided. The wheel target image recognition device includes:
[0013] An acquisition unit, configured to acquire an original wheel target image obtained by a camera photographing a target installed on a wheel; in the target pattern of the target, a common circle and a concentric circle located in the vertex area of a polygon are provided;
[0014] A first recognition unit, configured to perform image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image;
[0015] A transformation unit, configured to perform perspective transformation on the original wheel target image based on the center coordinates of the concentric circles to obtain a perspective-transformed wheel target image;
[0016] A circle fitting unit, configured to perform circle fitting on the concentric circles and the common circles in the perspective-transformed wheel target image to obtain the center coordinates of the concentric circles and the common circles in the perspective-transformed wheel target image;
[0017] A correction unit, configured to map the center coordinates of the concentric circles and the common circles in the perspective-transformed wheel target image back to the original wheel target image to obtain the center coordinates of the concentric circles and the common circles in the original wheel target image after eccentricity compensation;
[0018] A second recognition unit, configured to obtain the recognition result of the original wheel target image based on the center coordinates of the concentric circles and the common circles in the original wheel target image after eccentricity compensation.
[0019] In the third aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the wheel target image recognition method described in the first aspect are implemented.
[0020] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the wheel target image recognition method described in the first aspect are implemented.
[0021] In the embodiments of the present application, a computer program product is further provided. The computer program product includes a computer program, and when the computer program runs on a processor, the steps of the wheel target image recognition method described in the first aspect are implemented.
[0022] In the embodiments of the present application, through image recognition of the original wheel target image obtained by a camera, the center coordinates of the concentric circles in the original wheel target image are obtained; based on the center coordinates of the concentric circles, perspective transformation is performed on the original wheel target image to obtain a perspective-transformed wheel target image; circle fitting is performed on the concentric circles and ordinary circles in the perspective-transformed wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image; the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image are mapped back to the original wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, thereby realizing the correction of the center coordinates of the concentric circles and ordinary circles in the original wheel target image. Therefore, when obtaining the recognition result of the original wheel target image based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation (i.e., the corrected center coordinates), compared with directly recognizing the wheel target image based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image, the recognition accuracy of the wheel target image can be improved, and the technical problem of the low recognition accuracy of the existing wheel target image is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 FIG. is a schematic flowchart of the implementation of the wheel target image recognition method provided by the embodiments of the present application.
[0024] Figure 2 FIG. is a schematic diagram of four wheel target patterns provided by the embodiments of the present application.
[0025] Figure 3 FIG. is a schematic diagram of the original wheel target image provided by the embodiments of the present application.
[0026] Figure 4 FIG. is a schematic flowchart of determining the center coordinates of the concentric circles in the original wheel target image provided by the embodiments of the present application.
[0027] Figure 5 FIG. is a schematic diagram of the original wheel target image with low clarity provided by the embodiments of the present application.
[0028] Figure 6 FIG. is a schematic diagram of performing perspective transformation on the original wheel target image provided by the embodiments of the present application.
[0029] Figure 7a FIG. is a schematic diagram of the original wheel target image with concentric circles that cannot be recognized provided by the embodiments of the present application.
[0030] Figure 7b FIG. is a schematic diagram of predicting the position of the concentric circles that cannot be recognized provided by the embodiments of the present application.
[0031] Figure 8 Schematic diagram of the process for determining the target number provided by the embodiment of the present application.
[0032] Figure 9 Schematic diagram of the structure of the wheel target image recognition device provided by the embodiment of the present application.
[0033] Figure 10 Schematic diagram of the structure of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0034] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0035] It should be understood that in the description of the specification and claims of the present application, the term "including" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0036] In addition, in the description of the specification and claims of the present application, the terms "first", "second", etc. are only used for differential description and cannot be understood as indicating or implying relative importance.
[0037] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure or characteristic described in combination with the embodiment is included in one or more embodiments of the present application. Thus, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0038] A camera is used to photograph the target installed on the wheel to obtain a wheel target image. Through image recognition technology, the obtained wheel target image is recognized, and the position and angle information of the wheel can be obtained. These data provide a detailed and reliable basis for subsequent four-wheel alignment adjustment, ensuring that the angle and position of the wheel are restored to the factory state, thereby improving the driving stability and safety. However, affected by shooting factors such as the shooting angle, when recognizing the wheel target image obtained by the camera, the recognized position and angle information of the wheel may have errors, and there is a problem of low recognition accuracy.
[0039] Based on this, the embodiments of the present application provide a method, device, electronic device, and readable storage medium for identifying a wheel target image, which can solve the technical problem of low accuracy in identifying a wheel target image in the existing solutions.
[0040] As Figure 1 shown, it is a schematic flowchart of the implementation process of a method for identifying a wheel target image provided by an embodiment of the present application. This method for identifying a wheel target image can be implemented by the following steps 101 to 106.
[0041] Step 101, obtain an original wheel target image obtained by a camera photographing a target installed on a wheel; wherein, a common circle and concentric circles located in the vertex area of a polygon are set in the target pattern of the target.
[0042] As Figure 2 shown, it is four wheel target patterns provided by an embodiment of the present application. These four wheel target patterns include ArUco markers located in the center of the target pattern for distinguishing each target number and 12 circular patterns located on the four sides of a quadrilateral. Among them, the circular patterns located at the four vertices of the polygon are concentric circles, and the remaining circular patterns are common circles.
[0043] In an embodiment of the present application, the common circle is a white circle, and the concentric circle is composed of a large white circle and a small black circle. Since black and white are a group of colors with strong contrast, setting the common circle as a white circle and setting the concentric circle as including a large white circle and a small black circle is beneficial to reducing the difficulty of identifying the wheel target image, thereby improving the accuracy of identifying the wheel target image.
[0044] It should be noted that Figure 2 only examples are given for the wheel target pattern. In other embodiments of the present application, the pattern of the target can also be other patterns. For example, the ArUco marker used to distinguish each target number in the middle can be other ArUco markers, and the number of common circles can be more or less. The present application does not limit this.
[0045] For the convenience of description, hereinafter, taking the wheel target pattern as Figure 2 shown as an example, the technical solution of the present application will be described.
[0046] Among them, Figure 2 the targets corresponding to the four wheel target images from left to right can be installed on the right rear wheel, left rear wheel, right front wheel, and left front wheel of the vehicle in sequence.
[0047] In the above step 101, by using cameras located on both sides of the wheel to photograph the target on the wheel, an image as Figure 3The original wheel target images corresponding to the right rear wheel, the left rear wheel, the right front wheel, and the left front wheel shown.
[0048] Step 102: Perform image recognition on the original wheel target images to obtain the center coordinates of the concentric circles in the original wheel target images.
[0049] As Figure 4 shown, in an embodiment of the present application, in the process of performing image recognition on the original wheel target images to obtain the center coordinates of the concentric circles in the original wheel target images, the following steps 401 to 402 can be adopted to implement.
[0050] Step 401: Identify the ellipses in the original wheel target images, and filter out the ellipses located on the target based on the average values of the lengths of the major and minor axes of the ellipses.
[0051] Specifically, when performing image recognition on the original wheel target images, all the ellipses in the original wheel target images can be identified first, and the image coordinates of each ellipse are recorded. Then, the ellipses located on the target are filtered out based on the average values of the lengths of the major and minor axes of the ellipses.
[0052] Specifically, the average value of the lengths of the major and minor axes of each ellipse can be obtained by adding the lengths of the major and minor axes of each ellipse and then dividing by 2. Then, the ellipses with similar average values (for example, the difference is less than or equal to 4 pixels) are divided into the same group, and the ellipses in this group are determined as the ellipses located on the target to filter out the interfering ellipses outside the target.
[0053] Step 402: Calculate the pixel average value corresponding to the pixels in the center area of each ellipse located on the target, determine the concentric circles in the original wheel target images based on the pixel average value, and obtain the center coordinates of the concentric circles.
[0054] For example, calculate the pixel average value corresponding to the pixels in the 3*3 pixel area where the center of each ellipse located on the target is located, and after sorting the pixel average values from large to small, calculate the pixel difference between two adjacent pixel average values. When the wheel target pattern is as Figure 2When the target pattern shown, that is, when the ordinary circle on the wheel target pattern is a white circle and the concentric circles are composed of a large white circle and a small black circle, the subtractor corresponding to the pixel difference with the largest value and the ellipse corresponding to the pixel mean arranged after the subtractor can be determined as the concentric circles in the original wheel target image. The minuend corresponding to the pixel difference with the largest value and the ellipse corresponding to the pixel mean arranged before the minuend are the ordinary circles in the original wheel target image. And, after identifying the concentric circles and ordinary circles in the original wheel target image, based on circle fitting, the center coordinates of the concentric circles and ordinary circles can be obtained.
[0055] In the embodiments of the present application, by calculating the pixel mean corresponding to the pixels in the center region of the ellipse center located on the target, and determining the concentric circles in the original wheel target image based on the pixel mean, when the clarity of the original wheel target image is relatively low (for example, as Figure 5 shown in the original wheel target image), the concentric circles and ordinary circles in the original wheel target image can still be accurately distinguished.
[0056] In an embodiment of the present application, when the clarity of the original wheel target image is relatively high, in addition to calculating the center coordinates of the concentric circles in the original wheel target image in the manner of step 402 described above, two circles with the distance between the centers of the ellipses located on the target less than a preset distance threshold can also be used as concentric circles, and the center coordinates of the concentric circles can be calculated based on the center coordinates of the two circles.
[0057] For example, the coordinate mean of the center coordinates of the two circles is used as the center coordinate of the concentric circles.
[0058] In the present application, by using two circles with the distance between the centers of the ellipses located on the target less than a preset distance threshold as concentric circles, the calculation amount for concentric circle recognition can be reduced, and thus, the efficiency of wheel target image recognition can be improved.
[0059] Step 103, based on the center coordinates of the concentric circles, perform perspective transformation on the original wheel target image to obtain the wheel target image after perspective transformation.
[0060] Since the concentric circles are located in the polygon vertex region, therefore, based on the center coordinates of the concentric circles, the original wheel target image can be converted into a wheel target image after perspective transformation without distortion through the perspective transformation formula according to the set ratio.
[0061] For example, as Figure 6 shown, after calculating Figure 3After obtaining the center coordinates of the four concentric circles in the original wheel target image corresponding to the left front wheel shown, the center coordinate with the smallest y value among the center coordinates of the four concentric circles can be used as the first coordinate, and the remaining three center coordinates are sorted in a clockwise direction. The original wheel target image is converted through perspective transformation according to the set ratio into Figure 6 The undistorted perspective-transformed wheel target image shown on the right.
[0062] Step 104: Perform circle fitting on the concentric circles and ordinary circles in the perspective-transformed wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image.
[0063] In the embodiments of the present application, algorithms such as the least squares method, the minimum zone method, the maximum inscribed circle, and the minimum circumscribed circle can be used for circle fitting. The present application does not limit the circle fitting method for the concentric circles and ordinary circles in the perspective-transformed wheel target image.
[0064] Step 105: Map the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image back to the original wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation.
[0065] In the embodiments of the present application, the process of mapping the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image back to the original wheel target image is the reverse process of step 103. The center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation obtained in this process are the corrected center coordinates of the center coordinates of the concentric circles obtained by directly performing image recognition on the original wheel target image in step 102.
[0066] Step 106: Based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, obtain the recognition result of the original wheel target image.
[0067] In the embodiments of the present application, the recognition result of the original wheel target image may include the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, or may also include other parameters calculated based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation.
[0068] In the embodiments of the present application, by performing circle fitting on the concentric circles and ordinary circles in the perspective-transformed wheel target image, the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image are obtained. Then, the center coordinates of the concentric circles and ordinary circles in the perspective-transformed wheel target image are mapped back to the original wheel target image, and the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation are obtained. This is equivalent to performing an eccentricity compensation on the center coordinates of the concentric circles and ordinary circles in the wheel target image, thereby realizing the correction of the center coordinates of the concentric circles and ordinary circles in the original wheel target image. Therefore, when obtaining the recognition result of the original wheel target image based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation (i.e., the corrected center coordinates), compared with directly recognizing the wheel target image based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image obtained by image recognition, the recognition accuracy of the wheel target image can be improved, and the technical problem of the low recognition accuracy of the existing wheel target image is solved.
[0069] In one embodiment of the present application, in step 106 above, based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, the internal parameters of the camera, and the three-dimensional coordinates in the world coordinate system corresponding to the centers of the concentric circles and ordinary circles in the original wheel target image, the conversion relationship between the camera coordinate system and the world coordinate system of the camera can be obtained, and the recognition result of the original wheel target image can be obtained based on the conversion relationship between the camera coordinate system and the world coordinate system of the camera.
[0070] At this time, the recognition result of the original wheel target image may include the camera coordinates in the camera coordinate system corresponding to each coordinate point of the original wheel target image. Among them, the world coordinates in the world coordinate system corresponding to each coordinate point of the original wheel target image are obtained by pre-design.
[0071] In one embodiment of the present application, the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, the internal parameters of the camera, and the three-dimensional coordinates in the world coordinate system corresponding to the centers of the concentric circles and ordinary circles in the original wheel target image can be input into the solvePnP algorithm to obtain the conversion relationship between the camera coordinate system and the world coordinate system of the camera.
[0072] Among them, the solvePnP algorithm is a function in the OpenCV library. By inputting the three-dimensional point coordinates in the world coordinate system (for example, the three-dimensional coordinates in the world coordinate system corresponding to the centers of the concentric circles and ordinary circles in the original wheel target image) and the two-dimensional coordinates of these points on the image (for example, the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation), as well as the internal parameters of the camera, the rotation vector and translation vector of the camera (that is, the conversion relationship between the camera coordinate system and the world coordinate system of the camera) can be calculated.
[0073] In the embodiment of the present application, by performing circle fitting on the concentric circles and ordinary circles in the wheel target image after perspective transformation, the center coordinates of the concentric circles and ordinary circles in the wheel target image after perspective transformation are obtained. Then, the center coordinates of the concentric circles and ordinary circles in the wheel target image after perspective transformation are mapped back to the original wheel target image, and the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation are obtained, which is equivalent to performing an eccentricity compensation on the center coordinates of the concentric circles and ordinary circles in the wheel target image. Compared with directly calculating the conversion relationship between the camera coordinate system and the world coordinate system based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image obtained by image recognition, the accuracy of the conversion relationship is improved. Therefore, when obtaining the recognition result of the original wheel target image based on the conversion relationship between the camera coordinate system and the world coordinate system of the camera, the recognition accuracy of the wheel target image can be improved, and the technical problem of the low recognition accuracy of the existing wheel target image is solved.
[0074] In the process of obtaining the recognition result of the original wheel target image based on the conversion relationship between the camera coordinate system and the world coordinate system of the camera, the three-dimensional camera coordinates corresponding to each coordinate point of the original wheel target image can be obtained through this conversion relationship, and then the wheel camber angle and the wheel toe angle can be calculated to achieve the four-wheel alignment of the vehicle. At this time, the recognition result of the original wheel target image can include the wheel camber angle and the wheel toe angle. Among them, the calculation process of the wheel camber angle and the wheel toe angle can refer to the records of related technologies and will not be elaborated here.
[0075] In practical applications, affected by factors such as ambient light, such as Figure 7aAs shown, in the above step 102, when performing image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image, there may be unrecognized concentric circles among the concentric circles located in the polygon vertex region. At this time, the number of recognized concentric circles located in the polygon vertex region will be less than the preset number threshold. Therefore, in an embodiment of the present application, if the number of recognized concentric circles located in the polygon vertex region is less than the preset number threshold, the center coordinates corresponding to the unrecognized concentric circles in the polygon vertex region can be predicted based on the center coordinates of the already recognized concentric circles. Correspondingly, in step 103, the original wheel target image can be perspectively transformed based on the predicted center coordinates of the concentric circles to obtain the perspectively transformed wheel target image.
[0076] Specifically, as Figure 7a and Figure 7b shown, when the polygon is a parallelogram (for example, a square or a rectangle) and the number of unrecognized concentric circles is one, a triangle can be constructed with the centers of the three already recognized concentric circles as vertices, the largest interior angle among the three interior angles of the triangle can be determined, and the opposite side to the largest interior angle; the coordinates of the symmetric point of the vertex where the largest interior angle is located with respect to the opposite side are used as the center coordinates corresponding to the unrecognized concentric circle.
[0077] In a specific implementation, after constructing the triangle, the magnitudes of the three interior angles of the triangle can be calculated, and the three centers can be sorted in ascending order according to the magnitudes of the three interior angles. Based on the three sorted centers, assuming that the fourth center and these three centers together form a parallelogram, and the fourth center is symmetric with respect to the straight line of the opposite side of the vertex where the largest interior angle in the triangle is located, the position of the fourth center can be inferred.
[0078] In this embodiment, the above preset number threshold can be equal to the number of polygon vertex regions. For example, when the polygon is a parallelogram, the number of polygon vertex regions is 4, and at this time the preset number threshold can also be 4.
[0079] In an embodiment of the present application, a target number marking pattern located on the polygon is also set in the target pattern of the target. After step 103, based on the center coordinates of the concentric circles, the original wheel target image is perspectively transformed to obtain the perspectively transformed wheel target image, and the number of the target can also be determined based on the following steps 801 to step 804.
[0080] Step 801, intercept the image area corresponding to the target number marking pattern in the perspectively transformed wheel target image to obtain the target number marking image.
[0081] Step 802, perform row and column segmentation on the target number marking image to obtain a plurality of grids distributed in rows and columns.
[0082] Step 803: Classify the multiple squares based on the pixel values in the multiple squares, and count the number or positions of the first type of target squares among the multiple squares.
[0083] Step 804: Determine the target number based on the number or positions of the first type of target squares.
[0084] For example, when the target number marking pattern is a black-and-white pattern as Figure 2 shown, and it is a square pattern or a rectangular pattern, intercept the image area corresponding to the target number marking pattern of the perspective-transformed wheel target image shown on the Figure 6 right side, and the target number marking image shown on the Figure 8 left side can be obtained. Then, perform row and column segmentation on the target number marking image, and multiple squares distributed in rows and columns as shown on the Figure 8 right side can be obtained. Moreover, each square can be classified as a black square or a white square based on the pixel values of the multiple squares. By counting the number of black squares or white squares (i.e., the first type of target squares) existing in the green square area, and comparing the statistical value with the pre-obtained design value, the target number can be obtained.
[0085] Optionally, each square can be classified as a black square or a white square based on the pixel values of the multiple squares. By counting the positions of the black squares or white squares (i.e., the first type of target squares) existing in the green square area, and comparing the counted position result with the pre-obtained design position result, the target number can be obtained.
[0086] Specifically, when determining the target number by quantity, as Figure 2 shown, the design value of the white squares of the target on the right rear wheel is 2, the design value of the white squares of the target on the left rear wheel is 3, the design value of the white squares of the target on the right front wheel is 4, and the design value of the white squares of the target on the left front wheel is 5. Figure 6 In Figure 6 , the number of white squares in the target number marking image is 5. Therefore, Figure 2 the target number marking image in Figure 6 corresponds to the wheel target pattern corresponding to the left front wheel in
[0087] Assume that the numbers corresponding to the right rear wheel, left rear wheel, right front wheel, and left front wheel are 1, 2, 3, and 4 respectively. Then, it can be confirmed that Figure 2 the target number of the target corresponding to the target number marking image in Figure 6The position result of the black or white square corresponding to the target serial number marked image in the green square area is compared with Figure 2 the wheel target patterns corresponding to the four wheels in Figure 6 order to confirm the target serial number corresponding to the target serial number marked image.
[0088] It should be noted that the target serial number marked pattern can be, in addition to the black and white pattern as shown in Figure 2 other patterns of different colors, for example, red and black pattern, red and white pattern, red and green pattern, red and yellow pattern, red and blue pattern, etc. The present application does not limit the pattern type of the target serial number marked pattern, nor does it limit the classification method of multiple squares.
[0089] In addition, it should also be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence. In some embodiments of the present application, certain steps can be performed in other sequences.
[0090] The embodiment of the present application further provides a wheel target image recognition device, as shown in Figure 9 , the wheel target image recognition device 90 may include:
[0091] An acquisition unit 91, configured to acquire an original wheel target image obtained by a camera photographing a target installed on a wheel; wherein, in the target pattern of the target, there is a common circle and a concentric circle located in the vertex area of the polygon;
[0092] A first recognition unit 92, configured to perform image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image;
[0093] A transformation unit 93, configured to perform perspective transformation on the original wheel target image based on the center coordinates of the concentric circles to obtain a perspective-transformed wheel target image;
[0094] A circle fitting unit 94, configured to perform circle fitting on the concentric circles and common circles in the perspective-transformed wheel target image to obtain the center coordinates of the concentric circles and common circles in the perspective-transformed wheel target image;
[0095] A correction unit 95, configured to map the center coordinates of the concentric circles and common circles in the perspective-transformed wheel target image back to the original wheel target image to obtain the center coordinates of the concentric circles and common circles in the original wheel target image after eccentricity compensation;
[0096] A second recognition unit 96, configured to obtain a recognition result of the original wheel target image based on the center coordinates of the concentric circles and the ordinary circles in the original wheel target image after eccentricity compensation.
[0097] It should be noted that, for the sake of convenience and brevity of description, the specific working process of the above-described wheel target image recognition device 90 may refer to the corresponding process of the method described above Figures 1 to 8 and will not be elaborated herein.
[0098] As Figure 10 shown, an embodiment of the present application further provides an electronic device. As Figure 10 shown, the electronic device 11 may include: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110. When the processor 110 executes the computer program 112, the steps in the above-described embodiments of various wheel target image recognition methods are implemented. For example, Figure 1 the steps 101 to 106 shown.
[0099] The so-called processor 110 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0100] The memory 111 may be an internal storage unit of the electronic device, for example, a hard disk or a memory. The memory 111 may also be an external storage device for the electronic device, for example, a plug-in hard disk equipped on the electronic device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 111 may also include both an internal storage unit and an external storage device of the electronic device. The memory 111 is used to store the above computer program and other programs and data required by the electronic device.
[0101] The above computer program can be divided into one or more units. The one or more units are stored in the memory 111 and executed by the processor 110 to complete the present application. The one or more units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the process of the above computer program executing the wheel target image recognition method in the electronic device.
[0102] For example, the above computer program can be divided into: an acquisition unit, a first recognition unit, a transformation unit, a circle fitting unit, a correction unit, and a second recognition unit. The specific functions are as follows:
[0103] The acquisition unit is used to acquire the original wheel target image obtained by the camera photographing the target installed on the wheel; wherein, ordinary circles are set in the target pattern of the target, and concentric circles are located in the vertex area of the polygon.
[0104] The first recognition unit is used to perform image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image.
[0105] The transformation unit is used to perform perspective transformation on the original wheel target image based on the center coordinates of the concentric circles to obtain the wheel target image after perspective transformation.
[0106] The circle fitting unit is used to perform circle fitting on the concentric circles and ordinary circles in the wheel target image after perspective transformation to obtain the center coordinates of the concentric circles and ordinary circles in the wheel target image after perspective transformation.
[0107] The correction unit is used to map the center coordinates of the concentric circles and ordinary circles in the wheel target image after perspective transformation back to the original wheel target image to obtain the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation.
[0108] The second recognition unit is used to obtain the recognition result of the original wheel target image based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0110] An embodiment of this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the wheel target image recognition method in each of the above embodiments.
[0111] An embodiment of this application also provides a computer program product. The computer program product includes a computer program, and when the computer program runs on a processor, it implements the steps of the wheel target image recognition method in each of the above embodiments.
[0112] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0113] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0114] In the embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be indirect couplings or communication connections through some interfaces, systems or units, and can be in electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in the various embodiments of this application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0117] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned embodiment methods of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or recording medium that can carry computer program code, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0118] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.
Claims
1. A wheel target image recognition method, characterized in that: The wheel target image recognition method comprises: Acquire an original wheel target image obtained by photographing a target mounted on the wheel with a camera; a target pattern of the target is provided with a common circle and concentric circles located in a polygonal vertex area; Performing image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image; Based on the center coordinates of the concentric circles, the original wheel target image is perspective transformed to obtain a wheel target image after perspective transformation; Performing circle fitting on the concentric circles and the ordinary circles in the wheel target image after the perspective transformation to obtain the center coordinates of the concentric circles and the ordinary circles in the wheel target image after the perspective transformation; Mapping the center coordinates of the concentric circles and the ordinary circles in the perspective transformed wheel target image back to the original wheel target image to obtain the center coordinates of the concentric circles and the ordinary circles in the original wheel target image after eccentricity compensation; Based on the center coordinates of the concentric circles and the common circles in the original wheel target image after eccentricity compensation, the recognition result of the original wheel target image is obtained.
2. The wheel target image recognition method according to claim 1, characterized in that: Performing image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image includes: Identifying an ellipse in the original wheel target image, and selecting an ellipse located on the target based on the mean length of the major axis and the minor axis of the ellipse; The pixel mean corresponding to each pixel in the ellipse center area on the target is calculated, the concentric circles in the original wheel target image are determined based on the pixel mean, and the center coordinates of the concentric circles are obtained.
3. The wheel target image recognition method according to claim 1, characterized in that: Performing image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image includes: Identifying an ellipse in the original wheel target image, and selecting an ellipse located on the target based on the mean length of the major axis and the minor axis of the ellipse; Two circles in the ellipse on the target whose centers are at a distance less than a preset distance threshold are regarded as concentric circles, and the center coordinates of the concentric circles are calculated based on the center coordinates of the two circles.
4. The wheel target image recognition method according to claim 1, characterized in that: The method of obtaining the recognition result of the original wheel target image based on the center coordinates of the concentric circles and the ordinary circles in the original wheel target image after eccentricity compensation comprises: Based on the center coordinates of the concentric circles and ordinary circles in the original wheel target image after eccentricity compensation, the internal parameters of the camera, and the three-dimensional coordinates in the world coordinate system corresponding to the centers of the concentric circles and ordinary circles in the original wheel target image, the conversion relationship between the camera coordinate system of the camera and the world coordinate system is obtained, and the recognition result of the original wheel target image is obtained based on the conversion relationship between the camera coordinate system of the camera and the world coordinate system.
5. The wheel target image recognition method according to any one of claims 1 to 4, characterized in that: The performing image recognition on the original wheel target image to obtain the center coordinates of the concentric circles in the original wheel target image includes: If the number of concentric circles identified in the polygon vertex area is less than a preset number threshold, the center coordinates of the unidentified concentric circles in the polygon vertex area are predicted based on the center coordinates of the identified concentric circles.
6. The wheel target image recognition method according to claim 5, characterized in that: When the polygon is a parallelogram and the number of the unidentified concentric circles is one, the predicting of the center coordinates of the unidentified concentric circles in the polygon vertex area based on the center coordinates of the identified concentric circles includes: Construct a triangle based on the centers of the three concentric circles that have been identified as vertices; Determine the largest interior angle among the three interior angles of the triangle, and the opposite side to the largest interior angle; The coordinates of the symmetric point of the vertex where the maximum inner angle is located relative to the opposite side are used as the center coordinates corresponding to the unidentified concentric circles.
7. The wheel target image recognition method according to any one of claims 1 to 4, characterized in that: The target pattern of the target is also provided with a target serial number marking pattern located on the polygon; After performing perspective transformation on the original wheel target image based on the center coordinates of the concentric circles to obtain the perspective transformed wheel target image, the method further includes: Intercepting an image area corresponding to the target serial number marking pattern in the perspective transformed wheel target image to obtain a target serial number marking image; Segmenting the target serial number mark image into rows and columns to obtain a plurality of squares distributed in rows and columns; Classifying the plurality of squares based on pixel values in the plurality of squares, and obtaining by statistics the number or position of the first type of target squares in the plurality of squares; The serial number of the target is determined according to the number or position of the first type target grid.
8. A wheel target image recognition device, characterized in that: The wheel target image recognition device comprises: An acquisition unit, used for acquiring an original wheel target image obtained by photographing a target mounted on the wheel by a camera; a target pattern of the target is provided with a common circle and concentric circles located in a polygonal vertex area; A first recognition unit, configured to perform image recognition on the original wheel target image to obtain center coordinates of concentric circles in the original wheel target image; A transformation unit, configured to perform perspective transformation on the original wheel target image based on the center coordinates of the concentric circles to obtain a perspective transformed wheel target image; A circle fitting unit, used for performing circle fitting on the concentric circles and the ordinary circles in the wheel target image after the perspective transformation, so as to obtain the center coordinates of the concentric circles and the ordinary circles in the wheel target image after the perspective transformation; a correction unit, used for mapping the center coordinates of the concentric circles and the ordinary circles in the perspective transformed wheel target image back to the original wheel target image, so as to obtain the center coordinates of the concentric circles and the ordinary circles in the original wheel target image after eccentricity compensation; The second recognition unit is used to obtain the recognition result of the original wheel target image based on the center coordinates of the concentric circles and the ordinary circles in the original wheel target image after eccentricity compensation.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the wheel target image recognition method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the wheel target image recognition method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Wheel target image recognition method and apparatus, electronic device, and readable storage medium
WO2026179702A1