Overlook conversion method, conversion device, and computer readable storage medium
By acquiring and correcting the calibrator corners in the fisheye image, calculating the top view transformation matrix, converting the fisheye image into a bird's eye view, solving the problem of converting the fisheye image into a bird's eye view in the prior art, and realizing the surround view system Panoramic stitching.
Patent Information
- Application Number
- CN202310694229.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2024-12-17
AI Technical Summary
The existing automotive surround-view panoramic system mainly uses two-dimensional flat panoramic images, which is difficult to convert the fisheye image collected by fisheye lenses into a bird's-eye view, affecting the implementation of the surround-view panoramic system.
By obtaining the fisheye image containing the calibrator, image distortion correction is performed and multiple corner points of the calibrator are extracted, and the plan view transformation matrix is solved according to the corner point simultaneous equation, and the fisheye image is converted into a bird's eye view. Specific steps include image distortion correction, extraction of corner points, improving contrast preprocessing, image threshold segmentation, connecting area search and verification of black rectangular blocks, and finally calculating the top view transformation matrix based on corner points.
The distortion correction and transformation of fisheye images are realized, feature corners are extracted, perspective transformation matrix is calculated, and subsequently applied to the circumferential view system to convert the fisheye images into bird's eye view, supporting panoramic stitching.
Smart Images

Figure CN119151776A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and more specifically, to a bird's-eye view transformation method, a transformation device, and a computer-readable storage medium. Background Art
[0002] As part of the Advanced Driver Assistance System (ADAS), the car surround view system can effectively alleviate the problem of the driver's obstructed vision, and intuitively present the objects within the 360-degree range around the car to the driver, improving driving safety in situations such as meeting and reversing. The car panoramic systems used in the market are almost all two-dimensional planar panoramas, that is, panoramic systems composed of overhead images. As a pre-stitching link, the overhead transformation of the image is crucial to the realization of the surround view system. Therefore, there is an urgent need for a bird's-eye view transformation method that can transform the fisheye image captured by the fisheye lens into a bird's-eye view. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a bird's-eye view transformation method, a transformation device and a computer-readable storage medium that can transform a fisheye image into a bird's-eye view.
[0004] In a first aspect, the present application provides a top-down transformation method, the method comprising:
[0005] Acquire a fisheye image containing a calibration object;
[0006] performing image distortion correction on the fisheye image; and,
[0007] Multiple corner points of the calibration object in the distortion-corrected fisheye image are extracted, and the bird's-eye view transformation matrix is solved according to the simultaneous equations of all corner points.
[0008] In a possible implementation, the calibration object includes a white rectangular block and at least one black rectangular block disposed on the white rectangular block, wherein the step of extracting multiple corner points of the calibration object in the fisheye image after distortion correction is extracting multiple corner points of each black rectangular block, including:
[0009] Extract each black rectangular block and obtain the point set of the outline of the black rectangular block;
[0010] Calculate the distance between two pixels in the point set, and select the two pixels corresponding to the maximum distance as the first corner point and the second corner point of the black rectangular block;
[0011] A straight line L is formed by the first corner point and the second corner point;
[0012] Calculate the vertical distances from all pixel points in the point set except the first corner point and the second corner point to the straight line L, and select the pixel points corresponding to the two values with the largest vertical distances as the third and fourth corner points of the black rectangular block.
[0013] In a possible implementation, extracting each black rectangular block includes:
[0014] Preprocessing the fisheye image after image distortion correction to improve contrast;
[0015] Perform image threshold segmentation on the preprocessed image;
[0016] Search the connected regions of the image threshold segmentation results based on the four-connected regions or eight-connected regions;
[0017] The black rectangular block area in the connected area search result is determined based on the prior knowledge of the aspect ratio b and area size S of the black rectangular block.
[0018] In a possible implementation, a white cross is set at the center of each black rectangular block; wherein, the extraction of each black rectangular block also includes verifying the accuracy of the extraction of the black rectangular block: extracting straight lines from the image threshold segmentation result; selecting two intersecting straight lines as crosses; and determining whether there is a cross located within the area of the extracted black rectangular block.
[0019] In a possible implementation, the preprocessing of the fisheye image after image distortion correction to improve contrast includes:
[0020] Convert the fisheye image to grayscale image;
[0021] Perform gamma brightness correction on grayscale images;
[0022] In a possible implementation, two black rectangular blocks are arranged in parallel on the white rectangular block, and solving the top-view transformation matrix according to the simultaneous equations of all corner points includes:
[0023] Get the eight corner points of the two black rectangular blocks;
[0024] Convert each corner point into the desired corner point under the bird's eye view;
[0025] Determine a top-view transformation matrix according to simultaneous equations of each of the four corner points and the four desired corner points corresponding to the four corner points;
[0026] Among all the overhead transformation matrices obtained from the eight corner points and the eight expected corner points corresponding to the eight corner points, the optimal solution is selected as the final overhead transformation matrix H.
[0027] In a possible implementation, the four expected corner points of the left black rectangular block in the bird's-eye view are respectively set as the upper left corner point J0 (x0, y0), the upper right corner point J1 (x1, y1), the lower left corner point J2 (x2, y2), and the lower right corner point J3 (x3, y3), and the four expected corner points of the right black rectangular block are respectively set as the upper left corner point J4 (x4, y4), the upper right corner point J5 (x5, y5), the lower left corner point J6 (x6, y6), and the lower right corner point J7 (x7, y7); the pixel coordinate values of the above eight expected corner points are derived from the center position between the two black rectangular blocks:
[0028] x0=W1 / 2-(B / 2+W2) / L, y0=H1-(A+H2) / L; x1=x0+W2 / L, y1=y0; x2=x0, y2=y0-H2 / L; x3=x1, y3=y2;
[0029] x4=W1 / 2+B / (2L), y4=H1-(A+H2) / L; x5=x4+W2 / L, y5=y4; x6=x4, y6=y4-H2 / L; x7=x5, y7=y6;
[0030] Among them, the conversion ratio from the physical coordinate system to the pixel coordinate system is L cm / pix, the width and height of the captured image are W1pix and H1pix respectively; the distance between two parallel black rectangular blocks is Bcm, and the distance between the black rectangular block and the vehicle is A cm; the width and height of the black rectangular block are W2cm and H2cm respectively.
[0031] In a possible implementation, the fisheye image is subjected to image distortion correction based on an isometric projection imaging model:
[0032] x′0=f*tanθ*(m-Center.x) / h0+Center.x;
[0033] y′0=f*tanθ*(n-Center.y) / h0+Center.y;
[0034]
[0035] θ=h0 / f;
[0036] Among them, the equidistant projection model is R=fθ; (m,n) is any distortion point in the fisheye image, (x′0, y′0) is the pixel point after distortion correction of the distortion point (m,n); f is the distance from the center point of the unit spherical coordinate system in the equidistant projection model to the center point of the fisheye image in the graphics coordinate system; (Center.x, Center.y) is the coordinate of the center point of the fisheye image in the graphics coordinate system; θ is the angle of the incident light; h0 is the image height, that is, the distance from the distortion point (m,n) to the center point of the fisheye image.
[0037] In a second aspect, the present application provides a top view transformation device, comprising:
[0038] A marking object used to be set on the ground, comprising a white rectangular block and at least one black rectangular block set on the white rectangular block;
[0039] A fisheye lens, arranged on a vehicle to capture a fisheye image containing a calibration object; and
[0040] An image processor is connected to the fisheye lens and is used to perform the steps of the bird's-eye view transformation method on the fisheye image.
[0041] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the overhead transformation method are implemented.
[0042] The beneficial effect of the bird's-eye view transformation method provided by the present application is that the fisheye image is transformed into a perspective image through a distortion correction transformation, the characteristic corner points of the calibration object are extracted from the perspective image, and the perspective transformation matrix is calculated through the simultaneous equations of the characteristic corner points. In this way, the surround view system that subsequently applies the bird's-eye view transformation method can use the perspective transformation matrix to transform the fisheye image in the surround view system into a bird's-eye view, so that the bird's-eye view can be used to achieve panoramic stitching. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0044] Figure 1 A flowchart of a top-down transformation method according to an embodiment of the present application;
[0045] Figure 2 A fisheye image including a calibration object according to an embodiment of the present application;
[0046] Figure 3For Figure 2 The result of fisheye image distortion correction;
[0047] Figure 4 For Figure 3 Schematic diagram of the result after image threshold segmentation after distortion correction;
[0048] Figure 5 For Figure 4 The result of extracting the black rectangular block area;
[0049] Figure 6 It is a schematic diagram of the expected corner point distribution of two black rectangular blocks and the orientation of the black rectangular blocks and the vehicle in the bird's-eye view of an embodiment of the present application;
[0050] Figure 7 for Figure 7 For Figure 3 The result image after the overhead transformation matrix is used for the overhead transformation. DETAILED DESCRIPTION
[0051] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0053] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0054] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0055] The top-view transformation method, transformation device and computer-readable storage medium of the present application are now described in detail with reference to the accompanying drawings.
[0056] Please refer to Figure 1 , the overhead view transformation method provided in the embodiment of the present application includes.
[0057] Step S100: Acquire a fisheye image containing a calibration object;
[0058] Step S200: performing image distortion correction on the fisheye image; and
[0059] Step S300: extract multiple corner points of the calibration object in the fisheye image after distortion correction, and solve the bird's-eye view transformation matrix H according to the simultaneous equations of all corner points.
[0060] In a specific embodiment, for step S200, the fisheye image is first subjected to distortion correction before the bird's-eye view transformation, and image distortion correction is performed on the fisheye image based on an isometric projection imaging model. The isometric projection model adopted is R=fθ, wherein f is the focal length, i.e., the distance from the center point of the unit spherical coordinate system in the isometric projection model to the center point of the fisheye image in the graphic coordinate system; θ is the angle of the incident light ray.
[0061] Assume that (m, n) is a distortion point of any imaging of the fisheye image. According to the distortion correction principle under the equidistant projection model, the distortion point (m, n) is corrected to obtain the corrected pixel point (x′0, y′0):
[0062] x′0=f*tanθ*(m-Center.x) / h0+Center.x;
[0063] y′0=f*tanθ*(n-Center.y) / h0+Center.y;
[0064]
[0065] θ=h0 / f;
[0066] Among them, (Center.x, Center.y) is the coordinate of the center point of the fisheye image in the graphics coordinate system; θ is the incident light angle in the equidistant projection model; h0 is the image height, that is, the distance from the distortion point (m,n) to the center point of the fisheye image. Figure 2 is the fisheye image containing the calibration object, Figure 3 This is the distortion correction result of the fisheye image.
[0067] In the embodiment of the present application, the calibration object includes a white rectangular block and at least one black rectangular block disposed on the white rectangular block. In step S300, extracting multiple corner points of the calibration object in the distortion-corrected fisheye image is extracting multiple corner points of each black rectangular block, specifically including:
[0068] Step S310: extract each black rectangular block to obtain a point set of the outline of the black rectangular block;
[0069] Step S320: Calculate the distance between two pixels in the point set, and select two pixels corresponding to the maximum distance as the first corner point and the second corner point of the black rectangular block;
[0070] Step S330: forming a straight line L by the first corner point and the second corner point;
[0071] Step S340: Calculate the vertical distances from all pixel points in the point set except the first corner point and the second corner point to the straight line L, and select the pixel points corresponding to the two values with the largest vertical distances as the third and fourth corner points of the black rectangular block.
[0072] It is worth noting that, for the pixel points of the outline of a black rectangular block, the distance between each pixel point is calculated to obtain the two pixel points corresponding to the maximum distance. The two pixel points, that is, the first corner point and the second corner point are obtained as the two corner points on a diagonal line of the black rectangular block. Then, in the point set of the outline of the black rectangular block, find the two pixel points corresponding to the two maximum vertical distances from the straight line L formed by the first corner point and the second corner point. The two pixel points are the other two corner points of the black rectangular block. Therefore, for steps S310 to S340, there are four vertices of a black rectangular block.
[0073] In a specific embodiment, for step S310 , extracting each black rectangular block specifically includes the following steps S311 to S314 .
[0074] Step S311: performing preprocessing on the fisheye image after image distortion correction to improve contrast.
[0075] The preprocessing to improve the contrast includes: converting the fisheye image into a grayscale image; performing gamma brightness correction on the grayscale image. In the gamma brightness correction of the grayscale image, the grayscale value of the grayscale image is first normalized to between 0 and 1; then correction is performed according to the gamma correction principle: the patent of this invention needs to correct the brightness near the black calibration block. The actual measurement shows that the grayscale value at the black calibration block is about 100, so this paper takes the gamma value of 1.5; the image after gamma correction is denormalized.
[0076] Since the bird's-eye view transformation method is used in a surround view stitching system, which is often used outdoors, such as a surround view stitching system that assists the driving of private cars, buses, or trailers, and various uneven lighting conditions such as backlighting often occur in outdoor scenes, it is necessary to perform contrast processing on the fisheye image.
[0077] Step S312: Perform image threshold segmentation on the preprocessed image. The image threshold segmentation uses the maximum inter-class variance to perform image threshold segmentation on the image. In the embodiment of the present application, when performing image segmentation, the black rectangular block is used as the foreground target, and the others are used as the background target. When the maximum inter-class variance is used for image threshold segmentation, the threshold value range used for the black rectangular block is [30,120].
[0078] Step S313: searching for connected regions on the image threshold segmentation result based on four connected regions or eight connected regions;
[0079] Step S314: Determine the black rectangular block area in the connected area search result based on the prior knowledge of the black rectangular block's aspect ratio b and area size S. The aspect ratio and area size of the black rectangular block used are known. According to the size and aspect ratio of the black rectangular block actually used, a suitable threshold is set. The connected area smaller than the threshold is the interference area, and the connected area greater than or equal to the threshold is the black rectangular block area.
[0080] in, Figure 4 for Figure 3 The result diagram after distortion correction is a schematic diagram of the result after image threshold segmentation. Figure 5 For Figure 4 The result of extracting the black rectangular block area.
[0081] In one embodiment of the application, a white cross is set at the center of each black rectangular block. It can be understood that accurate extraction of the black rectangular blocks of the fisheye image can ensure the accuracy of the perspective transformation matrix solved subsequently, wherein the white cross in the black rectangular block can be used to verify the accuracy of the extraction of the black rectangular block.
[0082] Specifically, the process of extracting each black rectangular block also includes verifying the accuracy of the extraction of the black rectangular block: extracting straight lines from the image threshold segmentation result of step S312; selecting two intersecting straight lines as crosses; and judging whether there is a cross located in the area of the black rectangular block extracted in step S314. If the cross extracted from the image threshold segmentation result of step S312 is located in the area of the black rectangular block, it can be considered that the extracted black rectangular block is accurate, otherwise it is wrong.
[0083] Furthermore, when the cross extracted in the image threshold segmentation result of step S312 is located in the area of the black rectangular block extracted in step S314, the intersection of the set of pixels of the extracted cross and the set of pixels of the extracted black rectangular block is not empty.
[0084] In one embodiment of the application, two black rectangular blocks are arranged parallel to each other on the white rectangular block, and for step S300, solving the overhead transformation matrix according to the simultaneous equations of all corner points includes the following steps S350 to S380.
[0085] Step S350: Obtain eight corner points of two black rectangular blocks.
[0086] Step S360: convert each corner point into an expected corner point in the bird's-eye view.
[0087] It is worth noting that the top-view transformation matrix to be solved can be set as H i : The perspective transformation matrix contains eight parameters. In order to obtain the bird's-eye view used for surround stitching, in order to obtain the bird's-eye view transformation matrix, at least four feature points before the bird's-eye view transformation and the expected feature points of the four feature points under the bird's-eye view are required, that is, four pairs of input points and output points are required to solve the bird's-eye view transformation matrix.
[0088] Reference Figure 6 , assuming that the conversion ratio from the physical coordinate system to the pixel coordinate system is L cm / pix (centimeters per pixel). For example, in the display, 200 cm in the real scene is represented by 50 pixels on the image, so the conversion ratio is 4 cm / pix; assuming that the width and height of the acquired image are W1pix and H1pix respectively; assuming that the distance between the two parallel black rectangular blocks on the white rectangular block of the calibration object is B cm; assuming that the width and height of the black rectangular block are W2 cm and H2 cm respectively, and assuming that the distance between the black rectangular block and the vehicle is A cm.
[0089] like Figure 6As shown, and in the actual process of installing the camera, in order to facilitate solving perspective transformation, calibration and subsequent stitching in the surround stitching system, the fisheye lens will be installed on the middle axis between the two black rectangular blocks; specifically, for example, the camera that collects the fisheye image is located in front of the front of the vehicle and is set on the central axis of the vehicle, and the two black rectangular blocks are set in front of the front of the vehicle and the central axis of the vehicle is located at the center position between the two black rectangular blocks. The horizontal axis coordinate of the center point of the fisheye image collected in this way is the same as the horizontal coordinate of the center position between the two black rectangular blocks, both of which are 1 / 2W. The distance between the black rectangular block and the vehicle can be understood as the distance between the black rectangular block and the front of the vehicle. The above describes the situation where the calibration object is set in front of the front of the vehicle and the fisheye lens is set at the front of the vehicle. When the calibration object is set at the rear of the vehicle and the fisheye lens is set at the rear of the vehicle, or the calibration object is set on the left and right sides of the vehicle and the fisheye lens is set on the left and right sides of the vehicle, the situation is similar and will not be repeated here.
[0090] It can be understood that in the bird's-eye view, the rectangle remains rectangular. Thus, according to the above-mentioned fisheye lens installation and the setting of the black rectangular block of the calibration object, the eight corner points of the two black rectangular blocks correspond to the eight expected corner points of the bird's-eye view image. The origin of the image coordinate system is in the upper left corner of the image. The one closer to the ordinate of the two black rectangular blocks is the left black rectangular block, and the one farther from the ordinate is the right black rectangular block. The four expected corner points of the left black rectangular block under the bird's-eye view are set as the upper left corner point J0 (x0, y0), the upper right corner point J1 (x1, y1), the lower left corner point J2 (x2, y2), and the lower right corner point J3 (x3, y3). The four expected corner points of the right black rectangular block are the upper left corner point J4 (x4, y4), the upper right corner point J5 (x5, y5), the lower left corner point J6 (x6, y6), and the lower right corner point J7 (x7, y7). The pixel coordinate values of the above eight expected corner points are derived from the center position between the two black rectangular blocks:
[0091] x0=W1 / 2-(B / 2+W2) / L, y0=H1-(A+H2) / L; x1=x0+W2 / L, y1=y0; x2=x0, y2=y0-H2 / L; x3=x1, y3=y2;
[0092] x4=W1 / 2+B / (2L), y4=H1-(A+H2) / L; x5=x4+W2 / L, y5=y4; x6=x4, y6=y4-H2 / L; x7=x5, y7=y6.
[0093] Step S370: Determine a top-view transformation matrix according to simultaneous equations of each four corner points and four expected corner points corresponding to the four corner points.
[0094] Assume that any corner point of the black rectangular block is t(x,y), and the expected corner point corresponding to the corner point t(x,y) in the bird's-eye view is J i (x i ,y i ), i=0,1,2,3,4,5,6,7. Then t(x,y),J i (x i ,y i ) and H i The connection equation is:
[0095]
[0096]
[0097] In this way, a bird's-eye view transformation matrix can be solved according to the four corner points and the four expected corner points corresponding to the four corner points.
[0098] Step S380: Among all the top-view transformation matrices obtained from the eight corner points and the eight expected corner points corresponding to the eight corner points, an optimal solution is selected as the final top-view transformation matrix.
[0099] It is worth noting that when a top-view transformation matrix is obtained for every four corner points and four expected corner points, multiple top-view transformation matrices can be obtained for the eight corner points and eight expected corner points. The optimal solution is selected as the final top-view transformation matrix as follows: For each obtained top-view transformation matrix H i For example, the four corner points of one of the black rectangular blocks obtained in step S300 belong to a calculated top-view transformation matrix H i In the above example, four predicted corner points are obtained, and then the difference Z between the four predicted corner points and the four expected corner points of the black rectangle is used as the multiple obtained top view transformation matrices H i For example, when the difference Z is the smallest, the corresponding top view transformation matrix H i is the optimal solution. Figure 7 For Figure 3 The result of the top-down transformation matrix is as follows: Figure 7 The numbers in the figure indicate the corner positions of the marked black rectangular blocks.
[0100] An embodiment of the present application also provides a bird's-eye view transformation device, which includes a calibration object for setting on the ground, a fisheye lens and an image processor, the calibration object includes a white rectangular block and at least one black rectangular block set on the white rectangular block; the fisheye lens is used to be set on a vehicle to collect a fisheye image containing the calibration object; the image processor is connected to the fisheye lens and is used to perform the steps of the above-mentioned bird's-eye view transformation method on the fisheye image.
[0101] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned overhead transformation method are implemented.
[0102] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for top-down transformation, characterized in that: include: Acquire a fisheye image containing a calibration object; Perform image distortion correction on fisheye images; as well as Multiple corner points of the calibration object in the distortion-corrected fisheye image are extracted, and the bird's-eye view transformation matrix is solved according to the simultaneous equations of all corner points.
2. The method for top-down transformation according to claim 1, characterized in that: The calibration object includes a white rectangular block and at least one black rectangular block disposed on the white rectangular block, wherein the step of extracting multiple corner points of the calibration object in the fisheye image after distortion correction is extracting multiple corner points of each black rectangular block, including: Extract each black rectangular block and obtain the point set of the outline of the black rectangular block; Calculate the distance between two pixels in the point set, and select the two pixels corresponding to the maximum distance as the first corner point and the second corner point of the black rectangular block; A straight line L is formed by the first corner point and the second corner point; Calculate the vertical distances from all pixel points in the point set except the first corner point and the second corner point to the straight line L, and select the pixel points corresponding to the two values with the largest vertical distances as the third and fourth corner points of the black rectangular block.
3. The method for top-down transformation according to claim 2, characterized in that: The step of extracting each black rectangular block comprises: Preprocessing the fisheye image after image distortion correction to improve contrast; Perform image threshold segmentation on the preprocessed image; Search the connected regions of the image threshold segmentation results based on the four-connected regions or eight-connected regions; The black rectangular block area in the connected area search result is determined based on the prior knowledge of the aspect ratio b and area size S of the black rectangular block.
4. The method for top-down transformation according to claim 3, characterized in that: A white cross is set at the center of each black rectangular block; wherein, the extraction of each black rectangular block also includes verifying the accuracy of the extraction of the black rectangular block: extracting straight lines from the image threshold segmentation result; selecting two intersecting straight lines as crosses; and determining whether there is a cross located in the area of the extracted black rectangular block.
5. The method for top-down transformation according to claim 3, characterized in that: The preprocessing of improving the contrast of the fisheye image after image distortion correction includes: Convert the fisheye image to grayscale image; Perform gamma brightness correction on grayscale images.
6. The method for top-view transformation according to any one of claims 2 to 5, characterized in that: Two black rectangular blocks are arranged in parallel on the white rectangular block. The method of solving the top-view transformation matrix according to the simultaneous equations of all corner points includes: Get the eight corner points of the two black rectangular blocks; Convert each corner point into the desired corner point under the bird's eye view; Determine a top-view transformation matrix according to simultaneous equations of each of the four corner points and the four desired corner points corresponding to the four corner points; Among all the overhead transformation matrices obtained from the eight corner points and the eight expected corner points corresponding to the eight corner points, the optimal solution is selected as the final overhead transformation matrix H.
7. The method for top-view transformation according to claim 6, characterized in that: The four expected corner points of the left black rectangular block in the bird's-eye view are set as the upper left corner J0 (x0, y0), the upper right corner J1 (x1, y1), the lower left corner J2 (x2, y2), and the lower right corner J3 (x3, y3), and the four expected corner points of the right black rectangular block are set as the upper left corner J4 (x4, y4), the upper right corner J5 (x5, y5), the lower left corner J6 (x6, y6), and the lower right corner J7 (x7, y7); the pixel coordinate values of the above eight expected corner points are derived from the center position between the two black rectangular blocks: x0=W1 / 2-(B / 2+W2) / L,y0=H1-(A+H2) / L; x1=x0+W2 / L,y1=y0; x2= x0, y2=y0-H2 / L; x3=x1, y3=y2; x4=W1 / 2+B / (2L), y4=H1-(A+H2) / L; x5=x4+W2 / L, y5=y4; x6=x4, y6=y4-H2 / L; x7=x5, y7=y6; Among them, the conversion ratio from the physical coordinate system to the pixel coordinate system is L cm / pix, the width and height of the captured image are W1pix and H1pix respectively; the distance between two parallel black rectangular blocks is Bcm, and the distance between the black rectangular block and the vehicle is A cm; the width and height of the black rectangular block are W2cm and H2cm respectively.
8. The method for top-view transformation according to any one of claims 1 to 5, characterized in that: Image distortion correction of fisheye images based on the imaging model of equidistant projection: x′0=f*tang*(m-Centerx) / h0+Center.x; y′0=f*tanθ*(n-Center.y) / h0+Center.y; θ=h0 / f; Among them, the equidistant projection model is R=fθ; (m, n) is any distortion point in the fisheye image, (x′0, y′0) is the pixel point after distortion correction of the distortion point (m, n); f is the distance from the center point of the unit spherical coordinate system in the equidistant projection model to the center point of the fisheye image in the graphics coordinate system; (Center.x, Center.y) is the coordinate of the center point of the fisheye image in the graphics coordinate system; θ is the angle of the incident light; h0 is the image height, that is, the distance from the distortion point (m, n) to the center point of the fisheye image.
9. A top view transformation device, characterized in that: include: A marking object used to be set on the ground, comprising a white rectangular block and at least one black rectangular block set on the white rectangular block; A fisheye lens, which is arranged on a vehicle to collect a fisheye image including a calibration object; as well as An image processor is connected to the fisheye lens and is used to perform the steps of the bird's-eye view transformation method as described in any one of claims 1 to 8 on the fisheye image.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the overhead view transformation method according to any one of claims 1 to 8 are implemented.
