Camera angle deviation monitoring method and device
The camera angle offset is monitored by dual acceleration sensors, combined with the angle information difference and time threshold determination, the problems of large error and low efficiency in the prior art are solved, and more accurate and efficient camera angle correction is achieved.
Patent Information
- Application Number
- CN202210815118.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-07-12
AI Technical Summary
In the prior art, when the camera angle offset is directly judged by the three-axis data of the acceleration sensor, there is a problem of error and low correction efficiency.
A dual acceleration sensor (acceleration sensor of the camera and network recorder) is used to monitor the camera angle deviation, and the offset is judged by obtaining the respective angle information and the difference value, and a preset difference threshold and the time threshold are used to determine it, and offset reminder information is generated.
Improve the accuracy and efficiency of camera angle offset judgment, so that users can clearly perceive and facilitate manual correction of camera position.
Smart Images

Figure CN115235406B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to a method and device for monitoring camera angle deviation. Background Art
[0002] While a vehicle is driving, its onboard camera may experience angular deviation due to bumps or other factors. This can cause the camera's monitoring area to change, leading to loss of recording of critical areas. Existing methods for monitoring camera angle deviation rely solely on triaxial data from the accelerometer on the camera's mainboard. However, directly determining the camera's actual angle based solely on triaxial data from the accelerometer can lead to errors and inefficient camera angle correction. Summary of the Invention
[0003] The embodiments of the present application provide a method and device for monitoring camera angle deviation, which can solve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a method for monitoring camera angle deviation, comprising:
[0005] Obtaining first angle information corresponding to a first acceleration sensor; the first acceleration sensor is an acceleration sensor of a camera; the first angle information is an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane; the first acceleration information is three-axis acceleration information;
[0006] Obtaining second angle information corresponding to a second acceleration sensor; the second acceleration sensor is an acceleration sensor of a network video recorder; the second angle information is an angle between a direction of second acceleration information corresponding to the second acceleration sensor and a horizontal plane; the second acceleration information is three-axis acceleration information;
[0007] Obtaining a first difference between the first angle information and the second angle information;
[0008] When the first difference is greater than a preset difference threshold, and a duration corresponding to the first difference is greater than a preset time threshold, it is determined that the camera angle is offset.
[0009] Furthermore, the obtaining of first angle information corresponding to the first acceleration sensor includes:
[0010] Acquiring first acceleration information corresponding to the first acceleration sensor;
[0011] The first acceleration information is converted into first angle information according to a preset conversion strategy.
[0012] Furthermore, converting the first acceleration information into first angle information according to a preset conversion strategy includes:
[0013] Performing calculations based on the first acceleration information and a preset calculation strategy to obtain first angle-related parameters;
[0014] Converting the first angle-related parameter into third angle information; the third angle information is the angle between the direction corresponding to the first acceleration information and the direction corresponding to the resultant acceleration;
[0015] The first angle information is determined according to the third angle information.
[0016] Furthermore, the obtaining of first angle information corresponding to the first acceleration sensor includes:
[0017] Receive first angle information corresponding to the first acceleration sensor sent by the camera.
[0018] Furthermore, the acquiring of second angle information corresponding to the second acceleration sensor includes:
[0019] Acquiring second acceleration information corresponding to the second acceleration sensor;
[0020] The second acceleration information is converted into second angle information according to a preset conversion strategy.
[0021] Furthermore, converting the second acceleration information into second angle information according to a preset conversion strategy includes:
[0022] Calculating according to the second acceleration information and a preset calculation strategy to obtain a second angle-related parameter;
[0023] Converting the second angle-related parameter into fourth angle information; the fourth angle information is the angle between the direction corresponding to the second acceleration information and the direction corresponding to the resultant acceleration;
[0024] The second angle information is determined according to the fourth angle information.
[0025] Furthermore, before determining that the camera angle is offset when the first difference is greater than a preset difference threshold and the duration corresponding to the first difference is greater than a preset time threshold, the method further includes:
[0026] Acquire first static angle information corresponding to the first acceleration sensor and second static angle information corresponding to the second acceleration sensor in a static state;
[0027] A difference between the first static angle information and the second static angle information is used as a preset difference threshold.
[0028] Furthermore, after determining that the camera angle is offset when the first difference is greater than a preset difference threshold and the duration corresponding to the first difference is greater than a preset time threshold, the method further includes:
[0029] Generate camera angle offset reminder information; the camera angle offset reminder information includes camera angle offset status information, camera angle offset reason, and camera angle offset correction prompt information.
[0030] In a second aspect, an embodiment of the present application provides a device for monitoring camera angle deviation, comprising:
[0031] a first acquisition unit, configured to acquire first angle information corresponding to a first acceleration sensor; the first acceleration sensor being an acceleration sensor of a camera; the first angle information being an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane; the first acceleration information being three-axis acceleration information;
[0032] a second acquiring unit, configured to acquire second angle information corresponding to a second acceleration sensor; the second acceleration sensor being an acceleration sensor of a network video recorder; the second angle information being an angle between a direction of the second acceleration information corresponding to the second acceleration sensor and a horizontal plane; the second acceleration information being three-axis acceleration information;
[0033] a third acquiring unit, configured to acquire a first difference between the first angle information and the second angle information;
[0034] The first processing unit is configured to determine that the camera angle is offset when the first difference is greater than a preset difference threshold and a duration corresponding to the first difference is greater than a preset time threshold.
[0035] Furthermore, the first acquiring unit is specifically configured to:
[0036] Acquiring first acceleration information corresponding to the first acceleration sensor;
[0037] The first acceleration information is converted into first angle information according to a preset conversion strategy.
[0038] Furthermore, the first acquiring unit is specifically configured to:
[0039] Performing calculations based on the first acceleration information and a preset calculation strategy to obtain first angle-related parameters;
[0040] Converting the first angle-related parameter into third angle information; the third angle information is the angle between the direction corresponding to the first acceleration information and the direction corresponding to the resultant acceleration;
[0041] The first angle information is determined according to the third angle information.
[0042] Furthermore, the first acquiring unit is specifically configured to:
[0043] Receive first angle information corresponding to the first acceleration sensor sent by the camera.
[0044] Furthermore, the second acquiring unit is specifically configured to:
[0045] Acquiring second acceleration information corresponding to the second acceleration sensor;
[0046] The second acceleration information is converted into second angle information according to a preset conversion strategy.
[0047] Furthermore, the second acquiring unit is specifically configured to:
[0048] Calculating according to the second acceleration information and a preset calculation strategy to obtain a second angle-related parameter;
[0049] Converting the second angle-related parameter into fourth angle information; the fourth angle information is the angle between the direction corresponding to the second acceleration information and the direction corresponding to the resultant acceleration;
[0050] The second angle information is determined according to the fourth angle information.
[0051] Furthermore, the camera angle deviation monitoring device further includes:
[0052] a fourth acquiring unit, configured to acquire first static angle information corresponding to the first acceleration sensor and second static angle information corresponding to the second acceleration sensor in a static state;
[0053] The second processing unit is configured to use a difference between the first static angle information and the second static angle information as a preset difference threshold.
[0054] Furthermore, the camera angle deviation monitoring device further includes:
[0055] The third processing unit is used to generate camera angle offset reminder information; the camera angle offset reminder information includes camera angle offset status information, camera angle offset reason, and camera angle offset correction prompt information.
[0056] In a third aspect, an embodiment of the present application provides a camera angle offset monitoring device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.
[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.
[0058] In an embodiment of the present application, first angle information corresponding to a first acceleration sensor is obtained; the first acceleration sensor is an acceleration sensor of a camera; the first angle information is the angle between the direction of the first acceleration information corresponding to the first acceleration sensor and the horizontal plane; second angle information corresponding to a second acceleration sensor is obtained; the second acceleration sensor is an acceleration sensor of a network video recorder; the second angle information is the angle between the direction of the second acceleration information corresponding to the second acceleration sensor and the horizontal plane; a first difference between the first angle information and the second angle information is obtained; when the first difference is greater than a preset difference threshold, and the duration corresponding to the first difference is greater than a preset time threshold, it is determined that the camera angle has shifted. In the above method, the device directly obtains the angle information, which can avoid the loss of accuracy caused by directly scaling the three-axis acceleration data, improve the accuracy of the judgment result, and the user's perception of the angle is significantly clearer than the perception of acceleration, which facilitates manual correction of the camera position. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.
[0060] Figure 1 is a schematic flow chart of a camera angle deviation monitoring method provided in the first embodiment of the present application;
[0061] Figure 2 is a schematic diagram of a camera angle offset monitoring device provided in a second embodiment of the present application;
[0062] Figure 3 This is a schematic diagram of a camera angle offset monitoring device provided in the third embodiment of the present application. DETAILED DESCRIPTION
[0063] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0064] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0065] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0066] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0067] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0068] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0069] See Figure 1 , Figure 1This is a schematic flow chart of a method for monitoring camera angle deviation provided in the first embodiment of the present application. The execution subject of the method for monitoring camera angle deviation in this embodiment is a device with a camera angle deviation monitoring function, such as a desktop computer, a server, etc. Figure 1 The camera angle deviation monitoring method shown may include:
[0070] S101: Acquire first angle information corresponding to a first acceleration sensor; the first acceleration sensor is an acceleration sensor of a camera; the first angle information is an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane.
[0071] While the vehicle is driving, the vehicle's onboard camera captures images of key areas. The camera has a built-in first accelerometer, which can sense changes in acceleration force. Accelerometer force is the force exerted on an object during acceleration. Movement changes such as shaking, falling, rising, and falling can all be converted into electrical signals by the accelerometer. The device obtains first angle information corresponding to the first accelerometer. The first angle information is the angle between the direction of the first acceleration information corresponding to the first accelerometer and the horizontal plane. The first acceleration information is three-axis acceleration information.
[0072] In this embodiment, the device obtains first angle information corresponding to the first acceleration sensor. The device can obtain the direction of the first acceleration information corresponding to the first acceleration sensor, and then obtain the angle between the direction of the first acceleration information and the horizontal plane, that is, obtain the first angle information.
[0073] In one embodiment, a device obtains first acceleration information corresponding to a first acceleration sensor and converts the first acceleration information into first angle information according to a preset conversion strategy. The first acceleration information is raw three-axis acceleration information directly obtained by the first acceleration sensor. The device stores a preset conversion strategy for converting the raw three-axis acceleration information into angle information. The device converts the raw three-axis acceleration information into angle information according to a calculation method in the preset conversion strategy.
[0074] In one embodiment, the device directly receives the first angle information corresponding to the first acceleration sensor sent by the camera. In this embodiment, the process of calculating the first angle information is not performed in the local device, but is calculated by the camera and sent to the device.
[0075] In one embodiment, the device can convert the original first acceleration information into the first angle information in the following manner: the device performs calculations based on the first acceleration information and a preset calculation strategy to obtain first angle-related parameters; converts the first angle-related parameters into third angle information; the third angle information is the angle between the direction corresponding to the first acceleration information and the direction corresponding to the resultant acceleration; and determines the first angle information based on the third angle information. The resultant acceleration is the final acceleration generated by the interaction of the acceleration due to gravity and the acceleration generated by motion. It is understood that in a stationary state, the resultant acceleration is equivalent to the acceleration due to gravity.
[0076] Specifically, the preset calculation strategy can be:
[0077]
[0078]
[0079]
[0080] Among them, X, Y, and Z are first acceleration information, and a, b, and c are first angle related parameters.
[0081] The principle of the preset calculation strategy is:
[0082] Using the Pythagorean theorem, confirm the algorithmic relationship between the first acceleration information and the resultant acceleration:
[0083] (ng) 2 =X 2 +Y 2 +Z 2 ;
[0084] Using trigonometric functions, confirm the algorithmic relationship between the first acceleration information and the resultant acceleration:
[0085] ng cos a=X;
[0086] ng cos b=Y;
[0087] ng cos c=Z;
[0088] Calculate and deduce using the above formula:
[0089] (ng) 2 =X 2 +Y 2 +Z 2 =(ng) 2 (cosa) 2 +Y 2 +Z 2 ;
[0090] (ng)2 -(ng) 2 (cosa) 2 =Y 2 +Z 2 ;
[0091] (ng) 2 (sina) 2 =Y 2 +Z 2 ;
[0092]
[0093]
[0094] get:
[0095]
[0096] Similarly, we get:
[0097]
[0098]
[0099] When the device converts the first angle-related parameters into the third angle information, it can directly use the conversion relationship between angles and radians for calculation:
[0100] 2π / a=360 / θx
[0101]
[0102] Similarly, we get:
[0103]
[0104]
[0105] Among them, θx, θy, and θz are third angle information.
[0106] Since the third angle information is the angle between the direction corresponding to the first acceleration information and the direction corresponding to the resultant acceleration, and the first angle information is the angle between the direction of the first acceleration information and the horizontal plane, the following method can be used to determine the first angle information based on the third angle information:
[0107] θ'x=90-θx-θdiffx;
[0108] θ'y=90-θy-θdiffy;
[0109] θ'z=90-θz-θdiffz;
[0110] Among them, θ'x, θ'y, and θ'z are the first angle information. θdiffx, θdiffy, and θdiffz are the angle errors. In the static state, because only gravity acceleration acts, the total acceleration is perpendicular to the horizontal plane. In this case, θdiffx, θdiffy, and θdiffz are 0. In the moving state, the total acceleration is also affected by external acceleration. In this case, θdiffx, θdiffy, and θdiffz are not 0. Because the network video recorder and the camera are subjected to the same forces by default, the angle errors can be offset when calculating the angle difference.
[0111] S102: Acquire second angle information corresponding to a second acceleration sensor; the second acceleration sensor is an acceleration sensor of a network video recorder; the second angle information is an angle between a direction of the second acceleration information corresponding to the second acceleration sensor and a horizontal plane.
[0112] In the method of this embodiment, two acceleration sensors are provided. The second acceleration sensor is an acceleration sensor of a network video recorder. The dual acceleration sensors are used to monitor the camera angle deviation, thereby further improving the monitoring accuracy.
[0113] The device may include a built-in network video recorder (NVR) that monitors its own mainboard acceleration sensor, i.e., the second acceleration sensor, in real time. The device obtains second angle information corresponding to the second acceleration sensor, where the second angle information is the angle between the direction of the second acceleration information corresponding to the second acceleration sensor and the horizontal plane. The second acceleration information is triaxial acceleration information.
[0114] In this embodiment, the device obtains the second angle information corresponding to the second acceleration sensor. The device can obtain the direction of the second acceleration information corresponding to the second acceleration sensor, and then obtain the angle between the direction of the second acceleration information and the horizontal plane, that is, obtain the second angle information.
[0115] In one embodiment, a device obtains second acceleration information corresponding to a second acceleration sensor and converts the second acceleration information into second angle information according to a preset conversion strategy. The second acceleration information is raw three-axis acceleration information directly obtained by the second acceleration sensor. The device stores a preset conversion strategy for converting the raw three-axis acceleration information into angle information. The device converts the raw three-axis acceleration information into angle information according to a calculation method in the preset conversion strategy.
[0116] In one embodiment, the device can convert the original second acceleration information into the second angle information in the following manner: performing calculations based on the second acceleration information and a preset calculation strategy to obtain second angle-related parameters; converting the second angle-related parameters into fourth angle information; the fourth angle information being the angle between the direction corresponding to the second acceleration information and the direction corresponding to the resultant acceleration; and determining the second angle information based on the fourth angle information. The specific conversion method here can be referred to the specific description of converting the first acceleration information into the first angle information above and will not be repeated here.
[0117] S103: Obtain a first difference between the first angle information and the second angle information.
[0118] After obtaining the first angle information and the second angle information, the device calculates a first difference between the first angle information and the second angle information. The first difference is used to determine whether the camera angle is offset.
[0119] S104: When the first difference is greater than a preset difference threshold, and a duration corresponding to the first difference is greater than a preset time threshold, it is determined that the camera angle is offset.
[0120] The device stores a preset difference threshold, which is used to determine whether the camera angle has shifted. The device needs to obtain a duration corresponding to the first difference. When the first difference is greater than the preset difference threshold and the duration corresponding to the first difference is greater than the preset time threshold, the device determines that the camera angle has shifted.
[0121] That is to say, when the first difference is less than or equal to the preset difference threshold, it is determined that the camera angle is not offset; when the first difference is greater than the preset difference threshold, and the duration corresponding to the first difference is less than or equal to the preset time threshold, it is determined that the camera angle is not offset.
[0122] The preset difference threshold is determined based on parameters of the vehicle in a stationary state. Specifically, the method for setting the preset difference threshold may be:
[0123] The device obtains first static angle information corresponding to the first acceleration sensor and second static angle information corresponding to the second acceleration sensor in a static state; and uses the difference between the first static angle information and the second static angle information as a preset difference threshold. The method for obtaining the first static angle information and the second static angle information can be referred to the relevant description in S101 and S102 and is not further described here.
[0124] After determining that the camera angle is offset, the device can also generate a camera angle offset reminder message to alert the user, allowing them to understand the current offset and make adjustments, providing effective assistance. The camera angle offset reminder message may include camera angle offset status information, camera angle offset cause, camera angle offset correction prompt information, and so on. The camera angle offset status information can inform the user that the camera angle has offset. The camera angle offset cause may include vehicle bumps or camera malfunction, etc. The camera angle offset correction prompt information can inform the user how to adjust the camera.
[0125] In an embodiment of the present application, first angle information corresponding to a first acceleration sensor is obtained; the first acceleration sensor is an acceleration sensor of a camera; the first angle information is the angle between the direction of the first acceleration information corresponding to the first acceleration sensor and the horizontal plane; second angle information corresponding to a second acceleration sensor is obtained; the second acceleration sensor is an acceleration sensor of a network video recorder; the second angle information is the angle between the direction of the second acceleration information corresponding to the second acceleration sensor and the horizontal plane; a first difference between the first angle information and the second angle information is obtained; when the first difference is greater than a preset difference threshold, and the duration corresponding to the first difference is greater than a preset time threshold, it is determined that the camera angle has shifted. In the above method, the device directly obtains the angle information, which can avoid the loss of accuracy caused by directly scaling the three-axis acceleration data, improve the accuracy of the judgment result, and the user's perception of the angle is significantly clearer than the perception of acceleration, which facilitates manual correction of the camera position.
[0126] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0127] See Figure 2 , Figure 2 Schematic diagram of the camera angle deviation monitoring device provided in the second embodiment of the present application. The units included are used to perform Figure 1 Each step in the corresponding embodiment. Please refer to Figure 1 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 2 , the camera angle deviation monitoring device 2 includes:
[0128] A first acquisition unit 210 is configured to acquire first angle information corresponding to a first acceleration sensor; the first acceleration sensor is an acceleration sensor of a camera; the first angle information is an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane; the first acceleration information is three-axis acceleration information;
[0129] The second acquisition unit 220 is configured to acquire second angle information corresponding to a second acceleration sensor; the second acceleration sensor is an acceleration sensor of a network video recorder; the second angle information is an angle between a direction of the second acceleration information corresponding to the second acceleration sensor and a horizontal plane; the second acceleration information is three-axis acceleration information;
[0130] A third acquiring unit 230 is configured to acquire a first difference between the first angle information and the second angle information;
[0131] The first processing unit 240 is configured to determine that the camera angle is offset when the first difference is greater than a preset difference threshold and a duration corresponding to the first difference is greater than a preset time threshold.
[0132] Furthermore, the first acquiring unit 210 is specifically configured to:
[0133] Acquiring first acceleration information corresponding to the first acceleration sensor;
[0134] The first acceleration information is converted into first angle information according to a preset conversion strategy.
[0135] Furthermore, the first acquiring unit 210 is specifically configured to:
[0136] Performing calculations based on the first acceleration information and a preset calculation strategy to obtain first angle-related parameters;
[0137] Converting the first angle-related parameter into third angle information; the third angle information is the angle between the direction corresponding to the first acceleration information and the direction corresponding to the resultant acceleration;
[0138] The first angle information is determined according to the third angle information.
[0139] Furthermore, the first acquiring unit 210 is specifically configured to:
[0140] Receive first angle information corresponding to the first acceleration sensor sent by the camera.
[0141] Furthermore, the second acquiring unit 220 is specifically configured to:
[0142] Acquiring second acceleration information corresponding to the second acceleration sensor;
[0143] The second acceleration information is converted into second angle information according to a preset conversion strategy.
[0144] Furthermore, the second acquiring unit 220 is specifically configured to:
[0145] Calculating according to the second acceleration information and a preset calculation strategy to obtain a second angle-related parameter;
[0146] Converting the second angle-related parameter into fourth angle information; the fourth angle information is the angle between the direction corresponding to the second acceleration information and the direction corresponding to the resultant acceleration;
[0147] The second angle information is determined according to the fourth angle information.
[0148] Furthermore, the camera angle offset monitoring device 2 further includes:
[0149] a fourth acquiring unit, configured to acquire first static angle information corresponding to the first acceleration sensor and second static angle information corresponding to the second acceleration sensor in a static state;
[0150] The second processing unit is configured to use a difference between the first static angle information and the second static angle information as a preset difference threshold.
[0151] Furthermore, the camera angle offset monitoring device 2 further includes:
[0152] The third processing unit is used to generate camera angle offset reminder information; the camera angle offset reminder information includes camera angle offset status information, camera angle offset reason, and camera angle offset correction prompt information.
[0153] Figure 3 Schematic diagram of a monitoring device for camera angle deviation provided in the third embodiment of the present application. Figure 3 As shown, the camera angle deviation monitoring device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a camera angle deviation monitoring program. When the processor 30 executes the computer program 32, the steps of the above-mentioned camera angle deviation monitoring method embodiments are implemented, such as Figure 2 Alternatively, when the processor 30 executes the computer program 32, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 3 Functions of modules 310 to 360 are shown.
[0154] Exemplarily, the computer program 32 can be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 32 in the camera angle offset monitoring device 3. For example, the computer program 32 can be divided into a first acquisition unit, a second acquisition unit, a third acquisition unit, and a first processing unit. The specific functions of each unit are as follows:
[0155] a first acquisition unit, configured to acquire first angle information corresponding to a first acceleration sensor; the first acceleration sensor being an acceleration sensor of a camera; the first angle information being an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane; the first acceleration information being three-axis acceleration information;
[0156] a second acquiring unit, configured to acquire second angle information corresponding to a second acceleration sensor; the second acceleration sensor being an acceleration sensor of a network video recorder; the second angle information being an angle between a direction of the second acceleration information corresponding to the second acceleration sensor and a horizontal plane; the second acceleration information being three-axis acceleration information;
[0157] a third acquiring unit, configured to acquire a first difference between the first angle information and the second angle information;
[0158] The first processing unit is configured to determine that the camera angle is offset when the first difference is greater than a preset difference threshold and a duration corresponding to the first difference is greater than a preset time threshold.
[0159] The monitoring device for the camera angle deviation may include, but is not limited to, a processor 30 and a memory 31. It will be understood by those skilled in the art that Figure 3 It is only an example of the monitoring device 3 for camera angle offset and does not constitute a limitation of the monitoring device 3 for camera angle offset. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the monitoring device for camera angle offset may also include input and output devices, network access devices, buses, etc.
[0160] The processor 30 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0161] The memory 31 may be an internal storage unit of the camera angle offset monitoring device 3, such as a hard disk or memory of the camera angle offset monitoring device 3. The memory 31 may also be an external storage device of the camera angle offset monitoring device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the camera angle offset monitoring device 3. Furthermore, the camera angle offset monitoring device 3 may also include both an internal storage unit and an external storage device of the camera angle offset monitoring device 3. The memory 31 is used to store the computer program and other programs and data required by the camera angle offset monitoring device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0162] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0163] An embodiment of the present application also provides a network 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, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.
[0164] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0165] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various method embodiments when executing the computer program product.
[0166] If the integrated unit is implemented as 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 process of the above-mentioned method embodiment 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 a processor, it can implement the steps of each of the above-mentioned method embodiments. 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 can at least include: any entity or device capable of carrying computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, mobile hard drive, magnetic disk, or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals or telecommunication signals.
[0167] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0168] Those skilled 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 beyond the scope of this application.
[0169] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0170] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0171] The above-described embodiments 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, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for monitoring camera angle deviation, characterized in that: Applied to a device; the device is communicatively connected to a camera; The device has a built-in network video recorder; The camera is used to collect images of key areas; The network video recorder is used to monitor the second acceleration sensor in real time; the method includes: Obtaining first angle information corresponding to a first acceleration sensor; the first acceleration sensor is an acceleration sensor of the camera; the first angle information is an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane; the first acceleration information is three-axis acceleration information; Obtaining second angle information corresponding to the second acceleration sensor; the second acceleration sensor is the acceleration sensor of the network video recorder; the second angle information is the angle between the direction of the second acceleration information corresponding to the second acceleration sensor and the horizontal plane; the second acceleration information is three-axis acceleration information; Obtaining a first difference between the first angle information and the second angle information; When the first difference is greater than a preset difference threshold, and a duration corresponding to the first difference is greater than a preset time threshold, it is determined that the camera angle is offset.
2. The method for monitoring camera angle deviation according to claim 1, wherein: The obtaining of first angle information corresponding to the first acceleration sensor includes: Acquiring first acceleration information corresponding to the first acceleration sensor; A first angle-related parameter is obtained by performing calculation based on the first acceleration information and a preset calculation strategy; the preset calculation strategy is: Wherein, X, Y, and Z are the first acceleration information, and a, b, and c are the first angle related parameters; Converting the first angle-related parameter into third angle information; the third angle information is the angle between the direction corresponding to the first acceleration information and the direction corresponding to the resultant acceleration; The first angle information is determined according to the third angle information.
3. The method for monitoring camera angle deviation according to claim 1, wherein: The obtaining of first angle information corresponding to the first acceleration sensor includes: Receive first angle information corresponding to the first acceleration sensor sent by the camera.
4. The method for monitoring camera angle deviation according to claim 1, wherein: The obtaining of second angle information corresponding to the second acceleration sensor includes: Acquiring second acceleration information corresponding to the second acceleration sensor; Calculation is performed based on the second acceleration information and a preset calculation strategy to obtain a second angle-related parameter; the preset calculation strategy is: Wherein, X', Y', Z' are the second acceleration information, and a', b', c' are the second angle related parameters; Converting the second angle-related parameter into fourth angle information; the fourth angle information is the angle between the direction corresponding to the second acceleration information and the direction corresponding to the resultant acceleration; The second angle information is determined according to the fourth angle information.
5. The method for monitoring camera angle deviation according to claim 1, wherein: Before determining that the camera angle is offset when the first difference is greater than a preset difference threshold and the duration corresponding to the first difference is greater than a preset time threshold, the method further includes: Acquire first static angle information corresponding to the first acceleration sensor and second static angle information corresponding to the second acceleration sensor in a static state; A difference between the first static angle information and the second static angle information is used as a preset difference threshold.
6. The method for monitoring camera angle deviation according to claim 1, wherein: After determining that the camera angle is offset when the first difference is greater than a preset difference threshold and the duration corresponding to the first difference is greater than a preset time threshold, the method further includes: Generate camera angle offset reminder information; the camera angle offset reminder information includes camera angle offset status information, camera angle offset reason, and camera angle offset correction prompt information.
7. A camera angle deviation monitoring device, characterized in that: Applied to a device; the device is communicatively connected to a camera; The device has a built-in network video recorder; The camera is used to collect images of key areas; The network video recorder is used to monitor the second acceleration sensor in real time; the device includes: a first acquiring unit, configured to acquire first angle information corresponding to a first acceleration sensor; the first acceleration sensor being an acceleration sensor of the camera; the first angle information being an angle between a direction of first acceleration information corresponding to the first acceleration sensor and a horizontal plane; the first acceleration information being three-axis acceleration information; a second acquiring unit, configured to acquire second angle information corresponding to the second acceleration sensor; the second acceleration sensor being the acceleration sensor of the network video recorder; the second angle information being the angle between the direction of the second acceleration information corresponding to the second acceleration sensor and a horizontal plane; the second acceleration information being three-axis acceleration information; a third acquiring unit, configured to acquire a first difference between the first angle information and the second angle information; The first processing unit is configured to determine that the camera angle is offset when the first difference is greater than a preset difference threshold and a duration corresponding to the first difference is greater than a preset time threshold.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Multi-modal indoor ranging and positioning method based on mobile phone camera and sensor
CN109059895A
Angular acceleration sensor and camera image blur correction device using this angular acceleration sensor
JP1991096617U