Camera monitoring method and device, storage medium and chip

By extracting the ground coordinate points in the image collected by the camera and converting the coordinate system, monitoring the target distance between the camera and the ground solves the monitoring problem of camera angle changes, achieves accurate monitoring in natural scenes, and improves automatic driving Perceptual accuracy of the system.

CN118865285AActive Publication Date: 2024-10-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310466507.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2024-10-29
Estimated Expiration
2043-04-26

Smart Images

  • Figure CN118865285A_ABST
    Figure CN118865285A_ABST
Patent Text Reader

Abstract

The invention relates to a camera monitoring method and device, a storage medium and a chip. The method comprises the steps that an image collected by a camera in a vehicle is acquired; extracting a plurality of ground coordinate points included in the ground in the image; projecting the plurality of ground coordinate points from the pixel coordinate system to a camera coordinate system to obtain a plurality of first coordinate points; determining a plurality of second initial coordinate points based on an unknown depth parameter and the plurality of first coordinate points; projecting the plurality of second initial coordinate points from the camera coordinate system to a vehicle body coordinate system of the vehicle to obtain a plurality of third coordinate points, taking the coordinate value of each third coordinate point in the vertical direction as zero as a constraint, and outputting a known depth parameter; outputting a plurality of second target coordinate points based on a known depth parameter and the plurality of first coordinate points; and obtaining a target distance between the camera and the ground based on the plurality of second target coordinate points, and determining a monitoring result based on the target distance and a pre-obtained reference distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of autonomous driving technology, and in particular to a camera monitoring method, device, storage medium and chip. Background Art

[0002] Since the camera can sense the rich texture features in the scene, it is an indispensable part of the vehicle's autonomous driving. In order to use the camera's perception results in the vehicle's autonomous driving, for example, using the perception results such as lane lines and traffic lights in driving and parking, the perception results need to be projected into the vehicle's body coordinate system. The camera's installation position is crucial to the projection of the perception results into the vehicle's body coordinate system.

[0003] However, during the driving process of the vehicle, the angle of the camera is often prone to change, so it is necessary to monitor the angle of the camera in a timely and accurate manner. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a camera monitoring method, device, storage medium and chip.

[0005] According to a first aspect of an embodiment of the present disclosure, a camera monitoring method is provided, including:

[0006] Obtaining images captured by a camera in a vehicle;

[0007] Extracting a plurality of ground coordinate points included in the ground in the image;

[0008] Projecting the plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points;

[0009] Determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system;

[0010] Projecting the plurality of the second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, taking the coordinate value of each of the third coordinate points in the vertical direction as zero as a constraint, and outputting a known depth parameter;

[0011] Based on the known depth parameter and the first coordinate points, output a plurality of second target coordinate points;

[0012] Based on the plurality of second target coordinate points, a target distance between the camera and the ground in the image is obtained, and based on the target distance and a pre-obtained reference distance, a monitoring result for characterizing the degree of deviation of the angle of the camera is determined.

[0013] In some embodiments, extracting a plurality of ground coordinate points included in the ground in the image includes:

[0014] Acquire a region of interest in the image;

[0015] Performing ground segmentation processing on the region of interest to obtain the ground;

[0016] Acquire a plurality of ground coordinate points included in the ground.

[0017] In some embodiments, the method further comprises:

[0018] When the number of the plurality of ground coordinate points is greater than or equal to the preset number of coordinate points, projecting the plurality of ground coordinate points from the pixel coordinate system to the camera coordinate system to obtain the plurality of first coordinate points;

[0019] When the number of the plurality of ground coordinate points is less than the preset number of coordinate points, the steps of acquiring the image captured by the camera in the vehicle and extracting the plurality of ground coordinate points included in the ground in the image are repeated until the number of the plurality of ground coordinate points extracted is greater than or equal to the preset number of coordinate points.

[0020] In some embodiments, obtaining the target distance between the camera and the ground in the image based on the plurality of second target coordinate points includes:

[0021] Determining a plurality of distances between a plurality of the second target coordinate points and the origin of the camera coordinate system;

[0022] An average operation is performed on a plurality of the distances to obtain the target distance between the camera and the ground in the image.

[0023] In some embodiments, determining a plurality of second initial coordinate points based on the unknown depth parameter and the plurality of first coordinate points comprises:

[0024] Based on the product between the unknown depth parameter and the plurality of first coordinate points, a plurality of second initial coordinate points are determined.

[0025] In some embodiments, the image comprises a frame, and the method further comprises:

[0026] Repeat the step of acquiring an image captured by a camera in a vehicle, until the step of obtaining a target distance between the camera and the ground in the image based on the plurality of second target coordinate points is performed, until a plurality of target distances are obtained, and / or the plurality of target distances obtained converge, the plurality of target distances being the distances between the camera and the ground in the image of a preset number of frames;

[0027] The step of determining a monitoring result for characterizing the degree of deviation of the angle of the camera based on the target distance and the pre-obtained reference distance includes:

[0028] Performing an average operation on the plurality of target distances to obtain an average target distance;

[0029] A monitoring result for characterizing the degree of deviation of the angle of the camera is determined according to the average target distance and the reference distance.

[0030] In some embodiments, determining the monitoring result for characterizing the degree of deviation of the angle of the camera according to the average target distance and the reference distance includes:

[0031] When the average target distance is higher than a first preset threshold or lower than a second preset threshold, obtaining the monitoring result for characterizing that the degree of deviation of the angle of the camera is not within an error range, wherein the first preset threshold and the second preset threshold are obtained based on the reference distance;

[0032] The method further comprises:

[0033] Output prompt information according to the monitoring result.

[0034] According to a second aspect of an embodiment of the present disclosure, there is provided a camera monitoring device, comprising:

[0035] An acquisition module is configured to acquire an image captured by a camera in the vehicle;

[0036] An extraction module, configured to extract a plurality of ground coordinate points included in the ground in the image;

[0037] A first projection module is configured to project the plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points;

[0038] A first determination module is configured to determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system;

[0039] A first output module is configured to project the plurality of second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, and take the coordinate value of each third coordinate point in the vertical direction as zero as a constraint, and output a known depth parameter;

[0040] A second output module is configured to output a plurality of second target coordinate points based on the known depth parameter and the plurality of first coordinate points;

[0041] The monitoring module is configured to obtain the target distance between the camera and the ground in the image based on multiple second target coordinate points, and to determine a monitoring result for characterizing the degree of deviation of the angle of the camera based on the target distance and a pre-obtained reference distance.

[0042] According to a third aspect of an embodiment of the present disclosure, there is provided a camera monitoring device, including:

[0043] processor;

[0044] a memory for storing processor-executable instructions;

[0045] Wherein, the processor is configured to:

[0046] Obtaining images captured by a camera in a vehicle;

[0047] Extracting a plurality of ground coordinate points included in the ground in the image;

[0048] Projecting the plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points;

[0049] Determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system;

[0050] Projecting the plurality of the second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, taking the coordinate value of each of the third coordinate points in the vertical direction as zero as a constraint, and outputting a known depth parameter;

[0051] Based on the known depth parameter and the first coordinate points, output a plurality of second target coordinate points;

[0052] Based on the plurality of second target coordinate points, a target distance between the camera and the ground in the image is obtained, and based on the target distance and a pre-obtained reference distance, a monitoring result for characterizing the degree of deviation of the angle of the camera is determined.

[0053] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the camera monitoring method provided in the first aspect of the present disclosure are implemented.

[0054] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, comprising a processor and an interface; the processor is used to read instructions to execute any one of the methods described in the first aspect of the present disclosure.

[0055] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by taking the coordinate value of each third coordinate point in the vertical direction as zero as a constraint, outputting a known depth parameter, and obtaining the depth of the ground coordinate point in the camera coordinate system, so that the target distance between the camera and the ground in the image can be obtained through the second target coordinate point of the ground coordinate point in the camera coordinate system, and then the angle of the camera can be monitored through the target distance. This monitoring method is not constrained by lane lines and can be more widely used in natural scenes.

[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0058] Figure 1 The figure is a flow chart of a camera monitoring method according to an exemplary embodiment.

[0059] Figure 2 is an exemplary diagram showing a region of interest according to an exemplary embodiment.

[0060] Figure 3 The invention is a block diagram of a camera monitoring device according to an exemplary embodiment.

[0061] Figure 4 is a block diagram of a vehicle according to an exemplary embodiment.

[0062] Figure 5 The invention is a block diagram of a camera monitoring device according to an exemplary embodiment. DETAILED DESCRIPTION

[0063] 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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0064] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0065] As mentioned in the background technology, the angle of the camera is often prone to change during the driving process of the vehicle. Therefore, it is necessary to monitor the angle of the camera in a timely and accurate manner. In the related technology, the angle of the camera can be monitored through the following two schemes: Scheme 1: When the vehicle leaves the factory, the camera takes a picture to detect the key points belonging to the vehicle body; in the actual driving scene of the vehicle, take another picture and extract the key points belonging to the vehicle body again; compare the changes in the positions of the two key points. If it exceeds the set threshold, it is considered that the external parameters have changed greatly and the camera angle has changed greatly. Scheme 2: Use a model to detect or segment two or more parallel lane lines in the image taken by the camera; and fit the points in the same lane line; calculate the vanishing points of the two lane lines through equations, and then calculate the external parameters of the camera, and measure the change in the camera angle by calculating the deviation between the external parameter angle calibrated with the production line.

[0066] However, Solution 1 requires the extraction of key points on the vehicle body. It is difficult to extract key points for the solid color parts of the vehicle body, so subsequent matching is difficult, and personalized accessories on the vehicle body, such as body stickers, will affect the matching of key points. Solution 2 requires more than two parallel lines, which leads to higher requirements for the scene on the one hand, and on the other hand, for cameras installed on both sides of the vehicle, even if the actual scene has enough lane lines, the camera usually cannot detect more than two parallel lines. Therefore, the use of Solution 2 is very limited.

[0067] In view of this, the present disclosure proposes a camera monitoring method, device, storage medium and chip. The camera monitoring method of the present disclosure is not restricted by lane lines and can be more widely applied in natural scenes.

[0068] Figure 1 is a flow chart of a camera monitoring method according to an exemplary embodiment. The camera monitoring method can be executed by a vehicle, such as Figure 1 As shown, the camera monitoring method may include the following steps.

[0069] Step 110: Acquire an image captured by a camera in the vehicle.

[0070] In some embodiments, the camera can be installed at any position in the vehicle, for example, it can be installed at the front side, rear side or B-pillar of the vehicle, where the B-pillar refers to the pillar between the front and rear doors of the vehicle. The present disclosure does not impose any restrictions on the position of the camera in the vehicle.

[0071] Step 120: extract multiple ground coordinate points included in the ground in the image.

[0072] In some embodiments, extracting a plurality of ground coordinate points included in the ground in the image may include: performing ground segmentation processing on the image to obtain the ground in the image; and extracting a plurality of ground coordinate points included in the ground.

[0073] In some embodiments, the ground segmentation processing of the image can be performed by a pre-trained ground segmentation model. The ground segmentation model can be trained in the following manner: obtaining multiple frames of sample images with ground annotated; iteratively updating the parameters of the initial ground segmentation model based on the multiple frames of sample images to reduce the loss function value corresponding to each sample image, and obtaining a trained ground segmentation model; wherein the loss function value corresponding to each sample image is determined by the following process: processing the sample image through the ground segmentation model to obtain a predicted ground; and determining the loss function value based on the difference between the predicted ground and the annotated ground.

[0074] For example, during the training process of the ground segmentation model, the parameters of the initial ground segmentation model can be continuously adjusted to reduce the loss function value corresponding to each sample image so that the loss function value meets the preset conditions. For example, the loss function value converges, or the loss function value is less than the preset value. When the loss function meets the preset conditions, the model training is completed and a trained ground segmentation model is obtained. The trained ground segmentation model can perform ground segmentation processing on the image to obtain the ground included in the image.

[0075] In some embodiments, the ground coordinate point may be a ground coordinate point included in the ground in the region of interest in the image. Extracting multiple ground coordinate points included in the ground in the image may include: obtaining the region of interest in the image; performing ground segmentation processing on the region of interest to obtain the ground; and obtaining multiple ground coordinate points included in the ground.

[0076] The disclosed embodiment extracts the ground coordinate points included in the ground in the area of ​​interest. For different images, it can uniformly measure the target distance between the ground of the image and the camera through the same area of ​​interest in the image. In the process of calculating the target distance, only the ground coordinate points in the area of ​​interest need to be paid attention to, which can reduce the amount of calculation and improve the camera monitoring efficiency.

[0077] In some embodiments, the region of interest may be specifically determined according to actual needs. For example, the region of interest may be the middle region of the image. Figure 2 By taking the middle area of ​​the image as the region of interest, it is ensured that there is ground in the region of interest, and the distance between the ground represented by the middle area and the vehicle body is moderate, which can ensure the accuracy of the calculated target distance.

[0078] In some embodiments, the ground segmentation processing of the region of interest can be performed using a pre-trained ground segmentation model. For the ground segmentation model, please refer to the above-mentioned related description, which will not be repeated here.

[0079] Step 130 : Projecting a plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points.

[0080] It can be understood that the ground coordinate point is a coordinate point in the image, and the pixel coordinate system is constructed based on the image, so the ground coordinate point can be in the pixel coordinate system. In some embodiments, multiple ground coordinate points can be projected from the pixel coordinate system to the camera coordinate system according to the intrinsic parameter matrix to obtain multiple first coordinate points. The intrinsic parameter matrix can be obtained by calibrating the camera in advance, for example, calibrating the camera when the vehicle leaves the factory to obtain the intrinsic parameter matrix.

[0081] The intrinsic parameter matrix can be used to reflect the conversion relationship from the camera coordinate system to the pixel coordinate system. Depending on the imaging model of the camera, the parameters included in the intrinsic parameter matrix of the camera may also be different. The imaging model of the camera may include a pinhole imaging model, a fisheye model, and an omnidirectional model. For the specific parameters included in the intrinsic parameter matrix, please refer to the relevant technology, which will not be repeated here.

[0082] The first coordinate point does not include the depth in the camera coordinate system, that is, it does not include the coordinate value in the z-axis direction of the camera coordinate system. For example, taking a single ground coordinate point (u, v) as an example, the first coordinate point (x, y) corresponding to the ground coordinate point can be obtained according to the following formula (1):

[0083]

[0084] Where x represents the coordinate value of the first coordinate point on the x-axis of the camera coordinate system, y represents the coordinate value of the first coordinate point on the y-axis of the camera coordinate system, u represents the pixel value of the ground coordinate point on the u-axis of the pixel coordinate system, v represents the pixel value of the ground coordinate point on the v-axis of the pixel coordinate system, K represents the intrinsic parameter matrix, K -1 Represents the inverse matrix of the intrinsic parameter matrix.

[0085] In some embodiments, the camera monitoring method may further include: when the number of the multiple ground coordinate points is greater than or equal to the preset number of coordinate points, projecting the multiple ground coordinate points from the pixel coordinate system to the camera coordinate system to obtain multiple first coordinate points; when the number of the multiple ground coordinate points is less than the preset number of coordinate points, repeatedly executing the steps of acquiring an image captured by a camera in the vehicle and extracting the multiple ground coordinate points included in the ground in the image until the number of the extracted multiple ground coordinate points is greater than or equal to the preset number of coordinate points.

[0086] The number of preset coordinate points can be specifically determined according to actual needs. For example, the number of preset coordinate points can be determined according to the total number of coordinate points in the image where the ground is located. For example, the number of preset coordinate points t1 can be obtained according to the formula t1=ratio1*N, where ratio1 represents the first weight value and N represents the total number of coordinate points in the image. It can be understood that when the image where the ground is located is the region of interest, that is, when the ground is extracted from the region of interest, N can represent the total number of coordinate points in the region of interest.

[0087] In some embodiments, the first weight value may be any value in [0, 1]. The first weight value may be specifically determined according to actual needs. The closer the first weight value is to 1, the higher the requirement for the ground coordinate points. In a possible implementation, the first weight value may be 0.5, indicating that only half of the ground coordinate points in the image are required to calculate the target distance.

[0088] The disclosed embodiment projects multiple ground coordinate points from the pixel coordinate system to the camera coordinate system when the number of ground coordinate points is greater than or equal to the preset number of coordinate points to obtain multiple first coordinate points for subsequent target distance calculation, and when the number of multiple ground coordinate points is less than the preset number of coordinate points, repeatedly executes the steps of acquiring an image captured by a camera in a vehicle and extracting multiple ground coordinate points included in the ground in the image until the number of the extracted multiple ground coordinate points is greater than or equal to the preset number of coordinate points, that is, when the number of ground coordinate points does not meet the requirement, acquires the next frame of image and extracts the ground coordinate points of the next frame of image. Thus, the target distance is calculated only when the number of ground coordinate points is greater than or equal to the preset number of coordinate points, which can ensure the accuracy of the target distance and improve the accuracy of the calculated target distance.

[0089] Step 140: determining a plurality of second initial coordinate points based on the unknown depth parameter and the plurality of first coordinate points, wherein the depth parameter is used to reflect the depth of each second initial coordinate point in the camera coordinate system.

[0090] In some embodiments, determining a plurality of second initial coordinate points based on the unknown depth parameter and the plurality of first coordinate points may include: determining the plurality of second initial coordinate points based on a product of the unknown depth parameter and the plurality of first coordinate points.

[0091] For example, taking the unknown depth parameter λ and the aforementioned single first coordinate point (x, y) as an example, the second initial coordinate point (λx, λy, λ) corresponding to the single first coordinate point (x, y) can be calculated by the following formula (2):

[0092]

[0093] Among them, λ, x and their respective meanings are the same as mentioned above; λ represents the coordinate value of the second initial coordinate point on the x-axis of the camera coordinate system; λy represents the coordinate value of the second initial coordinate point on the y-axis of the camera coordinate system; λ represents the coordinate value of the second initial coordinate point on the z-axis of the camera coordinate system, that is, it represents the depth of the second initial coordinate point in the camera coordinate system.

[0094] Step 150, projecting the plurality of second initial coordinate points from the camera coordinate system to the vehicle body coordinate system to obtain a plurality of third coordinate points, and taking the coordinate value of each third coordinate point in the vertical direction as zero as a constraint, and outputting a known depth parameter.

[0095] In some embodiments, the plurality of second initial coordinate points may be projected from the camera coordinate system to the vehicle body coordinate system according to the extrinsic matrix to obtain a plurality of third coordinate points. The extrinsic matrix may be used to reflect the transformation between the camera coordinate system and the vehicle body coordinate system, and the extrinsic matrix may include a rotation matrix R and a translation vector t.

[0096] For example, assuming that the vehicle body coordinate system {x w ,y w ,z w}, x w Axis, y w axis, and z w For example, the corresponding directions of the axes are "front", "left" and "up". w The roll angle is obtained by rotating around the y axis. w The pitch angle is obtained by rotating around the z axis. w The yaw angle is obtained by rotating the axis. Assuming that the conversion between the camera coordinate system and the vehicle coordinate system is done around the x axis of the vehicle coordinate system w Axis, y w axis, and z w The angles of axis rotation are α, β, and γ respectively, then the rotation matrix R can be obtained by first pressing z w Rotate around the y axis w Axis rotation, finally around x w The rotation matrix R can be obtained by the following formula (3):

[0097]

[0098] Among them, cos represents the cosine function, and sin represents the sine function.

[0099] In order to simplify the expression of the rotation matrix R, it is assumed that the three matrices in the above formula (3) are multiplied to obtain the following formula (4):

[0100]

[0101] It is worth noting that the parameter ai in formula (4) is a customized parameter only for simplifying the rotation matrix R. The aforementioned formula (3) is not equivalent to formula (4) after expansion. For specific details, please refer to the relevant technology and will not be repeated here.

[0102] After obtaining the aforementioned rotation matrix R, the extrinsic parameter matrix can be obtained by combining the translation vector t. For example, the extrinsic parameter matrix T can be expressed by the following formula (5):

[0103]

[0104] Among them, T represents the external parameter matrix, t represents the translation vector, and t xw Indicates along x w The translational component of the axis, t yw Indicates along y w The translational component of the axis, t zw Indicates along z w The translation component of the axis.

[0105] In some embodiments, the extrinsic parameter matrix may be obtained by pre-calibrating the camera, for example, the camera is calibrated when the vehicle leaves the factory to obtain the extrinsic parameter matrix. It is worth noting that the form of the extrinsic parameter matrix can be flexibly determined according to actual needs, and the extrinsic parameter matrix can also reflect the transformation between the vehicle body coordinate system and the camera coordinate system. For example, the inverse matrix of the extrinsic parameter matrix represented by the above formula (5) can be determined as the final extrinsic parameter matrix, and the inverse matrix can represent the transformation between the vehicle body coordinate system and the camera coordinate system.

[0106] For example, still taking the above formulas (1)-(5) as an example, the following formula (6) can be used to project a single second initial coordinate point (λx, λy, λ) from the camera coordinate system to the vehicle body coordinate system according to the external parameter matrix to obtain a single third coordinate point (x w ,y w ,z w ):

[0107]

[0108] The meanings of the parameters in formula (6) are the same as those mentioned above and will not be repeated here.

[0109] It can be understood that the above formulas (1), (2) and (6) illustrate the conversion between single coordinate points. When multiple coordinate points are converted, the multiple coordinate points can be reflected by the coordinate point matrix, thereby converting multiple points at the same time.

[0110] In some embodiments, the vertical coordinate value of each third coordinate point can be set to zero as a constraint to solve the unknown depth parameter and output the known depth parameter. The vertical coordinate value of the third coordinate point can refer to the z coordinate value of the third coordinate point in the vehicle body coordinate system. w Coordinate value in the axis direction.

[0111] For example, taking the above formula (6) as an example, since the coordinate value of the third coordinate point in the vertical direction is constrained to be zero, according to the matrix operation of formula (6), it can be obtained that: g*+h*+*+t zw *1= w = 0. Therefore, Among them, g, h, i and t zm It can be obtained based on the pre-calibrated external parameter matrix, which is a known quantity. x and y are the coordinate values ​​of the first coordinate point, which are also known quantities. Therefore, the unknown depth parameter λ can be solved and the known depth parameter can be output.

[0112] Step 160: output a plurality of second target coordinate points based on the known depth parameter and the plurality of first coordinate points.

[0113] For example, the depth parameter and the plurality of first coordinate points are both known quantities. In this case, the plurality of second target coordinate points may be output according to the product between the depth parameter and the plurality of first coordinate points.

[0114] Step 170, obtaining a target distance between the camera and the ground in the image based on a plurality of second target coordinate points, and determining a monitoring result for characterizing the degree of deviation of the angle of the camera based on the target distance and a pre-obtained reference distance.

[0115] The disclosed embodiment uses the coordinate value of each third coordinate point in the vertical direction as zero as a constraint, outputs a known depth parameter, and obtains the depth of the ground coordinate point in the camera coordinate system, so that the target distance between the camera and the ground in the image can be obtained through the second target coordinate point of the ground coordinate point in the camera coordinate system, and then the angle of the camera is monitored through the target distance. This monitoring method is not constrained by lane lines and can be more widely used in natural scenes.

[0116] The target distance between the camera and the ground in the image may be: the distance between the origin of the camera coordinate system of the camera and a second target coordinate point of the ground coordinate point included in the ground in the camera coordinate system. In some embodiments, obtaining the target distance between the camera and the ground in the image based on multiple second target coordinate points may include: determining multiple distances between the multiple second target coordinate points and the origin of the camera coordinate system; and averaging the multiple distances to obtain the target distance between the camera and the ground in the image.

[0117] In some embodiments, the image may include one frame, and a single target distance between the camera and the ground in the single frame image may be obtained by executing a round of steps 110-170. For the single target distance, based on the target distance and the pre-obtained reference distance, determining the monitoring result for characterizing the degree of deviation of the angle of the camera may include: when the target distance is higher than a first preset threshold value, or lower than a second preset threshold value, obtaining the monitoring result for characterizing that the degree of deviation of the angle of the camera is not within the error range, and the first preset threshold value and the second preset threshold value are obtained based on the reference distance.

[0118] The reference distance may be obtained in advance and used to characterize a standard distance between the camera and the ground. For example, the reference distance may be a target distance obtained in advance according to the aforementioned steps 110 - 170 when the vehicle leaves the factory.

[0119] The first preset threshold and the second preset threshold may be obtained based on the reference distance, for example, the first preset threshold d1=ratio2*d, wherein ratio2 represents the second weight value, d represents the reference distance, wherein the second weight value may be a value greater than 1, for example, the second weight value may be 1.1 or 1.2, etc. The second preset threshold d2=ratio3*d, wherein ratio3 represents the third weight value, d represents the reference distance, wherein the third weight value may be a value less than 1, for example, the third weight value may be 0.8 or 0.9, etc.

[0120] The angle of the camera may refer to the pitch angle of the camera. In some embodiments, the method further includes: when the monitoring result indicates that the degree of deviation of the angle of the camera is not within the error range, outputting a prompt message according to the monitoring result, the prompt message is used to prompt the driver of the vehicle to at least one of the following information: use the automatic driving function with caution, use the assisted driving function with caution, and recalibrate the position of the camera. The present disclosure outputs a prompt message when it is found that the degree of deviation of the angle of the camera is not within the error range, so as to prompt the driver that the camera parameters are inaccurate and to use the relevant automatic driving or assisted driving functions with caution. Thereby, the driving safety of the vehicle can be improved.

[0121] As mentioned above, the image may include a frame. In some embodiments, the method further includes: repeatedly executing the step of acquiring an image captured by a camera in a vehicle, until, based on multiple second target coordinate points, obtaining a target distance between the camera and the ground in the image, until multiple target distances are obtained, and / or the multiple target distances obtained converge, and the multiple target distances are the distances between the camera and the ground in an image of a preset number of frames; based on the target distance and a pre-obtained reference distance, determining a monitoring result for characterizing the degree of deviation of the angle of the camera, including: averaging multiple target distances to obtain an average target distance; determining a monitoring result for characterizing the degree of deviation of the angle of the camera based on the average target distance and the reference distance.

[0122] In some embodiments, repeatedly performing the acquisition of images captured by a camera in a vehicle may include: repeatedly performing the acquisition of images captured by a camera in a vehicle during driving of the vehicle. The present disclosure acquires images during driving of the vehicle and obtains monitoring results of the angle of the camera, which can realize real-time monitoring of the angle of the camera.

[0123] The disclosed embodiment obtains multiple target distances by repeatedly executing the step of acquiring images captured by a camera in a vehicle, and obtaining the target distance between the camera and the ground in the image based on multiple second target coordinate points. The monitoring result is determined by the multiple target distances, and the monitoring result of the camera angle can be determined by using data from multiple frames of images, thereby preventing erroneous monitoring results determined by a single frame of image due to reasons such as vehicle shaking.

[0124] In some embodiments, the step of acquiring an image captured by a camera in a vehicle, and obtaining a target distance between the camera and the ground in the image based on multiple second target coordinate points, can be repeated at every preset period to obtain multiple target distances. For example, the preset period can be 20s. Assuming that 25 frames of images can be acquired per second, 20s*25f / s=500 frames of images can be processed through the preset period to obtain 500 target distances.

[0125] The stopping condition of repeatedly performing the step of acquiring an image captured by a camera in a vehicle until, based on a plurality of second target coordinate points, obtaining a target distance between the camera and the ground in the image may include: obtaining a plurality of target distances, and / or the obtained plurality of target distances converge. In some embodiments, the variance of the plurality of target distances may be calculated, and the plurality of target distances are determined to converge when the variance is less than a third preset threshold.

[0126] In some embodiments, the monitoring result for characterizing the degree of deviation of the angle of the camera is determined based on the average target distance and the reference distance, including: when the average target distance is higher than a first preset threshold, or lower than a second preset threshold, a monitoring result for characterizing that the degree of deviation of the angle of the camera is not within an error range is obtained, and the first preset threshold and the second preset threshold are obtained based on the reference distance; the method further includes: outputting prompt information based on the monitoring result. For specific details about the first preset threshold, the second preset threshold, and the prompt information, please refer to the above-mentioned related description, which will not be repeated here.

[0127] Figure 3 is a block diagram of a camera monitoring device according to an exemplary embodiment. Figure 3 The camera monitoring device 300 includes an acquisition module 310 , an extraction module 320 , a first projection module 330 , a first determination module 340 , a first output module 350 , a second output module 360 ​​and a monitoring module 370 .

[0128] An acquisition module 310 is configured to acquire an image captured by a camera in a vehicle;

[0129] An extraction module 320 is configured to extract a plurality of ground coordinate points included in the ground in the image;

[0130] A first projection module 330 is configured to project the plurality of ground coordinate points from a pixel coordinate system constructed based on the image to a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points;

[0131] A first determination module 340 is configured to determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system;

[0132] A first output module 350 is configured to project the plurality of second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, and take the vertical coordinate value of each of the third coordinate points as zero as a constraint, and output a known depth parameter;

[0133] A second output module 360 ​​is configured to output a plurality of second target coordinate points based on the known depth parameter and the plurality of first coordinate points;

[0134] The monitoring module 370 is configured to obtain the target distance between the camera and the ground in the image based on multiple second target coordinate points, and to determine a monitoring result for characterizing the degree of deviation of the angle of the camera based on the target distance and a pre-obtained reference distance.

[0135] In some embodiments, the extraction module 320 is further configured to:

[0136] Acquire a region of interest in the image;

[0137] Performing ground segmentation processing on the region of interest to obtain the ground;

[0138] Acquire a plurality of ground coordinate points included in the ground.

[0139] In some embodiments, the apparatus further comprises:

[0140] A second projection module is configured to project the plurality of ground coordinate points from the pixel coordinate system to the camera coordinate system to obtain the plurality of first coordinate points when the number of the plurality of ground coordinate points is greater than or equal to the preset number of coordinate points;

[0141] The first execution module is configured to repeatedly execute the steps of acquiring an image captured by a camera in a vehicle and extracting a plurality of ground coordinate points included in the ground in the image when the number of the plurality of ground coordinate points is less than the preset number of coordinate points, until the number of the plurality of ground coordinate points extracted is greater than or equal to the preset number of coordinate points.

[0142] In some embodiments, the monitoring module 370 is further configured to:

[0143] Determining a plurality of distances between a plurality of the second target coordinate points and the origin of the camera coordinate system;

[0144] An average operation is performed on a plurality of the distances to obtain the target distance between the camera and the ground in the image.

[0145] In some embodiments, the first determination module 340 is further configured to:

[0146] Based on the product between the unknown depth parameter and the plurality of first coordinate points, a plurality of second initial coordinate points are determined.

[0147] In some embodiments, the image comprises a frame, and the apparatus further comprises:

[0148] A second execution module is configured to repeatedly execute the step of acquiring the image captured by the camera in the vehicle, until the step of obtaining the target distance between the camera and the ground in the image based on the plurality of second target coordinate points is obtained, until a plurality of target distances are obtained, and / or the plurality of target distances obtained converge, and the plurality of target distances are the distances between the camera and the ground in the image of a preset number of frames;

[0149] The monitoring module 370 is further configured to:

[0150] Performing an average operation on the plurality of target distances to obtain an average target distance;

[0151] A monitoring result for characterizing the degree of deviation of the angle of the camera is determined according to the average target distance and the reference distance.

[0152] In some embodiments, the monitoring module 370 is further configured to:

[0153] When the average target distance is higher than a first preset threshold or lower than a second preset threshold, obtaining the monitoring result for characterizing that the degree of deviation of the angle of the camera is not within an error range, wherein the first preset threshold and the second preset threshold are obtained based on the reference distance;

[0154] The method further comprises:

[0155] Output prompt information according to the monitoring result.

[0156] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0157] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the camera monitoring method provided by the present disclosure are implemented.

[0158] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned camera monitoring method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, for example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned camera monitoring method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned camera monitoring method.

[0159] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned camera monitoring method when executed by the programmable device.

[0160] Figure 4 4 is a block diagram of a vehicle 400 according to an exemplary embodiment. For example, the vehicle 400 may be a hybrid vehicle, an electric vehicle, or other types of vehicles. The vehicle 400 may be an autonomous vehicle or a semi-autonomous vehicle.

[0161] Reference Figure 4 , the vehicle 400 may include various subsystems, for example, an infotainment system 410, a perception system 420, a decision control system 430, a drive system 440, and a computing platform 450. The vehicle 400 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 400 may be interconnected by wire or wireless means.

[0162] In some embodiments, the infotainment system 410 may include a communication system, an entertainment system, and a navigation system, among others.

[0163] The perception system 420 may include several sensors for sensing information about the environment around the vehicle 400. For example, the perception system 420 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.

[0164] The decision control system 430 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.

[0165] The drive system 440 may include components that provide power movement for the vehicle 400. In one embodiment, the drive system 440 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.

[0166] Some or all functions of the vehicle 400 are controlled by a computing platform 450. The computing platform 450 may include at least one processor 451 and a memory 452, and the processor 451 may execute instructions 453 stored in the memory 452.

[0167] The processor 451 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0168] Memory 452 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 storage, flash memory, magnetic disk or optical disk.

[0169] In addition to instructions 453 , memory 452 may also store data, such as road maps, route information, and data such as the location, direction, and speed of the vehicle. The data stored in memory 452 may be used by computing platform 450 .

[0170] In the embodiment of the present disclosure, the processor 451 may execute the instruction 453 to complete all or part of the steps of the above-mentioned camera monitoring method.

[0171] Figure 5 is a block diagram of a camera monitoring device 500 according to an exemplary embodiment. For example, the device 500 may be provided as a server. Figure 5 , the apparatus 500 includes a processing component 522, which further includes one or more processors, and a memory resource represented by a memory 532 for storing instructions executable by the processing component 522, such as an application. The application stored in the memory 532 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 522 is configured to execute instructions to perform the above-mentioned camera monitoring method.

[0172] The device 500 may also include a power supply component 526 configured to perform power management of the device 500, a wired or wireless network interface 550 configured to connect the device 500 to a network, and an input / output interface 558. The device 500 may operate based on an operating system stored in the memory 532, such as Windows Server 2008. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or similar.

[0173] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0174] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A camera monitoring method, characterized in that: include: Obtaining images captured by a camera in a vehicle; Extracting a plurality of ground coordinate points included in the ground in the image; Projecting the plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points; Determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system; Projecting the plurality of the second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, taking the coordinate value of each of the third coordinate points in the vertical direction as zero as a constraint, and outputting a known depth parameter; Based on the known depth parameter and the first coordinate points, output a plurality of second target coordinate points; Based on the plurality of second target coordinate points, a target distance between the camera and the ground in the image is obtained, and based on the target distance and a pre-obtained reference distance, a monitoring result for characterizing the degree of deviation of the angle of the camera is determined.

2. The camera monitoring method according to claim 1, characterized in that: The step of extracting a plurality of ground coordinate points included in the ground in the image comprises: Acquire a region of interest in the image; Performing ground segmentation processing on the region of interest to obtain the ground; Acquire a plurality of ground coordinate points included in the ground.

3. The camera monitoring method according to claim 1 or 2, characterized in that: The method further comprises: When the number of the plurality of ground coordinate points is greater than or equal to the preset number of coordinate points, projecting the plurality of ground coordinate points from the pixel coordinate system to the camera coordinate system to obtain the plurality of first coordinate points; When the number of the plurality of ground coordinate points is less than the preset number of coordinate points, the steps of acquiring the image captured by the camera in the vehicle and extracting the plurality of ground coordinate points included in the ground in the image are repeated until the number of the plurality of ground coordinate points extracted is greater than or equal to the preset number of coordinate points.

4. The camera monitoring method according to claim 1, characterized in that: The obtaining, based on the plurality of second target coordinate points, a target distance between the camera and the ground in the image comprises: Determining a plurality of distances between a plurality of the second target coordinate points and the origin of the camera coordinate system; An average operation is performed on a plurality of the distances to obtain the target distance between the camera and the ground in the image.

5. The camera monitoring method according to claim 1, characterized in that: The step of determining a plurality of second initial coordinate points based on the unknown depth parameter and the plurality of first coordinate points comprises: Based on the product between the unknown depth parameter and the plurality of first coordinate points, a plurality of second initial coordinate points are determined.

6. The camera monitoring method according to claim 1, characterized in that: The image comprises a frame, and the method further comprises: Repeat the step of acquiring an image captured by a camera in a vehicle, until the step of obtaining a target distance between the camera and the ground in the image based on the plurality of second target coordinate points is performed, until a plurality of target distances are obtained, and / or the plurality of target distances obtained converge, the plurality of target distances being the distances between the camera and the ground in the image of a preset number of frames; The step of determining a monitoring result for characterizing the degree of deviation of the angle of the camera based on the target distance and the pre-obtained reference distance includes: Performing an average operation on the plurality of target distances to obtain an average target distance; A monitoring result for characterizing the degree of deviation of the angle of the camera is determined according to the average target distance and the reference distance.

7. The camera monitoring method according to claim 6, characterized in that: The step of determining the monitoring result for characterizing the degree of deviation of the angle of the camera according to the average target distance and the reference distance includes: When the average target distance is higher than a first preset threshold or lower than a second preset threshold, obtaining the monitoring result for characterizing that the degree of deviation of the angle of the camera is not within an error range, wherein the first preset threshold and the second preset threshold are obtained based on the reference distance; The method further comprises: Output prompt information according to the monitoring result.

8. A camera monitoring device, characterized in that: include: An acquisition module is configured to acquire an image captured by a camera in the vehicle; An extraction module, configured to extract a plurality of ground coordinate points included in the ground in the image; A first projection module is configured to project the plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points; A first determination module is configured to determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system; A first output module is configured to project the plurality of second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, and take the coordinate value of each third coordinate point in the vertical direction as zero as a constraint, and output a known depth parameter; A second output module is configured to output a plurality of second target coordinate points based on the known depth parameter and the plurality of first coordinate points; The monitoring module is configured to obtain the target distance between the camera and the ground in the image based on multiple second target coordinate points, and to determine a monitoring result for characterizing the degree of deviation of the angle of the camera based on the target distance and a pre-obtained reference distance.

9. A camera monitoring device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Obtaining images captured by a camera in a vehicle; Extracting a plurality of ground coordinate points included in the ground in the image; Projecting the plurality of ground coordinate points from a pixel coordinate system constructed based on the image into a camera coordinate system constructed based on the camera to obtain a plurality of first coordinate points; Determine a plurality of second initial coordinate points based on an unknown depth parameter and a plurality of the first coordinate points, wherein the depth parameter is used to reflect the depth of each of the second initial coordinate points in the camera coordinate system; Projecting the plurality of the second initial coordinate points from the camera coordinate system to the body coordinate system of the vehicle to obtain a plurality of third coordinate points, taking the coordinate value of each of the third coordinate points in the vertical direction as zero as a constraint, and outputting a known depth parameter; Based on the known depth parameter and the first coordinate points, output a plurality of second target coordinate points; Based on the plurality of second target coordinate points, a target distance between the camera and the ground in the image is obtained, and based on the target distance and a pre-obtained reference distance, a monitoring result for characterizing the degree of deviation of the angle of the camera is determined.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

11. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Car lane change early warning method based on continuous image constraint pose estimation

    CN110745140A

  • Lane line detection method based on high-precision map

    CN111242031A

  • Lane line distance detection method, device, equipment and medium

    CN114565510A

  • Vehicle positioning method and device, computer equipment, storage medium and vehicle

    CN114820769A

  • Systems and methods for self-supervised depth estimation

    US20220084230A1