An arrow picture data augmentation method and system, an electronic device, and a storage medium

By converting the front view into a bird's-eye view and transforming the arrow type, the problem of modifying local image information in existing technologies is solved, thereby improving the generalization ability of deep learning models.

CN115713678BActive Publication Date: 2026-03-31WUHAN ZHONGHAITING DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing data augmentation methods are mainly based on overall image transformation, which cannot effectively solve the small sample problem, especially the modification of local image information.

Method used

By using the intrinsic and extrinsic parameters of the target camera and preset inverse perspective transformation parameters, a horizontal homography matrix and a field of view transformation matrix are generated. After being converted into a bird's-eye view, the type is transformed according to the aspect ratio characteristics of the arrows, and the background color is optimized using the Poisson fusion algorithm. Finally, the bird's-eye view is converted back into a front view.

Benefits of technology

This improves the generalization ability of deep learning models by balancing the number of samples from different categories through local image transformation, thereby enhancing the model's generalization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115713678B_ABST
    Figure CN115713678B_ABST
Patent Text Reader

Abstract

The application provides an arrow picture data augmentation method, which comprises the following steps: obtaining a horizontal homography matrix and a field of view transformation matrix of a target camera based on intrinsic parameters, extrinsic parameters and preset inverse perspective transformation parameters of the target camera; obtaining a perspective transformation matrix and an inverse perspective transformation matrix based on the horizontal homography matrix and the field of view transformation matrix, and transforming a first front view into a bird's eye view according to the perspective transformation matrix; transforming the types of arrows in the bird's eye view according to the aspect ratio characteristics of multiple types of arrows; and transforming the bird's eye view after the type transformation into a second front view based on the inverse perspective transformation matrix. The application transforms a front view into a bird's eye view, then transforms multiple types of arrows in the picture in the bird's eye view, and then transforms the bird's eye view after the transformation into a front view, so that the transformation conforms to the front picture imaging rule when the front view is locally transformed, and the generalization ability of a deep learning model is improved through local image transformation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data augmentation technology, and more specifically, to a method, system, electronic device, and storage medium for augmenting arrow image data. Background Technology

[0002] Data augmentation is a commonly used technique in deep learning model training. It primarily enriches the diversity of the training dataset and maintains data balance, thereby enhancing the generalization ability of the trained model. Current data augmentation methods mainly include horizontal / vertical flipping, rotation, scaling, cropping, shearing, translation, contrast adjustment, color dithering, and noise reduction. These traditional data augmentation algorithms have relatively little impact on the performance of deep learning models. However, these traditional methods are all based on overall image transformation and therefore cannot address the problem of solving the few-shot problem by modifying local image information. Therefore, how to solve the few-shot problem by modifying local image information is a pressing issue that needs to be addressed. Summary of the Invention

[0003] This invention addresses the technical problems existing in the prior art by providing a method, system, electronic device, and storage medium for augmenting arrow image data, thereby solving the problem of how to address small sample size by modifying local information of an image.

[0004] According to a first aspect of the present invention, a method for augmenting arrow image data is provided, comprising:

[0005] Based on the intrinsic and extrinsic parameters of the target camera and the preset inverse perspective transformation parameters, the horizontal homography matrix and field of view transformation matrix of the target camera are obtained.

[0006] Based on the horizontal homography matrix and the field of view transformation matrix, the inverse perspective transformation matrix and the perspective matrix are obtained. The first front view is then transformed into a bird's-eye view according to the perspective transformation matrix.

[0007] Based on the aspect ratio characteristics of multiple types of arrows, the arrow types in the bird's-eye view are transformed.

[0008] Based on the inverse perspective transformation matrix, the bird's-eye view after type transformation is further transformed into a second front view.

[0009] Based on the above technical solution, the present invention can also be improved as follows.

[0010] Preferably, the intrinsic parameters of the target camera include at least focal length fu, focal length fv, optical center cu, and optical center cv, and the extrinsic parameters include at least pitch angle Pitc, yaw angle Yaw, and the height h of the camera center from the ground. The preset inverse perspective transformation parameters include at least the size of the inverse perspective image, the area of ​​the inverse perspective transformation, the size of the inverse perspective image, and the distance from the forward projection of the camera.

[0011] Preferably, the step of transforming the arrow types in the bird's-eye view based on the aspect ratio characteristics of multiple types of arrows includes:

[0012] Obtain the aspect ratio characteristics of the original arrow and the arrow to be replaced, and scale the original arrow proportionally so that the length of the original arrow is the same as the length of the arrow to be replaced, and the width changes with the length.

[0013] The average background pixel value of the region image of the arrow to be replaced is extracted based on the K-means. The pixel value of the original arrow after proportional scaling is modified to the average background pixel value. The original arrow to be replaced is then replaced with the modified original arrow, thus completing the arrow type transformation.

[0014] Preferably, after the step of completing the arrow type transformation, the following steps are included:

[0015] The background color of the region where the arrow type is transformed is optimized based on the Poisson fusion algorithm in OpenCV.

[0016] Preferably, the step of optimizing the background color of the region for arrow-type transformation based on the Poisson fusion algorithm in OpenCV includes:

[0017] The bird's-eye view after the arrow type transformation is completed is combined with the bird's-eye view before the transformation using Poisson fusion to obtain the first fusion result;

[0018] The first fusion result is then combined with the proportionally scaled original arrow image using a Poisson fusion method to optimize the background color of the region where the arrow type has been transformed.

[0019] Preferably, after the step of transforming the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix, the method further includes:

[0020] The missing portion of the second front view is replaced to obtain the augmented image.

[0021] Preferably, after the step of transforming the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix, the method further includes:

[0022] Based on the first front view and the second front view, two identical networks are trained, and the recall rate of the trained networks is compared to obtain the data augmentation effect.

[0023] According to a second aspect of the present invention, an arrow image data augmentation system is provided, comprising:

[0024] The matrix acquisition module is used to obtain the horizontal homography matrix and field-of-view transformation matrix of the target camera based on the target camera's intrinsic and extrinsic parameters and preset inverse perspective transformation parameters.

[0025] The view transformation module is used to obtain an inverse perspective transformation matrix and a perspective matrix based on the horizontal homography matrix and the field of view transformation matrix, and to transform the first front view into a bird's-eye view according to the perspective transformation matrix.

[0026] The type transformation module is used to transform the arrow types in the bird's-eye view based on the aspect ratio characteristics of multiple types of arrows.

[0027] The view transformation module is used to transform the bird's-eye view after type transformation into a second front view based on the inverse perspective transformation matrix.

[0028] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the processor is configured to implement the steps of any of the arrow image data augmentation methods described in the first aspect when executing a computer management program stored in the memory.

[0029] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management class program is stored, wherein when executed by a processor, the computer management class program implements the steps of any of the arrow image data augmentation methods in the first aspect described above.

[0030] This invention provides a method, system, electronic device, and storage medium for augmenting arrow image data. The method includes: obtaining the horizontal homography matrix and field-of-view transformation matrix of the target camera based on its intrinsic and extrinsic parameters and preset inverse perspective transformation parameters; obtaining the perspective transformation matrix and inverse perspective transformation matrix based on the horizontal homography matrix and the field-of-view transformation matrix; transforming a first front view into a bird's-eye view according to the perspective transformation matrix; performing type transformation on the arrow types in the bird's-eye view based on the aspect ratio characteristics of multiple types of arrows; and further transforming the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix. This invention transforms the front view into a bird's-eye view, then transforms multiple types of arrows in the image within the bird's-eye view, and finally transforms the bird's-eye view back into the front view. This ensures that the transformation conforms to the imaging rules of front-view images during local transformation of the front view. This allows for the replacement of numerous straight arrows on traffic surfaces with other types of arrows, balancing the number of different categories of samples, and improving the generalization ability of deep learning models through local image transformation. Attached Figure Description

[0031] Figure 1 A flowchart of an arrow image data augmentation method provided by the present invention;

[0032] Figure 2 A schematic diagram illustrating the experimental results provided by this invention;

[0033] Figure 3 A schematic diagram illustrating the simplified algorithm flow provided by this invention;

[0034] Figure 4 A schematic diagram of an arrow image data augmentation system provided by the present invention;

[0035] Figure 5 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;

[0036] Figure 6 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation

[0037] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0038] Figure 1 A flowchart of an arrow image data augmentation method provided by the present invention is shown below. Figure 1 As shown, the method includes:

[0039] Step S100: Based on the intrinsic and extrinsic parameters of the target camera and the preset inverse perspective transformation parameters, obtain the horizontal homography matrix and field of view transformation matrix of the target camera;

[0040] It should be noted that the executing entity of the method in this embodiment can be a computer terminal device with data processing, network communication, and program execution functions, such as a computer or tablet computer; it can also be a server device with the same or similar functions, or a cloud server with similar functions. This embodiment does not impose any restrictions on this. For ease of understanding, this embodiment and the following embodiments will be described using a computer device as an example.

[0041] The computer environment used in this embodiment is Ubuntu 16.04, the graphics card is GTX 1080 Ti, the software development environment is PyCharm and AdaConda, and the deep learning development environment is PyTorch.

[0042] It is understood that the intrinsic parameters of the target camera include, but are not limited to, focal length fu, focal length fv, optical center cu and optical center cv, and the extrinsic parameters include, but are not limited to, pitch angle Pitc, yaw angle Yaw and the height h of the camera center from the ground. The preset inverse perspective transformation parameters include, but are not limited to, the size of the inverse perspective image, the area of ​​the inverse perspective transformation, the size of the inverse perspective image and the distance from the forward projection of the camera.

[0043] Step S200: Based on the horizontal homography matrix and the field of view transformation matrix, obtain the inverse perspective transformation matrix and the perspective matrix, and transform the first front view into a bird's-eye view according to the perspective transformation matrix;

[0044] In this specific implementation, the front view of the camera is converted into a bird's-eye view. This can be achieved by utilizing the transformation relationships between different coordinate systems during the camera imaging process. For example, given the camera pose, the camera can be rotated 90 degrees towards the road surface to obtain a new camera pose. In this new pose, the camera is perpendicular to the road surface and pointing downwards. By using homography matrix transformation to change the camera's viewing angle, a new camera pose can be obtained, which is the bird's-eye view of the image. Since the camera pose only changes the pitch angle, the homography matrix H is calculated as follows:

[0045] H = K * R * K -1 ;

[0046] Where K is the intrinsic parameter of the camera, and R is the camera rotation matrix.

[0047] After obtaining the homography matrix, the field of view transformation matrix is ​​obtained by using the region and distance of the inverse perspective transformation. Finally, the inverse perspective transformation matrix is ​​obtained by multiplying the homography matrix and the field of view transformation matrix.

[0048] By combining the perspective transformation function loading principle and perspective transformation matrix in the OpenCV library with the aforementioned inverse perspective transformation matrix, a bird's-eye view of the target image can be obtained.

[0049] Step S300: Based on the aspect ratio characteristics of multiple types of arrows, transform the arrow types in the bird's-eye view;

[0050] To further describe the steps of the above arrow type transformation, the specific implementation method can be as follows:

[0051] Step S301: Obtain the aspect ratio characteristics of the original arrow and the arrow to be replaced, and scale the original arrow proportionally so that the length of the original arrow is the same as the length of the arrow to be replaced, and the width changes with the length.

[0052] Step S302: Extract the average background pixel value of the region image of the arrow to be replaced based on the K-means, modify the pixel value of the original arrow after proportional scaling to the average background pixel value, and replace the arrow to be replaced with the modified original arrow to complete the arrow type transformation.

[0053] In practical implementation, since the length of different types of arrows is fixed, but the width varies greatly, there are more straight arrows on conventional roads and fewer left-turn, straight, or U-turn arrows. Therefore, this embodiment of the invention needs to replace the straight arrows in the bird's-eye view with other types of arrows that are less numerous.

[0054] This embodiment uses replacing the straight arrow with a left-turn arrow as an example. See [link / reference] Figure 2 , Figure 2 This is a schematic diagram illustrating the experimental results provided by the present invention. First, the aspect ratios of the straight arrow and the left-turn arrow are obtained separately. Then, the left-turn arrow is scaled proportionally so that its length matches the length of the straight arrow, and its width varies with the length. This ensures that the replaced left-turn arrow... Figure 2 ③ will not be distorted; finally, extract the straight arrow image and use K-means to extract the average pixel values ​​of the foreground and background, then extract the left-turn arrow image ( Figure 2 All pixel values ​​in (③) are replaced with the background pixel values ​​of the vertical arrows, ultimately forming the image. Figure 2 (Middle ④)

[0055] To further reduce the problem of large gradients at the stitching edges of the replacement region and an unrealistic scene, this embodiment includes the following steps after completing the arrow type transformation:

[0056] Step S303: Optimize the background color of the region where the arrow type is transformed based on the Poisson fusion algorithm in OpenCV.

[0057] Its specific implementation can be as follows:

[0058] Step S3031: Perform Poisson fusion between the bird's-eye view after the arrow type transformation and the bird's-eye view before the transformation to obtain the first fusion result;

[0059] Step S3032: Perform Poisson fusion between the first fusion result and the proportionally scaled original arrow image to optimize the background color of the region where the arrow type has been transformed.

[0060] In its specific implementation, this invention uses the Poisson blending algorithm in OpenCV to adjust the style and background color locally based on the gradient. This invention uses two Poisson blending operations: the first is to use the bird's-eye view obtained in step S302 after the arrow type transformation is completed. Figure 2 (③) Perform a Poisson fusion with the bird's-eye view before the transformation. The second step is to combine the left-turn arrow generated in step S302. Figure 2 The image in step ④ is merged with the output image generated by the first Poisson fusion, with the placement based on the center point of the straight arrow in the original image. The fusion process changes the color and gradient in the left-turn arrow image to achieve a seamless fusion effect.

[0061] Step S400: Based on the inverse perspective transformation matrix, the bird's-eye view after type transformation is further transformed into a second front view.

[0062] It is understandable that the above-mentioned inverse perspective transformation matrix can be obtained by mapping the points in the front view to the points in the bird's-eye view, thus obtaining the inverse perspective matrix from the bird's-eye view to the front view.

[0063] To further obtain an augmented image suitable for use, after the step of transforming the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix, the following steps are included:

[0064] Step S500: Replace the missing parts of the second front view to obtain the augmented image.

[0065] In the actual implementation, due to the limitations of the bird's-eye view, only a part of the original image is shown in the reversed front view. Therefore, it is necessary to replace the black area in the converted front view with the pixel value of the same position in the original image to finally form the augmented image.

[0066] To further verify the data augmentation effect of the augmented image, after the step of transforming the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix, the following steps are included:

[0067] Step S600: Based on the first front view and the second front view, train two identical networks, compare the recall rate of the trained networks, and obtain the data augmentation effect.

[0068] In the specific implementation, the augmented image obtained using the above method was fed into the YOLOv5 model for training to obtain Model 1, while Model 2 was trained by feeding the original image into the same network as the training dataset. Through model testing and comparison, it was found that Model 1 and Model 2 improved the recall metric by 8% after data augmentation, which fully demonstrates that using augmented images for model training improves the generalization ability of the model to a certain extent.

[0069] Understandably, given the deficiencies in the background technology, this invention proposes an arrow image data augmentation method. The method includes: obtaining the horizontal homography matrix and field-of-view transformation matrix of the target camera based on its intrinsic and extrinsic parameters and preset inverse perspective transformation parameters; obtaining the perspective transformation matrix and inverse perspective transformation matrix based on the aforementioned horizontal homography matrix and field-of-view transformation matrix; transforming the first front view into a bird's-eye view according to the aforementioned perspective transformation matrix; performing type transformation on the arrow types in the aforementioned bird's-eye view based on the aspect ratio characteristics of multiple types of arrows; and further transforming the type-transformed bird's-eye view into a second front view based on the aforementioned inverse perspective transformation matrix. This invention transforms the front view into a bird's-eye view, then transforms multiple types of arrows in the image within the bird's-eye view, and finally transforms the transformed bird's-eye view into the front view. This ensures that the transformation conforms to the imaging rules of front-view images during local transformation of the front view, thereby replacing the numerous straight arrows on traffic surfaces with other types of arrows, balancing the number of different categories of samples, and improving the generalization ability of deep learning models through local image transformation.

[0070] In one possible application scenario, this embodiment of the invention also provides an algorithm flowchart, see [link to flowchart]. Figure 3 , Figure 3 A schematic diagram illustrating the simplified algorithm flow provided by this invention; in Figure 3 In this embodiment of the invention, the front view is transformed into a bird's-eye view by combining the original camera image with the camera's intrinsic and extrinsic parameters. Then, the target area is replaced, and finally, the replaced bird's-eye view is restored to the front view and compared with the original camera image. Figure 1 The augmented output image is obtained by using the sample as a training sample.

[0071] In this embodiment, since the road in the bird's-eye view is vertically forward, replacing the straight arrows with left-turn arrows in the bird's-eye view will also result in the left-turn arrows pointing vertically forward. Then, restoring the replaced bird's-eye view to the front view, the original rectangular area of ​​the replaced left-turn arrow will become an irregular quadrilateral area during the perspective transformation. This transformation conforms to the imaging rules of the front view image. Another aspect is that replacing a large number of straight arrows with other types of arrows balances the number of samples between different categories. Using this image augmentation method can improve the generalization ability of deep learning models.

[0072] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an arrow image data augmentation system provided in an embodiment of the present invention, as shown below. Figure 4 As shown, an arrow image data augmentation system includes a matrix acquisition module 100, a view transformation module 200, a type transformation module 300, and a view conversion module 400, wherein:

[0073] The matrix acquisition module 100 is used to obtain the horizontal homography matrix and field-of-view transformation matrix of the target camera based on the intrinsic and extrinsic parameters and preset inverse perspective transformation parameters of the target camera; the view transformation module 200 is used to obtain the inverse perspective transformation matrix and perspective matrix based on the horizontal homography matrix and the field-of-view transformation matrix, and transform the first front view into a bird's-eye view according to the perspective transformation matrix; the type transformation module 300 is used to perform type transformation on the arrow types in the bird's-eye view according to the aspect ratio characteristics of multiple types of arrows; the view conversion module 400 is used to further transform the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix.

[0074] It is understood that the arrow image data augmentation system provided by the present invention corresponds to the arrow image data augmentation method provided in the foregoing embodiments. The relevant technical features of the arrow image data augmentation system can be referred to the relevant technical features of the arrow image data augmentation method, and will not be repeated here.

[0075] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 5 As shown, this embodiment of the invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320. When the processor 1320 executes the computer program 1311, it performs the following steps:

[0076] Based on the intrinsic and extrinsic parameters of the target camera and the preset inverse perspective transformation parameters, the horizontal homography matrix and field of view transformation matrix of the target camera are obtained; based on the above horizontal homography matrix and field of view transformation matrix, the perspective transformation matrix and inverse perspective transformation matrix are obtained; the first front view is transformed into a bird's-eye view according to the above perspective transformation matrix; based on the aspect ratio characteristics of multiple types of arrows, the arrow types in the above bird's-eye view are transformed; based on the above inverse perspective transformation matrix, the bird's-eye view after the type transformation is further transformed into a second front view.

[0077] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 6 As shown, this embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored. When the computer program 1411 is executed by a processor, it performs the following steps:

[0078] Based on the intrinsic and extrinsic parameters of the target camera and the preset inverse perspective transformation parameters, the horizontal homography matrix and field of view transformation matrix of the target camera are obtained; based on the above horizontal homography matrix and field of view transformation matrix, the perspective transformation matrix and inverse perspective transformation matrix are obtained; the first front view is transformed into a bird's-eye view according to the above perspective transformation matrix; based on the aspect ratio characteristics of multiple types of arrows, the arrow types in the above bird's-eye view are transformed; based on the above inverse perspective transformation matrix, the bird's-eye view after the type transformation is further transformed into a second front view.

[0079] This invention provides a method, system, and storage medium for augmenting arrow image data. The method includes: obtaining a horizontal homography matrix and a field-of-view transformation matrix of a target camera based on its intrinsic and extrinsic parameters and preset inverse perspective transformation parameters; obtaining a perspective transformation matrix and an inverse perspective transformation matrix based on the horizontal homography matrix and the field-of-view transformation matrix; transforming a first front view into a bird's-eye view according to the perspective transformation matrix; performing type transformation on the arrow types in the bird's-eye view based on the aspect ratio characteristics of multiple types of arrows; and further transforming the type-transformed bird's-eye view into a second front view based on the inverse perspective transformation matrix. This invention transforms the front view into a bird's-eye view, then transforms multiple types of arrows in the image within the bird's-eye view, and finally transforms the transformed bird's-eye view into a front view. This ensures that the transformation conforms to the imaging rules of front-view images during local transformation of the front view. Consequently, it can replace the numerous straight arrows on traffic surfaces with other types of arrows, balancing the number of different categories of samples, and thus improving the generalization ability of deep learning models through local image transformation.

[0080] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0081] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0082] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0083] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0085] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0086] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An arrow picture data augmentation method, characterized by, The method comprises: obtaining a horizontal homography matrix and a field of view transformation matrix of a target camera based on intrinsic parameters, extrinsic parameters and preset inverse perspective transformation parameters of the target camera; obtaining an inverse perspective transformation matrix and a perspective matrix based on the horizontal homography matrix and the field of view transformation matrix, and transforming a first front view into an aerial view according to the perspective transformation matrix; transforming the type of an arrow in the aerial view according to the aspect ratio characteristics of multiple types of arrows; the step of transforming the type of the arrow in the aerial view according to the aspect ratio characteristics of multiple types of arrows comprises: obtaining the aspect ratio characteristics of an original arrow and a to-be-replaced arrow, scaling the original arrow proportionally so that the length of the original arrow is consistent with the length of the to-be-replaced arrow, and the width changes with the length; extracting the average foreground pixel value of the region picture of the to-be-replaced arrow based on K-means, modifying the pixel value of the proportionally scaled original arrow to the average foreground pixel value, replacing the to-be-replaced arrow with the modified original arrow, and completing the arrow type transformation; after the step of completing the arrow type transformation, the method comprises: performing background color optimization on the region of the arrow type transformation based on the Poisson fusion algorithm in OpenCV; the step of performing background color optimization on the region of the arrow type transformation based on the Poisson fusion algorithm in OpenCV comprises: Poisson fusing the aerial view after the arrow type transformation with the aerial view before the transformation to obtain a first fusion result; Poisson fusing the first fusion result with the proportionally scaled original arrow picture to optimize the background color of the region of the arrow type transformation; transforming the aerial view after the type transformation back into a second front view based on the inverse perspective transformation matrix.

2. The arrow picture data augmentation method of claim 1, wherein The intrinsic parameters of the target camera at least include focal length fu, focal length fv, optical center cu and optical center cv, the extrinsic parameters at least include pitch angle Pitc, yaw angle Yaw and camera center distance ground height h, and the preset inverse perspective transformation parameters at least include the size of the inverse perspective image, the region of the inverse perspective transformation, the size of the inverse perspective image and the distance from the camera front projection.

3. The arrow picture data augmentation method of claim 1, wherein after the step of transforming the aerial view after the type transformation back into a second front view based on the inverse perspective transformation matrix, the method comprises: replacing the missing part of the second front view to obtain an augmented picture.

4. The arrow picture data augmentation method of claim 1, wherein after the step of transforming the aerial view after the type transformation back into a second front view based on the inverse perspective transformation matrix, the method comprises: training two same networks based on the first front view and the second front view, comparing the recall rate indicators of the trained networks, and obtaining the data augmentation effect.

5. An arrow picture data augmentation system applying the arrow picture data augmentation method according to any one of claims 1 to 4, characterized by, The method comprises a matrix obtaining module configured to obtain a horizontal homography matrix and a field of view transformation matrix of a target camera based on intrinsic parameters, extrinsic parameters and preset inverse perspective transformation parameters of the target camera; a view transformation module configured to obtain an inverse perspective transformation matrix and a perspective matrix based on the horizontal homography matrix and the field of view transformation matrix, and transform a first front view into an aerial view according to the perspective transformation matrix. The type conversion module is configured to convert the type of the arrow in the bird's eye view according to the aspect ratio characteristics of a plurality of type arrows. The view conversion module is configured to convert the type-converted bird's eye view into a second front view based on the inverse perspective transformation matrix.

6. An electronic device, comprising: A computer program product comprising a memory, a processor for executing a computer management program stored in the memory to implement the method of claim 1 4. The steps of the method of augmenting arrow picture data of any one of the preceding claims.

7. A computer readable storage medium characterized by a computer management program stored thereon, which, when executed by a processor, implements the method of claim 1 4. The steps of the arrow picture data augmentation method of any one of the preceding claims.

Citation Information

Patent Citations

  • Pavement arrow identification method and device based on template self-supervision

    CN113947763A