Camera angle offset detection method, device, equipment and storage medium
By matching feature points in camera images to calculate the essential matrix and Euler angles, the problem of low accuracy in camera angle offset detection is solved, achieving more efficient angle offset detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SF TECH CO LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, camera angle offset detection has low accuracy under complex lighting conditions and when there are many moving objects in the scene, resulting in blind spots and security issues.
By acquiring standard images and images to be detected from the camera at different time points, matching image feature points, calculating the essential matrix and Euler angles, it is determined whether the camera has experienced angular shift.
It improves the accuracy and speed of camera angle offset detection, reduces the demand for computing resources, and avoids the waste of manpower and computing resources.
Smart Images

Figure CN122312477A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for detecting camera angle offset. Background Technology
[0002] With social development and technological advancements, surveillance cameras are playing an increasingly important role in various fields such as security monitoring, traffic management, and urban management. By capturing real-time images, surveillance cameras help people understand and monitor the dynamic situation in specific areas. However, over time, the screws securing surveillance cameras in their installation locations gradually loosen, causing the camera's angle to shift. This is especially true for cameras installed in high-vibration environments such as factories, where the probability of angular shift increases significantly. Such shifts can create blind spots, affecting monitoring effectiveness and security.
[0003] Traditional techniques primarily rely on machine learning to detect camera angular shifts. For example, a standard image and the image to be detected are stacked in channels and fed into a 3D motion classification network for identification to detect whether the camera angle has shifted. However, this method only recognizes camera angle shifts when there are significant differences in the image quality. Under complex lighting conditions and with many moving objects in the scene, the accuracy of angle shift detection still needs improvement, resulting in a low overall accuracy rate. Summary of the Invention
[0004] Therefore, it is necessary to provide a camera angle offset detection method, apparatus, device, and storage medium that can improve the accuracy of camera angle offset detection in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides a camera angle offset detection method, the method comprising:
[0006] Acquire the standard image captured by the camera at the first time point and the image to be detected captured by the camera at the second time point;
[0007] The first image feature points of the standard image are matched with the second image feature points of the image to be detected;
[0008] If the number of successful matches between the first image feature point and the second image feature point is greater than or equal to a preset number, then for any set of successfully matched first image feature points and second image feature points, the essential matrix is determined based on the first image coordinates of the first image feature point and the second image coordinates of the second image feature point.
[0009] Based on the essential matrix, it is determined whether the camera has experienced an angular shift between the first time point and the second time point.
[0010] In one embodiment, the method further includes:
[0011] If the number of successful matches between the first image feature point and the second image feature point is less than a preset number, it is determined that the camera has undergone an angular shift between the first time point and the second time point.
[0012] In one embodiment, determining the essential matrix based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points for any set of successfully matched first image feature points and second image feature points includes:
[0013] For any set of successfully matched first image feature points and second image feature points, the first image coordinates of the first image feature points are normalized according to the camera intrinsic parameter matrix of the camera to obtain the first normalized coordinates;
[0014] The second image coordinates of the second image feature points are normalized according to the camera intrinsic parameter matrix to obtain the second normalized coordinates.
[0015] Based on the first normalized coordinates and the second normalized coordinates, and according to the constraints of epipolar geometry, the essential matrix is determined.
[0016] In one embodiment, determining whether the camera has experienced an angular shift between the first time point and the second time point based on the essential matrix includes:
[0017] Based on the essential matrix, determine the rotation matrix between the standard image and the image to be detected;
[0018] The rotation matrix is converted into multiple Euler angles of the camera.
[0019] Based on the multiple Euler angles, it is determined whether the camera has experienced an angular shift between the first time point and the second time point.
[0020] In one embodiment, determining whether the camera has experienced an angular shift between the first time point and the second time point based on the plurality of Euler angles includes:
[0021] If the sum of the plurality of Euler angles is greater than a preset angle, it is determined that the camera has undergone an angular shift between the first time point and the second time point;
[0022] If the sum of the plurality of Euler angles is less than or equal to the preset angle, it is determined that the camera did not experience any angular shift between the first time point and the second time point.
[0023] In one embodiment, matching the first image feature points of the standard image with the second image feature points of the image to be detected includes:
[0024] For each first image feature point of the standard image and each second image feature point of the image to be detected, if the first image coordinates of the first image feature point and the second image coordinates of the second image feature point are mapped to the same coordinates, then it is determined that the first image feature point and the second image feature point are successfully matched.
[0025] If the first image coordinates and the second image coordinates are mapped to different coordinates, then it is determined that the first image feature point and the second image feature point have failed to match.
[0026] Secondly, this application provides a camera angle offset detection device, the device comprising:
[0027] The acquisition module is used to acquire the standard image captured by the camera at a first time point and the image to be detected captured by the camera at a second time point;
[0028] The matching module is used to match the first image feature points of the standard image with the second image feature points of the image to be detected;
[0029] The determination module is used to determine the essential matrix based on the first image coordinates of the first image feature points and the second image feature points if the number of successful matches between the first image feature points and the second image feature points is greater than or equal to a preset number.
[0030] The judgment module is used to determine, based on the essential matrix, whether the camera has undergone an angular shift between the first time point and the second time point.
[0031] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments of this application.
[0032] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.
[0033] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.
[0034] The aforementioned camera angle shift detection method, apparatus, device, and storage medium acquire a standard image captured by the camera at a first time point and a detection image captured by the camera at a second time point. First image feature points of the standard image are matched with second image feature points of the detection image. If the number of successfully matched first and second image feature points is greater than or equal to a preset number, an essential matrix is determined for any set of successfully matched first and second image feature points based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points. Based on the essential matrix, it is determined whether an angle shift has occurred between the first and second time points. Compared to traditional methods of detecting camera angle shift using machine learning, this application improves the accuracy of camera angle shift detection by matching feature points of the standard image and the detection image. If the number of successfully matched feature points is greater than or equal to a preset number, it indicates that the camera angle may not have shifted or the shift angle may be small. To accurately detect camera angle shift, an essential matrix can be calculated from any set of successfully matched feature points, and then the determination of whether the camera has shifted angle can be based on the essential matrix, thus improving the accuracy of camera angle shift detection. Attached Figure Description
[0035] Figure 1 This is an application environment diagram of the camera angle offset detection method in one embodiment;
[0036] Figure 2 This is a flowchart illustrating a camera angle offset detection method in one embodiment;
[0037] Figure 3 This is a structural block diagram of a camera angle offset detection device in one embodiment;
[0038] Figure 4 This is an internal structural diagram of a computer device in one embodiment;
[0039] Figure 5 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0041] The camera angle offset detection method provided in this application can be applied to, for example... Figure 1 In the application environment shown, camera 102 communicates with server 104 via a network. The data storage system can be set up separately to store data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other servers. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, cloud security, host security and other network security services, CDN, and big data and artificial intelligence platforms. Camera 102 and server 104 can be connected directly or indirectly via wired or wireless communication; this application does not impose any restrictions on this connection.
[0042] Server 104 can acquire a standard image captured by camera 102 at a first time point and an image to be detected captured by camera 102 at a second time point. Server 104 can match the first image feature points of the standard image with the second image feature points of the image to be detected. If the number of successful matches between the first and second image feature points is greater than or equal to a preset number, server 104 can determine an essential matrix for any set of successfully matched first and second image feature points based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points. Based on the essential matrix, server 104 can determine whether camera 102 has experienced an angular shift between the first and second time points.
[0043] It is understood that this embodiment does not limit this aspect. Figure 1 The application scenarios shown are for illustrative purposes only and are not limited to these.
[0044] In one embodiment, such as Figure 2 As shown, a method for detecting camera angle offset is provided. This method can be applied to computer devices, which can be terminals or servers. This embodiment illustrates the application of this method to a computer device as an example, including the following steps:
[0045] Step 202: Obtain the standard image captured by the camera at the first time point and the image to be detected captured by the camera at the second time point.
[0046] The standard image is the image captured when the camera has not shifted its angle. In other words, the standard image can be the image captured after the camera has been installed and its angle adjusted. The image to be detected is the image used to detect whether the camera has shifted. The first time point is earlier than the second time point.
[0047] In one embodiment, the computer device can acquire and store a standard image captured by the camera at a first time point after the camera has been installed and its angle adjusted. The computer device can also acquire the image to be detected captured by the camera at a second time point later than the first time point.
[0048] In one embodiment, the computer device can periodically acquire images to be detected captured by the camera, so as to periodically detect the camera's angle shift. For example, the computer device can acquire images to be detected captured by the camera at the current time point (i.e., the second time point) once a week, so as to perform angle shift detection on the camera once a week.
[0049] Step 204: Match the first image feature points of the standard image with the second image feature points of the image to be detected.
[0050] In one embodiment, for each first image feature point of the standard image and each second image feature point of the image to be detected, if the first image feature point and the second image feature point both point to the same object, then a mapping relationship is established between the first image feature point and the second image feature point, and it is determined that the first image feature point and the second image feature point are successfully matched; otherwise, it is determined that the first image feature point and the second image feature point are not successfully matched.
[0051] Step 206: If the number of successful matches between the first image feature points and the second image feature points is greater than or equal to a preset number, then for any set of successfully matched first image feature points and second image feature points, the essential matrix is determined based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points.
[0052] Wherein, the first image coordinates are the pixel coordinates of the first image feature point located on the standard image. The second image coordinates are the pixel coordinates of the second image feature point located on the image to be detected. The essential matrix is used to reflect the relationship between the representation of a point in space in the camera coordinate system from different camera viewpoints.
[0053] In one embodiment, if the number of successful matches between the first image feature point and the second image feature point is greater than or equal to a preset number (e.g., the number of successful matches between the first image feature point and the second image feature point is greater than or equal to 8), then for any set of successfully matched first image feature points and second image feature points, the computer device can calculate the essential matrix based on the first image coordinates of the first image feature point in the standard image and the second image coordinates of the second image feature point in the image to be detected. For example, if the first image feature point A1 and the second image feature point B1 are successfully matched, the computer device can calculate the essential matrix based on the first image coordinates P1 of the first image feature point A1 in the standard image and the second image coordinates P2 of the second image coordinates of the second image feature point B1 in the image to be detected.
[0054] Step 208: Based on the essential matrix, determine whether the camera has experienced an angular shift between the first time point and the second time point.
[0055] In one embodiment, the computer device may determine the rotation matrix between the standard image and the image to be detected based on the essential matrix, and determine whether the camera has undergone angular shift between the first time point and the second time point based on the rotation matrix.
[0056] In the aforementioned camera angle shift detection method, a standard image captured by the camera at a first time point and a detection image captured by the camera at a second time point are obtained. First image feature points of the standard image are matched with second image feature points of the detection image. If the number of successful matches between the first and second image feature points is greater than or equal to a preset number, an essential matrix is determined for any set of successfully matched first and second image feature points based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points. Based on the essential matrix, it is determined whether an angle shift has occurred between the first and second time points. Compared to traditional methods of detecting camera angle shift through machine learning, this application improves the accuracy of camera angle shift detection by matching feature points between the standard image and the detection image. If the number of successfully matched feature points is greater than or equal to a preset number, it indicates that the camera angle may not have shifted or the shift angle may be small. To accurately detect the camera angle shift, an essential matrix can be calculated from any set of successfully matched feature points, and then the determination of whether the camera has shifted angle can be based on the essential matrix, thus improving the accuracy of camera angle shift detection. Furthermore, compared to traditional methods of detecting camera angle shifts through machine learning, the camera angle shift detection method of this application does not require the calculation of a large amount of floating-point data for machine learning models, and the detection speed of camera angle shifts is faster and more efficient.
[0057] In one embodiment, the method further includes: if the number of successful matches between the first image feature points and the second image feature points is less than a preset number, then it is determined that the camera has undergone an angular shift between the first time point and the second time point.
[0058] Specifically, if the number of successful matches between the first image feature point and the second image feature point is less than a preset number (for example, the number of successful matches between the first image feature point and the second image feature point is less than 8), the computer device can directly determine that the camera has undergone an angular shift between the first time point and the second time point.
[0059] In the above embodiments, if the number of successful matches between the first image feature point and the second image feature point is less than the preset number, it indicates that the camera angle shift is relatively serious and the image captured by the camera changes significantly. In this case, it can be directly determined that the camera has shifted its angle between the first time point and the second time point, which can improve the detection efficiency of the camera angle shift.
[0060] In one embodiment, for any set of successfully matched first image feature points and second image feature points, determining the essential matrix based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points includes: for any set of successfully matched first image feature points and second image feature points, normalizing the first image coordinates of the first image feature points according to the camera intrinsic parameter matrix of the camera to obtain first normalized coordinates; normalizing the second image coordinates of the second image feature points according to the camera intrinsic parameter matrix to obtain second normalized coordinates; and determining the essential matrix based on the first normalized coordinates and the second normalized coordinates, according to the constraints of epipolar geometry.
[0061] In one embodiment, the computer device can normalize the first image coordinates and the second image coordinates using the following formulas:
[0062] ;
[0063] Where K is the camera intrinsic parameter matrix of the camera, f u and f v These are the pixel coordinates of the camera's focal length, c u and c v It is the offset between the image center and the intersection of the image and the optical axis. This can be understood as the offset when normalizing the coordinates of the first image. Indicates the coordinates of the first image. This represents the first normalized coordinate. When normalizing the second image coordinate, Indicates the coordinates of the second image. This represents the second normalized coordinate.
[0064] In one embodiment, a computer device can determine the essential matrix using the following formula:
[0065] ;
[0066] in, Represents the first normalized coordinate. Let E represent the second normalized coordinates and E represent the essential matrix.
[0067] In the above embodiments, by normalizing the first image coordinates of the first image feature points and the second image coordinates of the second image feature points, and then calculating the essential matrix based on these two normalized image coordinates and according to the constraints of epipolar geometry, the accuracy of the final obtained essential matrix can be improved.
[0068] In one embodiment, determining whether the camera has experienced an angular shift between a first time point and a second time point based on the essential matrix includes: determining a rotation matrix between a standard image and an image to be detected based on the essential matrix; converting the rotation matrix into multiple Euler angles of the camera; and determining whether the camera has experienced an angular shift between the first time point and the second time point based on the multiple Euler angles.
[0069] In one embodiment, the rotation matrix can be calculated based on singular value decomposition using the following formula:
[0070] ;
[0071] ;
[0072] Where R represents the rotation matrix. This represents the translation vector between the standard image and the image to be detected. This indicates that singular value decomposition is performed on the essential matrix E, i.e., U represents an orthogonal matrix. Let V denote a non-negative diagonal matrix, and let V denote an orthogonal matrix. This represents the matrix obtained by rotating the rotation matrix R by 90°.
[0073] In the above embodiments, the Euler angles of the camera can directly reflect the angular offset of the camera. By judging the changes in the Euler angles calculated based on the essential matrix, it can be determined whether the camera has experienced an angular offset between the first time point and the second time point, which can further improve the accuracy of the camera's angular offset detection.
[0074] In one embodiment, determining whether the camera has experienced an angular shift between a first time point and a second time point based on multiple Euler angles includes: if the sum of the multiple Euler angles is greater than a preset angle, then determining that the camera has experienced an angular shift between the first time point and the second time point; if the sum of the multiple Euler angles is less than or equal to the preset angle, then determining that the camera has not experienced an angular shift between the first time point and the second time point.
[0075] In one embodiment, the rotation matrix is converted into three Euler angles of the camera. If the sum of the three Euler angles is greater than a preset angle, the computer device can determine that the camera has undergone an angular shift between the first and second time points. If the sum of the three Euler angles is less than or equal to the preset angle, the computer device can determine that the camera has not undergone an angular shift between the first and second time points.
[0076] In the above embodiments, the change in the Euler angles of the camera directly reflects the magnitude of the camera's angular shift. A large change in the Euler angles indicates a significant angular shift, meaning the camera has shifted angularly between the first and second time points. Conversely, a small change in the Euler angles indicates a negligible angular shift, meaning no angular shift has occurred between the first and second time points. This approach ensures accurate angular shift detection while avoiding the waste of human and computer resources caused by excessively high detection sensitivity.
[0077] In one embodiment, matching a first image feature point of a standard image with a second image feature point of an image to be detected includes: for each first image feature point of the standard image and each second image feature point of the image to be detected, if the first image coordinates of the first image feature point and the second image coordinates of the second image feature point are mapped to the same coordinates, then the first image feature point and the second image feature point are determined to be successfully matched; if the first image coordinates and the second image coordinates are mapped to different coordinates, then the first image feature point and the second image feature point are determined to be unmatched.
[0078] In the above embodiments, by determining whether the first image coordinates of the first image feature point and the second image coordinates of the second image feature point are mapped to the same coordinates, it is determined whether the first image feature point and the second image feature point are successfully matched. Compared with the method that only when the coordinates are exactly the same is it considered a successful match. The matching method of this embodiment is more flexible and can allow the camera angle to shift slightly. This can ensure the accuracy of the camera angle shift detection while avoiding the waste of human and computer resources caused by the excessively high detection sensitivity of the camera angle shift.
[0079] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially, these steps are not necessarily executed in that order. Unless otherwise expressly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the above embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0080] In one embodiment, such as Figure 3 As shown, a camera angle offset detection device 300 is provided, which specifically includes:
[0081] The acquisition module 302 is used to acquire the standard image captured by the camera at the first time point and the image to be detected captured by the camera at the second time point;
[0082] The matching module 304 is used to match the first image feature points of the standard image with the second image feature points of the image to be detected;
[0083] The determining module 306 is used to determine the essential matrix based on the first image coordinates of the first image feature points and the second image feature points if the number of successful matches between the first image feature points and the second image feature points is greater than or equal to a preset number.
[0084] The judgment module 308 is used to determine, based on the essential matrix, whether the camera has experienced an angular shift between the first time point and the second time point.
[0085] In one embodiment, the judgment module 308 is further configured to determine that the camera has undergone angular shift between the first time point and the second time point if the number of successful matches between the first image feature points and the second image feature points is less than a preset number.
[0086] In one embodiment, the determining module 306 is further configured to, for any set of successfully matched first image feature points and second image feature points, normalize the first image coordinates of the first image feature points according to the camera intrinsic parameter matrix of the camera to obtain first normalized coordinates; normalize the second image coordinates of the second image feature points according to the camera intrinsic parameter matrix to obtain second normalized coordinates; and determine the essential matrix based on the first normalized coordinates and the second normalized coordinates, according to the constraints of epipolar geometry.
[0087] In one embodiment, the determination module 308 is further configured to determine the rotation matrix between the standard image and the image to be detected based on the essential matrix; convert the rotation matrix into multiple Euler angles of the camera; and determine, based on the multiple Euler angles, whether the camera has undergone an angular shift between the first time point and the second time point.
[0088] In one embodiment, the determination module 308 is further configured to determine that the camera has undergone an angular shift between the first time point and the second time point if the sum of the multiple Euler angles is greater than a preset angle; and to determine that the camera has not undergone an angular shift between the first time point and the second time point if the sum of the multiple Euler angles is less than or equal to the preset angle.
[0089] In one embodiment, the matching module 304 is further configured to, for each first image feature point of the standard image and each second image feature point of the image to be detected, if the first image coordinates of the first image feature point and the second image coordinates of the second image feature point are mapped to the same coordinates, then the first image feature point and the second image feature point are determined to be successfully matched; if the first image coordinates and the second image coordinates are mapped to different coordinates, then the first image feature point and the second image feature point are determined to be unmatched.
[0090] The aforementioned camera angle shift detection device acquires a standard image captured by the camera at a first time point and a detection image captured by the camera at a second time point. It matches first image feature points of the standard image with second image feature points of the detection image. If the number of successful matches between the first and second image feature points is greater than or equal to a preset number, an essential matrix is determined for any set of successfully matched first and second image feature points based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points. Based on the essential matrix, it is determined whether an angle shift has occurred between the first and second time points. Compared to traditional methods of detecting camera angle shift using machine learning, this application improves the accuracy of camera angle shift detection by matching feature points between the standard image and the detection image. If the number of successful matches is greater than or equal to a preset number, it indicates that the camera angle may not have shifted or the shift angle may be small. To accurately detect camera angle shift, an essential matrix can be calculated from any set of successfully matched feature points, and then the determination of whether the camera has shifted angle can be based on the essential matrix, thus improving the accuracy of camera angle shift detection. Furthermore, compared to traditional methods of detecting camera angle shifts through machine learning, the camera angle shift detection method of this application does not require the calculation of a large amount of floating-point data for machine learning models, and the detection speed of camera angle shifts is faster and more efficient.
[0091] Each module in the aforementioned camera angle offset detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0092] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for detecting camera angle shift.
[0093] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a camera angle shift detection method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0094] Those skilled in the art will understand that Figure 4 and Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0095] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0096] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0097] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for detecting camera angle offset, characterized in that, The method includes: Acquire the standard image captured by the camera at the first time point and the image to be detected captured by the camera at the second time point; The first image feature points of the standard image are matched with the second image feature points of the image to be detected; If the number of successful matches between the first image feature point and the second image feature point is greater than or equal to a preset number, then for any set of successfully matched first image feature points and second image feature points, the essential matrix is determined based on the first image coordinates of the first image feature point and the second image coordinates of the second image feature point. Based on the essential matrix, it is determined whether the camera has experienced an angular shift between the first time point and the second time point.
2. The method according to claim 1, characterized in that, The method further includes: If the number of successful matches between the first image feature point and the second image feature point is less than a preset number, it is determined that the camera has undergone an angular shift between the first time point and the second time point.
3. The method according to claim 1, characterized in that, For any set of successfully matched first image feature points and second image feature points, determining the essential matrix based on the first image coordinates of the first image feature points and the second image coordinates of the second image feature points includes: For any set of successfully matched first image feature points and second image feature points, the first image coordinates of the first image feature points are normalized according to the camera intrinsic parameter matrix of the camera to obtain the first normalized coordinates; The second image coordinates of the second image feature points are normalized according to the camera intrinsic parameter matrix to obtain the second normalized coordinates. Based on the first normalized coordinates and the second normalized coordinates, and according to the constraints of epipolar geometry, the essential matrix is determined.
4. The method according to claim 1, characterized in that, The step of determining whether the camera has experienced an angular shift between the first time point and the second time point based on the essential matrix includes: Based on the essential matrix, determine the rotation matrix between the standard image and the image to be detected; The rotation matrix is converted into multiple Euler angles of the camera. Based on the multiple Euler angles, it is determined whether the camera has experienced an angular shift between the first time point and the second time point.
5. The method according to claim 4, characterized in that, The step of determining whether the camera has experienced an angular shift between the first time point and the second time point based on the plurality of Euler angles includes: If the sum of the plurality of Euler angles is greater than a preset angle, it is determined that the camera has undergone an angular shift between the first time point and the second time point; If the sum of the plurality of Euler angles is less than or equal to the preset angle, it is determined that the camera did not experience any angular shift between the first time point and the second time point.
6. The method according to any one of claims 1 to 5, characterized in that, The step of matching the first image feature points of the standard image with the second image feature points of the image to be detected includes: For each first image feature point of the standard image and each second image feature point of the image to be detected, if the first image coordinates of the first image feature point and the second image coordinates of the second image feature point are mapped to the same coordinates, then it is determined that the first image feature point and the second image feature point are successfully matched. If the first image coordinates and the second image coordinates are mapped to different coordinates, then it is determined that the first image feature point and the second image feature point have failed to match.
7. A camera angle offset detection device, characterized in that, The device includes: The acquisition module is used to acquire the standard image captured by the camera at a first time point and the image to be detected captured by the camera at a second time point; The matching module is used to match the first image feature points of the standard image with the second image feature points of the image to be detected; The determination module is used to determine the essential matrix based on the first image coordinates of the first image feature points and the second image feature points if the number of successful matches between the first image feature points and the second image feature points is greater than or equal to a preset number. The judgment module is used to determine, based on the essential matrix, whether the camera has undergone an angular shift between the first time point and the second time point.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.