Camera alignment method, apparatus, device, storage medium and product
By detecting the pixel coordinates of the target to be aligned in the panoramic image and using a mobile angle mapping network to control the close-up camera alignment, the problem that the camera alignment accuracy is affected by the distance to the calibration object is solved, achieving higher alignment accuracy and reducing edge errors.
Patent Information
- Application Number
- CN202411688616.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-11-25
AI Technical Summary
In the prior art, when the close-up camera and panoramic camera images overlap, the distance between the calibration object and the camera has a significant impact, resulting in reduced camera alignment accuracy and large errors at the edge of the image.
By detecting the pixel coordinates of the target to be aimed at in the panoramic picture, the target movement angle is obtained using the preset movement angle mapping network mapping, and the second shooting device is controlled to aim at the target, avoiding direct calculation of close-up participation and reducing the deviation caused by field of view differences.
Improves the accuracy of camera alignment, reduces image edge errors, and achieves more precise target alignment.
Smart Images

Figure CN119211734B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a camera alignment method, apparatus, device, storage medium, and product. Background Art
[0002] With the development of informatization in various industries, cameras are becoming more and more widely used as important image acquisition tools. Among them, binocular cameras, which are composed of a fixed panoramic camera with a large field of view and a pan-tilt close-up camera with a smaller field of view, take into account both observation range and clarity, and have become a widely used solution.
[0003] In related technologies, the target's position in a panoramic camera is directly used to calculate the theoretical movement of the panoramic camera, p (horizontal movement angle Pan) t (vertical movement angle Tilt), and the PT of the close-up camera's default position is recorded. The PT when the centers of the close-up and panoramic camera images coincide with the target is then recorded. The difference between the two PTs is used as compensation for calculating PT in the panoramic camera to obtain the movement angle of the close-up camera. However, this is greatly affected by the distance between the calibration object and the camera when the close-up and panoramic camera images coincide, and there is a large error at the edge of the image, which reduces the accuracy of camera alignment. Summary of the Invention
[0004] The main purpose of this application is to provide a camera alignment method, device, equipment, storage medium and product, which aims to solve the technical problem that when the close-up camera and panoramic camera images overlap, the distance between the calibration object and the camera is greatly affected, and there is a large error at the edge of the image, which reduces the accuracy of camera alignment.
[0005] To achieve the above objectives, the present application proposes a camera alignment method, which includes:
[0006] When detecting that a target to be aligned exists in the panoramic picture taken by the first shooting device, obtaining target pixel coordinates of the target to be aligned in the panoramic picture;
[0007] The target pixel coordinates are input into a preset movement angle mapping network to map a target movement angle, and based on the target movement angle, the second shooting device is controlled to aim at the target to be aimed.
[0008] In one embodiment, when detecting that a target to be aligned exists in a panoramic picture captured by the first shooting device, before the step of obtaining target pixel coordinates of the target to be aligned in the panoramic picture includes:
[0009] Obtaining a sample pixel coordinate set and an initial sample angle of a second camera device;
[0010] Constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set;
[0011] An initial neural network is obtained, and the discrete mapping relationship is input into the initial neural network for fitting to obtain a preset movement angle mapping network.
[0012] In one embodiment, the step of obtaining the sample pixel coordinate set and the initial sample angle of the second camera device includes:
[0013] Using the first photographing device, photographing a sample curved surface of a preset dimension to obtain a curved surface image;
[0014] Determining a sample feature point set based on the curved surface image;
[0015] A sample pixel coordinate set of the sample feature point set in the curved surface image is determined.
[0016] In one embodiment, the step of constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set includes:
[0017] Acquire a target sample angle set after a second shooting device is aligned with the sample feature point set;
[0018] Determining, based on the initial sample angle and the target sample angle set, a sample movement angle set of the target sample angle set relative to the initial sample angle of the second photographing device;
[0019] A discrete mapping relationship is constructed based on the sample pixel coordinate set and the sample movement angle set.
[0020] In one embodiment, the step of detecting that a target to be aligned exists in the panoramic picture captured by the first shooting device includes:
[0021] Obtaining a panoramic image captured by a first camera;
[0022] Based on a preset target detection algorithm, target detection is performed on the panoramic image to obtain a target set;
[0023] The target set is judged to obtain targets to be aligned that meet the alignment conditions.
[0024] In one embodiment, the step of obtaining the target pixel coordinates of the target to be aligned in the panoramic picture includes:
[0025] Determining the center point of the panoramic image;
[0026] Establishing a coordinate system with the center point as the coordinate origin;
[0027] Based on the coordinate system, target pixel coordinates of the target to be aligned in the panoramic picture are determined.
[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a camera aiming device, which includes:
[0029] an acquisition module, configured to, upon detecting that a target to be aligned exists in the panoramic picture taken by the first shooting device, acquire target pixel coordinates of the target to be aligned in the panoramic picture;
[0030] The mapping module is used to input the target pixel coordinates into a preset movement angle mapping network, map to obtain a target movement angle, and control the second shooting device to align with the target to be aligned based on the target movement angle.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a camera alignment device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the camera alignment method described above.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of the camera alignment method described above are implemented.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the camera alignment method described above are implemented.
[0034] One or more technical solutions proposed in this application have at least the following technical effects:
[0035] Compared with the related art, which is greatly affected by the distance of the calibration object from the camera when the close-up camera and the panoramic camera images overlap, and there is a problem of large image edge error, which reduces the accuracy of camera alignment, the present application detects that there is a target to be aligned in the panoramic image taken by the first shooting device, obtains the target pixel coordinates of the target to be aligned in the panoramic image; inputs the target pixel coordinates into a preset movement angle mapping network, maps to obtain the target movement angle, and sends the target movement angle to the second shooting device, so that the second shooting device aligns with the target to be aligned based on the target movement angle. It can be understood that after detecting the target to be aligned, the present application determines the pixel coordinates of the target to be aligned in the panoramic image, and obtains the movement angle used for alignment of the second shooting device through the preset movement angle mapping network according to the pixel coordinates, which can avoid the problem that the positioning calculation process does not require the participation of close-up cameras. Due to the difference in the field of view of the two cameras, direct mapping will produce a large deviation, which reduces the accuracy of camera alignment. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0038] Figure 1 A schematic diagram of a flow chart of the first embodiment of the camera alignment method of the present application;
[0039] Figure 2 A shooting scene diagram of the first shooting device and the second shooting device in the camera alignment method of this application;
[0040] Figure 3 A schematic diagram of a flow chart of the second embodiment of the camera alignment method of the present application;
[0041] Figure 4 This is a schematic diagram of the module structure of the camera alignment device according to an embodiment of the present application;
[0042] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the camera alignment method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] The main solution of the embodiment of the present application is: when it is detected that there is a target to be aimed at in the panoramic picture taken by the first shooting device, the target pixel coordinates of the target to be aimed at in the panoramic picture are obtained; the target pixel coordinates are input into a preset movement angle mapping network, and the target movement angle is mapped, and based on the target movement angle, the second shooting device is controlled to aim at the target to be aimed at.
[0047] In related technologies, the target's position in a panoramic camera is directly used to calculate the theoretical movement of the panoramic camera, p (horizontal movement angle Pan) t (vertical movement angle Tilt), and the PT of the close-up camera's default position is recorded. The PT when the centers of the close-up and panoramic camera images coincide with the target is then recorded. The difference between the two PTs is used as compensation for calculating PT in the panoramic camera to obtain the movement angle of the close-up camera. However, this is greatly affected by the distance between the calibration object and the camera when the close-up and panoramic camera images coincide, and there is a large error at the edge of the image, which reduces the accuracy of camera alignment.
[0048] After detecting the target to be aligned, the present application determines the pixel coordinates of the target to be aligned in the panoramic picture, and obtains the movement angle of the second shooting device for alignment through a preset movement angle mapping network based on the pixel coordinates. This can avoid the problem that the positioning calculation process does not require the participation of close-up shots. Due to the difference in the field of view of the two cameras, direct mapping will produce large deviations, thereby reducing the accuracy of camera alignment.
[0049] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses a camera pointing device as an example to illustrate this embodiment and the following embodiments.
[0050] Based on this, the embodiment of the present application provides a camera alignment method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the camera alignment method of the present application.
[0051] In this embodiment, the camera alignment method includes steps S100 to S200:
[0052] Step S100: When it is detected that a target to be aligned exists in a panoramic picture taken by a first shooting device, the target pixel coordinates of the target to be aligned in the panoramic picture are obtained;
[0053] It should be noted that the execution subject of this embodiment is a camera aiming device. The camera aiming device is equipped with a binocular camera, which is composed of a panoramic camera and a close-up camera. The panoramic camera is a fixed camera with a large field of view and is equipped with a fixed-focus wide-angle panoramic high-definition lens.
[0054] It is understood that the first capturing device is a panoramic camera. Pixel coordinates are used to describe positions in an image or screen. The target to be aligned is the target to be aligned. When the camera alignment device detects that the target to be aligned appears in the panoramic image captured by the panoramic camera, it obtains the position coordinates of the target to be aligned in the panoramic image.
[0055] In step S200 , the target pixel coordinates are input into a preset movement angle mapping network to obtain a target movement angle through mapping. Based on the target movement angle, the second camera is controlled to align with the target to be aligned.
[0056] It should be noted that the second shooting device is a close-up camera, which is a pan-tilt close-up camera with a small field of view. The close-up camera is provided with a close-up lens, which is composed of a free-degree rotating pan-tilt and an optical zoom camera. The target movement angle is The values, including horizontal and vertical angles, can be used to precisely move the close-up camera by moving the camera in different directions. The angles required for the close-up camera to align with the target are the values of the horizontal and vertical angles. The preset movement angle mapping network represents the relationship between the pixel coordinates of the target and the close-up camera's movement angle, where P is the horizontal movement angle Pan and t is the vertical movement angle Tilt.
[0057] It is understandable that after the camera aiming device obtains the pixel coordinates of the target to be aimed at in the panoramic camera, the target pixel coordinates are input into a preset movement angle mapping network for characterizing the relationship between the pixel coordinates of the target to be aimed at and the close-up movement angle. Based on the pixel coordinates of the target to be aimed at, the angle that the close-up camera needs to move is mapped. After obtaining the angle that the close-up camera needs to move, the camera aiming device will control the pan / tilt of the close-up camera to rotate, thereby realizing the movement of the close-up camera based on the obtained movement angle. After moving the target movement angle, the close-up camera can be aimed at the target to be aimed at based on the position after the movement.
[0058] Specifically, the camera alignment device uses the target detection algorithm to obtain the pixel coordinates of the target on the specified surface in the panoramic camera. Afterwards, the mapping network is used to transform the pixel coordinates in the target panoramic camera Directly mapped to close-up camera pan / tilt rotation Value, in order to get a close-up of the camera pan / tilt rotation After setting the value, turn the close-up camera to the specified position.
[0059] In a feasible implementation, when it is detected that a target to be aligned exists in the panoramic picture captured by the first shooting device, before the step of obtaining the target pixel coordinates of the target to be aligned in the panoramic picture, the method includes:
[0060] Obtaining a sample pixel coordinate set and an initial sample angle of a second camera device;
[0061] It should be noted that the initial sample angle is the initial angle of the second camera when it is not moving, and this initial sample angle is fixed. The sample pixel coordinate set is the pixel coordinates of the selected sample feature points in the panoramic camera image. The camera alignment device obtains the fixed initial angle of the second camera when it is not moving, and obtains the sample pixel coordinate set of the selected sample feature points in the panoramic camera image.
[0062] Constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set;
[0063] It is understood that a discrete mapping relationship is a correspondence relationship between two discrete sets. The camera alignment device constructs a discrete mapping relationship between the two discrete sets based on the initial fixed angle of the close-up camera and the pixel coordinates of the selected sample feature points in the panoramic camera image.
[0064] An initial neural network is obtained, and the discrete mapping relationship is input into the initial neural network for fitting to obtain a preset movement angle mapping network.
[0065] It should be noted that the initial neural network is used to fit discrete mapping relationships into continuous mapping relationships. Since the surface is a three-dimensional surface, discrete mapping relationships constructed by selecting a number of points from the three-dimensional surface are input into the neural network for fitting, which enables the neural network to predict movement angles in three-dimensional space. The camera alignment device inputs the discrete mapping relationships into the obtained initial neural network, which then learns the ability to predict movement angles in three-dimensional space, resulting in a preset movement angle mapping network that fits discrete mapping relationships into continuous mapping relationships.
[0066] Furthermore, the camera aiming device performs simple mapping processing through a preset movement angle mapping network, which not only reduces the amount of calculation and improves the speed of movement angle prediction, but also accurately predicts the angle that the second shooting device needs to move based on the pixel coordinates of the target to be aimed in the panoramic picture of the first shooting device. Then, the movement of the pan-tilt head of the second device is accurately controlled through the movement angle, so as to realize the accurate aiming operation of the second shooting device on the target to be aimed.
[0067] Specifically, the computing hardware of the camera pointing device is Ambarella cv22. The algorithm uses a simple neural network for mapping, with very little computational complexity. The forward reasoning process of the network can be implemented explicitly using programming languages (such as C / C++), or it can be deployed using the Ambarella platform's neural network reasoning acceleration tool eazyAI to further speed up the reasoning speed.
[0068] In a feasible implementation manner, the step of obtaining the sample pixel coordinate set and the initial sample angle of the second shooting device includes the following steps:
[0069] Using the first photographing device, photographing a sample curved surface of a preset dimension to obtain a curved surface image;
[0070] It is understandable that the sample curved surface is a three-dimensional curved surface. The camera aiming device controls the first shooting device to shoot the three-dimensional curved surface to obtain an image of the curved surface.
[0071] Determining a sample feature point set based on the curved surface image;
[0072] It should be noted that the sample feature point set includes all the selected feature points. The camera alignment device selects several feature points on the surface image, and based on the selected feature points, a sample feature point set is formed. Figure 2 , Figure 2 A shooting scene diagram of a first shooting device and a second shooting device is provided.
[0073] A sample pixel coordinate set of the sample feature point set in the curved surface image is determined.
[0074] It is understood that the sample pixel coordinate set includes the pixel coordinates of each feature point in the panoramic image. After obtaining the selected sample feature point set, the camera alignment device records the pixel coordinates of each feature point in the sample feature point set in the panoramic image and constructs a sample pixel coordinate set based on the pixel coordinates of each feature point.
[0075] Specifically, the camera alignment device first selects several feature points on a given surface and records the pixel coordinates of each feature point in the panorama. , and then align the close-up image center with these feature points in turn, and record the close-up rotation angle at this time , thus obtaining the mapping relationship between several panoramic pixel coordinates and close-up rotation angles , and then use the fitting method to fit the discrete mapping relationship into a continuous mapping relationship , you can use polynomial fitting or a neural network with higher accuracy for fitting.
[0076] In specific use, the camera aiming device obtains the pixel coordinates of any target point on the surface in the panoramic camera by detection Then, use the formula Quickly switch to close-up camera movement angle , achieving fast and accurate close-up positioning.
[0077] In a feasible implementation, the step of constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set includes the following steps:
[0078] Acquire a target sample angle set after a second shooting device is aligned with the sample feature point set;
[0079] It should be noted that the camera aiming device controls the movement of the second shooting device and aims at each feature point in the sample feature point set, and records the angle of the second shooting device after alignment, obtains the angle of each second shooting device after alignment, and constructs the target sample angle set based on each corresponding angle after alignment with different feature points.
[0080] Determining, based on the initial sample angle and the target sample angle set, a sample movement angle set of the target sample angle set relative to the initial sample angle of the second photographing device;
[0081] It is understood that the sample movement angle set includes the movement angles of the second camera based on different feature points. The camera alignment device compares the initial angle of the second camera with the target angle after the second camera is aligned with each feature point to obtain the movement angles of the second camera based on different feature points. The sample movement angle set is formed based on the movement angles of different feature points.
[0082] A discrete mapping relationship is constructed based on the sample pixel coordinate set and the sample movement angle set.
[0083] It should be noted that the camera alignment device constructs a discrete mapping relationship based on two discrete sets of sample pixel coordinates and sample movement angles.
[0084] In this embodiment, after obtaining the pixel coordinates of the target to be aimed, the camera aiming device maps the movement angle required by the second shooting device through a preset movement angle mapping network. The second shooting device does not need to collect information, which can effectively avoid the impact of image distortion and ensure accurate movement of objects at the edge of the panoramic picture.
[0085] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 When it is detected that there is a target to be aligned in the panoramic picture captured by the first shooting device, the camera alignment method further includes steps A100 to A300:
[0086] Step A100, obtaining a panoramic image captured by a first shooting device;
[0087] It is understandable that the panoramic picture covers the sample curved surface. The camera is aimed at the device and captures the panoramic picture of the curved surface through the first shooting device.
[0088] Step A200: performing target detection on the panoramic image based on a preset target detection algorithm to obtain a target set;
[0089] It should be noted that the target set includes all sets of the required types. The preset target detection algorithm can detect people, test papers, desks, etc., depending on specific needs. The camera is pointed at the device using the preset target detection algorithm to detect pre-defined targets in the panoramic image, generating a set of targets of the same type.
[0090] Step A300: judge the target set to obtain the target to be aligned that meets the alignment conditions.
[0091] It is understandable that after obtaining the target set of the required type, the camera aiming device selects the only target to be aimed that meets the target conditions according to the preset judgment conditions.
[0092] Specifically, the target conditions may include the following examples:
[0093] Target size
[0094] Condition: The size of the target must be within a certain range.
[0095] Purpose: Make sure the target is large enough to be clearly visible in the frame.
[0096] Example: The width and height of an object must be larger than a certain threshold (e.g., 100 pixels).
[0097] Target distance
[0098] Condition: The distance between the target and the camera must be within a certain range.
[0099] Purpose: Ensure the target is in focus and avoid blur.
[0100] Example: The distance to the target must be between 1 meter and 5 meters.
[0101] Target location
[0102] Condition: The position of the target in the picture must meet specific requirements.
[0103] Purpose: Make sure the subject is in a strategic position in the frame, such as the center or the golden section.
[0104] Example: The center point of the target must be within a certain range of the center of the picture.
[0105] Background contrast
[0106] Condition: The contrast between the target and the background must be high enough.
[0107] Purpose: To ensure that the target is highlighted in the frame.
[0108] Example: The grayscale difference between the target and the background must be greater than a certain threshold (for example, 50).
[0109] Dynamic characteristics
[0110] Condition: Is the target moving? If so, are its speed and direction of movement in compliance with the requirements?
[0111] Purpose: To ensure that the camera is aiming at a stationary or slow-moving target and to avoid blur.
[0112] Example: The target's motion speed must be less than a certain threshold (e.g., 5 pixels per second).
[0113] Target category
[0114] Condition: The target must belong to a pre-defined category.
[0115] Purpose: To ensure that a specific type of target is being aimed at.
[0116] Example: The target must be a person, a test paper, or a desk.
[0117] Target quantity
[0118] Condition: The number of targets must meet certain requirements.
[0119] Purpose: To ensure that only one target needs to be aligned, avoiding interference from multiple targets.
[0120] Example: Only one target in the picture can meet the conditions.
[0121] Target posture
[0122] Condition: The target's posture must meet certain requirements.
[0123] Purpose: Ensure the target's pose is suitable for alignment.
[0124] Example: The target must be facing the camera.
[0125] Target integrity
[0126] Condition: The target must be complete and unobstructed in the picture.
[0127] Purpose: To ensure that all features of the target are captured clearly.
[0128] Example: The completeness of a goal must be greater than a certain threshold (for example, 80%).
[0129] Target color
[0130] Condition: The color of the target must meet certain requirements.
[0131] Purpose: To ensure that the target color is suitable for alignment.
[0132] Example: The color of a target must be within a certain color range (for example, red).
[0133] In a feasible implementation manner, the step of obtaining the target pixel coordinates of the target to be aligned in the panoramic picture includes the following steps:
[0134] Determining the center point of the panoramic image;
[0135] It should be noted that when the camera is pointed at the device, it first obtains the specific dimensions of the panoramic image, namely the width (Width) and height (Height) of the image, and uses the width and height to calculate the center point of the image. The horizontal coordinate (X coordinate) of the center point is equal to half of the width, and the vertical coordinate (Y coordinate) is equal to half of the height. The mathematical expression is:
[0136] The X coordinate of the center point = width / 2.
[0137] Center point Y coordinate = height / 2.
[0138] Establishing a coordinate system with the center point as the coordinate origin;
[0139] It is understandable that the camera aiming device uses the determined center point of the panoramic image as the origin (0,0) of the new coordinate system and generates a coordinate system. In this new coordinate system, the right direction is the positive X axis and the downward direction is the positive Y axis; the left direction is the negative X axis and the upward direction is the negative Y axis.
[0140] Based on the coordinate system, target pixel coordinates of the target to be aligned in the panoramic picture are determined.
[0141] It should be noted that the camera aiming device will obtain the target pixel coordinates of the target to be aimed at in a new coordinate system with the center point of the panoramic image as the origin.
[0142] In this embodiment, the camera aiming device can accurately locate and track a specific target by establishing a coordinate system.
[0143] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the camera alignment method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0144] This application also provides a camera alignment device, please refer to Figure 4 , the camera aiming device comprises:
[0145] An acquisition module 10 is configured to, upon detecting that a target to be aligned exists in a panoramic picture taken by a first shooting device, acquire target pixel coordinates of the target to be aligned in the panoramic picture;
[0146] The mapping module 20 is configured to input the target pixel coordinates into a preset movement angle mapping network, map the target movement angle, and control the second camera to align with the target based on the target movement angle.
[0147] Optionally, the acquisition module includes:
[0148] The fitting submodule is used to obtain a sample pixel coordinate set and an initial sample angle of the second camera device; construct a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set; obtain an initial neural network, and input the discrete mapping relationship into the initial neural network for fitting to obtain a preset movement angle mapping network.
[0149] The detection submodule is used to obtain a panoramic picture taken by the first shooting device; based on a preset target detection algorithm, perform target detection on the panoramic picture to obtain a target set; and judge the target set to obtain a target to be aligned that meets the alignment conditions.
[0150] The determination submodule is configured to determine the center point of the panoramic picture; establish a coordinate system with the center point as the coordinate origin; and determine the target pixel coordinates of the target to be aligned in the panoramic picture based on the coordinate system.
[0151] Optionally, the fitting submodule includes:
[0152] The shooting unit is used to shoot a sample surface of preset dimensions through the first shooting device to obtain a surface image; determine a sample feature point set based on the surface image; and determine a sample pixel coordinate set of the sample feature point set in the surface image.
[0153] A construction unit is used to obtain a target sample angle set after the second shooting device is aligned with the sample feature point set; based on the initial sample angle and the target sample angle set, determine a sample movement angle set of the target sample angle set relative to the initial sample angle of the second shooting device; and construct a discrete mapping relationship based on the sample pixel coordinate set and the sample movement angle set.
[0154] The camera alignment device provided in this application utilizes the camera alignment method described in the aforementioned embodiments to solve the technical problem of camera alignment. Compared to the prior art, the camera alignment device provided in this application has the same beneficial effects as the camera alignment method described in the aforementioned embodiments. Other technical features of the camera alignment device are the same as those disclosed in the aforementioned embodiments and are not further described here.
[0155] The present application provides a camera aiming device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the camera aiming method in the above-mentioned embodiment one.
[0156] Reference below Figure 5 , which shows a schematic structural diagram of a camera aiming device suitable for implementing embodiments of the present application. The camera aiming device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, tablet computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The camera aiming device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0157] like Figure 5As shown, the camera pointing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the camera pointing device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input devices 1007, such as a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003, such as a magnetic tape or hard disk; and communication device 1009. The communication device 1009 can allow the camera pointing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a camera pointing device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or have alternatively.
[0158] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0159] The camera alignment device provided in this application utilizes the camera alignment method described in the aforementioned embodiment to solve the technical problem of camera alignment. Compared to the prior art, the camera alignment device provided in this application has the same beneficial effects as the camera alignment method described in the aforementioned embodiment. Other technical features of the camera alignment device are the same as those disclosed in the aforementioned embodiment and are not further described here.
[0160] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0161] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0162] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the camera alignment method in the above-mentioned embodiment.
[0163] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0164] The computer-readable storage medium may be included in the camera pointing device, or may exist independently without being assembled into the camera pointing device.
[0165] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the camera aiming device, the camera aiming device: when detecting that there is a target to be aimed at in the panoramic picture taken by the first shooting device, obtains the target pixel coordinates of the target to be aimed at in the panoramic picture; inputs the target pixel coordinates into a preset movement angle mapping network, maps to obtain the target movement angle, and controls the second shooting device to aim at the target to be aimed at based on the target movement angle.
[0166] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0167] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0168] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0169] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned camera alignment method, thereby resolving the technical issues surrounding camera alignment. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the camera alignment method provided in the aforementioned embodiments and are not further elaborated here.
[0170] The present application also provides a computer program product, comprising a computer program, which implements the steps of the camera alignment method as described above when the computer program is executed by a processor.
[0171] The computer program product provided in this application can solve the technical problem of camera alignment. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the camera alignment method provided in the above embodiment, which will not be repeated here.
[0172] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A camera alignment method, characterized in that: The camera alignment method comprises: Using a first photographing device, photographing a sample curved surface of a preset dimension to obtain a curved surface image; Determining a sample feature point set based on the curved surface image; Determine a sample pixel coordinate set of the sample feature point set in the curved surface image; Obtaining the sample pixel coordinate set and an initial sample angle of the second shooting device, wherein the sample pixel coordinate set is pixel coordinates on a surface of a preset dimension; Acquire a target sample angle set after a second shooting device is aligned with the sample feature point set; Determining, based on the initial sample angle and the target sample angle set, a sample movement angle set of the target sample angle set relative to the initial sample angle of the second photographing device; Constructing a discrete mapping relationship based on the sample pixel coordinate set and the sample movement angle set; Obtaining an initial neural network, and inputting the discrete mapping relationship into the initial neural network for fitting to obtain a preset movement angle mapping network, wherein the preset movement angle mapping network is used to predict the movement angle of the second camera device in a preset dimensional space; When detecting that a target to be aligned exists in the panoramic picture taken by the first shooting device, obtaining target pixel coordinates of the target to be aligned in the panoramic picture; The target pixel coordinates are input into a preset movement angle mapping network, and the target movement angle is mapped. Based on the target movement angle, the second shooting device is controlled to aim at the target to be aimed, wherein the preset movement angle mapping network is used to characterize the relationship between the pixel coordinates of the target to be aimed in the preset dimensional space and the movement angle of the second shooting device.
2. The camera alignment method according to claim 1, wherein: The step of detecting that a target to be aligned exists in the panoramic picture taken by the first shooting device includes: Obtaining a panoramic image captured by a first camera; Based on a preset target detection algorithm, target detection is performed on the panoramic image to obtain a target set; The target set is judged to obtain targets to be aligned that meet the alignment conditions.
3. The camera alignment method according to claim 1, wherein: The step of obtaining the target pixel coordinates of the target to be aligned in the panoramic picture includes: Determining the center point of the panoramic image; Establishing a coordinate system with the center point as the coordinate origin; Based on the coordinate system, target pixel coordinates of the target to be aligned in the panoramic picture are determined.
4. A camera aiming device, characterized in that: The device comprises: The fitting submodule includes: a photographing unit configured to photograph a sample curved surface of a preset dimension using a first photographing device to obtain a curved surface image; determine a sample feature point set based on the curved surface image; and determine a sample pixel coordinate set of the sample feature point set in the curved surface image; The fitting submodule is used to obtain the sample pixel coordinate set and the initial sample angle of the second camera device, wherein the sample pixel coordinate set is the pixel coordinate on the preset dimensional surface; obtain the target sample angle set after the second camera device is aligned with the sample feature point set; based on the initial sample angle and the target sample angle set, determine the sample movement angle set of the target sample angle set relative to the initial sample angle of the second camera device; construct a discrete mapping relationship based on the sample pixel coordinate set and the sample movement angle set; obtain an initial neural network, and input the discrete mapping relationship into the initial neural network for fitting to obtain a preset movement angle mapping network, wherein the preset movement angle mapping network is used to predict the movement angle of the second camera device in a preset dimensional space; an acquisition module, configured to, upon detecting that a target to be aligned exists in the panoramic picture taken by the first shooting device, acquire target pixel coordinates of the target to be aligned in the panoramic picture; A mapping module is used to input the target pixel coordinates into a preset movement angle mapping network, map the target movement angle, and control the second shooting device to align with the target to be aligned based on the target movement angle, wherein the preset movement angle mapping network is used to characterize the relationship between the pixel coordinates of the target to be aligned in the preset dimensional space and the movement angle of the second shooting device.
5. A camera aiming device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the camera alignment method according to any one of claims 1 to 3.
6. A storage medium, characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the camera alignment method according to any one of claims 1 to 3 are implemented.
7. A computer program product, characterized in that The computer program product comprises a computer program, which implements the steps of the camera alignment method according to any one of claims 1 to 3 when executed by a processor.
Citation Information
Patent Citations
Moving object video surveillance method based on multi-PTZ (pan-tilt-zoom)-camera linkage structure
CN104125433A
Object tracking method and device and storage medium
CN111460972A