Method and device for detecting installation angle of camera
By installing the camera on the side of the vehicle and using the neural network model to detect the camera installation angle, the problem of poor blind spot vision caused by irregular camera installation in the vehicle is solved, and high accuracy and timely installation angle detection is achieved, which improves driving safety and Passage efficiency.
Patent Information
- Application Number
- CN202410917838.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-15
AI Technical Summary
Improper camera installation in vehicles leads to poor blind spot vision and affects driving safety. The existing technology relies on manual detection to have problems with accuracy and timeliness.
The camera is installed on the side of the vehicle near the tail to obtain the captured images, and the neural network model is used to extract features, identify the preset environmental parameters, compare the standard parameters at normal installation angles, detect whether the camera installation angle is abnormal in real time, and generate an alarm hint.
Improve the accuracy and timeliness of camera installation angle detection, ensure driving safety and traffic efficiency, and avoid misjudgment caused by abnormal angles.
Smart Images

Figure CN118967799A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method and device for detecting a camera installation angle. Background Art
[0002] At present, due to the structure of the vehicle and the driving seat, the driver will have visual blind spots during normal driving. By installing a vehicle-mounted camera and capturing video streams of the blind spots, the driver can be assisted in observing the blind spots and improve driving safety.
[0003] However, in the daily operation of the vehicle, the camera may be loosely installed or improperly installed, resulting in poor blind spot vision, which will affect the safety of normal operation of the vehicle. Therefore, it is urgent to provide a method for detecting the installation angle of the camera. Summary of the invention
[0004] The present application provides a method and device for detecting the camera installation angle, which can detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera, thereby improving driving safety and traffic efficiency. The technical solution is as follows:
[0005] In a first aspect, a method for detecting a camera installation angle is provided, the method comprising: acquiring an image taken by a camera; the camera is installed on the side of a vehicle and close to the rear of the vehicle, the field of view of the camera includes a blind spot of the vehicle, the image includes a preset mark, the preset mark includes at least one of a vehicle's own landmark and a vanishing point in the blind spot environment, the vanishing point is the intersection of a road boundary and a skyline; performing feature extraction on the image to obtain image features; determining environmental parameters of the preset mark based on the image features; determining whether the camera installation angle is abnormal based on the environmental parameters of the preset mark and standard parameters corresponding to the preset mark when the camera is installed at a normal angle.
[0006] In a second aspect, a device for detecting a camera installation angle is provided, the device comprising: an acquisition module for acquiring an image taken by a camera; the camera is installed on the side of a vehicle and close to the rear of the vehicle, the field of view of the camera includes a blind spot of the vehicle, the image includes a preset mark, the preset mark includes at least one of a vehicle's own marker and a vanishing point in the blind spot environment, and the vanishing point is the intersection of a road boundary and a skyline; a feature extraction module for extracting features from the image to obtain image features; a determination module for determining environmental parameters of the preset mark based on the image features; and determining whether the camera installation angle is abnormal based on the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark when the camera is installed at a normal angle.
[0007] According to a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method described in the first aspect when executed by the processor.
[0008] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0009] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method described in the first aspect.
[0010] The embodiment of the present application provides a method and device for detecting the installation angle of a camera. According to the scheme provided by the present application, the camera is installed on the side of the vehicle and close to the rear of the vehicle. The field of view of the camera includes the blind spot of the vehicle, that is, the camera can capture a part of the vehicle body and the blind spot of the vehicle. An image captured by the camera is obtained, and the image includes a preset mark. The preset mark indicates a mark that is easy to identify and can be used as a reference. The preset mark includes at least one of the vehicle's own marker and a vanishing point in the blind spot environment. The vanishing point is the intersection of the road boundary and the skyline. Feature extraction is performed on the image to obtain image features; the image features include the features of the preset mark. According to the image features, the preset mark in the image captured by the camera is identified, and relevant parameters are calculated to determine the environmental parameters of the preset mark. The environmental parameters of the preset mark can reflect the position information of the preset mark in the field of view of the camera. Then, according to the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark at the normal installation angle of the camera, it is determined whether the installation angle of the camera is abnormal. It can realize the detection of whether the installation angle of the camera is abnormal, and timely remind the user to adjust the camera to improve driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments. 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 creative work.
[0012] Figure 1 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 1 ;
[0013] Figure 2 is a schematic diagram of an image captured by a camera provided in an embodiment of the present application;
[0014] Figure 3 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 2 ;
[0015] Figure 4 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 3 ;
[0016] Figure 5 is a schematic diagram of a camera and a rearview mirror provided in an embodiment of the present application;
[0017] Figure 6 is a schematic diagram of a camera and a vanishing point provided in an embodiment of the present application;
[0018] Figure 7 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 4 ;
[0019] Figure 8 It is a structural schematic diagram of a camera installation angle detection device provided in an embodiment of the present application;
[0020] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0022] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0023] Before explaining the embodiments of the present application in detail, the related technologies of the embodiments of the present application are first explained.
[0024] In the related art, for commercial vehicles or buses that are too long, their visual blind spots are too large, which can easily cause the driver to be unable to see the environmental conditions in the blind spots at certain angles (for example, when turning), reducing driving safety. Therefore, most vehicles are currently equipped with blind spot cameras (or cameras) to assist the driver in observing the blind spots, and combine artificial intelligence (AI) technology to identify pedestrians, cyclists and other targets in the blind spots to remind the driver. If the installation angle of the blind spot camera is abnormal, it will lead to problems such as inaccurate blind spot images and failure of AI alarms. It will not be able to effectively assist the driver in observing pedestrians, cyclists and other targets in the blind spots, reducing driving safety.
[0025] Normally, whether the camera installation angle is abnormal requires regular manual inspection by the driver or fleet operation and maintenance personnel. However, if there are too many vehicles in the fleet or the inspectors lack safety awareness, the abnormal installation angle may not be discovered in time. In addition, manual inspection relies on the experience of the inspectors, which reduces the accuracy of the inspection results.
[0026] Based on the above technical problems, the embodiment of the present application provides a method for detecting the installation angle of a camera, which can be applied to driving scenarios and involves the fields of computer vision and vehicles, such as Figure 1 As shown, Figure 1 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 1 , the method comprising:
[0027] S101. Acquire an image captured by a camera; the camera is installed on the side of the vehicle and close to the rear of the vehicle, the field of view of the camera includes the blind spot of the vehicle, the image includes a preset mark, the preset mark includes at least one of the vehicle's own landmark and a vanishing point in the blind spot environment, and the vanishing point is the intersection of the road boundary and the skyline.
[0028] In the embodiment of the present application, the camera is installed on the side of the vehicle and close to the rear of the vehicle. The camera can capture the vehicle body and landmarks on the side of the vehicle, such as the body outline, rearview mirrors, door handles, upper edges of wheels, wheel eyebrows, vehicle logos (e.g., trademarks), etc. Of course, other objects may also be attached to the side of the vehicle, which is not limited to the embodiment of the present application.
[0029] The camera can also capture vehicle blind spots, which may include pedestrians, cars, road boundaries, and the skyline. Road boundaries may include but are not limited to railings, traffic markings, green belts, curbs, water barriers, etc.
[0030] like Figure 2 As shown, Figure 2It is a schematic diagram of an image captured by a camera provided in an embodiment of the present application. Figure 2 The image shown in includes the vehicle body, rearview mirror, and vehicles in the vehicle's blind spot, road boundaries, etc.
[0031] It should be noted that the camera can capture the vehicle body and its own landmarks at any viewing angle. When the front view is good, the camera can capture the vanishing point, which is the intersection of the road boundary and the skyline.
[0032] In the embodiment of the present application, a video stream can be obtained from a camera through a vehicle system, and the video stream is a continuous multi-frame image. The camera installation angle can be detected by selecting any frame from the continuous multi-frame image, or an image with a good field of view and a vanishing point can be selected from the continuous multi-frame image, and then the camera installation angle can be detected. Alternatively, a calculation can be performed once for each frame of the image, and finally a comprehensive judgment is made as to whether the camera installation angle is abnormal, which is not limited in the embodiment of the present application.
[0033] S102: Extract features from the image to obtain image features.
[0034] In an embodiment of the present application, a neural network (NN) model is used to process the image to extract image features, which include features of the vehicle's own landmarks (e.g., the vehicle's body outline, vehicle rearview mirrors), features of the road boundary, and features of the skyline.
[0035] Among them, the neural network model includes but is not limited to Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Deep Neural Networks (DNN), etc. The neural network model is a multi-task network model that is pre-trained with a large number of image samples, and has the functions of target detection, semantic segmentation and key point detection. Among them, target detection refers to using a target frame to frame the target position (that is, the position of a preset mark), semantic segmentation refers to classifying the target according to pixel points, and key point detection refers to regressing the position of the key point, such as the vanishing point of the road. The embodiment of the present application does not limit the structure of the neural network model, as long as the neural network model can extract features of the preset mark in the image, identify the preset mark and segment the pixels of the preset mark.
[0036] S103: Determine preset marked environmental parameters according to the image features.
[0037] The image includes a preset mark, and the extracted image features include features of the preset mark. The preset mark in the image captured by the camera is identified according to the image features, and relevant parameters are calculated to determine the environmental parameters of the preset mark, which can reflect the position information of the preset mark in the field of view of the camera.
[0038] In the embodiment of the present application, feature point matching can be performed through a neural network model to identify and extract feature points. The position of the feature points in the image can be represented by an image coordinate system to obtain the preset environmental parameters. Among them, the preset environmental parameters may include: geometric parameters of the vehicle's own markers (for example, the body outline, the position of the rearview mirror, etc.), the height of the vehicle's own markers from the ground (for example, the height of the rearview mirror from the ground). Image features are features of two-dimensional images. In the embodiment of the present application, the features of the two-dimensional image can also be perspective transformed to obtain the environmental parameters of the preset mark in the three-dimensional space, for example, the position information of the camera in the three-dimensional space, and the position information of the rearview mirror in the three-dimensional space. And by identifying the intersection between the road boundary and the skyline in the blind spot environment, the vanishing point is obtained, and the position information of the vanishing point in the pixel coordinate system is obtained.
[0039] S104: Determine whether the camera installation angle is abnormal based on the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark under the normal installation angle of the camera.
[0040] In the embodiments of the present application, according to the environmental parameters of the preset mark, a mathematical model or a geometric calculation method can be used to calculate the installation angle of the camera, and combined with the normal installation angle of the camera, it is determined whether the installation angle of the camera is abnormal. Example 1: Using the line of sight method, according to the optical axis of the camera, the position information of the camera in three-dimensional space, and the position information of the rearview mirror in three-dimensional space, a line is connected between the camera and the rearview mirror in three-dimensional space, and the angle between the line and the optical axis of the camera is calculated using trigonometric functions. The angle is used as the pitch angle of the camera. Then, according to the pitch angle of the camera at the normal installation angle, it is determined whether the installation angle of the camera is abnormal. Example 2: Using the vanishing point method, in perspective geometry, the pitch angle and yaw angle of the camera are calculated using the vanishing point and the position information of the camera in three-dimensional space. Then, according to the pitch angle and yaw angle of the camera at the normal installation angle, it is determined whether the installation angle of the camera is abnormal.
[0041] In an embodiment of the present application, it is also possible to determine whether there is an abnormality in the camera installation angle based on the geometric parameters of the vehicle's own landmarks (for example, the body outline, the position of the rearview mirror, etc.), the height of the vehicle's own landmarks from the ground (for example, the height of the rearview mirror from the ground), and the position of the vehicle's own landmarks at the normal installation angle of the camera.
[0042] It should be noted that the technicians in this field can dynamically adjust the discrimination threshold (i.e., the standard parameter corresponding to the preset mark) according to the characteristics of the installation position of the vehicle-mounted camera to improve the adaptability and accuracy. The standard parameters corresponding to the preset mark may include: the preset ratio interval of the vehicle body contour, the preset range corresponding to the position of the vehicle's own marker in the image, the height of the vehicle's own marker from the ground, and the pitch angle and yaw angle of the camera at the normal installation angle. Among them, according to the three-dimensional (3-dimension, 3D) digital model of the vehicle, when arranging the installation position and installation angle of the camera, a standard installation angle (including the pitch angle and yaw angle of the camera) can be preset, and the height of the vehicle's own marker from the ground can be obtained. Then, the standard image captured by the camera at the standard installation angle (i.e., the normal installation angle) is captured, and the preset ratio interval of the vehicle body contour and the preset range corresponding to the position of the vehicle's own marker in the image are determined according to the standard image.
[0043] The camera installation angle abnormality determination method proposed in the embodiment of the present application can detect and determine in real time whether the camera installation angle is abnormal. When it is determined that the camera installation angle is abnormal, an alarm prompt is generated to remind the driver that the camera installation angle is abnormal and that the camera installation angle needs to be adjusted in time to avoid misjudgment caused by the abnormal angle, thereby improving the safety of the vehicle during driving.
[0044] According to the scheme provided by the present application, the camera is installed on the side of the vehicle and close to the rear of the vehicle, and the camera's field of view includes the vehicle's blind spot, that is, the camera can capture part of the vehicle body and the vehicle's blind spot. An image captured by the camera is obtained, and the image includes a preset mark, and the preset mark indicates a mark that is easy to identify and can be used as a reference. The preset mark includes at least one of the vehicle's own marker and the vanishing point in the blind spot environment, and the vanishing point is the intersection of the road boundary and the skyline. Feature extraction is performed on the image to obtain image features; the image features include the features of the preset mark, and according to the image features, the preset mark in the image captured by the camera is identified, and relevant parameters are calculated to determine the environmental parameters of the preset mark, which can reflect the position information of the preset mark in the camera's field of view. Then, according to the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark at the normal installation angle of the camera, it is determined whether the camera installation angle is abnormal. It can realize the detection of whether the camera installation angle is abnormal, and timely remind the user to adjust the camera, thereby improving driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved.
[0045] In some embodiments, the image includes the vehicle's own landmarks, and the vehicle's own landmarks can be used to detect the camera installation angle. Figure 1 ,like Figure 3 As shown, Figure 3 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 2 .
[0046] S201, obtaining an image captured by a camera.
[0047] S202: Extract features from the image to obtain image features.
[0048] S203: Determine the geometric parameters of the vehicle's own landmarks based on the image features.
[0049] In an embodiment of the present application, the image features include features of the vehicle's own landmarks, and the positions of the vehicle's own landmarks in the image (i.e., the geometric parameters of the vehicle's own landmarks) are identified based on the image features through a neural network model (which has a target detection function), for example, the position of the vehicle body in the image (corresponding to the vehicle body contour) and the position of the rearview mirror in the image.
[0050] S204: Determine whether the camera installation angle is abnormal based on the geometric parameters and the standard parameters corresponding to the vehicle's own landmarks at the normal camera installation angle.
[0051] In an embodiment of the present application, it is determined whether the camera installation angle is abnormal based on the geometric parameters detected in real time and the standard parameters corresponding to the vehicle's own markers at the normal installation angle of the camera. Exemplarily, it is determined whether the camera installation angle is abnormal based on the real-time detected position of the vehicle body in the image and the position of the vehicle body captured by the camera at the normal installation angle (i.e., the standard parameters corresponding to the vehicle's own markers). Alternatively, it is determined whether the camera installation angle is abnormal based on the position of the rearview mirror in the image and the position of the rearview mirror captured by the camera at the normal installation angle (i.e., the standard parameters corresponding to the vehicle's own markers). It is possible to detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera to improve driving safety and traffic efficiency.
[0052] In some embodiments, the above Figure 3 S204 can be implemented through the following two examples.
[0053] Example 1: The vehicle's own landmark includes the vehicle's body, the vehicle's own landmark's geometric parameters include the vehicle's body outline, and the standard parameters include a preset ratio interval. Figure 3S204 includes: determining the proportion of the vehicle body in the image according to the vehicle body contour; and determining that an abnormality occurs in the camera installation angle when the proportion is not within a preset proportion interval.
[0054] In an embodiment of the present application, the proportion of the vehicle body in the entire image is determined based on the position of the vehicle body in the image (corresponding to the vehicle body contour). The area of the vehicle body contour may be calculated based on the position of the vehicle body in the image, and the ratio of the area of the vehicle body contour to the area of the entire image is used as the proportion of the vehicle body in the image. Alternatively, the pixel points belonging to the vehicle body in the image may be identified through a neural network pattern, and the number of pixel points belonging to the vehicle body is counted, and the ratio of the number of pixel points belonging to the vehicle body to the pixel points of the entire image is used as the proportion of the vehicle body in the image.
[0055] According to the proportion of the vehicle body contour captured by the camera at a normal installation angle in the entire image, a preset proportion value is determined, and a preset proportion interval is set with the preset proportion value as the center. When the proportion of the vehicle body in the image is within the preset proportion interval, it is determined that there is no abnormality in the camera installation angle. When the proportion of the vehicle body in the image is not within the preset proportion interval, it is determined that there is an abnormality in the camera installation angle. For example, if the proportion of the vehicle body contour increases to exceed the upper limit of the preset proportion interval, or decreases to exceed the lower limit of the preset proportion interval, it means that there is an abnormality in the camera installation angle.
[0056] In the embodiment of the present application, the proportion of the vehicle body contour in the image is compared with the preset proportion interval to determine whether the camera installation angle is abnormal. This example can detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera to improve driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved.
[0057] Example 2: The vehicle's own landmarks include any one of the vehicle's rearview mirror, the vehicle's door handle, the upper edge of the vehicle's wheel, the vehicle's wheel eyebrow, and the vehicle's logo; the vehicle's own landmarks' geometric parameters include the position of the vehicle's own landmarks in the image, and the standard parameters include a preset range. Figure 3 S204 includes: when the position of the vehicle's own landmark in the image is not within a preset range, determining that the camera installation angle is abnormal.
[0058] In an embodiment of the present application, the pixel points belonging to the vehicle's own marker in the image can be identified through a neural network model, and the pixel positions of the pixel points belonging to the vehicle's own marker are used as the positions of the vehicle's own marker in the image.
[0059] According to the position of the vehicle's own landmark in the entire image captured by the camera at a normal installation angle, the preset position is determined, and the preset range is set with the preset position as the center. The preset range can be slightly larger than the actual range of the vehicle's own landmark. When the position of the vehicle's own landmark in the image is within the preset range, it is determined that there is no abnormality in the camera installation angle. When the position of the vehicle's own landmark in the image is not within the preset range, it is determined that there is an abnormality in the camera installation angle.
[0060] For example, taking the vehicle's own landmark as a rearview mirror, the camera sets a preset range corresponding to the rearview mirror at a normal installation angle. If the pixel position of the pixel point belonging to the rearview mirror is not located in the preset range, it means that the position of the rearview mirror captured by the current camera is greatly offset, and it is determined that the installation angle is abnormal. Alternatively, the camera sets the pixel position corresponding to the rearview mirror at a normal installation angle. If the pixel position of the pixel point belonging to the rearview mirror is offset by a preset number of pixels, for example, 50 pixels, it is determined that the installation angle is abnormal.
[0061] In the embodiment of the present application, the position of the vehicle's own marker in the image is compared with the preset range to determine whether the camera installation angle is abnormal. This example can detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera to improve driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved.
[0062] In some embodiments, after determining in the above-mentioned Example 1 and Example 2 that the camera installation angle is abnormal, the method further includes the following steps: generating an alarm prompt; the alarm prompt is used to remind that the camera installation angle is abnormal.
[0063] In the embodiment of the present application, when an abnormality is detected in the camera installation angle, an alarm prompt can be generated. The alarm is issued by the vehicle system, and the alarm form includes but is not limited to: sound or visual prompts (for example, text, flash), or a combination of the two or more, to remind the driver that the camera installation angle is abnormal and should be checked and adjusted in time. The driver can check the installation angle of the camera according to the alarm prompt and make necessary adjustments to ensure the accuracy and reliability of the images captured by the camera, thereby improving driving safety and traffic efficiency.
[0064] In some embodiments, the image captured by the camera is a two-dimensional image, which can be converted into a three-dimensional image, and the camera installation angle can be detected based on the three-dimensional image. Figure 1 ,like Figure 4 As shown, Figure 4 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 3.
[0065] S301, obtaining an image captured by a camera.
[0066] S302: Extract features from the image to obtain image features.
[0067] S303: Perform perspective transformation on the image according to the image features to obtain position information of points in the image in three-dimensional space.
[0068] In the embodiment of the present application, the image captured by the camera is a two-dimensional image. After the image features in the two-dimensional image are extracted, the points in the two-dimensional image are mapped into three-dimensional space using the perspective transformation principle.
[0069] The perspective transformation can be expressed as follows:
[0070]
[0071] Wherein, (x, y, z) in the above formula (1) is a point in three-dimensional space, (x', y', z') is a point on the image plane (ie, two-dimensional image), and z is the depth from the image plane to the three-dimensional space point.
[0072] S304: Determine preset marked environmental parameters according to the position information of the points in the image in the three-dimensional space.
[0073] In the embodiment of the present application, more spatial information can be obtained by mapping points on the image plane to three-dimensional space. The preset environmental parameters may include: the height of the vehicle's own landmark from the ground (for example, the height of the rearview mirror from the ground), the position information of the camera in three-dimensional space, and the position information of the rearview mirror in three-dimensional space. The vanishing point can also be obtained by identifying the intersection between the road boundary and the skyline in the blind spot environment, and the position information of the vanishing point in the pixel coordinate system can be obtained during the perspective transformation.
[0074] S305: Determine whether the camera installation angle is abnormal based on the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark under the normal installation angle of the camera.
[0075] In some embodiments, the above Figure 4 S305 can be implemented through the following three examples.
[0076] Example 1: The preset marked environmental parameters include the height of the vehicle's own marker from the ground. S305 includes: when the height of the vehicle's own marker from the ground is not within the standard height range of the vehicle's own marker from the ground in the preset model of the vehicle, determining that the camera installation angle is abnormal.
[0077] In an embodiment of the present application, the pixel points belonging to the vehicle's own marker in the image plane can be identified through a neural network model, and the position information of the pixel points belonging to the vehicle's own marker can be determined in the three-dimensional space after the perspective transformation, and then the height of the vehicle's own marker from the ground can be determined in the three-dimensional space.
[0078] In this example, a three-dimensional model of the vehicle (i.e., a preset model of the vehicle) is pre-set, and the three-dimensional model includes the size and shape information of the vehicle. This information can be obtained from the vehicle manufacturer or obtained by three-dimensional (3D) scanning technology. This embodiment of the present application is not limited. The standard height of the vehicle's own marker from the ground is obtained according to the preset model of the vehicle, and a standard height range is set with the standard height as the center. When the height of the vehicle's own marker from the ground is within the standard height range, it is determined that the camera installation angle is not abnormal. When the height of the vehicle's own marker from the ground is not within the standard height range, it is determined that the camera installation angle is abnormal.
[0079] For example, taking the vehicle's own landmark as a rearview mirror, the height of the rearview mirror from the ground is determined in three-dimensional space and compared with the standard height range of the rearview mirror from the ground in the vehicle's preset model. If the height of the rearview mirror from the ground is within the standard height range, it means that the position of the rearview mirror captured by the current camera has not shifted or has shifted slightly, and it is determined that there is no abnormality in the camera installation angle. If the height of the rearview mirror from the ground is not within the standard height range, it means that the position of the rearview mirror captured by the current camera has shifted a lot, and it is determined that there is an abnormality in the camera installation angle.
[0080] In the embodiment of the present application, the height of the vehicle's own marker from the ground is compared with the standard height range to determine whether the camera installation angle is abnormal. This example can detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera, thereby improving driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved.
[0081] Example 2: The preset marked environmental parameters include the position information of the camera in the three-dimensional space and the position information of the rearview mirror of the vehicle in the three-dimensional space. S305 includes: determining a first pitch angle according to the optical axis of the camera, the position information of the camera in the three-dimensional space, and the position information of the rearview mirror in the three-dimensional space; and determining that the camera installation angle is abnormal when the first pitch angle is not within the preset pitch angle deviation range.
[0082] In an embodiment of the present application, the pixel points belonging to the vehicle's own landmarks in the image plane can be identified through a neural network model, the image plane can be perspective transformed, and the position information of the pixel points belonging to the vehicle's own landmarks can be determined in the three-dimensional space after the perspective transformation. Taking the self-marker as a rearview mirror as an example, the position information of the camera in the three-dimensional space and the position information of the rearview mirror in the three-dimensional space are obtained after the perspective transformation. In the three-dimensional space, according to the position information of the camera and the rearview mirror in the three-dimensional space, the camera and the rearview mirror are connected, and a vertical line is drawn from the rearview mirror to the optical axis of the camera to form a triangle, and the angle between the connecting line between the camera and the rearview mirror and the optical axis of the camera is calculated using trigonometric functions, and the angle is used as the first pitch angle.
[0083] For example, Figure 5 As shown, Figure 5 It is a schematic diagram of a camera and a rearview mirror provided in an embodiment of the present application. Figure 5 The camera shown in the figure is installed on the side of the vehicle and close to the rear of the vehicle. The camera can capture the rearview mirror. By using perspective transformation, the image plane captured by the camera is converted into a three-dimensional space, thereby obtaining the spatial relationship between the camera and the rearview mirror in the three-dimensional space.
[0084] Using the line of sight method, it is assumed that the angle formed by the line connecting the optical axis of the camera and a feature point of the vehicle (for example, a rearview mirror) is θ. Trigonometric functions can be used to calculate θ, which is used as the first pitch angle, as shown in formula (2).
[0085]
[0086] In the above formula (2), d represents the vertical distance from the rearview mirror to the optical axis of the camera in the three-dimensional space, and l represents the horizontal distance from the rearview mirror to the optical axis of the camera in the three-dimensional space.
[0087] The positional relationship between the camera and the rearview mirror of the vehicle in three-dimensional space is obtained, and the preset pitch angle is calculated in combination with the direction of the optical axis of the camera at a normal installation angle. The preset pitch angle deviation range is set with the preset pitch angle as the center. When the first pitch angle is within the preset pitch angle deviation range, it is determined that the camera installation angle is not abnormal. When the first pitch angle is not within the preset pitch angle deviation range, it is determined that the camera installation angle is abnormal.
[0088] In the embodiment of the present application, the position information of the camera and the rearview mirror in the three-dimensional space is used to establish a line between the camera and the rearview mirror, and then the angle between the line and the optical axis of the camera is calculated using trigonometric functions. The angle is used as the first pitch angle to determine whether the camera installation angle is abnormal. This example can detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera, thereby improving driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved.
[0089] In some embodiments, after determining in the above-mentioned Example 1 and Example 2 that the camera installation angle is abnormal, the method further includes the following steps: generating an alarm prompt; the alarm prompt is used to remind that the camera installation angle is abnormal.
[0090] In the embodiment of the present application, when an abnormal camera installation angle is detected, an alarm prompt can be generated to remind the driver that the camera installation angle is abnormal and that the driver should check and adjust it in time to ensure the accuracy and reliability of the images captured by the camera, thereby improving driving safety and traffic efficiency.
[0091] In some embodiments, after determining that an abnormality occurs in the camera installation angle by calculating the first pitch angle, the method further includes the following steps: determining the deviation amount based on the first pitch angle and a preset pitch angle deviation range; determining the installation adjustment direction based on the deviation amount; the installation adjustment direction is used to indicate installation adjustment of the camera.
[0092] In an embodiment of the present application, after calculating the first pitch angle of the camera, the deviation amount can also be calculated according to the lower limit value or upper limit value of the deviation range between the first pitch angle and the preset pitch angle, and the installation adjustment direction and the installation adjustment degree can be determined according to the deviation amount. Among them, the installation adjustment direction can indicate the driver in which direction to adjust, and the installation adjustment degree can include the first, second and third levels with gradually increasing levels to prompt the driver to adjust the strength. The driver can adjust the camera according to the installation adjustment direction and the installation adjustment degree to improve the adjustment efficiency of the camera.
[0093] Furthermore, in the process of adjusting the camera based on the installation adjustment direction, when it is detected that the camera is adjusted to a normal installation angle, an adjustment completion prompt is generated, and the adjustment completion prompt is used to remind the driver that the camera installation angle is normal. In the process of the driver adjusting the camera based on the installation adjustment direction and the installation adjustment degree, reasonable feedback on the adjustment process of the camera installation angle can also be given to the driver, and a prompt of adjustment completion is given when the camera is adjusted in the correct direction to the correct angle range, thereby improving the adjustment efficiency.
[0094] Example 3: When the blind spot environment includes a road boundary and a skyline, the preset marked environmental parameters include the position information of the vanishing point in the blind spot environment in the pixel coordinate system. S305 includes: converting the position information of the vanishing point in the pixel coordinate system to the image coordinate system to obtain the coordinate information in the image coordinate system; determining the yaw angle and the second pitch angle according to the focal length of the camera and the coordinate information in the image coordinate system; when the second pitch angle is not within the preset pitch angle deviation range, and / or the yaw angle is not within the preset yaw angle deviation range, determining that the camera installation angle is abnormal.
[0095] In perspective geometry, parallel lines converge at a point in an image, which is called a vanishing point. A vanishing point is when a vehicle is driving on a straight road, and the lane lines away from the center of sight gradually converge into a point, i.e., a vanishing point, which is the intersection between the road boundary and the skyline in a blind spot environment. The position information of the vanishing point can be used to determine the second pitch angle and yaw angle of the camera. By identifying the vanishing points of the road boundary and the skyline in the image, their intersection in three-dimensional space can be determined, and the positional relationship between this intersection and the camera can be used to calculate the second pitch angle and yaw angle of the camera.
[0096] In the embodiment of the present application, edge detection, color filtering and other methods can be used to extract the position information of the lane line. After the position information of the lane line is extracted, clustering or fitting algorithms can be used to find the trend of the lane line, thereby identifying the vanishing point in the image plane. The image plane is perspective transformed, and the position information of the vanishing point is determined in the three-dimensional space after the perspective transformation.
[0097] The camera is essentially a camera. The perspective transformation process involves the image coordinate system, pixel coordinate system, camera coordinate system (camera) and the world coordinate system (world coordinate) corresponding to the three-dimensional space. Among them, the world coordinate system describes the spatial position of the camera and the vanishing point. The origin of the camera coordinate system is the optical center of the camera. Its X-axis and Y-axis are parallel to the x-axis and y-axis of the image coordinate system respectively. The Z-axis of the camera coordinate system is the optical axis of the camera. The image coordinate system and the pixel coordinate system are both on the imaging plane.
[0098] like Figure 6 As shown, Figure 6 It is a schematic diagram of a camera and a vanishing point provided in an embodiment of the present application. Figure 6 The camera coordinate system (Xc, Yc, Zc), the origin Oc of the camera coordinate system, the image coordinate system (x, y), the pixel coordinate system (u, v), the origin of the pixel coordinate system (u0, v0), and the camera focal length f are shown in the figure, where (u0, v0) refers to the intersection between the camera optical axis and the image plane, and f represents the distance from the origin Oc of the camera coordinate system to the origin (u0, v0) of the pixel coordinate system. Figure 6 , the vanishing point P in the world coordinate system is shown in , and the vanishing point P is mapped to the image coordinate system (or pixel coordinate system) to obtain the vanishing point P'(u, v).
[0099] The geometric relationship between the image coordinate system and the pixel coordinate system is shown in formula (3).
[0100]
[0101] The above formula (3) is transformed to obtain the coordinate value of the vanishing point in the image coordinate system, as shown in formula (4).
[0102]
[0103] In the above formulas (3) and (4), (u-u0)*dx represents the deviation of the vanishing point P' on the x-axis of the image coordinate system, and dx represents the physical size of each pixel on the x-axis. (v-v0)*dy represents the deviation of the vanishing point P' on the y-axis, and dy represents the physical size of each pixel on the y-axis.
[0104] The coordinates of the vanishing point P' in the image coordinate system in the above formula (4) are transformed into the camera coordinate system to calculate the yaw angle and the second pitch angle. Combined with the camera focal length f, the yaw angle is shown in formula (5) and the second pitch angle is shown in formula (6).
[0105]
[0106] The tan-1 in the above formula (5) and formula (6) represents the trigonometric function relationship: inverse tangent function arctan.
[0107] For example, Figure 6 As shown, the coordinates of the vanishing point P' on the x-axis of the image coordinate system in formula (4) are transformed to the Xc-Oc-Zc plane and substituted into the above formula (5) to obtain the yaw angle of the camera as shown in formula (7).
[0108]
[0109] For example, Figure 6 As shown, the coordinates of the vanishing point P' on the x-axis of the image coordinate system in formula (4) are converted to the Yc-Oc-Zc plane and substituted into the above formula (6) to obtain the second pitch angle of the camera as shown in formula (8).
[0110]
[0111] In the embodiment of the present application, there is a certain linear relationship between the position of the vanishing point in the image coordinate system and the second pitch angle and yaw angle of the camera, and the geometric relationship between the vanishing point and the camera can be derived using a three-dimensional geometric model.
[0112] In one implementation, when the second pitch angle is not within the preset pitch angle deviation range, it is determined that the camera installation angle is abnormal. In another implementation, when the yaw angle is not within the preset yaw angle deviation range, it is determined that the camera installation angle is abnormal. In yet another implementation, when the second pitch angle is not within the preset pitch angle deviation range and the yaw angle is not within the preset yaw angle deviation range, it is determined that the camera installation angle is abnormal.
[0113] The first pitch angle is calculated based on the line of sight using trigonometric functions, such as Figure 5 The second pitch angle is calculated based on the vanishing point method using the geometric relationship between the image coordinate system and the pixel coordinate system and the camera focal length, as shown in Figure 6 As shown. Normally, the vanishing point can be captured in an ideal scene, and there may not be a vanishing point in the image captured by the camera. Therefore, when there is no vanishing point in the captured image, the first pitch angle can be calculated based on the line of sight method and used as the final pitch angle. When there is a vanishing point in the captured image, the above two methods can be combined, the first pitch angle is calculated based on the line of sight method, and the second pitch angle is calculated based on the vanishing point method, and the first pitch angle or the second pitch angle is used as the final pitch angle, or the average of the first pitch angle and the second pitch angle is used as the final pitch angle. Then, the final pitch angle is compared with the preset pitch angle deviation range to determine whether the camera installation angle is abnormal.
[0114] It should be noted that, through the above examples, combined with actual image data and vehicle models, the installation angle of the camera relative to the vehicle can be calculated. These calculations can be implemented by computer vision software and image processing algorithms, and may need to be adjusted and optimized according to actual conditions. This embodiment of the application is not limited to this.
[0115] In the embodiment of the present application, by identifying the vanishing point in the image plane, the geometric relationship between the vanishing point in the image coordinate system and the pixel coordinate system in the perspective transformation is used to calculate the second pitch angle and yaw angle, thereby determining whether the camera installation angle is abnormal. This example can detect whether the camera installation angle is abnormal, and promptly remind the user to adjust the camera, thereby improving driving safety and traffic efficiency. Moreover, compared with the manual detection method of whether the camera installation angle is abnormal, the accuracy of the detection result is improved.
[0116] After determining in the above example three that the camera installation angle is abnormal, the method further includes the following steps: generating an alarm prompt; the alarm prompt is used to remind that the camera installation angle is abnormal.
[0117] When the camera is installed at an abnormal angle, an alarm will be issued to help the driver check and adjust in time to improve driving safety.
[0118] In some embodiments, after determining that an abnormality occurs in the camera installation angle, the method further includes the following steps: determining the deviation amount based on the pitch angle and a preset pitch angle deviation range, and / or, the yaw angle and a preset yaw angle deviation range; determining the installation adjustment direction based on the deviation amount; the installation adjustment direction is used to indicate the installation adjustment of the camera.
[0119] The pitch angle may be the first pitch angle, the second pitch angle, or the average of the first pitch angle and the second pitch angle.
[0120] After the final pitch angle and yaw angle are calculated, the total deviation can be calculated based on the lower limit or upper limit of the pitch angle deviation range and the lower limit or upper limit of the yaw angle deviation range, and the installation adjustment direction can be determined based on the total deviation. The driver can install and adjust the camera based on the installation adjustment direction, thereby improving the adjustment efficiency of the camera.
[0121] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0122] For example, Figure 7 As shown, Figure 7 This is a process of a camera installation angle detection method provided in an embodiment of the present application. Figure 4 The embodiment of the present application provides a method for determining abnormal camera installation angle. The method comprises the following steps:
[0123] S401, obtaining a captured image through a video stream.
[0124] Get the video stream of the camera. Select one frame of image from the video stream.
[0125] S402: Extract features from the image using a neural network model to obtain image features.
[0126] The image is processed through a neural network model to extract the environmental information around the vehicle, that is, the image features.
[0127] S403, identifying environmental parameters of preset signs such as a rearview mirror, a vehicle body, and a skyline according to image features.
[0128] The environmental parameters of the preset signs are identified according to the image features. The preset signs include but are not limited to the vehicle body, the rearview mirror of the vehicle, the door handle of the vehicle, the upper edge of the wheel of the vehicle, the wheel eyebrow of the vehicle, the vehicle logo, the road boundary and the skyline, etc.
[0129] S404: Calculate the pitch angle and the yaw angle according to the environmental parameters.
[0130] The camera installation angle (including pitch angle and yaw angle) is calculated according to the environmental parameters. The implementation process and technical effects achieved can be found in the above Figure 3 and Figure 4 The description will not be repeated here.
[0131] S405: When the pitch angle and the yaw angle exceed the standard parameter range, an angle abnormality alarm is issued.
[0132] The calculated installation angle (including pitch angle and yaw angle) is compared with the preset standard parameter range (i.e., the standard parameters corresponding to the preset identification of the camera at the normal installation angle) to determine whether the camera installation angle is abnormal. If the installation angle deviates significantly from the preset standard parameter range, for example, the deviation exceeds the preset threshold, it is determined that the camera installation angle is abnormal, and an alarm is issued to remind the driver to take corresponding measures in time, such as checking and adjusting the camera.
[0133] The embodiment of the present application determines whether the camera installation angle is abnormal through environmental parameter analysis, and uses methods such as image processing and geometric calculation to calculate the camera installation angle, thereby improving the accuracy of the judgment result. The camera installation angle is monitored and analyzed in real time to determine whether it has an abnormal installation angle, and when the camera installation angle is abnormal, an alarm is issued in time to improve the safety of the vehicle during driving.
[0134] Based on the camera installation angle detection method provided in the above embodiment, Figure 8 1 is a schematic diagram of a camera installation angle detection device provided in an embodiment of the present application. The device can be implemented as part or all of a computer device by software, hardware, or a combination of both. Figure 8The detection device 80 for the camera installation angle includes: an acquisition module 801, which is used to acquire an image taken by a camera; the camera is installed on the side of the vehicle and close to the rear of the vehicle, the field of view of the camera includes the blind spot of the vehicle, and the image includes a preset mark, the preset mark includes at least one of the vehicle's own marker and a vanishing point in the blind spot environment, and the vanishing point is the intersection of the road boundary and the skyline; a feature extraction module 802, which is used to extract features from the image to obtain image features; a determination module 803, which is used to determine the environmental parameters of the preset mark according to the image features; and determine whether the camera installation angle is abnormal according to the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark under the normal installation angle of the camera.
[0135] Optionally, the preset marked environmental parameters include geometric parameters of the vehicle's own landmarks;
[0136] The determination module 803 is also used to determine whether there is an abnormality in the camera installation angle based on the geometric parameters and the standard parameters corresponding to the vehicle's own landmarks at the normal installation angle of the camera.
[0137] Optionally, the vehicle's own marker includes a vehicle body, the geometric parameters of the vehicle's own marker include a body contour, and the standard parameters include a preset ratio interval;
[0138] The determination module 803 is further used to determine the proportion of the vehicle body in the image according to the vehicle body contour; when the proportion is not within a preset proportion range, it is determined that the camera installation angle is abnormal.
[0139] Optionally, the vehicle's own marker includes any one of a rearview mirror of the vehicle, a door handle of the vehicle, an upper edge of a wheel of the vehicle, a wheel eyebrow of the vehicle, and a vehicle logo; the geometric parameter of the vehicle's own marker includes a position of the vehicle's own marker in the image, and the standard parameter includes a preset range;
[0140] The determination module 803 is also used to determine that the camera installation angle is abnormal when the position of the vehicle's own landmark in the image is not within a preset range.
[0141] Optionally, the determination module 803 is further used to perform perspective transformation on the image according to image features to obtain position information of points in the image in three-dimensional space; and determine preset marked environmental parameters according to the position information of points in the image in three-dimensional space.
[0142] Optionally, the preset marked environmental parameters include the height of the vehicle's own marker from the ground;
[0143] The determination module 803 is also used to determine that the camera installation angle is abnormal when the height of the vehicle's own marker from the ground is not within the standard height range of the vehicle's own marker from the ground in the vehicle's preset model.
[0144] Optionally, the preset marked environmental parameters include position information of the camera in the three-dimensional space, and position information of the rearview mirror of the vehicle in the three-dimensional space;
[0145] The determination module 803 is also used to determine the first pitch angle according to the optical axis of the camera, the position information of the camera in the three-dimensional space, and the position information of the rearview mirror in the three-dimensional space; when the first pitch angle is not within the preset pitch angle deviation range, it is determined that the camera installation angle is abnormal.
[0146] Optionally, in the case where the blind spot environment includes a road boundary and a skyline, the preset marked environment parameters include position information of a vanishing point in the blind spot environment in a pixel coordinate system;
[0147] The determination module 803 is further used to convert the position information of the vanishing point in the pixel coordinate system into the image coordinate system to obtain the coordinate information in the image coordinate system; determine the yaw angle and the second pitch angle according to the focal length of the camera and the coordinate information in the image coordinate system; and determine that an abnormality occurs in the camera installation angle when the second pitch angle is not within the preset pitch angle deviation range and / or the yaw angle is not within the preset yaw angle deviation range.
[0148] Optionally, the camera installation angle detection device 80 further includes an alarm module 804 and an adjustment module 805;
[0149] Alarm module 804, used to generate an alarm prompt; the alarm prompt is used to remind the camera installation angle is abnormal;
[0150] The adjustment module 805 is used to determine the deviation amount according to the pitch angle and the preset pitch angle deviation range, and / or the yaw angle and the preset yaw angle deviation range; wherein the pitch angle includes the first pitch angle and / or the second pitch angle; determine the installation adjustment direction according to the deviation amount; the installation adjustment direction is used to indicate the installation adjustment of the camera.
[0151] It should be noted that the camera installation angle detection device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when detecting whether the installation angle is abnormal. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0152] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0153] The camera installation angle detection device and the camera installation angle detection method provided in the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought about can be found in the method embodiment part and will not be repeated here.
[0154] Based on the camera installation angle detection method provided in the above embodiment, Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the computer device 90 includes: a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program 903, the steps in the method for detecting the camera installation angle in the above embodiment are implemented.
[0155] The computer device 90 may be a general-purpose computer device or a dedicated computer device. In a specific implementation, the computer device 90 may be a desktop computer, a portable computer, a network server, a PDA, a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of the computer device 90. Those skilled in the art will understand that Fig. 9 This is merely an example of the computer device 90 and does not constitute a limitation on the computer device 90 . The computer device 90 may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, etc.
[0156] The processor 901 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0157] In some embodiments, the memory 902 may be an internal storage unit of the computer device 90, such as a hard disk or memory of the computer device 90. In other embodiments, the memory 902 may also be an external storage device of the computer device 90, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 90. Further, the memory 902 may also include both an internal storage unit of the computer device 90 and an external storage device. The memory 902 is used to store an operating system, an application program, a boot loader, data, and other programs. The memory 902 may also be used to temporarily store data that has been output or is to be output.
[0158] An embodiment of the present application also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the above-mentioned method embodiments are implemented.
[0159] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0160] An embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the steps in the above-mentioned method embodiments.
[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above method embodiments, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device. The computer-readable storage medium mentioned in the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.
[0162] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0165] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for detecting a camera installation angle, characterized in that: The method comprises: Acquire an image captured by a camera; the camera is installed on the side of the vehicle and close to the rear of the vehicle, the field of view of the camera includes a blind spot of the vehicle, the image includes a preset mark, the preset mark includes at least one of a vehicle's own marker and a vanishing point in the blind spot environment, and the vanishing point is the intersection of a road boundary and a skyline; Performing feature extraction on the image to obtain image features; Determining the environmental parameters of the preset mark according to the image features; According to the environmental parameters of the preset mark and the standard parameters corresponding to the preset mark under the normal installation angle of the camera, it is determined whether the installation angle of the camera is abnormal.
2. The method according to claim 1, characterized in that The preset marked environmental parameters include geometric parameters of the vehicle's own landmarks; The determining whether the camera installation angle is abnormal according to the environmental parameter of the preset mark and the standard parameter corresponding to the preset mark at the normal installation angle of the camera includes: Based on the geometric parameters and the standard parameters corresponding to the vehicle's own markers when the camera is installed at a normal angle, it is determined whether the camera installation angle is abnormal.
3. The method according to claim 2, characterized in that The vehicle's own marker includes a vehicle body, the geometric parameters of the vehicle's own marker include a vehicle body contour, and the standard parameters include a preset ratio interval; The determining whether the camera installation angle is abnormal according to the geometric parameters and the standard parameters corresponding to the vehicle's own marker at a normal installation angle of the camera includes: Determining the proportion of the vehicle body in the image according to the vehicle body contour; When the proportion is not within the preset proportion interval, it is determined that the camera installation angle is abnormal.
4. The method according to claim 2, characterized in that The vehicle's own marker includes any one of the vehicle's rearview mirror, the vehicle's door handle, the upper edge of the vehicle's wheel, the vehicle's wheel eyebrow, and the vehicle logo; the geometric parameter of the vehicle's own marker includes the position of the vehicle's own marker in the image, and the standard parameter includes a preset range; The determining whether the camera installation angle is abnormal according to the geometric parameters and the standard parameters corresponding to the vehicle's own marker at a normal installation angle of the camera includes: When the position of the vehicle's own marker in the image is not within the preset range, it is determined that the camera installation angle is abnormal.
5. The method according to any one of claims 1 to 4, characterized in that: The step of determining the preset marked environmental parameter according to the image feature includes: Performing perspective transformation on the image according to the image features to obtain position information of points in the image in three-dimensional space; The environmental parameters of the preset mark are determined according to the position information of the points in the image in the three-dimensional space.
6. The method according to claim 5, characterized in that The preset marked environmental parameters include the height of the vehicle's own marker from the ground; The determining whether the camera installation angle is abnormal according to the environmental parameter of the preset mark and the standard parameter corresponding to the preset mark at the normal installation angle of the camera includes: When the height of the vehicle's own marker from the ground is not within the standard height range of the vehicle's own marker from the ground in the preset model of the vehicle, it is determined that the camera installation angle is abnormal.
7. The method according to claim 5, characterized in that The preset marked environmental parameters include the position information of the camera in the three-dimensional space and the position information of the rearview mirror of the vehicle in the three-dimensional space; The determining whether the camera installation angle is abnormal according to the environmental parameter of the preset mark and the standard parameter corresponding to the preset mark at the normal installation angle of the camera includes: Determining a first pitch angle according to the optical axis of the camera, the position information of the camera in the three-dimensional space, and the position information of the rearview mirror in the three-dimensional space; When the first pitch angle is not within a preset pitch angle deviation range, it is determined that an abnormality occurs in the camera installation angle.
8. The method according to claim 5, characterized in that In the case where the blind spot environment includes a road boundary and a skyline, the preset marked environment parameter includes position information of a vanishing point in the blind spot environment in a pixel coordinate system; The determining whether the camera installation angle is abnormal according to the environmental parameter of the preset mark and the standard parameter corresponding to the preset mark at the normal installation angle of the camera includes: Convert the position information of the vanishing point in the pixel coordinate system to the image coordinate system to obtain the coordinate information in the image coordinate system; Determine a yaw angle and a second pitch angle according to the focal length of the camera and coordinate information in the image coordinate system; When the second pitch angle is not within a preset pitch angle deviation range, and / or the yaw angle is not within a preset yaw angle deviation range, it is determined that an abnormality occurs in the camera installation angle.
9. The method according to any one of claims 3, 4, 6-8, characterized in that: After determining that the camera installation angle is abnormal, the method further includes: Generate an alarm prompt; the alarm prompt is used to remind that the camera installation angle is abnormal; and / or, Determine a deviation amount based on a pitch angle and a preset pitch angle deviation range, and / or a yaw angle and a preset yaw angle deviation range; wherein the pitch angle includes a first pitch angle and / or a second pitch angle; determine an installation adjustment direction based on the deviation amount; and the installation adjustment direction is used to indicate installation adjustment of the camera.
10. A computer device, characterized in that: The computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 9 when executed by the processor.
