Camera alignment method, device, equipment, storage medium and product

By detecting the coordinates of the target pixel to be aligned in the panoramic picture and using the moving angle mapping network, the accuracy problem when the close-up camera and the panoramic camera picture overlap is solved, and higher camera alignment accuracy is achieved.

CN119211734AActive Publication Date: 2024-12-27VALUEHD CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411688616.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2024-12-27
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

In the prior art, when the close-up camera and the panoramic camera pictures overlap, the distance from the calibration object is greatly affected, resulting in a decrease in the accuracy of camera alignment and a large error in the edge of the picture.

Method used

By detecting the coordinates of the target pixel to be aligned in the panoramic picture and inputting it into the preset moving angle mapping network, obtaining the target moving angle, controlling the close-up camera to aligning the target, avoiding deviations caused by field of view differences.

Benefits of technology

The accuracy of camera alignment is improved, the participation of close-up shots in the positioning calculation process is reduced, deviations caused by field differences are avoided, and the accuracy of alignment is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211734A_ABST
    Figure CN119211734A_ABST
Patent Text Reader

Abstract

The invention discloses a camera alignment method and device, equipment, a storage medium and a product, and relates to the technical field of computers, and the camera alignment method comprises the steps: obtaining a target pixel coordinate of a to-be-aligned target in a panoramic picture when it is detected that the to-be-aligned target exists in the panoramic picture shot by first shooting equipment; and inputting the target pixel coordinate into a preset movement angle mapping network, mapping to obtain a target movement angle, and based on the target movement angle, controlling a second shooting device to align with the to-be-aligned target. After the to-be-aligned target is detected, the pixel coordinates of the to-be-aligned target in the panoramic picture are determined, and the movement angle of the second shooting device for alignment is obtained according to the pixel coordinates through the preset movement angle mapping network, so that the situation that close-up lens participation is not needed in the positioning calculation process can be avoided, and the positioning accuracy is improved due to the field-of-view difference of the two cameras. And direct mapping can generate large deviation, so that the alignment accuracy of the camera is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a camera alignment method, device, equipment, storage medium and product. Background Art

[0002] With the development of informatization in all walks of life, cameras are used more and more widely as important image acquisition tools. Among them, the binocular camera, which is 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, takes into account both the observation range and clarity, and has become a widely used solution.

[0003] In the related art, the position of the target in the panoramic camera is directly used to calculate the theoretical movement p (horizontal movement angle Pan) t (vertical movement angle Tilt) of a panoramic camera, and the PT of the close-up camera's default position is recorded. Then, the PT is recorded when the centers of the close-up camera and the panoramic camera's screens coincide with the target. The difference between the two PTs is used as compensation for calculating pt in the panoramic camera to obtain the moving angle of the close-up camera. However, when the close-up camera and the panoramic camera's screens coincide, the distance between the calibration object and the camera has a significant impact, and there is a problem of large errors at the edge of the screen, 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, aiming 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 object, the present application proposes a camera alignment method, which comprises: When it is detected that there is a target to be aligned in the panoramic picture taken by the first shooting device, the target pixel coordinates of the target to be aligned in the panoramic picture are obtained; The target pixel coordinates are input into a preset movement angle mapping network to map the target movement angle, and based on the target movement angle, the second shooting device is controlled to aim at the target to be aimed.

[0006] In one embodiment, when it is detected that there is a target to be aimed at in the panoramic picture taken by the first shooting device, before the step of obtaining the target pixel coordinates of the target to be aimed at in the panoramic picture includes: Obtaining a sample pixel coordinate set and an initial sample angle of a second camera device; Constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set; 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.

[0007] In one embodiment, the step of obtaining the sample pixel coordinate set and the initial sample angle of the second shooting device includes: Using the first shooting device, shooting a sample curved surface of a preset dimension to obtain a curved surface image; Based on the curved surface image, determining a sample feature point set; A sample pixel coordinate set of the sample feature point set in the curved surface image is determined.

[0008] In one embodiment, the step of constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set includes: Acquire a target sample angle set after a second shooting device is aimed at the sample feature point set; Based on the initial sample angle and the target sample angle set, determining a sample movement angle set of the target sample angle set relative to the initial sample angle of the second photographing device; A discrete mapping relationship is constructed based on the sample pixel coordinate set and the sample movement angle set.

[0009] In one embodiment, the step of detecting that there is a target to be aimed at in the panoramic picture taken by the first shooting device includes: Acquire a panoramic picture captured by a first shooting device; Based on a preset target detection algorithm, target detection is performed on the panoramic picture to obtain a target set; The target set is judged to obtain the target to be aligned that meets the alignment condition.

[0010] In one embodiment, 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 picture; 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.

[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a camera aiming device, the camera aiming device comprising: An acquisition module, configured to acquire target pixel coordinates of the target to be aligned in the panoramic picture when detecting that there is a target to be aligned in the panoramic picture taken by the first shooting device; A 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 based on the target movement angle, control the second shooting device to align with the target to be aligned.

[0012] 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 in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the camera alignment method described above.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which 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 described above are implemented.

[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the camera alignment method described above are implemented.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: Compared with the related art, in which the distance of the calibration object from the camera is greatly affected when the close-up camera and the panoramic camera images overlap, and there is a problem of large error at the edge of the image, which reduces the accuracy of camera alignment, the present application, when detecting 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 by 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, thereby reducing the accuracy of camera alignment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] 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.

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the camera alignment method of the present application; Figure 2 A shooting scene diagram of the first shooting device and the second shooting device in the camera alignment method of the present application; Figure 3 A schematic diagram of a flow chart provided for the second embodiment of the camera alignment method of the present application; Figure 4 This is a schematic diagram of the module structure of the camera aiming device according to an embodiment of the present application; 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.

[0019] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0021] 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.

[0022] 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, 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.

[0023] In the related art, the position of the target in the panoramic camera is directly used to calculate the theoretical movement p (horizontal movement angle Pan) t (vertical movement angle Tilt) of a panoramic camera, and the PT of the close-up camera's default position is recorded. Then, the PT is recorded when the centers of the close-up camera and the panoramic camera's screens coincide with the target. The difference between the two PTs is used as compensation for calculating pt in the panoramic camera to obtain the moving angle of the close-up camera. However, when the close-up camera and the panoramic camera's screens coincide, the distance between the calibration object and the camera has a significant impact, and there is a problem of large errors at the edge of the screen, which reduces the accuracy of camera alignment.

[0024] 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 according to the pixel coordinates. This can avoid the problem that the positioning calculation process does not require the participation of close-up shots, and that direct mapping will produce large deviations due to the difference in the fields of view of the two cameras, thereby reducing the accuracy of camera alignment.

[0025] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a camera aiming device as an example to illustrate this embodiment and the following embodiments.

[0026] 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.

[0027] In this embodiment, the camera alignment method includes steps S100 to S200: Step S100, when it is detected that there is a target to be aligned in the panoramic picture taken by the first shooting device, the target pixel coordinates of the target to be aligned in the panoramic picture are obtained; It should be noted that the execution subject of this embodiment is a camera aiming device. The camera aiming device is provided with a binocular camera, which is composed of a panoramic camera and a close-up camera, wherein the panoramic camera is a fixed camera with a large field of view, and the fixed camera is provided with a fixed-focus wide-angle panoramic high-definition lens.

[0028] It is understandable that the first shooting device is a panoramic camera. Pixel coordinates are used to describe the position of an image or screen. The target to be aimed at is the target to be aimed at. When the camera aiming device detects that the target to be aimed at appears in the panoramic picture taken by the panoramic camera, it will obtain the position coordinates of the target to be aimed at in the panoramic picture.

[0029] Step S200: 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 aim at the target to be aimed based on the target movement angle.

[0030] 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, wherein the close-up camera is provided with a close-up lens, which is composed of a free-degree-of-freedom rotating pan-tilt and an optical zoom camera. The value includes horizontal angle and vertical angle. By moving the angles in different directions, the close-up camera can be driven to move accurately. The close-up camera needs to move at the angle to be aimed at the target. The preset moving angle mapping network is used to characterize the relationship between the pixel coordinates of the target to be aimed at and the moving angle of the close-up camera, where P is the horizontal movement angle Pan and t is the vertical movement angle Tilt.

[0031] It is understandable that, after obtaining the pixel coordinates of the target to be aimed at in the panoramic camera, the camera aiming device inputs the target pixel coordinates into a preset moving angle mapping network that is used to characterize the relationship between the pixel coordinates of the target to be aimed at and the close-up camera moving 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 controls the pan / tilt of the close-up camera to rotate, thereby realizing the movement of the close-up camera based on the obtained moving angle. After moving the target moving angle, the close-up camera can be aimed at the target to be aimed at based on the moved position.

[0032] Specifically, the camera is aimed at the device using 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.

[0033] In a feasible implementation manner, when it is detected that there is a target to be aimed at in the panoramic picture taken by the first shooting device, before the step of obtaining the target pixel coordinates of the target to be aimed at in the panoramic picture includes: Obtaining a sample pixel coordinate set and an initial sample angle of a second camera device; It should be noted that the initial sample angle is the initial angle of the second shooting device when it is not moving, wherein the initial sample angle is fixed. The sample pixel coordinate set is the pixel coordinate of the selected sample feature point in the image of the panoramic camera. The camera aiming device obtains the fixed initial angle of the second shooting device when it is not moving, and obtains the sample pixel coordinate set of the selected sample feature point in the image of the panoramic camera.

[0034] Constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set; It is understandable that the 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 obtained initial fixed angle of the close-up camera and the pixel coordinates of the selected sample feature points in the panoramic camera image.

[0035] 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.

[0036] It should be noted that the initial neural network is used to fit the discrete mapping relationship into a continuous mapping relationship. Since the surface is a three-dimensional surface, the discrete mapping relationship formed by a number of points selected from the three-dimensional surface is input into the neural network for fitting, so that the neural network can have the ability to predict the movement angle in the three-dimensional space. The camera aiming device inputs the discrete mapping relationship into the obtained initial neural network, and the initial neural network will learn the ability to predict the movement angle in the three-dimensional space, and obtain a preset movement angle mapping network that fits the discrete mapping relationship into a continuous mapping relationship.

[0037] Furthermore, the camera aiming device performs simple mapping processing through a preset movement angle mapping network, which can not only reduce the amount of calculation and improve the speed of movement angle prediction, but also accurately predict the angle that the second shooting device needs to move according to the pixel coordinates of the target to be aimed at in the panoramic picture of the first shooting device. Then, the movement of the pan / tilt of the second device is accurately controlled through the movement angle, so that the second shooting device can accurately aim at the target to be aimed at.

[0038] 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 effort. The forward reasoning process of the network can be explicitly implemented 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.

[0039] 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: Using the first shooting device, shooting a sample curved surface of a preset dimension to obtain a curved surface image; 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.

[0040] Based on the curved surface image, determining a sample feature point set; It should be noted that the sample feature point set includes all the selected feature points. The camera alignment device selects a number of 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.

[0041] A sample pixel coordinate set of the sample feature point set in the curved surface image is determined.

[0042] It is understandable 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 forms a sample pixel coordinate set based on the pixel coordinates of each feature point.

[0043] 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.

[0044] 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.

[0045] In a feasible implementation manner, the step of constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set includes the following steps: Acquire a target sample angle set after a second shooting device is aimed at the sample feature point set; It should be noted that the camera aiming device controls the second shooting device to move and aim 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 a target sample angle set based on each corresponding angle after alignment with different feature points.

[0046] Based on the initial sample angle and the target sample angle set, determining a sample movement angle set of the target sample angle set relative to the initial sample angle of the second photographing device; It is understandable that the sample movement angle set includes the movement angles of the second shooting device based on different feature points. The camera alignment device compares the initial angle of the second shooting device with the target angle after the second shooting device moves and aligns with each feature point to obtain the movement angles of the second shooting device based on different feature points, and forms a sample movement angle set based on the movement angles of different feature points.

[0047] A discrete mapping relationship is constructed based on the sample pixel coordinate set and the sample movement angle set.

[0048] It should be noted that the camera aiming device constructs a discrete mapping relationship based on two discrete sets of sample pixel coordinates and sample movement angles.

[0049] In this embodiment, after obtaining the pixel coordinates of the target to be aimed at, 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 is not required 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.

[0050] 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-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 When it is detected that there is a target to be aligned in the panoramic picture taken by the first shooting device, the camera alignment method further includes steps A100 to A300: Step A100, obtaining a panoramic picture captured by a first shooting device; It is understandable that the panoramic picture covers the sample curved surface. The camera is aimed at the device to capture the panoramic picture of the curved surface through the first shooting device.

[0051] Step A200, performing target detection on the panoramic picture based on a preset target detection algorithm to obtain a target set; It should be noted that the target set includes all sets of the required type. The preset target detection algorithm can detect people, test papers, desks, etc., which is determined according to specific needs. The camera is aimed at the device using the preset target detection algorithm to detect the pre-set targets in the panoramic picture to obtain the target set of the same type.

[0052] Step A300, judging the target set to obtain the target to be aligned that meets the alignment condition.

[0053] 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 condition according to the preset judgment condition.

[0054] Specifically, the target conditions may include the following examples: Target size Condition: The size of the target must be within a certain range.

[0055] Purpose: Make sure the target is large enough to be clearly visible in the frame.

[0056] Example: The width and height of an object must be larger than a certain threshold (e.g., 100 pixels).

[0057] Target distance Condition: The distance between the target and the camera must be within a certain range.

[0058] Purpose: Ensure the subject is in focus and avoid blur.

[0059] Example: The distance to the target must be between 1 meter and 5 meters.

[0060] Target location Condition: The position of the target in the picture must meet certain requirements.

[0061] Purpose: Make sure the subject is in a strategic position in the frame, such as the center or the golden section.

[0062] Example: The center point of the target must be within a certain range of the center of the picture.

[0063] Background contrast Condition: The contrast between the target and the background must be high enough.

[0064] Purpose: Ensure that the target is highlighted in the frame.

[0065] Example: The grayscale difference between the target and the background must be greater than a certain threshold (for example, 50).

[0066] Dynamic characteristics Condition: Is the target moving? If so, is its speed and direction of movement in compliance with the requirements?

[0067] Purpose: To ensure that the camera is aiming at a stationary or slow-moving target and to avoid blur.

[0068] Example: The target's motion speed must be less than a certain threshold (e.g., 5 pixels per second).

[0069] Target Category Condition: The target must belong to a pre-defined category.

[0070] Purpose: To ensure that a specific type of target is being aimed at.

[0071] Example: The target must be a person, a test paper, or a desk.

[0072] Target quantity Condition: The number of targets must meet certain requirements.

[0073] Purpose: To ensure that only one target needs to be aimed at, avoiding interference from multiple targets.

[0074] Example: Only one target in the picture can meet the condition.

[0075] Target posture Condition: The target's posture must meet certain requirements.

[0076] Purpose: Ensure that the target's posture is suitable for alignment.

[0077] Example: The target must be facing the camera.

[0078] Target integrity Condition: The target must be complete and unobstructed in the picture.

[0079] Purpose: To ensure that all features of the target are captured clearly.

[0080] Example: The completeness of a goal must be greater than a certain threshold (e.g., 80%).

[0081] Target Color Condition: The color of the target must meet certain requirements.

[0082] Purpose: To ensure that the color of the target is suitable for alignment.

[0083] Example: The color of a target must be within a certain color range (for example, red).

[0084] 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: Determining the center point of the panoramic picture; It should be noted that the camera pointing device will first obtain the specific size of the panoramic image, that is, the width (Width) and height (Height) of the image, and use 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: The center point X coordinate = width / 2.

[0085] Center point Y coordinate = height / 2.

[0086] Establishing a coordinate system with the center point as the coordinate origin; 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 which 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.

[0087] Based on the coordinate system, target pixel coordinates of the target to be aligned in the panoramic picture are determined.

[0088] 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 picture as the origin.

[0089] In this implementation, the camera aiming device can accurately locate and track a specific target by establishing a coordinate system.

[0090] 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 protection scope of the present application.

[0091] This application also provides a camera alignment device, please refer to Figure 4 , the camera aiming device comprises: An acquisition module 10 is used to acquire the target pixel coordinates of the target to be aligned in the panoramic picture when detecting that there is a target to be aligned in the panoramic picture taken by the first shooting device; The mapping module 20 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.

[0092] Optionally, the acquisition module includes: A fitting submodule is used to obtain a sample pixel coordinate set and an initial sample angle of a second shooting device; based on the initial sample angle and the sample pixel coordinate set, a discrete mapping relationship is constructed; 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.

[0093] 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.

[0094] The determination submodule is used 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.

[0095] Optionally, the fitting submodule includes: The shooting unit is used to shoot a sample curved surface of a preset dimension through the first shooting 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.

[0096] A construction unit is used to obtain a target sample angle set after a 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; based on the sample pixel coordinate set and the sample movement angle set, construct a discrete mapping relationship.

[0097] The camera alignment device provided by the present application adopts the camera alignment method in the above embodiment, which can solve the technical problem of camera alignment. Compared with the prior art, the beneficial effects of the camera alignment device provided by the present application are the same as the beneficial effects of the camera alignment method provided by the above embodiment, and other technical features in the camera alignment device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0098] 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 executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the camera aiming method in the above-mentioned embodiment 1.

[0099] Reference below Figure 5 , which shows a schematic diagram of the structure of a camera aiming device suitable for implementing the embodiment of the present application. The camera aiming device in the embodiment 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), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The camera aiming device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0100] like Figure 5As shown, the camera aiming device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the camera aiming device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a 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 camera pointing device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0101] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a 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 through 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.

[0102] The camera alignment device provided by the present application adopts the camera alignment method in the above embodiment to solve the technical problem of camera alignment. Compared with the prior art, the beneficial effects of the camera alignment device provided by the present application are the same as the beneficial effects of the camera alignment method provided by the above embodiment, and other technical features in the camera alignment device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0103] It should be understood that the various parts disclosed in this application can be implemented by 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.

[0104] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0105] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the camera alignment method in the above-mentioned embodiment.

[0106] The computer-readable storage medium provided in the present 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 of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0107] The computer-readable storage medium may be included in the camera aiming device; or may exist independently without being assembled into the camera aiming device.

[0108] The computer-readable storage medium carries one or more programs. When the 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.

[0109] 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 separate 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 through 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).

[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0112] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned camera alignment method, and can solve the technical problem of camera alignment. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the camera alignment method provided in the above-mentioned embodiment, and will not be described in detail here.

[0113] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the camera alignment method as described above are implemented.

[0114] The computer program product provided by the present application can solve the technical problem of camera alignment. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the camera alignment method provided by the above embodiment, which will not be repeated here.

[0115] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications 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: When it is detected that there is a target to be aligned in the panoramic picture taken by the first shooting device, the target pixel coordinates of the target to be aligned in the panoramic picture are obtained; The target pixel coordinates are input into a preset movement angle mapping network to map the target movement angle, and based on the target movement angle, the second shooting device is controlled to aim at the target to be aimed.

2. The camera alignment method according to claim 1, characterized in that: Before the step of detecting that there is a target to be aimed at in the panoramic picture taken by the first shooting device, obtaining the target pixel coordinates of the target to be aimed at in the panoramic picture includes: Obtaining a sample pixel coordinate set and an initial sample angle of a second camera device; Constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set; 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.

3. The camera alignment method according to claim 2, characterized in that: The step of obtaining a sample pixel coordinate set and an initial sample angle of the second shooting device includes: Using the first shooting device, shooting a sample curved surface of a preset dimension to obtain a curved surface image; Based on the curved surface image, determining a sample feature point set; A sample pixel coordinate set of the sample feature point set in the curved surface image is determined.

4. The camera alignment method according to claim 2, wherein: The step of constructing a discrete mapping relationship based on the initial sample angle and the sample pixel coordinate set comprises: Acquire a target sample angle set after a second shooting device is aimed at the sample feature point set; Based on the initial sample angle and the target sample angle set, determining a sample movement angle set of the target sample angle set relative to the initial sample angle of the second photographing device; A discrete mapping relationship is constructed based on the sample pixel coordinate set and the sample movement angle set.

5. The camera alignment method according to claim 1, wherein: The step of detecting that there is a target to be aimed at in the panoramic picture taken by the first shooting device includes: Obtaining a panoramic picture captured by a first shooting device; Based on a preset target detection algorithm, target detection is performed on the panoramic picture to obtain a target set; The target set is judged to obtain the target to be aligned that meets the alignment condition.

6. The camera alignment method according to claim 1, characterized in that: The step of obtaining the target pixel coordinates of the target to be aligned in the panoramic picture comprises: Determining the center point of the panoramic picture; 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.

7. A camera aiming device, characterized in that: The device comprises: An acquisition module, configured to acquire target pixel coordinates of the target to be aligned in the panoramic picture when detecting that there is a target to be aligned in the panoramic picture taken by the first shooting device; A 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 based on the target movement angle, control the second shooting device to align with the target to be aligned.

8. 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 6.

9. 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 6 are implemented.

10. 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 6 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

  • Method and device for linkage tracking and enhanced display of scene monitoring system and video

    CN113286080A

  • Camera calibration method, device and equipment and computer readable storage medium

    CN117979167A