Camera picture adjusting method and device and electronic equipment
By identifying and calculating the user's adjustment operations on the screen on the display device and generating gimbal control instructions, the problem that the camera gimbal system cannot flexibly adjust the shooting position in the prior art is solved, and the accurate and flexible movement of the camera gimbal is achieved. , improving the efficiency and user experience of teaching recording and live broadcast.
Patent Information
- Application Number
- CN202411344832.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, the camera gimbal system cannot flexibly adjust the shooting position, resulting in low control efficiency and inability to instantly preview the shooting screen changes, affecting user experience and teaching recording or live broadcast progress.
By receiving the picture collected by the camera gimbal device on the display device, identifying the user's adjustment operations on the screen, calculating the corresponding gimbal control commands, and sending them to the gimbal device in real time to make adjustments, supporting drag and zooming Various operation methods can realize the accurate and flexible movement of the camera gimbal.
Real-time preview of the camera adjustment process and results is realized, which improves the casualness and accuracy of operations, simplifies the picture adjustment process, avoids interruptions in shooting progress, and improves the efficiency of teaching recording and live broadcast.
Smart Images

Figure CN119299848A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a camera image adjustment method, device and electronic device. Background Art
[0002] In the process of educational informatization, more and more schools choose to deploy advanced audio and video equipment in classrooms to improve teaching quality and management efficiency, so as to record or broadcast classroom scenes in real time to achieve teaching and research purposes such as interaction and class inspection. Generally speaking, when using a camera to record video images, in order to enrich the image content and accurately convey the information in the current scene, the operator will control the camera lens to change the shooting position and shooting angle according to the actual situation. Therefore, how to make the camera move to the target position accurately and efficiently is very important for the smoothness of the image and the accuracy of the image position. Summary of the invention
[0003] The present application provides a camera picture adjustment method, device and electronic device, which can solve the technical problem in the related art that the shooting position of the camera cannot be flexibly adjusted.
[0004] In a first aspect, an embodiment of the present application provides a camera picture adjustment method, which is applied to a display device, wherein the display device is connected to a camera pan / tilt device, and the method comprises:
[0005] Receive and display the images captured by the camera pan / tilt device;
[0006] Identify the image adjustment operation triggered on the shooting image, and determine the pan / tilt control instruction corresponding to the image adjustment operation;
[0007] The pan / tilt control instruction is sent to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
[0008] The beneficial effects brought about by the technical solution of the first aspect include at least: while the display device continues to display the images captured by the camera pan / tilt device in real time, the user can directly perform image adjustment operations on the shooting screen, and the display device calculates the control instructions of the camera pan / tilt device based on the image adjustment operation and enables the camera pan / tilt device to execute the control instructions, so that the process and results of the camera adjustment can also be continuously displayed without interrupting the shooting progress, and can give the user an easy-to-operate experience, making the entire image adjustment process simpler and more accurate.
[0009] In some possible implementations, the above-mentioned determination of the pan / tilt control instruction corresponding to the above-mentioned picture adjustment operation includes: determining the target adjustment amount for the above-mentioned shooting picture based on the above-mentioned picture adjustment operation, and calculating the adjustment amount corresponding to the above-mentioned camera pan / tilt device according to the above-mentioned target adjustment amount; generating a pan / tilt control instruction according to the above-mentioned adjustment amount.
[0010] Through the technical solutions in the above possible implementation methods, in the specific implementation process of the picture adjustment, the adjustment amount made to the picture in the picture is first calculated based on the operation, and then the adjustment amount required by the gimbal is calculated based on the adjustment amount, thereby accurately generating the corresponding control instructions for the gimbal.
[0011] In some possible implementations, the above-mentioned picture adjustment operation is a drag operation, and the above-mentioned generating the pan / tilt control instruction based on the above-mentioned adjustment amount includes: calculating the moving speed corresponding to the camera pan / tilt device based on the dragging speed of the drag operation, and generating the pan / tilt control instruction according to the adjustment amount and the moving speed.
[0012] Through the technical solutions in the above possible implementation methods, when generating the gimbal control instructions corresponding to the drag operation, the movement speed of the gimbal is further adaptively calculated according to the dragging speed of the user, and finally the control instructions are generated by combining the adjustment amount and the movement speed. By standardizing the calculation of the gimbal adjustment amount and adaptively calculating the gimbal adjustment speed, the operation process of the gimbal adjustment is simplified.
[0013] In some possible implementations, the above-mentioned picture adjustment operation is a zoom operation, and the above-mentioned pan-tilt control instruction is generated according to the above-mentioned adjustment amount, including: calculating the lens distance change speed corresponding to the camera pan-tilt device based on the zoom speed of the zoom operation, and generating the pan-tilt control instruction according to the adjustment amount and the lens distance change speed.
[0014] Through the technical solutions in the above possible implementation methods, when generating the gimbal control instructions corresponding to the zoom operation, the change speed of the gimbal lens distance is further adaptively calculated according to the user's zoom speed for the picture, and finally the control instructions are generated by combining the adjustment amount and the lens distance change speed, thereby achieving the effect of adaptively calculating the gimbal adjustment speed for the zoom operation.
[0015] In some possible implementations, the above-mentioned picture adjustment operation is a drag operation; the above-mentioned target adjustment amount for the above-mentioned shooting picture is determined based on the above-mentioned picture adjustment operation, and the adjustment amount corresponding to the above-mentioned camera pan head device is calculated according to the above-mentioned target adjustment amount, including: determining the operation moving distance for the above-mentioned shooting picture based on the above-mentioned drag operation; performing step conversion calculation on the above-mentioned operation moving distance according to a preset step conversion rule to obtain the moving step corresponding to the above-mentioned camera pan head device.
[0016] Through the technical solutions in the above possible implementation methods, when the user wants to move the angle and shooting position of the picture by touch or mouse, the operation moving distance of the picture can be determined by dragging the operation, and then the operation moving distance is converted into the moving step of the pan-tilt head according to the command protocol of the pan-tilt head and the preset step conversion rule, so that the subsequent pan-tilt head controls the camera to rotate the corresponding step to capture the target picture that meets the user's needs. On various touch and non-touch display devices, multiple operation methods can be used to directly operate the picture to achieve instant and flexible picture position adjustment.
[0017] In some possible implementations, the above-mentioned determination of the operation moving distance for the above-mentioned shooting picture based on the above-mentioned drag operation includes: determining the first coordinates of the touch point in the above-mentioned shooting picture when the above-mentioned drag operation starts, and the second coordinates of the touch point in the above-mentioned shooting picture when the above-mentioned drag operation ends; calculating the operation moving distance corresponding to the above-mentioned drag operation based on the above-mentioned first coordinates and the above-mentioned second coordinates.
[0018] Through the technical solutions in the above possible implementation methods, when the user adjusts the shooting angle and position of the picture by dragging, the user can obtain the operation movement distance corresponding to the current operation through the coordinate change between the touch point at the beginning of the operation and the touch point at the end of the operation in the shooting picture.
[0019] In some possible implementations, the picture adjustment operation is a zoom operation, and the target adjustment amount for the captured picture is determined based on the picture adjustment operation, and the adjustment amount corresponding to the camera pan / tilt device is calculated according to the target adjustment amount, including: determining the zoom adjustment amount for the captured picture based on the zoom operation; calculating the zoom position according to the current zoom position of the captured picture and the zoom adjustment amount, to obtain the target zoom position corresponding to the camera pan / tilt device.
[0020] Through the technical solutions in the above possible implementation methods, when the user wants to adjust the picture size and zoom the picture by touch or mouse, the zoom adjustment amount of the zoom operation on the captured picture can be directly calculated, and then the new target zoom position can be calculated based on the current zoom position, so that the picture zoom adjustment can be performed simply and quickly on various touch and non-touch display devices, and the zoom result can be easily and instantly reflected in the changes of the captured picture.
[0021] In some possible implementations, when the above-mentioned zoom operation is a touch pinch-and-pull operation, the above-mentioned determination of the zoom adjustment amount for the above-mentioned shooting picture based on the above-mentioned zoom operation includes: determining a first distance between two touch points in the above-mentioned shooting picture when the above-mentioned touch pinch-and-pull operation starts, and a second distance between the two touch points in the above-mentioned shooting picture when the above-mentioned touch pinch-and-pull operation ends; and calculating the zoom adjustment amount corresponding to the above-mentioned touch pinch-and-pull operation based on the above-mentioned first distance and the above-mentioned second distance.
[0022] Through the technical solutions in the above possible implementation methods, if the zoom operation is achieved by the user pinching or stretching the screen with his fingers, that is, when the zoom operation is a touch pinch-and-stretch operation, the change in the distance between the two touch points of the user's two fingers from the beginning of the operation to the end of the operation can be calculated, and then the change in distance can be converted into the zoom adjustment amount of the screen, so that the screen can be zoomed in and out by touch.
[0023] In some possible implementations, when the above-mentioned zoom operation is a mouse wheel operation, the above-mentioned determination of the zoom adjustment amount for the above-mentioned captured image based on the above-mentioned zoom operation includes: determining the wheel scrolling amount of the above-mentioned mouse wheel operation, and calculating the zoom adjustment amount corresponding to the above-mentioned mouse wheel operation according to a preset scrolling zoom amount calculation rule.
[0024] Through the technical solution in the above possible implementation, if the zoom operation is implemented by the user through the mouse, that is, when the zoom operation is a mouse wheel operation, then in the case of no direct operation on the captured image, the scrolling amount of the wheel corresponding to the operation can be identified, and the zoom adjustment amount corresponding to the operation can be determined according to the preset corresponding relationship between the scrolling amount and the image zoom adjustment amount. In this way, the user can directly use the mouse wheel to zoom the image.
[0025] In a second aspect, an embodiment of the present application provides a camera picture adjustment device, which is applied to a display device, wherein the display device is connected to a camera pan / tilt device, and the device includes:
[0026] The image display module is used to receive and display the images captured by the camera pan / tilt device;
[0027] An operation adjustment module, used to identify the picture adjustment operation triggered on the above-mentioned shooting picture, and determine the pan / tilt control instruction corresponding to the above-mentioned picture adjustment operation;
[0028] The pan / tilt control module is used to send the pan / tilt control instruction to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
[0029] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method.
[0030] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the method.
[0031] In a fifth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] 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, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 An example diagram of an adjustment interface of an existing camera image adjustment method provided in an embodiment of the present application;
[0034] Figure 2 An exemplary system architecture diagram of a camera image adjustment method provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of a flow chart of a camera image adjustment method provided in an embodiment of the present application;
[0036] Figure 4 A schematic diagram of a flow chart of a camera image adjustment method provided in an embodiment of the present application;
[0037] Figure 5 An example diagram of a behavior calculation process based on a drag operation provided in an embodiment of the present application;
[0038] Figure 6 An example diagram of a behavior calculation process based on a touch pinch-and-pull operation provided in an embodiment of the present application;
[0039] Figure 7 A structural block diagram of a camera image adjustment device provided in an embodiment of the present application;
[0040] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0042] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. And in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two.
[0043] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0044] In the development of educational informatization, more and more schools will deploy audio and video equipment in the classroom to record classroom videos. These devices can not only record classroom scenes in real time and in high definition, but also achieve teaching and research purposes such as interaction and class inspection through live broadcast. Generally speaking, when using a camera to record video images, in order to obtain more vivid and information-rich video content, the operator will control the camera lens and flexibly adjust the shooting position and shooting angle according to the actual needs of the teaching activities, so as to ensure that the key knowledge points, teacher-student interaction and other content details in the teaching scene can be accurately captured.
[0045] In order to achieve this goal, how to ensure that the camera can be quickly and accurately rotated to the target position has become a key link in the shooting control process. Generally speaking, the camera gimbal can be used to move and control the direction of the camera lens. Specifically, the camera is mounted on the gimbal, and the gimbal is controlled to rotate the camera lens to change the direction of the camera lens, so that the camera can capture images at various angles and positions. Therefore, it can be seen that the smoothness of the image in the camera and the accuracy of the image position are closely related to the accuracy of the gimbal's movement control.
[0046] However, the existing PTZ system still has many inconveniences in practical applications. Figure 1 , Figure 1 This is an example diagram of an adjustment interface of an existing camera image adjustment method provided in an embodiment of the present application. Figure 1 As shown in the figure, in the position debugging interface of the gimbal, there are fixed moving buttons in 4 directions (or 8 directions), as well as buttons for controlling zooming such as "pull in" and "pull out". Users often need to operate these buttons to control the gimbal to move in a fixed direction. If the user wants to move the gimbal to a specific position, it is necessary to perform more operation steps on multiple buttons, and the moving path is long, resulting in low control efficiency. In addition, the gimbal cannot move to the target position in a direct path during movement, which greatly affects the user experience during the position adjustment process. On the other hand, the camera shooting screen and the gimbal control interface are generally designed separately. When adjusting the gimbal position, the user cannot preview the changes in the shooting screen in real time, and must frequently switch interfaces to confirm the effect. This "blind adjustment" method is not only inefficient, but may also lead to multiple reworks, affecting the overall recording or live broadcast progress. Moreover, the movement speed of the gimbal is usually fixed each time it moves, and it lacks the flexibility to automatically adjust the speed according to the shooting scene. The movement control and movement adjustment of the gimbal are also separate. Each movement can only be made at a fixed gimbal speed. If the movement speed needs to be changed, it is necessary to stop the movement control of the gimbal and then switch the speed. After the speed switch is completed, the gimbal movement can be continued. This is very inflexible.
[0047] Therefore, an embodiment of the present application provides a camera image adjustment method to solve the above-mentioned technical problem that the shooting position of the camera cannot be flexibly adjusted.
[0048] See also Figure 2 , Figure 2 An exemplary system architecture diagram of a camera image adjustment method provided in an embodiment of the present application.
[0049] like Figure 2As shown, the system architecture may include an electronic device 201, a network 202, and a camera pan / tilt device 203. The network 202 is used to provide a medium for a communication link between the electronic device 201 and the camera pan / tilt device 203. The network 202 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.
[0050] The electronic device 201 can interact with the camera pan-tilt device 203 through the network 202 to receive messages from the camera pan-tilt device 203 or send messages to the camera pan-tilt device 203, or the electronic device 201 can interact with the camera pan-tilt device 203 through the network 202 to receive messages or data sent by other users to the camera pan-tilt device 203. The electronic device 201 is specifically a display device that includes at least audio and video display functions and has computing capabilities, including but not limited to smart interactive tablets, smart phones, tablet computers, laptop portable computers, and desktop computers. The camera pan-tilt device 203 mainly includes a pan-tilt device and a camera device. The pan-tilt device is connected to the camera device to support the camera to rotate in both horizontal and vertical directions, so that the camera can shoot from multiple angles.
[0051] In an embodiment of the present application, during the process of the camera pan / tilt device 203 collecting audio and video data, there is a communication connection relationship between the display device, that is, the electronic device 201 and the camera pan / tilt device 203, and the camera pan / tilt device 203 transmits the audio and video data to the display device, that is, the electronic device 201 in real time, and the electronic device 201 continuously receives and displays the corresponding shooting picture collected by the camera pan / tilt device 203; then when a picture adjustment operation occurs, the electronic device 201 identifies the picture adjustment operation triggered on the shooting picture, and determines the pan / tilt control instruction corresponding to the picture adjustment operation; after the instruction is determined, the electronic device 201 sends the pan / tilt control instruction to the camera pan / tilt device 203, so that the camera pan / tilt device 203 moves based on the pan / tilt control instruction.
[0052] It should be understood that Figure 2 The number of electronic devices, networks and camera pan / tilt devices in the figure is only for illustration and any number of electronic devices, networks and camera pan / tilt devices may be used according to implementation requirements.
[0053] See also Figure 3 , Figure 3A flowchart of a camera picture adjustment method provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be an electronic device that performs the camera picture adjustment, or a processor in an electronic device that performs the camera picture adjustment method, or a camera picture adjustment service in an electronic device that performs the camera picture adjustment method. For the convenience of description, the specific execution process of the camera picture adjustment method is introduced below by taking the execution subject being a processor in an electronic device as an example.
[0054] like Figure 3 As shown, the camera picture adjustment method is applied to a display device, the display device is connected to a camera pan / tilt device, and the method may at least include:
[0055] S302: Receive and display the captured images from the camera pan / tilt device.
[0056] Optionally, it can be known from the introduction of the above embodiments that a display device and a camera pan / tilt device are deployed in the target recording and broadcasting scenario, wherein the camera pan / tilt device can rotate the camera through the pan / tilt device to control the camera to shoot the target image from various angles, and a communication link is established between the display device and the camera pan / tilt device. The display device can receive the shooting image data collected and transmitted by the camera pan / tilt device through the communication link and display it in real time. In addition, the display device can also send and receive control instructions with the camera pan / tilt device through the communication link.
[0057] S304: Identify the picture adjustment operation triggered on the shooting picture, and determine the pan / tilt control instruction corresponding to the picture adjustment operation.
[0058] Optionally, when the display device displays the captured image, the user may need to adjust the shooting position and angle of the image, that is, the camera pan tilt device needs to be controlled so that the camera pan tilt device rotates the camera to the target shooting position to shoot the image that meets the user's needs. In the process of controlling the pan tilt adjustment, the shooting image currently displayed in the display device is generally switched to the pan tilt control interface, and the pan tilt movement is controlled by direction buttons in the pan tilt control interface. However, this causes the user to perform more operation steps on multiple buttons when adjusting the shooting position, resulting in a longer movement path and low control efficiency. At the same time, the separation of the camera shooting image and the pan tilt control interface also causes the user to be unable to instantly preview the changes in the shooting image when adjusting the pan tilt position. For the user, the "blind adjustment" method is inefficient and greatly affects the overall recording or live broadcast progress.
[0059] Optionally, considering that the purpose of the user's control of the gimbal is actually due to the change in their own needs for the shooting picture, in order to improve the accuracy and efficiency of the control of the gimbal, the user can directly operate on the shooting picture to adjust the size of the picture, the position of the camera, etc., so as to convert the target position corresponding to the gimbal through the adjustment of the picture, so that the gimbal adjusts the camera to the target position to shoot the picture that meets the user's needs. That is, the user can directly operate on the shooting picture, and the display device can recognize the picture adjustment operation triggered on the shooting picture, such as zooming, panning or tilting the picture.
[0060] Optionally, when the user is performing an operation, the operation speed, operation method and operation trajectory during the operation are not fixed. Therefore, when the display device identifies the screen adjustment operation, it usually obtains a screen adjustment operation at a certain pre-set frequency. For example, when the display device detects that the user starts the operation, it can use 20 milliseconds as a cycle length, and at the end of each 20 milliseconds, the user operation data within these 20 milliseconds is used as a screen adjustment operation. Further, taking the user operation on the display device for a complete duration of 2 seconds as an example, for the display device, it obtains a total of 100 screen adjustment operations, and for these 100 screen adjustment operations, it is necessary to calculate 100 pan-tilt control instructions. The camera pan-tilt device performs 100 adjustments based on these 100 pan-tilt control instructions, so that the final adjustment result is the result corresponding to this user operation. It is easy to understand that the shorter the operation acquisition cycle of the display device, the more sensitive the judgment of the screen adjustment operation is, and the smoother the user's operation experience is; if the operation acquisition cycle of the display device is longer, it can save computing resources to a certain extent, thereby saving equipment costs. Therefore, the operation acquisition cycle of the display device can be set according to the needs of the actual scenario, and the embodiments of the present application are not limited to this.
[0061] Furthermore, operations with very small amplitudes or very short operation times may be caused by accidental touches by the user. Therefore, operations with amplitudes less than a preset threshold and / or operation times less than a preset duration may be ignored, thereby avoiding calculation of unnecessary operations and adjusting the camera pan / tilt device based thereon, ensuring that the user's normal use of the device is not affected by accidental touches.
[0062] Among them, according to the different user operation modes supported by the display device, the screen adjustment operation performed by the user may also be implemented in multiple ways. For example, in a display device that supports touch operation, the screen adjustment operation may be an operation recognized after the user directly touches the display screen of the display device; in a display device that supports mouse control, the screen adjustment operation may be an operation triggered by the user through hardware such as the left and right mouse buttons and the scroll wheel. It should be noted that in a display device that supports multiple operation modes at the same time, screen adjustment operations triggered by the user in multiple ways can also be recognized.
[0063] Furthermore, the PTZ can only respond to control commands that need to comply with the mobile protocol it uses. Therefore, after recognizing the picture adjustment operation, the display device will also convert it according to the recognized picture adjustment operation and determine the corresponding PTZ control command, thereby converting the user's adjustment intention into specific control parameters, such as rotation angle, pitch height, zoom ratio, etc. At the same time, the system will also consider the current shooting environment, camera status, and possible conflicting factors to ensure that the generated PTZ control command not only meets user needs, but also ensures the continuity and stability of shooting.
[0064] S306: Send the pan / tilt control instruction to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
[0065] Optionally, after determining the pan / tilt control instructions, the display device will send these instructions to the camera pan / tilt device. The transmission process of the instructions follows an efficient and stable communication protocol to ensure the integrity and real-time performance of the data during the transmission process. When the pan / tilt control instructions are received and parsed by the camera pan / tilt device, the device will perform corresponding adjustment operations according to the instructions, thereby achieving the purpose of picture adjustment. After the camera pan / tilt device parses the pan / tilt control instructions, the various mechanical structures inside it will respond quickly, driving the motor or stepping device to perform actions according to the instructions. In this process, advanced sensors and feedback mechanisms continuously monitor and adjust the motion state to ensure that each step of movement is accurate and can maintain a high degree of stability and reliability even under complex and changing environmental conditions. In this process, since the display device continues to display the shooting pictures collected by the camera pan / tilt device in real time, the user can preview the camera's viewing angle changes in real time through the display interface of the display device, giving the user an easy and intuitive experience, making the entire picture adjustment process simpler and more accurate.
[0066] In an embodiment of the present application, a camera picture adjustment method is provided, which is applied to a display device. The shooting picture collected by the camera pan-tilt device is received and displayed; the picture adjustment operation triggered on the shooting picture is identified, and the pan-tilt control instruction corresponding to the picture adjustment operation is determined; the pan-tilt control instruction is sent to the camera pan-tilt device, so that the camera pan-tilt device is adjusted based on the pan-tilt control instruction. While the display device continues to display the picture collected by the camera pan-tilt device in real time, the user can directly perform picture adjustment operations on the shooting picture. The display device calculates the control instructions of the camera pan-tilt device based on the picture adjustment operation and enables the camera pan-tilt device to execute the control instructions. In this way, the process and results of the camera adjustment can also be continuously displayed without interrupting the shooting progress, and can give the user an easy-to-operate experience, making the entire picture adjustment process simpler and more accurate.
[0067] Because different PTZ cameras may use different PTZ control protocols, and different protocols use different control commands. Therefore, in the display device, when converting and calculating between the picture adjustment operation and the PTZ control command, it is also necessary to calculate the user's picture adjustment behavior data based on the picture adjustment operation, and then convert the adjustment behavior data into control commands that the PTZ can use according to the command rules of the control protocol used by the PTZ. For details, please refer to Figure 4 , Figure 4 A flowchart of a camera image adjustment method provided in an embodiment of the present application.
[0068] like Figure 4 As shown, in the camera picture adjustment method, the step of determining the pan / tilt control instruction corresponding to the picture adjustment operation in the above S204 may at least further include:
[0069] S402: Determine a target adjustment amount for the captured image based on the image adjustment operation, and calculate a corresponding adjustment amount of the camera pan / tilt device according to the target adjustment amount.
[0070] Optionally, when the user operates on the shooting screen, the position of the screen after the adjustment amount is realized can be calculated according to the adjustment amount of the screen adjustment operation, such as the moving distance, the zooming distance, etc., and then the camera shooting position corresponding to the changed screen can be calculated, and then the adjustment amount corresponding to the camera pan / tilt device can be determined according to the target shooting position of the camera.
[0071] In addition, the movement control of common camera pan / tilt devices is usually driven by motors, which may be stepper motors, servo motors or other types of motors. In order to facilitate the introduction of the specific calculation process of the pan / tilt control instructions, the camera pan / tilt device driven by a stepper motor is used as an example for subsequent description in the embodiment of the present application.
[0072] Specifically, when the user wants to move the position of the picture on the shooting screen, he usually expresses his control intention by dragging. In the embodiment of the present application, the picture adjustment operation is a drag operation as an example to describe the specific calculation process of the gimbal control instruction when the drag operation occurs. The drag operation may specifically include but is not limited to touch drag operation, mouse drag operation, infrared pen drag operation, etc.
[0073] Optionally, the display device monitors touch behavior based on the captured image to capture the user's drag operation. For example, in a touch-sensitive display device, the dragging behavior is monitored by acquiring behavioral events such as the start of finger touch, finger movement, and end of touch. During the complete process of the dragging behavior, the distance from the user's touch point from the starting point to the end point can be used to calculate the operation movement distance of the dragging behavior for the captured image, and then the operation movement distance is converted into a step size according to the preset step size conversion rule corresponding to the camera pan / tilt device to obtain the movement step size corresponding to the camera pan / tilt device. The preset step size conversion rule specifies the number of pan / tilt rotation steps corresponding to each pixel moved in the image during the picture adjustment operation. The rule is formulated based on the specific software and hardware parameters of the camera. The embodiment of the present application does not specifically limit the correspondence between pixels and pan / tilt rotation steps in the preset step size conversion rule.
[0074] Optionally, the specific calculation process of the drag operation is as follows: See Figure 5 , Figure 5 This is an example diagram of a behavior calculation process based on a drag operation provided in an embodiment of the present application. Figure 5 As shown in (A), in the captured image, one pixel is used as a coordinate unit. When the dragging behavior is triggered, the first coordinate (start x , start y ), and the second coordinate of the touch point in the captured image at the end of the drag operation (current x , current y ), the direction vector corresponding to the dragging behavior can be determined based on the two coordinates. Based on the first coordinate and the second coordinate in the direction vector, the operation moving distance corresponding to the dragging operation can be further calculated, that is, the horizontal coordinate offset: x =current x -start x ; and the vertical coordinate offset: offset y =current y -start y It should be noted that the direction of the coordinate offset is indicated by positive and negative.
[0075] At the same time, considering that the user's dragging operation trajectory may not be completely horizontal or vertical every time, but may have a certain angle with the horizontal direction, it is also necessary to calculate the dragging distance d and dragging angle θ of this operation degress . Then if Figure 5 As shown in (B), when calculating the drag angle θ degress When dragging a distance d, you need to first calculate the coordinate component d x =current y -start x ;d y =current y -start y , the drag distance d is obtained based on the Pythagorean formula: Drag angle θ degress The initial angle is calculated based on the inverse tangent function Then determine the drag arc θ according to the positive and negative coordinate components radians Specifically, if d x is a positive number, and d y is a positive number, the direction vector is toward the first quadrant, and the drag angle is θ radians =θ initial If d x d x is a positive number, d y If it is a negative number, the direction vector is toward the fourth quadrant, and the drag angle is θ radians =θ initial +180°; if d x If it is a negative number, the direction vector is toward the second or third quadrant, then the drag angle is θ. radians =θ initial +180°. According to the drag arc θ radians Further conversion is performed to obtain the drag angle θ degress : In summary, we can derive the horizontal and vertical position offsets and offsets of a single drag operation. x and offset y , drag distance d and drag angle θ degress , and the subsequent step size conversion calculation can be performed.
[0076] Optionally, the protocol used by the camera pan / tilt device may be the Visca camera pan / tilt movement protocol. In the Visca protocol, pan / tilt control instructions can be divided into absolute position movement instructions, relative position movement instructions, and continuous movement instructions. The absolute position movement instruction controls the pan / tilt to move to a specified position according to the absolute position movement instruction; the relative position movement instruction controls the pan / tilt to move a certain distance in a certain direction relative to the current position according to the relative position movement instruction; the continuous movement instruction controls the pan / tilt to move continuously in a certain direction and stops when it reaches the maximum position. Since the dragging operations for the current shooting screen of the camera in the embodiment of the present application are all based on the movement adjustment of the current screen, the use of relative position movement instructions is more suitable for realizing the movement control of the pan / tilt in the horizontal and vertical directions. For example, the Visca instruction format usually starts with 0x81, followed by the specific command type and parameters (hexadecimal). When the relative position movement instruction is "81 01 06 03 VVWW 0Y 0Y 0Y 0Y 0Z 0Z 0Z 0Z FF", the command is interpreted as: 81: command start byte, representing the device address and message type; 01: control command, representing the start of the control command; 06: operation type, representing the Pan-Tilt Drive function command; 03: represents the relative position movement instruction; VV: Pan speed horizontal movement speed; WW: Tilt speed tilt / vertical movement speed; 0Y 0Y 0Y 0Y: pan position, that is, the relative movement position of the camera on the horizontal axis, divided into four bytes: high byte and low byte; 0Z 0Z 0Z 0Z: tilt / vertical position, that is, the relative movement position of the camera on the vertical axis, divided into four bytes: high byte and low byte; FF: end byte, marking the end of the instruction.
[0077] Optionally, in the embodiment of the present application, it is assumed that the operation moving distance calculated by the dragging behavior is as follows: horizontal coordinate offset: x =40; vertical coordinate offset: offset y =30; drag distance: d=50; drag angle: θ=37°. Since the gimbal is controlled by the relative position movement command, the first four fixed hexadecimal numerical parts of the command "81010603" can be obtained first. "VV" and "WW" represent the horizontal and vertical movement speeds of the gimbal. The calculation of the gimbal movement speed is not involved here, so a default movement speed of 0x08 can be used for the time being to represent it, and the command "81 01 06 03 08 08" can be obtained.
[0078] Furthermore, "0Y 0Y 0Y 0Y" represents the distance the gimbal moves in the horizontal direction. The moving distance of the stepper motor gimbal is expressed as a step length, and the length of each step represents a certain angle of rotation of the gimbal. In the embodiment of the present application, the gimbal moves one step in the horizontal direction, that is, rotates 0.0769 degrees as an example. In order to use different step length intervals to distinguish the different horizontal movement directions of the gimbal (that is, to distinguish between left movement and right movement), the range of the moving step length is [0xffff, 0xf670] from the 0 point (the middle position directly in front of the gimbal) to the left, and [0x0000, 0x0990] from the 0 point to the right. In the preset step length conversion rule, it can be stipulated that 1 pixel is converted into 5 steps of gimbal movement. Then, according to the horizontal coordinate offset, the step length that the camera needs to move in the horizontal direction is calculated as: step = offset x ×5=40×5=200, converted to hexadecimal is 0x00c8, where offset x If it is a positive number, then the obtained step is also a positive number. It can be seen that the horizontal direction of the drag operation is to the right, so the relative gimbal needs to turn the camera to the left to move the picture to the right. Based on the range of the gimbal's left movement [0xffff, 0xf670], the corresponding moving step of the gimbal is calculated as step x =0xffff-0x00c8=0xff37. It should be noted that if the PTZ needs to move to the right, since the range of the PTZ to move to the right is [0x0000, 0x0990], the calculated camera movement step length can be directly equivalent to the movement step length of the PTZ, and there is no need to perform a subtraction calculation similar to the left movement. Therefore, based on the instruction "81 01 06 03 08 08", the instruction "81 01 06 03 08 08 0f0f 03 07" is obtained.
[0079] Furthermore, "0Z 0Z 0Z 0Z" represents the vertical movement distance of the gimbal. In the embodiment of the present application, the gimbal moves one step in the vertical direction, that is, rotates 0.0714 degrees as an example. In order to use different step intervals to distinguish the different vertical movement directions of the gimbal (that is, to distinguish between upward movement and downward movement), the range of the moving step is [0x0000, 0x0510] from the 0 point (the middle position directly in front of the gimbal), and the range of moving from the 0 point downward is [0xfad5, 0xffe5]. Based on the preset step conversion rule and the vertical coordinate offset: offset y =30, we can calculate that the step length that the camera needs to move in the vertical direction is: step = offset y ×5=30×5=150, converted to hexadecimal is 0x0096, where offset yIf it is a positive number, then the obtained step is also a positive number. It can be known that the vertical direction of the drag operation is upward, so the relative gimbal needs to rotate the camera downward to move the picture upward. Based on the downward movement range of the gimbal [0xfad5, 0xffe5], the corresponding moving step of the gimbal is calculated as step x = 0xffe5-0x0096 = 0xff4f. It should be noted that if the PTZ needs to move upward, since the upward movement range of the PTZ is [0x0000, 0x0510], the calculated camera movement step length can be directly equivalent to the movement step length of the PTZ, and there is no need to perform a subtraction calculation similar to the downward movement. Therefore, based on the instruction "81 01 06 03 08 08 0f 0f 03 07", the instruction "81 01 06 03 0808 0f 0f 03 07 0f 0f 04 0f" is obtained. Finally, the final instruction is added with the instruction end value FF, and the final instruction is "81 01 06 03 0808 0f 0f 03 070f 0f 04 0f ff". The display device sends the pan / tilt control instruction to the camera pan / tilt device in the form of UDP, so that the camera pan / tilt device completes the effect of controlling the pan / tilt movement of this drag operation based on the control instruction.
[0080] In another feasible implementation, when the user wants to zoom in or out the screen, he or she usually expresses his or her control intention by pinching and pulling with two fingers on the screen, or sliding up and down with the mouse wheel. In the embodiment of the present application, the specific calculation process of the pan / tilt control instruction when the zoom operation occurs is described by taking the screen adjustment operation as the zoom operation as an example. The zoom operation may specifically include but is not limited to touch pinching and pulling operation, mouse wheel operation, and the like.
[0081] Optionally, the conversion calculation process between the zoom operation and the pan-tilt control instruction is similar to the drag operation. The zoom adjustment amount for the captured image is determined based on the zoom operation, and then the zoom position is calculated based on the current zoom position of the captured image and the zoom adjustment amount to obtain the target zoom position corresponding to the camera pan-tilt device. The instruction required to move the pan-tilt to the target zoom position is further calculated as the pan-tilt control instruction.
[0082] Optionally, there are two types of calculations for zooming behavior. One is the zooming behavior achieved by the pinch-and-pull operation. During the pinch-and-pull operation, the change in the user's pinch-and-pull operation can be used to calculate the zoom adjustment amount for the captured image by the pinch-and-pull operation. The specific calculation process for the pinch-and-pull operation is as follows: Figure 6 , Figure 6 This is an example diagram of a behavior calculation process based on a touch pinch-pull operation provided in an embodiment of the present application. Figure 6As shown, in the captured image, one pixel is used as one coordinate unit to determine the coordinates of two touch points (start x1 , start y1 ) and (start x2 , start y2 ) When the pinch-to-pull operation is completed, the two touch points (current x1 , current y1 ) and (current x2 , current y2 ) Based on the first distance and the second distance, the difference between the two distances d=d2-d1 is calculated to obtain the zoom distance d, which is the zoom adjustment amount corresponding to the touch pinch-pull operation. After the zoom distance d is obtained, the subsequent zoom control instruction conversion can be performed.
[0083] Furthermore, since there is no relative zoom command directly used to implement a fixed-step zoom in the Visca protocol, the embodiment of the present application uses an absolute position zoom instruction and some programming techniques to achieve the effect of a fixed-step zoom. For example, when the Visca absolute position zoom instruction is "81 01 04 47 0p 0q 0r 0s FF", the command is interpreted as: 81: start byte, indicating the device address and message type (for example, a camera with an address of 1); 01: control command; 04: operation type (Camera Operation); 47: Zoom absolute position command; 0p 0q 0r 0s: indicating the value of the relative zoom (a 4-byte hexadecimal number); FF: end byte, marking the end of the instruction.
[0084] Optionally, in the embodiment of the present application, it is assumed that the zoom adjustment amount obtained by the above calculation is taken as an example: zoom distance: d = 50. Since the gimbal implements zoom control according to the absolute position zoom instruction, the current zoom position zoom of the gimbal lens can be read through the instruction "81 09 0447 FF". Assuming that the current zoom position zoom = 500, then based on the current zoom position, combined with the zoom distance: d = 50, the new target zoom position can be calculated. In the preset zoom conversion rule, it can be stipulated that 1 pixel is converted into a lens zoom distance of 10. Because the zoom distance d is a positive number, the gimbal lens screen should be zoomed in, and the new lens zoom position can be obtained as: zoom new=500+50×10=1000. If d is a negative number, subtract d×10 from the current zoom value. After each calculation, record the new zoom position as the current zoom value for the next calculation. According to the new target zoom position, the absolute zoom instruction "81 01 04 47 01 00 00 00 FF" can be obtained. The display device sends the PTZ control instruction to the camera PTZ device in UDP form, so that the camera PTZ device can complete the effect of controlling the movement of the PTZ by the touch pinch and pull operation based on the control instruction.
[0085] Optionally, in addition to being implemented by directly touching the display screen, the zoom operation of the captured image can also be implemented by the scroll wheel of the mouse corresponding to the display device. In order to realize the control of the zoom of the image by the mouse wheel, the conversion calculation rule between the scrolling amount of the wheel and the zoom adjustment amount, that is, the zoom distance, can be pre-set. When the zoom operation is a mouse wheel operation, the zoom adjustment amount corresponding to the mouse wheel operation can be calculated based on the preset scrolling zoom amount calculation rule according to the scrolling amount of the mouse wheel operation. For example, in the preset scrolling zoom amount calculation rule, it is set that each scroll of the wheel corresponds to a zoom distance of 10 pixels. When the scrolling amount of the mouse wheel operation is 3, the zoom adjustment amount of 30 pixels can be calculated, that is, the zoom distance d=30, and then the conversion calculation of the pan / tilt zoom control instruction can be performed based on the zoom distance d=30.
[0086] S404: The picture adjustment operation is a drag operation, and the corresponding moving speed of the camera pan / tilt device is calculated based on the drag speed of the drag operation, and a pan / tilt control instruction is generated according to the adjustment amount and the moving speed.
[0087] Optionally, when the camera pan / tilt device is rotating, its speed is often set by default or actively by the user. However, if the speed is too slow, the user will feel stuck, and if the speed is too fast, it is not convenient for the user to debug. Therefore, such speed control method is not accurate and flexible enough. Then, in the embodiment of the present application, considering the speed of the user's touch operation and mouse operation when the user is operating, it also reflects the speed of the picture adjustment speed required by the user. Based on this, the movement speed of the camera pan / tilt device corresponding to the current user operation can be adaptively calculated according to the speed of the user operation.
[0088] Specifically, taking the drag operation as an example, according to the speed formula, the drag speed of the drag operation can be obtained as v = s (drag distance) / t (drag time), thereby calculating the speed of the gimbal movement. Among them, the drag distance is calculated based on the coordinates of the touch point before and after the drag, and the drag time can be calculated by recording the drag start time time start And the drag end time end , calculate the time interval between the two and get t = timeend -time start The unit of the drag operation speed v is: pixels per millisecond. Since the horizontal and vertical movements of the camera pan / tilt device are controlled separately, when converting the pan / tilt movement speed according to the drag operation speed, we can assume that the conversion rule is that the pan / tilt horizontal movement speed and vertical movement speed are both twice the drag operation speed v, and the pan / tilt horizontal movement speed v can be calculated. x =2×v, vertical direction v y =2×v, and then convert it into hexadecimal and substitute it into the relative position movement instruction of the pan / tilt, and get "81 01 06 03 Vx vy 0f 0f 03 07 0f 0f 04 0f". It should be noted that the adaptive conversion rule of the pan / tilt movement speed can be specifically set according to the software and hardware parameters of the camera, and the solution provided in the embodiment of the present application is not the only solution. Moreover, although the movement speed of the pan / tilt needs to be calculated separately, it can still support simultaneous movement in the horizontal and vertical directions without the need to move horizontally first and then vertically or vertically first and then horizontally. Finally, after calculating the movement speed and the adjustment amount, the display device sends the complete pan / tilt control instruction corresponding to this operation to the camera pan / tilt device in the form of UDP, so that the camera pan / tilt device completes the effect of controlling the movement of the pan / tilt in this picture adjustment operation based on the control instruction.
[0089] S406: The picture adjustment operation is a zoom operation, and a lens distance change speed corresponding to the camera pan / tilt device is calculated based on the zoom speed of the zoom operation, and a pan / tilt control instruction is generated according to the adjustment amount and the lens distance change speed.
[0090] In another feasible implementation, similar to the calculation process of the gimbal adjustment speed during the drag operation, when the screen adjustment operation is a zoom operation, the gimbal adjustment speed can also be determined based on the user's own operation speed. When the user operates quickly, the gimbal can also be adjusted faster, and when the user operates slowly, the gimbal will also adjust slowly.
[0091] Specifically, according to the start time and end time of the user's zoom operation, the operation duration of the zoom operation is determined, and then combined with the zoom adjustment amount of the zoom operation for the captured image, the zoom speed v=s (zoom adjustment amount) / t (zoom time) of the zoom operation can be obtained. On the basis of the zoom speed, the specific lens distance change speed of the pan-tilt movement is further calculated according to the reasonable ratio of the preset lens distance change speed and the zoom speed. For example, the lens distance change speed can be consistent with the zoom speed v, or twice the zoom speed v, so that the lens distance change speed is adaptively and reasonably calculated with the user's operation speed. After calculating the lens distance change speed and the adjustment amount, the display device sends the complete pan-tilt control instruction corresponding to this operation to the camera pan-tilt device in the form of UDP, so that the camera pan-tilt device completes the effect of controlling the pan-tilt movement of this screen adjustment operation based on the control instruction.
[0092] In an embodiment of the present application, a camera picture adjustment method is provided. In the specific implementation process of picture adjustment, the adjustment amount made to the picture in the picture is first calculated based on the operation, and then the adjustment amount required by the pan-tilt is calculated according to the adjustment amount; further, the moving speed of the pan-tilt is adaptively calculated according to the speed of the operation, and finally the control instruction is generated by combining the adjustment amount and the moving speed. By standardizing the calculation of the pan-tilt adjustment amount and the adaptive calculation of the pan-tilt moving speed, the operation process of pan-tilt movement is simplified. When the user wants to move the angle and shooting position of the picture by touch or mouse, the operation moving distance of the picture can be determined by dragging the operation, so that according to the command protocol of the pan-tilt and the preset step conversion rule, the operation moving distance is converted into the moving step of the pan-tilt, so that the subsequent pan-tilt controls the camera to rotate the corresponding step to shoot the target picture that meets the user's needs. On various touch and non-touch display devices, the picture can be directly operated through a variety of operation methods to achieve instant and flexible picture position adjustment. When the user wants to adjust the screen size or zoom the screen by touch or mouse, the zoom adjustment amount of the shooting screen can be directly calculated, and then the new target zoom position can be calculated based on the current zoom position, so that the screen zoom adjustment can be performed simply and quickly on various touch and non-touch display devices, and the zoom result can be easily and instantly reflected in the changes of the shooting screen.
[0093] See also Figure 7 , Figure 7 This is a structural block diagram of a camera image adjustment device provided in an embodiment of the present application. Figure 7 As shown, the camera picture adjustment device 700 is applied to a display device, and the display device is connected to a camera pan / tilt device, and includes:
[0094] The picture display module 710 is used to receive and display the shooting pictures collected by the camera pan / tilt device;
[0095] The operation adjustment module 720 is used to identify the picture adjustment operation triggered on the shooting picture and determine the PTZ control instruction corresponding to the picture adjustment operation;
[0096] The pan / tilt control module 730 is used to send the pan / tilt control instruction to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
[0097] Optionally, the operation adjustment module 720 is further used to determine a target adjustment amount for the captured image based on the image adjustment operation, and calculate an adjustment amount corresponding to the camera pan / tilt device according to the target adjustment amount; and generate a pan / tilt control instruction according to the adjustment amount.
[0098] Optionally, the picture adjustment operation is a drag operation, and the operation adjustment module 720 is further used to calculate the corresponding moving speed of the camera pan / tilt device based on the drag speed of the drag operation, and generate a pan / tilt control instruction according to the adjustment amount and the moving speed.
[0099] Optionally, the picture adjustment operation is a zoom operation, and the operation adjustment module 720 is further used to calculate the lens distance change speed corresponding to the camera pan / tilt device based on the zoom speed of the zoom operation, and generate a pan / tilt control instruction according to the adjustment amount and the lens distance change speed.
[0100] Optionally, the picture adjustment operation is a drag operation, and the operation adjustment module 720 is also used to determine the operation movement distance for the shooting picture based on the drag operation; perform step conversion calculation on the operation movement distance according to a preset step conversion rule to obtain the movement step corresponding to the camera pan / tilt device.
[0101] Optionally, the operation adjustment module 720 is also used to determine the first coordinates of the touch point in the shooting picture when the drag operation starts, and the second coordinates of the touch point in the shooting picture when the drag operation ends; and calculate the operation movement distance corresponding to the drag operation based on the first coordinates and the second coordinates.
[0102] Optionally, the picture adjustment operation is a zoom operation, and the operation adjustment module 720 is also used to determine the zoom adjustment amount for the captured picture based on the zoom operation; calculate the zoom position according to the current zoom position and zoom adjustment amount of the captured picture to obtain the target zoom position corresponding to the camera pan / tilt device.
[0103] Optionally, when the zoom operation is a touch pinch-and-pull operation, the operation adjustment module 720 is also used to determine a first distance between two touch points in the shooting screen when the touch pinch-and-pull operation starts, and a second distance between the two touch points in the shooting screen when the touch pinch-and-pull operation ends; and calculate the zoom adjustment amount corresponding to the touch pinch-and-pull operation based on the first distance and the second distance.
[0104] Optionally, when the zoom operation is a mouse wheel operation, the operation adjustment module 720 is further configured to determine a wheel scrolling amount of the mouse wheel operation, and calculate a zoom adjustment amount corresponding to the mouse wheel operation according to a preset scrolling zoom amount calculation rule.
[0105] In an embodiment of the present application, a camera picture adjustment device is provided, which is applied to a display device, and the display device is connected to a camera pan / tilt device. Among them, the picture display module is used to receive and display the shooting picture collected by the camera pan / tilt device; the operation adjustment module is used to identify the picture adjustment operation triggered on the shooting picture, and determine the pan / tilt control instruction corresponding to the picture adjustment operation; the pan / tilt control module is used to send the pan / tilt control instruction to the camera pan / tilt device, so that the camera pan / tilt device is adjusted based on the pan / tilt control instruction. While the display device continues to display the picture collected by the camera pan / tilt device in real time, the user can directly perform picture adjustment operations on the shooting picture. The display device calculates the control instructions of the camera pan / tilt device based on the picture adjustment operation and enables the camera pan / tilt device to execute the control instructions. In this way, the process and results of the camera adjustment can also be continuously displayed without interrupting the shooting progress, and can give the user an easy-to-operate experience, making the entire picture adjustment process simpler and more accurate.
[0106] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.
[0107] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 800 may include: at least one electronic device processor 801 , at least one network interface 804 , a user interface 803 , a memory 805 , and at least one communication bus 802 .
[0108] The communication bus 802 is used to realize the connection and communication between these components.
[0109] The user interface 803 may include a display screen (Display) and a camera (Camera), and the optional user interface 803 may also include a standard wired interface and a wireless interface.
[0110] Among them, the network interface 804 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The network interface 804 is used to establish a communication link with the camera pan-tilt device corresponding to the electronic device 800, thereby receiving the shooting picture data collected by the camera pan-tilt device.
[0111] Among them, the electronic device processor 801 may include one or more processing cores. The electronic device processor 801 uses various interfaces and lines to connect various parts within the entire electronic device 800, and executes various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 805, and calling data stored in the memory 805. Optionally, the electronic device processor 801 can be implemented in at least one hardware form of digital signal processing (DigitalSignal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The electronic device processor 801 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processor (GraphicsProcessing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the electronic device processor 801, and it can be implemented separately through a chip.
[0112] Among them, the memory 805 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 805 includes a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 805 may optionally be at least one storage device located away from the aforementioned electronic device processor 801. As Figure 8 As shown, the memory 805 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a camera picture adjustment program.
[0113] exist Figure 8In the electronic device 800 shown, the user interface 803 is mainly used to provide an input interface for the user and obtain the data input by the user; and the electronic device processor 801 can be used to call the camera picture adjustment program stored in the memory 805, and specifically perform the following operations:
[0114] Receive and display the images captured by the camera pan / tilt device;
[0115] Identify the image adjustment operation triggered on the shooting image, and determine the gimbal control instruction corresponding to the image adjustment operation;
[0116] The pan / tilt control instruction is sent to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
[0117] In some embodiments, when the electronic device processor 801 executes the pan-tilt control instruction corresponding to the picture adjustment operation, it specifically performs the following steps: determines the target adjustment amount for the captured picture based on the picture adjustment operation, and calculates the adjustment amount corresponding to the camera pan-tilt device according to the target adjustment amount; generates the pan-tilt control instruction according to the adjustment amount.
[0118] In some embodiments, the picture adjustment operation is a drag operation. When the electronic device processor 801 generates a pan / tilt control instruction based on the adjustment amount, it specifically performs the following steps: calculates the corresponding moving speed of the camera pan / tilt device based on the drag speed of the drag operation, and generates a pan / tilt control instruction based on the adjustment amount and the moving speed.
[0119] In some embodiments, the picture adjustment operation is a zoom operation. When the electronic device processor 801 generates a pan-tilt control instruction based on the adjustment amount, it specifically performs the following steps: calculates the lens distance change speed corresponding to the camera pan-tilt device based on the zoom speed of the zoom operation, and generates a pan-tilt control instruction based on the adjustment amount and the lens distance change speed.
[0120] In some embodiments, the picture adjustment operation is a drag operation. When the electronic device processor 801 determines the target adjustment amount for the captured picture based on the picture adjustment operation and calculates the adjustment amount corresponding to the camera pan / tilt device based on the target adjustment amount, it specifically performs the following steps: determining the operation moving distance for the captured picture based on the drag operation; performing step conversion calculation on the operation moving distance according to a preset step conversion rule to obtain the moving step corresponding to the camera pan / tilt device.
[0121] In some embodiments, when the electronic device processor 801 determines the operation moving distance for the shooting screen based on the drag operation, it specifically performs the following steps: determining the first coordinates of the touch point in the shooting screen when the drag operation starts, and the second coordinates of the touch point in the shooting screen when the drag operation ends; calculating the operation moving distance corresponding to the drag operation based on the first coordinates and the second coordinates.
[0122] In some embodiments, the picture adjustment operation is a zoom operation. When the electronic device processor 801 determines the target adjustment amount for the captured picture based on the picture adjustment operation, and calculates the adjustment amount corresponding to the camera pan / tilt device according to the target adjustment amount, it specifically performs the following steps: determines the zoom adjustment amount for the captured picture based on the zoom operation; calculates the zoom position according to the current zoom position of the captured picture and the zoom adjustment amount, and obtains the target zoom position corresponding to the camera pan / tilt device.
[0123] In some embodiments, when the zoom operation is a touch pinch-and-pull operation, the electronic device processor 801 specifically performs the following steps when determining the zoom adjustment amount for the captured image based on the zoom operation: determining a first distance between two touch points in the captured image when the touch pinch-and-pull operation starts, and a second distance between the two touch points in the captured image when the touch pinch-and-pull operation ends; and calculating the zoom adjustment amount corresponding to the touch pinch-and-pull operation based on the first distance and the second distance.
[0124] In some embodiments, when the zoom operation is a mouse wheel operation, the electronic device processor 801 specifically performs the following steps when determining the zoom adjustment amount for the captured image based on the zoom operation: determining the wheel scrolling amount of the mouse wheel operation, and calculating the zoom adjustment amount corresponding to the mouse wheel operation according to a preset scrolling zoom amount calculation rule.
[0125] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0126] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the above process or function according to the embodiment of this specification is generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above computer instructions can be stored in a computer-readable storage medium or transmitted by the above computer-readable storage medium. The above computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The above computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The above-mentioned available media can be magnetic media (for example, floppy disks, hard disks, tapes), optical media (for example, digital versatile discs (DVD)), or semiconductor media (for example, solid state drives (SSD)), etc.
[0128] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] The above is a description of a camera picture adjustment method, device and electronic device provided by the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A camera image adjustment method, characterized in that: Applied to a display device, the display device is connected to a camera pan / tilt device, and the method comprises: Receiving and displaying the captured images from the camera pan / tilt device; Identifying an image adjustment operation triggered on the shooting image, and determining a pan / tilt control instruction corresponding to the image adjustment operation; The pan / tilt control instruction is sent to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
2. The method according to claim 1, characterized in that The determining of the PTZ control instruction corresponding to the picture adjustment operation includes: Determining a target adjustment amount for the captured image based on the image adjustment operation, and calculating a corresponding adjustment amount for the camera pan / tilt device according to the target adjustment amount; A pan / tilt control instruction is generated according to the adjustment amount.
3. The method according to claim 2, characterized in that The picture adjustment operation is a drag operation, and the generating of the pan / tilt control instruction according to the adjustment amount includes: The moving speed of the camera pan / tilt device is calculated based on the dragging speed of the dragging operation, and a pan / tilt control instruction is generated according to the adjustment amount and the moving speed.
4. The method according to claim 2, characterized in that: The picture adjustment operation is a zoom operation, and the generating of the pan / tilt control instruction according to the adjustment amount includes: The lens distance change speed corresponding to the camera pan / tilt device is calculated based on the zoom speed of the zoom operation, and a pan / tilt control instruction is generated according to the adjustment amount and the lens distance change speed.
5. The method according to claim 2, characterized in that: The picture adjustment operation is a drag operation, and determining a target adjustment amount for the shooting picture based on the picture adjustment operation, and calculating an adjustment amount corresponding to the camera pan / tilt device according to the target adjustment amount, includes: determining an operation moving distance for the shooting picture based on the drag operation; The operation moving distance is calculated by step conversion according to a preset step conversion rule to obtain the moving step length corresponding to the camera pan / tilt device.
6. The method according to claim 5, characterized in that The determining the operation moving distance for the shooting picture based on the drag operation includes: Determine a first coordinate of the touch point in the captured image when the drag operation starts, and a second coordinate of the touch point in the captured image when the drag operation ends; The operation moving distance corresponding to the drag operation is calculated based on the first coordinate and the second coordinate.
7. The method according to claim 2, characterized in that The picture adjustment operation is a zoom operation, and determining a target adjustment amount for the captured picture based on the picture adjustment operation, and calculating an adjustment amount corresponding to the camera pan / tilt device according to the target adjustment amount, includes: Determining a zoom adjustment amount for the captured image based on the zoom operation; The zoom position is calculated according to the current zoom position of the shooting picture and the zoom adjustment amount to obtain the target zoom position corresponding to the camera pan / tilt device.
8. The method according to claim 7, characterized in that When the zoom operation is a touch pinch-pull operation, determining the zoom adjustment amount for the captured image based on the zoom operation includes: Determine a first distance between two touch points in the captured image when the touch pinch-pull operation starts, and a second distance between the two touch points in the captured image when the touch pinch-pull operation ends; A zoom adjustment amount corresponding to the touch pinch-and-pull operation is calculated based on the first distance and the second distance.
9. The method according to claim 7, characterized in that: When the zoom operation is a mouse wheel operation, determining the zoom adjustment amount for the captured image based on the zoom operation includes: The scrolling amount of the mouse wheel operation is determined, and the zoom adjustment amount corresponding to the mouse wheel operation is calculated according to a preset scrolling zoom amount calculation rule.
10. A camera image adjustment device, characterized in that: Applied to a display device, the display device is connected to a camera pan / tilt device, and the device comprises: A picture display module, used to receive and display the shooting pictures collected by the camera pan / tilt device; An operation adjustment module, used to identify an image adjustment operation triggered on the shooting image, and determine a pan / tilt control instruction corresponding to the image adjustment operation; The pan / tilt control module is used to send the pan / tilt control instruction to the camera pan / tilt device, so that the camera pan / tilt device makes adjustments based on the pan / tilt control instruction.
11. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 9 when executing the program.