Corner point detection method and device, equipment, storage medium and program product
By extracting corner points images from traffic sign images and matching templates, the problem of high error detection rate caused by poor imaging quality is solved, and the corner points of traffic signs are detected with high accuracy in low-quality images and accurately positioning traffic signs.
Patent Information
- Application Number
- CN202410987482.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-19
AI Technical Summary
The prior art is difficult to realize high-precision corner detection of traffic signs in images with poor imaging quality, resulting in high error detection rate and the inability to accurately locate traffic signs.
By acquiring at least two signboard images, extracting corner point images and matching templates, it is determined whether the extraction accuracy of corner point data meets the preset conditions. If it is met, the corner point detection result will be output, and the accuracy verification process will be added to ensure the extraction accuracy.
In the signboard images with poor imaging quality, the corner points of the signboard can be detected with high accuracy, accurately positioned the area where the traffic sign is located, and the effect of accurately identifying the traffic signs is achieved, reducing the requirements for image quality.
Smart Images

Figure CN118982680A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a corner point detection method, device, equipment, storage medium and program product. Background Art
[0002] Traffic signs are graphic symbols that display traffic regulations and road information. Traffic sign recognition is an important part of ensuring traffic safety. Traffic signs contain a wealth of road traffic information, providing drivers with auxiliary information such as warnings and instructions, and play an important auxiliary role in reducing drivers' driving pressure, reducing road traffic pressure, and reducing the occurrence of traffic accidents. Therefore, it is extremely important to accurately identify traffic signs.
[0003] Currently, traffic sign recognition is usually done by extracting corner points of the sign image based on feature points, and then locating the area where the traffic sign is located based on the corner points. However, this method has high requirements on image quality and requires clear images with obvious features. For images with poor imaging quality, the false detection rate is too high and high-precision corner point detection cannot be achieved. Summary of the invention
[0004] The embodiments of the present application provide a corner point detection method, apparatus, device, storage medium and program product for detecting the corner points of a sign with high precision even in a sign image with poor imaging quality, and then accurately locating the area where the traffic sign is located based on the corner points, thereby achieving the effect of accurately identifying the traffic sign.
[0005] In a first aspect, an embodiment of the present application provides a corner point detection method, including:
[0006] Acquire at least two traffic sign images corresponding to the traffic sign;
[0007] For each of the at least two signboard images, a corner point image is extracted; in a pre-configured signboard corner point template atlas, template matching is performed on the corner point image, and according to the template matching result, corner point data of the corner point image is extracted;
[0008] Acquire at least two target corner point images for the target corner point, and determine whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images;
[0009] If the extraction accuracy corresponding to the corner point data meets the preset accuracy condition, the corner point detection result of the target corner point is obtained according to the corner point data respectively corresponding to the at least two target corner point images.
[0010] In a possible implementation, the at least two target corner point images include a first corner point image and a second corner point image, and judging whether the extraction accuracy corresponding to the corner point data satisfies a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images includes:
[0011] Acquire a coordinate mapping relationship between the first corner point image and the second corner point image;
[0012] Based on the coordinate mapping relationship, mapping the corner point data of the second corner point image to the first corner point image to obtain mapped corner point data of the corner point data of the second corner point image in the first corner point image;
[0013] In the first corner point image, calculating the distance between the position point represented by the mapped corner point data and the position point represented by the corner point data of the first corner point image to obtain a distance calculation result;
[0014] Based on the distance calculation result, it is determined whether the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
[0015] In a possible implementation, the at least two signboard images include a first image and a second image, the first corner point image is extracted from the first image, and the second corner point image is extracted from the second image, and acquiring a coordinate mapping relationship between the first corner point image and the second corner point image includes:
[0016] Extracting a third corner point image for the target corner point from the first image, wherein the image size of the third corner point image is larger than the image size of the second corner point image;
[0017] The second corner point image is used as a matching template to perform image matching with the third corner point image to obtain a coordinate mapping relationship between the first corner point image and the second corner point image.
[0018] In a possible implementation, performing template matching on the corner point image in a preconfigured signboard corner point template atlas, and extracting corner point data of the corner point image according to the template matching result, includes:
[0019] Performing template matching on the corner point image in a pre-configured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image;
[0020] According to the target signboard corner point template image, the corner point data of the corner point image is extracted.
[0021] In a possible implementation, performing template matching on the corner point image in a preconfigured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image includes:
[0022] If the signboard included in the signboard image is a rectangular signboard, obtaining a rectangular signboard corner point template atlas from the signboard corner point template atlas;
[0023] Determine a target corner point template atlas for detecting the target corner point from the corner point template atlas for detecting different corner points included in the rectangular signboard corner point template atlas; wherein the rectangular signboard corner point template atlas includes a corner point template atlas for detecting the upper left corner point, a corner point template atlas for detecting the upper right corner point, a corner point template atlas for detecting the lower left corner point, and a corner point template atlas for detecting the lower right corner point;
[0024] For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image.
[0025] In a possible implementation, the corner point template atlas includes a corner point template image indicating that the color at the edge of the image transitions from light to dark, and a corner point template image indicating that the color at the edge of the image transitions from dark to light, and the template matching is performed on each corner point template image in the target corner point template atlas with the corner point image to obtain a target signboard corner point template image that matches the corner point image, including:
[0026] For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain similarity results between the corner point image and different corner point template images;
[0027] According to the similarity results between the corner point image and different corner point template images, the corner point template image with the highest similarity in the similarity results is selected as the target signboard corner point template image that matches the corner point image.
[0028] In a possible implementation manner, extracting a corner point image for each of the at least two signboard images includes:
[0029] Performing a dedistortion process on each of the at least two signboard images;
[0030] Performing a perspective removal process on the signboard image after the distortion removal process;
[0031] Performing scaling processing on the signboard image after the perspective removal processing to obtain at least two signboard images with the same image size;
[0032] For each sign image of at least two sign images having the same image size, a corner point image is extracted.
[0033] In a possible implementation, performing template matching on the corner point image in a preconfigured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image includes:
[0034] Performing binarization processing on the corner point image;
[0035] In the pre-configured signboard corner point template atlas, template matching is performed on the corner point image after the binarization process to obtain a target signboard corner point template image that matches the corner point image after the binarization process.
[0036] In a second aspect, an embodiment of the present application provides a corner point detection device, including:
[0037] An acquisition module, used to acquire at least two sign images corresponding to the traffic sign;
[0038] An extraction module is used to extract a corner point image for each of the at least two signboard images; perform template matching on the corner point image in a pre-configured signboard corner point template atlas, and extract corner point data of the corner point image according to the template matching result;
[0039] A judgment module, used to obtain at least two target corner point images for the target corner point, and judge whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images;
[0040] The corner point detection result obtaining module is used to obtain the corner point detection result of the target corner point according to the corner point data respectively corresponding to the at least two target corner point images if the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
[0041] In a possible implementation, the at least two target corner point images include a first corner point image and a second corner point image, and the determination module is specifically configured to:
[0042] Acquire a coordinate mapping relationship between the first corner point image and the second corner point image;
[0043] Based on the coordinate mapping relationship, mapping the corner point data of the second corner point image to the first corner point image to obtain mapped corner point data of the corner point data of the second corner point image in the first corner point image;
[0044] In the first corner point image, calculating the distance between the position point represented by the mapped corner point data and the position point represented by the corner point data of the first corner point image to obtain a distance calculation result;
[0045] Based on the distance calculation result, it is determined whether the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
[0046] In a possible implementation, the at least two signboard images include a first image and a second image, the first corner point image is extracted from the first image, and the second corner point image is extracted from the second image, and the judgment module is specifically configured to:
[0047] Extracting a third corner point image for the target corner point from the first image, wherein the image size of the third corner point image is larger than the image size of the second corner point image;
[0048] The second corner point image is used as a matching template to perform image matching with the third corner point image to obtain a coordinate mapping relationship between the first corner point image and the second corner point image.
[0049] In a possible implementation, the extraction module is specifically used to:
[0050] Performing template matching on the corner point image in a pre-configured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image;
[0051] According to the target signboard corner point template image, the corner point data of the corner point image is extracted.
[0052] In a possible implementation, the extraction module is specifically used to:
[0053] If the signboard included in the signboard image is a rectangular signboard, obtaining a rectangular signboard corner point template atlas from the signboard corner point template atlas;
[0054] Determine a target corner point template atlas for detecting the target corner point from the corner point template atlas for detecting different corner points included in the rectangular signboard corner point template atlas; wherein the rectangular signboard corner point template atlas includes a corner point template atlas for detecting the upper left corner point, a corner point template atlas for detecting the upper right corner point, a corner point template atlas for detecting the lower left corner point, and a corner point template atlas for detecting the lower right corner point;
[0055] For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image.
[0056] In a possible implementation, the corner point template atlas includes a corner point template map indicating that the color at the edge of the image transitions from light to dark, and a corner point template map indicating that the color at the edge of the image transitions from dark to light, and the extraction module is specifically used to:
[0057] For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain similarity results between the corner point image and different corner point template images;
[0058] According to the similarity results between the corner point image and different corner point template images, the corner point template image with the highest similarity in the similarity results is selected as the target signboard corner point template image that matches the corner point image.
[0059] In a possible implementation, the extraction module is specifically used to:
[0060] Performing a dedistortion process on each of the at least two signboard images;
[0061] Performing a perspective removal process on the signboard image after the distortion removal process;
[0062] Performing scaling processing on the signboard image after the perspective removal processing to obtain at least two signboard images with the same image size;
[0063] For each sign image of at least two sign images having the same image size, a corner point image is extracted.
[0064] In a possible implementation, the extraction module is specifically used to:
[0065] Performing binarization processing on the corner point image;
[0066] In the pre-configured signboard corner point template atlas, template matching is performed on the corner point image after the binarization process to obtain a target signboard corner point template image that matches the corner point image after the binarization process.
[0067] In a third aspect, an embodiment of the present application provides a corner point detection device, including: a memory, a processor;
[0068] The memory stores computer-executable instructions;
[0069] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0070] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0071] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0072] The corner point detection method, device, equipment, storage medium and program product provided in the embodiment of the present application can obtain at least two sign images corresponding to the traffic sign, extract the corner point image for each of the at least two sign images, and extract the corner point data of the corner point image by template matching. The template matching method does not have high requirements on the imaging quality of the image, and first extracts the corner point image, and uses the corner point image for template matching, which reduces the requirements on memory and computing power. For the target corner point to be extracted, the embodiment of the present application can obtain at least two target corner point images for the target corner point, and measure the accuracy of the extracted corner point data based on the corner point data corresponding to the at least two target corner point images, and output the final corner point detection result for the target corner point when the extraction accuracy meets the preset accuracy condition. The extraction accuracy of the corner point is guaranteed by increasing the verification process of the extraction accuracy, so that the corner point of the sign can be detected with high accuracy even in the sign image with poor imaging quality, and then the area where the traffic sign is located is accurately located according to the corner point, so as to achieve the effect of accurately identifying the traffic sign. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0074] Figure 1 A schematic diagram of a scene for the corner detection method provided in this application;
[0075] Figure 2 Schematic diagram of the corner point detection method provided in this application Figure 1 ;
[0076] Figure 3 Schematic diagram of the corner point detection method provided in this application Figure 2 ;
[0077] Figure 4 This is a schematic diagram of two traffic sign images obtained by photographing the same traffic sign in this application;
[0078] Figure 5 A schematic diagram of a signboard image after de-distortion processing in this application;
[0079] Figure 6 A schematic diagram of a signboard image after de-perspective processing for this application;
[0080] Figure 7 A schematic diagram of a signboard image after scaling for this application;
[0081] Figure 8 A schematic diagram of cropping a sign image to obtain a corner point image for this application;
[0082] Fig. 9 This is a schematic diagram of a corner point image after binarization processing in this application;
[0083] Fig.10 This is a schematic diagram of the rectangular sign corner template atlas for this application;
[0084] Fig.11 This is a schematic diagram of the corner points extracted for this application;
[0085] Fig.12 This is a schematic diagram of the third triangle image and its matching result box of the present application;
[0086] Fig.13 A schematic diagram of the process of corner detection method provided in this application;
[0087] Fig.14 A schematic diagram of the structure of the corner point detection device provided in this application;
[0088] Fig.15 This is a schematic diagram of the structure of the corner point detection device provided in this application.
[0089] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0090] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0091] The application scenario of the present application is specifically a scenario in which the corner points of traffic signs are detected based on the collected sign images, wherein the corner points of traffic signs can be detected based on the collected sign images in the server, or the corner points of traffic signs can be detected based on the collected sign images in the terminal device, and the terminal device can be a vehicle-mounted device, a desktop computer, a laptop computer, a tablet computer, a smart phone, etc. Figure 1 A schematic diagram of a scene of the corner detection method provided in this application, such as Figure 1 As shown, the corner points of traffic signs are detected in the terminal device based on the collected sign images.
[0092] In view of the above scenario, in the prior art, the corner points of the signboard image are extracted based on the feature points, and then the area where the traffic sign is located is located according to the corner points. However, this method has high requirements on image quality and requires the image to be clear and have obvious features. For images with poor imaging quality, the false detection rate is too high and high-precision corner point detection cannot be achieved.
[0093] The corner point detection method provided in the present application can obtain at least two sign images corresponding to the traffic sign, extract the corner point image for each of the at least two sign images, and extract the corner point data of the corner point image by template matching. The present application extracts the corner point data by template matching, which does not have high requirements on the imaging quality of the image, and can still extract the corner point data when the imaging quality of the acquired sign image is not high. The present application processes the sign image, extracts the corner point image therefrom, and uses the corner point image for template matching. Compared with directly using the sign image for template matching, using a small image for template matching can greatly reduce the requirements for device memory and computing power, so that the corner point detection method of the present application can be applied to devices with low memory and computing power. For any corner point that needs to be extracted, the present application can obtain at least two corner point images for the corner point, and measure the accuracy of the extracted corner point data based on the corner point data corresponding to the at least two corner point images. When the extraction accuracy meets the preset accuracy condition, the final corner point detection result for the corner point is output. The extraction accuracy of the corner point is guaranteed by increasing the verification process of the extraction accuracy, and the technical problem of detecting the corner points of the sign with high accuracy even in the sign image with poor imaging quality is solved.
[0094] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0095] Figure 2 Schematic diagram of the corner point detection method provided in this application Figure 1 ,like Figure 2 As shown, the method includes:
[0096] S201. Acquire at least two traffic sign images corresponding to the traffic sign.
[0097] In the embodiment of the present application, the at least two traffic sign images corresponding to the same traffic sign may be acquired from different frames of the traffic sign images, wherein the traffic sign images may be captured by a camera installed on a vehicle.
[0098] S202, extracting a corner point image for each of the at least two signboard images; performing template matching on the corner point image in a pre-configured signboard corner point template atlas, and extracting corner point data of the corner point image based on the template matching result.
[0099] For each of the at least two signboard images, a corner point image is extracted, and multiple corner point images may be extracted from one signboard image.
[0100] The signboard corner template atlas refers to a collection of signboard corner template images, and the signboard corner template atlas can be pre-configured. In the embodiment of the present application, the signboard corner template images in the signboard corner template atlas can be used to perform template matching with the corner image, and the corner data of the corner image can be extracted based on the template matching result.
[0101] S203: Obtain at least two target corner point images for the target corner point, and determine whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images.
[0102] At least two target corner point images for the target corner point are obtained, and the corner point data corresponding to the at least two target corner point images can be compared. The extraction accuracy of the corner point data is determined based on the comparison result, and it is judged whether the extraction accuracy meets a preset accuracy condition, and the target corner point extraction is determined to be successful or failed based on whether the preset accuracy condition is met. Specifically, if the preset accuracy condition is met, it is determined that the target corner point extraction is successful; if the preset accuracy condition is not met, it is determined that the target corner point extraction fails.
[0103] S204: If the extraction accuracy corresponding to the corner point data meets the preset accuracy condition, obtain a corner point detection result of the target corner point according to the corner point data corresponding to at least two target corner point images.
[0104] In an embodiment of the present application, when the extraction accuracy corresponding to the corner point data meets the preset accuracy conditions, the corner point detection result of the target corner point is determined based on the corner point data corresponding to at least two target corner point images, and then the corner point detection result of the final traffic sign can be output.
[0105] The corner point detection method provided in the embodiment of the present application can obtain at least two sign images corresponding to the traffic sign, extract the corner point image for each of the at least two sign images, and extract the corner point data of the corner point image by template matching. The template matching method does not have high requirements on the imaging quality of the image, and first extracts the corner point image, and uses the corner point image for template matching, which reduces the requirements on memory and computing power. For the target corner point to be extracted, the embodiment of the present application can obtain at least two target corner point images for the target corner point, and measure the accuracy of the extracted corner point data based on the corner point data corresponding to the at least two target corner point images, and output the final corner point detection result for the target corner point when the extraction accuracy meets the preset accuracy condition. The extraction accuracy of the corner point is guaranteed by increasing the verification process of the extraction accuracy, so that the corner point of the sign can be detected with high accuracy even in the sign image with poor imaging quality, and then the area where the traffic sign is located is accurately located according to the corner point, so as to achieve the effect of accurately identifying the traffic sign.
[0106] Figure 3 Schematic diagram of the corner point detection method provided in this application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a corner point detection method is described in detail, and the method includes:
[0107] S301. Acquire at least two traffic sign images corresponding to the traffic sign.
[0108] The sign image contains a complete traffic sign. Specifically, the sign image can be a ROI (Region of Interest) image. The ROI image is obtained by cropping the original sign image according to the cropping frame. Using the ROI image for further image processing can reduce the amount of calculation and improve processing efficiency, especially when processing large images or videos. Figure 4 As shown, it is a schematic diagram of two sign images obtained by photographing the same traffic sign in this application. The emergency lane sign is photographed to obtain sign image A1 and sign image B1. The cropping frame corresponding to sign image A1 is Bbox_A, and the cropping frame corresponding to sign image B1 is Bbox_B. Sign image A1 and sign image B1 are both grayscale images. If they are non-grayscale images, they need to be grayscaled first. Sign image A1 and sign image B1 both contain a complete emergency lane traffic sign.
[0109] S302, extracting a corner point image for each of the at least two signboard images; performing template matching on the corner point image in a pre-configured signboard corner point template atlas, and extracting corner point data of the corner point image based on the template matching result.
[0110] In a possible implementation, for each of the at least two signboard images, extracting a corner point image may specifically include:
[0111] Performing a dedistortion process on each of the at least two signboard images;
[0112] Performing a perspective removal process on the signboard image after the distortion removal process;
[0113] Performing scaling processing on the signboard image after the perspective removal processing to obtain at least two signboard images with the same image size;
[0114] For each sign image of at least two sign images having the same image size, a corner point image is extracted.
[0115] In the embodiment of the present application, each of the at least two signboard images may be preprocessed, and the preprocessing step is a preparation for the corner point extraction step, so that the preprocessed image data can be directly used for corner point extraction.
[0116] In an embodiment of the present application, the device internal parameters of the shooting device that shoots the signboard image can also be obtained. The device internal parameters determine the mapping relationship inside the device, including focal length, image principal point and distortion coefficient. The present application can use K to represent the device internal parameters.
[0117] Continue with Figure 4 For example, both the signboard image A1 and the signboard image B1 need to be preprocessed, wherein the preprocessing steps that the signboard image A1 needs to go through include distortion removal and perspective removal, and the preprocessing steps that the signboard image B1 needs to go through include distortion removal, perspective removal and scaling.
[0118] Dedistortion refers to distortion correction. The sign image A1 and the sign image B1 can be dedistorted according to the parameters provided in the device internal parameter K to avoid pixel position offset and deformation caused by lens distortion. The distortion parameters are relative to the original sign image (large image). The dedistortion of the sign image requires mapping each point in the sign image to the distortion relationship of each point in the original sign image, thereby achieving the dedistortion of the sign image (small image). Of course, if there are no requirements for memory and efficiency, the original sign image can be dedistorted first, and then the dedistorted original sign image can be cropped into the sign image.
[0119] The corner detection method of the embodiment of the present application can be applied to vehicle-mounted equipment. At this time, because the image data needs to be processed in real time, both efficiency and memory are required. Therefore, the acquired original image of the signboard can be first cropped into an ROI image, that is, the signboard image, and then the ROI image can be dedistorted. Figure 5 , which is a schematic diagram of a signboard image after dedistortion processing of the present application, the signboard image A1 is dedistorted to obtain the dedistorted signboard image A2, and the signboard image B1 is dedistorted to obtain the dedistorted signboard image B2.
[0120] Due to the perspective phenomenon of the image itself, a real rectangular traffic sign is generally not a regular rectangle after dedistortion. Affected by the perspective of near and far and depth, the closer to the edge of the image, the more serious this perspective phenomenon is. In order to accurately extract the corner points, it is necessary to remove the perspective. This application uses affine transformation to solve this problem. The so-called affine transformation is the process of transforming from one two-dimensional coordinate system to another two-dimensional coordinate system, which is a linear transformation. The formula is as follows:
[0121]
[0122] in, represents the vector before transformation, represents the transformed vector, and H represents the transformation matrix. The transformation matrix can be obtained if three pairs of coordinate points are known. Figure 6 As shown, it is a schematic diagram of the signboard image after de-perspective processing of the present application. The de-perspective processing is performed on the de-distorted signboard image A2 to obtain the de-perspective processing signboard image A3, and the de-perspective processing is performed on the de-distorted signboard image B2 to obtain the de-perspective processing signboard image B3.
[0123] The scaling process of the signboard image can be performed on only one of the signboard images, with the purpose of making the two signboard images at the same scale, so as to facilitate image template matching in the subsequent accuracy verification stage. Figure 7 As shown, it is a schematic diagram of the sign image after scaling processing of the present application. For example, the present application performs scaling processing on the sign image B3 after de-perspective processing. Specifically, according to the width-height ratio relationship between the de-perspective result of Bbox_A and the width-height ratio of the de-perspective result of Bbox_B, the sign image B3 after de-perspective processing can be directly scaled to an image of the same scale as the sign image A3 after de-perspective processing. The de-perspective processed sign image B3 is scaled and marked as the scaled sign image B4.
[0124] It should be noted that the above preprocessing step is optional. If the image resolution is high enough, there is no need to scale the sign image, and the corner detection accuracy will not be bad.
[0125] If there is no requirement for the usage scenario of the corner point detection method, that is, no requirement for memory and frame rate, the original image can be directly used for dedistortion without first cropping it into a ROI image and then dedistorting it on the ROI image.
[0126] If the image is close to the principal point and the perspective phenomenon is not serious, you don’t need to do the de-perspective operation, which will have little impact on the corner point results.
[0127] In a possible implementation, for each of the at least two signboard images, extracting a corner point image may specifically include:
[0128] For each of the at least two signboard images, based on the number of corner points contained in the signboard image, the signboard image is cropped to obtain a corner point image having a corresponding number of corner points.
[0129] In the embodiment of the present application, a corner point image is used for template matching to extract corner points. A corner point image refers to an image containing only one corner point of a traffic sign. Using a corner point image containing only one corner point of a traffic sign to extract corner points, rather than using a sign image containing all corner points of a traffic sign to extract corner points, can further reduce memory requirements and effectively improve corner point extraction efficiency.
[0130] In this embodiment, corner point images of a corresponding number of corner points can be cropped according to the number of corner points of the traffic sign contained in the sign image. For example, if the traffic sign contained in the sign image is a rectangular sign, four corner point images can be cropped, namely, a corner point image of the upper left corner, a corner point image of the upper right corner, a corner point image of the lower left corner, and a corner point image of the lower right corner.
[0131] Reference Figure 8 As shown, it is a schematic diagram of the application cropping the sign image to obtain the corner image. The application further crops the image based on the sign image A3 after the perspective removal processing and the sign image B4 after the scaling processing. The cropping can only select an appropriate small frame near the corner point to be extracted. The sign image A3 after the perspective removal processing is cropped to obtain the corner image A5, and the sign image B4 after the scaling processing is cropped to obtain the corner image B5.
[0132] In a possible implementation, in a pre-configured signboard corner template atlas, template matching is performed on the corner image, and according to the template matching result, corner data of the corner image is extracted, which may specifically include:
[0133] In a pre-configured signboard corner point template atlas, template matching is performed on the corner point image to obtain a target signboard corner point template image that matches the corner point image;
[0134] According to the target signboard corner point template image, the corner point data of the corner point image is extracted.
[0135] In this embodiment, by using a signboard corner point template image in a signboard corner point template image collection to perform template matching with the corner point image, a target signboard corner point template image that matches the corner point image is obtained, and by using the target signboard corner point template image to perform image matching with the corner point image, the corner point data of the corner point image can be extracted.
[0136] In a possible implementation, in a pre-configured signboard corner point template atlas, template matching is performed on the corner point image to obtain a target signboard corner point template image that matches the corner point image, which may specifically include:
[0137] Binarize the corner point image;
[0138] In the pre-configured signboard corner point template atlas, template matching is performed on the binarized corner point image to obtain a target signboard corner point template image that matches the binarized corner point image.
[0139] Before performing template matching on the corner point image, the corner point image can be binarized to reduce noise. Fig. 9 As shown, it is a schematic diagram of the corner point image after binarization processing of the present application. After binarization processing of the corner point image A5, the binarization processing of the corner point image A6 is obtained. After binarization processing of the corner point image B5, the binarization processing of the corner point image B6 is obtained.
[0140] In a possible implementation, in a pre-configured signboard corner point template atlas, template matching is performed on the corner point image to obtain a target signboard corner point template image that matches the corner point image, which may specifically include:
[0141] If the signboard included in the signboard image is a rectangular signboard, a rectangular signboard corner point template atlas is obtained from the signboard corner point template atlas;
[0142] Determine a target corner point template atlas for detecting a target corner point from a corner point template atlas for detecting different corner points included in the rectangular signboard corner point template atlas; wherein the rectangular signboard corner point template atlas includes a corner point template atlas for detecting an upper left corner point, a corner point template atlas for detecting an upper right corner point, a corner point template atlas for detecting a lower left corner point, and a corner point template atlas for detecting a lower right corner point;
[0143] For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image.
[0144] In the embodiment of the present application, the sign corner template atlas may be pre-configured, and the sign corner template atlas may include a rectangular sign corner template atlas, a triangular sign corner template atlas, a polygonal sign corner template atlas, etc. The sign corner template atlas may be marked as C, and the corner template diagram in the sign corner template atlas is formulated based on the corner characteristics of the traffic sign. Traffic signs of different shapes have different styles of corresponding corner template diagrams.
[0145] Reference Fig.10 As shown, it is a schematic diagram of the corner point template atlas of the rectangular sign of the present application. The four corner points in the rectangular sign have corresponding corner point template atlases. According to the characteristics of the rectangular sign, the interior of the rectangular sign is generally a fixed background color, and there are obvious edge lines on the outside. Such edge lines have color light and dark distinctions with the internal color and the background. Even if the rectangular sign is a solid color without edge lines, there is also a light and dark difference with the background. There will be obvious right-angle edges near the corner points. By using this feature, we can only care about the corners where the light and dark changes at the edges. These are the corner points that need to be extracted. The corner point template images in the corner point template atlas are divided into two categories, one category represents the color transition from light to dark at the edge of the image, and the other category represents the color transition from dark to light at the edge of the image, covering two changes in the corner point edges of the binary image. The internal area of the traffic sign can be masked to ignore the influence of the internal area and focus only on the matching of the edge corner points. In addition, the image size of the corner point template image needs to be smaller than the matching corner point image.
[0146] In a possible implementation, the corner point template atlas includes a corner point template image indicating that the color at the edge of the image transitions from light to dark, and a corner point template image indicating that the color at the edge of the image transitions from dark to light. For each corner point template image in the target corner point template atlas, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image. Specifically, the following may be included:
[0147] For each corner template map in the target corner template map set, template matching is performed with the corner image to obtain the similarity results of the corner image corresponding to different corner template maps;
[0148] According to the similarity results of the corner point image corresponding to different corner point template images, the corner point template image with the highest similarity in the similarity results is selected as the target signboard corner point template image that matches the corner point image.
[0149] In a specific implementation, it is necessary to select the most suitable corner point template map from the corner point template maps included in the target corner point template map set as the target signboard corner point template map for extracting the corner point data of the corner point image.
[0150] Continuing with the above example, it is necessary to determine the target signboard corner point template image to be matched with the binarized corner point image A6 or the binarized corner point image B6. Since the binarized corner point image A6 and the binarized corner point image B6 are corner point images of the upper right corner, the corner point template atlas of the upper right corner can be obtained. The corner point template atlas of the upper right corner can be marked as Ci. For the two corner point template images in the corner point template atlas Ci of the upper right corner, a template matching method with a mask can be used to perform template matching with the binarized corner point image A6 respectively to obtain a similarity result with each corner point template image in the corner point template atlas Ci of the upper right corner, and the corner point template image Ci0 with the highest similarity in the similarity result is taken. The corner point template image Ci0 is the target signboard corner point template image used to extract corner point data.
[0151] After determining the target signboard corner point template image, the corner point data of the corner point image is extracted according to the target signboard corner point template image, specifically, the target signboard corner point template image is image matched with the corner point image to obtain the corner point data of the corner point image.
[0152] Exemplarily, the corner point template image Ci0 is matched with the binarized corner point image A6 to obtain the corner point data of the corner point VA. The corner point template image Ci0 is matched with the binarized corner point image B6 to obtain the corner point data of the corner point VB. Fig.11 As shown, the triangle position is the extracted corner point position.
[0153] After the above-mentioned corner point extraction step, corner points have been obtained, but it is impossible to judge whether the corner point accuracy meets the requirements. Therefore, this application adds an accuracy verification step to verify the corner point extraction accuracy.
[0154] S303: Acquire at least two target corner point images for the target corner point, wherein the at least two target corner point images include a first corner point image and a second corner point image, and acquire a coordinate mapping relationship between the first corner point image and the second corner point image.
[0155] In the embodiment of the present application, for the target corner points to be extracted, the corresponding first corner point image and second corner point image can be obtained, and the coordinate mapping relationship between the first corner point image and the second corner point image can be obtained.
[0156] In a possible implementation, the at least two signboard images include a first image and a second image, the first corner point image is extracted from the first image, and the second corner point image is extracted from the second image, and obtaining the coordinate mapping relationship between the first corner point image and the second corner point image may specifically include:
[0157] Extracting a third corner point image for the target corner point from the first image, wherein the image size of the third corner point image is larger than the image size of the second corner point image;
[0158] The second corner point image is used as a matching template to perform image matching with the third corner point image to obtain a coordinate mapping relationship between the first corner point image and the second corner point image.
[0159] In the above example, the first corner image may be corner image A5, and the second corner image may be corner image B5. Corner image B5 may be used as a matching template, and the sign image A3 after de-perspective processing may be cropped to obtain corner image A7 (i.e., the third corner image), wherein the image size of corner image A7 is larger than the image size of corner image B5. Corner image A7 is used as the original matching image, and image matching between corner image A7 and corner image B5 is performed to obtain a coordinate mapping relationship R between corner image A7 and corner image B5, and the coordinate mapping relationship between corner image A7 and corner image B5 is used as the coordinate mapping relationship between corner image A5 and corner image B5. Fig.12 The figure shows a schematic diagram of the third triangle point image and its matching result box of the present application.
[0160] S304 . Map the corner point data of the second corner point image to the first corner point image based on the coordinate mapping relationship to obtain mapped corner point data of the corner point data of the second corner point image on the first corner point image.
[0161] Specifically, according to the obtained coordinate mapping relationship R between the corner point image A7 and the corner point image B5, the corner point data of the corner point VB is mapped onto the corner point image A5 to obtain the mapped corner point data of the mapped corner point VB2A.
[0162] S305. In the first corner point image, calculate the distance between the position point represented by the mapped corner point data and the position point represented by the corner point data of the first corner point image to obtain a distance calculation result.
[0163] S306: Based on the distance calculation result, determine whether the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
[0164] In a possible implementation, judging whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the distance calculation result may specifically include:
[0165] If the distance calculation result meets the preset distance condition, it is determined that the extraction accuracy corresponding to the corner point data meets the preset accuracy condition;
[0166] If the distance calculation result does not meet the preset distance condition, it is determined that the extraction accuracy corresponding to the corner point data does not meet the preset accuracy condition.
[0167] For the mapped corner points VB2A and VA, the coordinate differences between the horizontal and vertical coordinates (i.e., the distance calculation results) are calculated respectively, marked as dx and dy respectively, and compared with the preset difference threshold (i.e., the preset distance condition). If it is less than the difference threshold, it is considered that the preset accuracy condition is met and the corner point extraction is successful. If it is not less than the difference threshold, it is considered that the preset accuracy condition is not met and the corner point extraction fails.
[0168] S307: If the extraction accuracy corresponding to the corner point data meets the preset accuracy condition, obtain the corner point detection result of the target corner point according to the corner point data respectively corresponding to at least two target corner point images.
[0169] The corner points obtained through the aforementioned steps are corner points on the corner point image, and the corner points need to be restored to the signboard image.
[0170] Specifically, the corner point VA can be directly restored to the sign image A3 after de-perspective processing according to the cropping relationship, and then through the inverse transformation of the affine transformation, the corner point can be restored to the sign image A2 after de-distortion processing, and then the corner point can be restored to the sign image A1 by adding distortion.
[0171] According to the cropping relationship, the corner point VB can be directly restored to the scaled sign image B4, and then restored to the de-perspective sign image B3 after de-scaling. After the inverse transformation of the affine transformation, the corner point can be restored to the de-distorted sign image B2, and then the corner point can be restored to the sign image B1 by adding distortion.
[0172] Reference Fig.13 As shown, it is a flow chart of the corner point detection method provided in the present application, which may specifically include an input link, a preprocessing and corner point extraction link, an accuracy verification link and an output link. The specific implementation process can be found in the above description and will not be repeated here.
[0173] The corner point detection method provided in the embodiment of the present application can obtain at least two sign images corresponding to the traffic sign, extract the corner point image for each of the at least two sign images, and extract the corner point data of the corner point image by template matching. The template matching method does not have high requirements on the imaging quality of the image, and first extracts the corner point image, and uses the corner point image for template matching, which reduces the requirements on memory and computing power. For the target corner point to be extracted, the embodiment of the present application can obtain at least two target corner point images for the target corner point, and measure the accuracy of the extracted corner point data based on the corner point data corresponding to the at least two target corner point images, and output the final corner point detection result for the target corner point when the extraction accuracy meets the preset accuracy condition. The extraction accuracy of the corner point is guaranteed by increasing the verification process of the extraction accuracy, so that the corner point of the sign can be detected with high accuracy even in the sign image with poor imaging quality, and then the area where the traffic sign is located is accurately located according to the corner point, so as to achieve the effect of accurately identifying the traffic sign.
[0174] Fig.14 A schematic diagram of the structure of the corner point detection device provided in this application is shown in FIG. Fig.14 As shown, the corner point detection device 140 provided in this embodiment includes:
[0175] An acquisition module 1401 is used to acquire at least two sign images corresponding to the traffic sign;
[0176] The extraction module 1402 is used to extract a corner point image for each of the at least two signboard images; perform template matching on the corner point image in a pre-configured signboard corner point template atlas, and extract corner point data of the corner point image according to the template matching result;
[0177] A judgment module 1403 is used to obtain at least two target corner point images for the target corner point, and judge whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images;
[0178] The corner point detection result obtaining module 1404 is used to obtain the corner point detection result of the target corner point according to the corner point data respectively corresponding to at least two target corner point images if the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
[0179] In a possible implementation manner, the at least two target corner point images include a first corner point image and a second corner point image, and the determination module is specifically configured to:
[0180] Acquire a coordinate mapping relationship between the first corner point image and the second corner point image;
[0181] Based on the coordinate mapping relationship, the corner point data of the second corner point image is mapped to the first corner point image to obtain the mapped corner point data of the second corner point image in the first corner point image;
[0182] In the first corner point image, calculating the distance between the position point represented by the mapped corner point data and the position point represented by the corner point data of the first corner point image, and obtaining a distance calculation result;
[0183] Based on the distance calculation result, it is determined whether the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
[0184] In a possible implementation, the at least two signboard images include a first image and a second image, the first corner point image is extracted from the first image, and the second corner point image is extracted from the second image, and the judgment module is specifically used to:
[0185] Extracting a third corner point image for the target corner point from the first image, wherein the image size of the third corner point image is larger than the image size of the second corner point image;
[0186] The second corner point image is used as a matching template to perform image matching with the third corner point image to obtain a coordinate mapping relationship between the first corner point image and the second corner point image.
[0187] In a possible implementation, the extraction module is specifically used for:
[0188] In a pre-configured signboard corner point template atlas, template matching is performed on the corner point image to obtain a target signboard corner point template image that matches the corner point image;
[0189] According to the target signboard corner point template image, the corner point data of the corner point image is extracted.
[0190] In a possible implementation, the extraction module is specifically used for:
[0191] If the signboard included in the signboard image is a rectangular signboard, a rectangular signboard corner point template atlas is obtained from the signboard corner point template atlas;
[0192] Determine a target corner point template atlas for detecting a target corner point from a corner point template atlas for detecting different corner points included in the rectangular signboard corner point template atlas; wherein the rectangular signboard corner point template atlas includes a corner point template atlas for detecting an upper left corner point, a corner point template atlas for detecting an upper right corner point, a corner point template atlas for detecting a lower left corner point, and a corner point template atlas for detecting a lower right corner point;
[0193] For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image.
[0194] In a possible implementation, the corner template atlas includes a corner template map indicating that the color at the edge of the image transitions from light to dark, and a corner template map indicating that the color at the edge of the image transitions from dark to light, and the extraction module is specifically used for:
[0195] For each corner template map in the target corner template map set, template matching is performed with the corner image to obtain the similarity results of the corner image corresponding to different corner template maps;
[0196] According to the similarity results of the corner point image corresponding to different corner point template images, the corner point template image with the highest similarity in the similarity results is selected as the target signboard corner point template image that matches the corner point image.
[0197] In a possible implementation, the extraction module is specifically used for:
[0198] Performing a dedistortion process on each of the at least two signboard images;
[0199] Performing a perspective removal process on the signboard image after the distortion removal process;
[0200] Performing scaling processing on the signboard image after the perspective removal processing to obtain at least two signboard images with the same image size;
[0201] For each sign image of at least two sign images having the same image size, a corner point image is extracted.
[0202] In a possible implementation, the extraction module is specifically used for:
[0203] Binarize the corner point image;
[0204] In the pre-configured signboard corner point template atlas, template matching is performed on the binarized corner point image to obtain a target signboard corner point template image that matches the binarized corner point image.
[0205] The corner point detection device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0206] Fig.15 This is a schematic diagram of the structure of the corner point detection device provided in this application. Fig.15 As shown, the corner point detection device 150 provided in this embodiment includes: at least one processor 1501 and a memory 1502. Optionally, the device 150 also includes a communication component 1503. The processor 1501, the memory 1502 and the communication component 1503 are connected via a bus.
[0207] In a specific implementation process, at least one processor 1501 executes the computer-executable instructions stored in the memory 1502, so that at least one processor 1501 executes the above method.
[0208] The specific implementation process of the processor 1501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0209] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0210] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0211] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0212] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0213] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0214] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0215] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0216] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0219] If the function 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, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0220] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0221] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A corner point detection method, It is characterized in that include: Acquire at least two traffic sign images corresponding to the traffic sign; For each of the at least two signboard images, extract a corner point image; Performing template matching on the corner point image in a pre-configured signboard corner point template atlas, and extracting corner point data of the corner point image according to the template matching result; Acquire at least two target corner point images for the target corner point, and determine whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images; If the extraction accuracy corresponding to the corner point data meets the preset accuracy condition, the corner point detection result of the target corner point is obtained according to the corner point data respectively corresponding to the at least two target corner point images.
2. The method according to claim 1, It is characterized in that The at least two target corner point images include a first corner point image and a second corner point image, and judging whether the extraction accuracy corresponding to the corner point data satisfies a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images includes: Acquire a coordinate mapping relationship between the first corner point image and the second corner point image; Based on the coordinate mapping relationship, mapping the corner point data of the second corner point image to the first corner point image to obtain mapped corner point data of the corner point data of the second corner point image in the first corner point image; In the first corner point image, calculating the distance between the position point represented by the mapped corner point data and the position point represented by the corner point data of the first corner point image to obtain a distance calculation result; Based on the distance calculation result, it is determined whether the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
3. The method according to claim 2, It is characterized in that The at least two signboard images include a first image and a second image, the first corner point image is extracted from the first image, and the second corner point image is extracted from the second image, and acquiring a coordinate mapping relationship between the first corner point image and the second corner point image includes: Extracting a third corner point image for the target corner point from the first image, wherein the image size of the third corner point image is larger than the image size of the second corner point image; The second corner point image is used as a matching template to perform image matching with the third corner point image to obtain a coordinate mapping relationship between the first corner point image and the second corner point image.
4. The method according to claim 1, It is characterized in that The step of performing template matching on the corner point image in a pre-configured signboard corner point template atlas and extracting corner point data of the corner point image according to the template matching result comprises: Performing template matching on the corner point image in a pre-configured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image; According to the target signboard corner point template image, the corner point data of the corner point image is extracted.
5. The method according to claim 4, It is characterized in that The step of performing template matching on the corner point image in a pre-configured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image comprises: If the signboard included in the signboard image is a rectangular signboard, obtaining a rectangular signboard corner point template atlas from the signboard corner point template atlas; Determine a target corner point template atlas for detecting the target corner point from the corner point template atlas for detecting different corner points included in the rectangular signboard corner point template atlas; wherein the rectangular signboard corner point template atlas includes a corner point template atlas for detecting the upper left corner point, a corner point template atlas for detecting the upper right corner point, a corner point template atlas for detecting the lower left corner point, and a corner point template atlas for detecting the lower right corner point; For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image.
6. The method according to claim 5, It is characterized in that The corner point template atlas includes a corner point template image indicating that the color at the edge of the image transitions from light to dark, and a corner point template image indicating that the color at the edge of the image transitions from dark to light. For each corner point template image in the target corner point template atlas, template matching is performed with the corner point image to obtain a target signboard corner point template image that matches the corner point image, including: For each corner point template image in the target corner point template image set, template matching is performed with the corner point image to obtain similarity results between the corner point image and different corner point template images; According to the similarity results between the corner point image and different corner point template images, the corner point template image with the highest similarity in the similarity results is selected as the target signboard corner point template image that matches the corner point image.
7. The method according to any one of claims 1 to 6, It is characterized in that The step of extracting a corner point image for each of the at least two signboard images comprises: Performing a dedistortion process on each of the at least two signboard images; Performing a perspective removal process on the signboard image after the distortion removal process; Performing scaling processing on the signboard image after the perspective removal processing to obtain at least two signboard images with the same image size; For each sign image of at least two sign images having the same image size, a corner point image is extracted.
8. The method according to any one of claims 4 to 6, It is characterized in that The step of performing template matching on the corner point image in a pre-configured signboard corner point template atlas to obtain a target signboard corner point template image that matches the corner point image comprises: Performing binarization processing on the corner point image; In the pre-configured signboard corner point template atlas, template matching is performed on the corner point image after the binarization process to obtain a target signboard corner point template image that matches the corner point image after the binarization process.
9. A corner point detection device, It is characterized in that include: An acquisition module, used to acquire at least two sign images corresponding to the traffic sign; An extraction module is used to extract a corner point image for each of the at least two signboard images; perform template matching on the corner point image in a pre-configured signboard corner point template atlas, and extract corner point data of the corner point image according to the template matching result; A judgment module, used to obtain at least two target corner point images for the target corner point, and judge whether the extraction accuracy corresponding to the corner point data meets a preset accuracy condition based on the corner point data respectively corresponding to the at least two target corner point images; The corner point detection result obtaining module is used to obtain the corner point detection result of the target corner point according to the corner point data respectively corresponding to the at least two target corner point images if the extraction accuracy corresponding to the corner point data meets the preset accuracy condition.
10. A corner point detection device / computer readable storage medium / computer program product, It is characterized in that The corner point detection device comprises a memory and a processor, the memory stores computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 8; and / or, The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor; and / or, The computer program product comprises a computer program, which implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Automobile and road traffic sign detection method and device
CN109558768A
Sign angular point acquisition method, device and equipment
CN113496145A
Cited By
Image stitching method, computer readable storage medium and computer program product
CN119359538A
