CN117082345A - PTZ camera frame selection screen control holder method and device - Google Patents

PTZ camera frame selection screen control holder method and device Download PDF

Info

Publication number
CN117082345A
CN117082345A CN202311337792.7A CN202311337792A CN117082345A CN 117082345 A CN117082345 A CN 117082345A CN 202311337792 A CN202311337792 A CN 202311337792A CN 117082345 A CN117082345 A CN 117082345A
Authority
CN
China
Prior art keywords
value
ptz
screen
frame selection
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311337792.7A
Other languages
Chinese (zh)
Inventor
王阳
吕建忠
陈明亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhiguanghailian Big Data Technology Co ltd
Zhiguang Hailian Tianjin Big Data Technology Co ltd
Original Assignee
Zhiguanghailian Big Data Technology Co ltd
Zhiguang Hailian Tianjin Big Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhiguanghailian Big Data Technology Co ltd, Zhiguang Hailian Tianjin Big Data Technology Co ltd filed Critical Zhiguanghailian Big Data Technology Co ltd
Priority to CN202311337792.7A priority Critical patent/CN117082345A/en
Publication of CN117082345A publication Critical patent/CN117082345A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/69Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses a method and a device for controlling a cradle head by a PTZ camera frame screen. The application comprises the following steps: a method of PTZ camera frame selection screen control pan-tilt comprising: acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture; determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise starting point coordinates and end point coordinates during frame selection; acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length; calculating a final PTZ value according to the screen information, the frame selection coordinates and the camera information, wherein the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; the camera is adjusted according to the final PTZ value. The application solves the problem that the direction focal length of the cradle head needs to be manually adjusted when a user views the target in a directional manner in the related art.

Description

PTZ camera frame selection screen control holder method and device
Technical Field
The application relates to the technical field of video monitoring, in particular to a method and a device for controlling a PTZ camera frame screen selection control holder.
Background
In recent years, through the development and construction of cities, monitoring equipment is widely applied in various fields, video monitoring equipment is arranged in various places, and meanwhile, the requirements of people are continuously improved along with the improvement of life quality, so that the users want to pay attention to panoramic information and pay attention to picture details of interest to the users. Therefore, a method for a user to quickly rotate a camera pan and zoom in on a focused picture by selecting a monitor picture using a mouse frame is needed. By default, a relatively wide field of view screen is seen, and when a point of interest in the screen is found, the point of interest can be focused to the middle of the screen through a mouse-over operation, and screen elements are enlarged.
In the prior art, most cameras are controlled through an actual cradle head, if a user needs to check a certain detail in a monitoring picture, the operation is inconvenient and the efficiency is not high because the operation is completed through the cooperation of an eight-direction adjusting button of the actual cradle head and a focal length amplifying button.
Therefore, currently, if a user wants to zoom in and view a certain point in a video picture, the user needs to adjust the direction and focal length of the pan-tilt camera to view the point.
Aiming at the technical problem that a user needs to manually adjust the direction focal length of the cradle head when looking at a target in a directional manner in the related art, an effective solution is not proposed at present.
Disclosure of Invention
The application aims to provide a method and a device for controlling a cradle head by a PTZ camera frame screen selection, which are used for solving the problem that a user needs to manually adjust the direction focal length of the cradle head when looking at a target in a directional manner in the related art.
According to one aspect of the application, a method for controlling a cradle head by a PTZ camera frame selection screen is provided. The method comprises the following steps: acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture; determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise starting point coordinates and end point coordinates during frame selection; acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length; calculating a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a width and height value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; the camera is adjusted according to the final PTZ value.
Further, projecting an original picture of the camera onto a screen, wherein the aspect ratio of the original picture is the same as that of a screen display picture; and determining an origin of the coordinate axes, wherein the origin is the upper left corner of the screen display picture.
Further, calculating a center point offset according to the screen information and the frame selection information, wherein the center point offset comprises a horizontal offset and a vertical offset, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,as the amount of the horizontal offset to be used,is the abscissa of the origin coordinates,is the abscissa of the end point coordinates,for the width of the screen display,as a result of the vertical offset,is the ordinate of the origin coordinates,squatting at endpoint coordinatesThe number of the mark is set to be equal to the number of the mark,is the high of the screen display.
Further, calculating the horizontal increment and the vertical increment according to the offset of the central point, the horizontal viewing angle, the vertical viewing angle and the focal length, wherein the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in a horizontal increment of the number of the horizontal increments,for a horizontal viewing angle,as the focal length of the lens is,in a vertical increment of the number of the vertical increments,is a vertical viewing angle.
Further, calculating the horizontal transfer angle and the vertical transfer angle according to the horizontal increment, the vertical increment, the horizontal rotation angle and the vertical rotation angle, wherein the calculation formula is as follows:wherein, the method comprises the steps of, wherein,for the horizontal transfer angle to be the same,is a horizontal rotation angle, and the rotation angle is equal to the horizontal rotation angle,for the vertical transfer angle to be the same,is a vertical rotation angle.
Further, a scaling value is calculated according to the screen information, the frame selection coordinates and the focal length, and when the value of the abscissa of the starting point coordinate is larger than the value of the abscissa of the ending point coordinate, the calculation formula is as follows:when the value of the abscissa of the starting point coordinate is smaller than that of the abscissa of the ending point coordinate, the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to scale the value of the scaling factor,for the width of the screen display,is the abscissa of the origin coordinates,is the abscissa of the endpoint coordinates.
Further, a zoom value is calculated according to the zoom value, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to achieve the zoom value,is the focal length.
According to another aspect of the application, a device for controlling a cradle head by a frame selection screen of a PTZ camera is provided. The device comprises: the first acquisition unit is used for acquiring the width and height values of the screen display picture, and determining coordinate axes according to the width and height values, wherein the width and height values comprise the width of the screen display picture and the height of the screen display picture; the determining unit is used for determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise a starting point coordinate and an end point coordinate during frame selection; a second acquisition unit configured to acquire camera information including an initial PTZ value, a horizontal angle of view, and a vertical angle of view, wherein the initial PTZ value includes a horizontal angle of rotation, a vertical angle of rotation, and a focal length; the computing unit is used for computing a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a wide-high value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; and an adjusting unit for adjusting the camera according to the final PTZ value.
To achieve the above object, according to another aspect of the present application, there is provided a computer-readable storage medium including a stored program, wherein the program performs a method of controlling a cradle head of a PTZ camera frame screen of any one of the above.
To achieve the above object, according to another aspect of the present application, there is provided a processor for executing a program, wherein the program performs a method of framing a PTZ camera with a screen control cradle head as set forth in any one of the above.
According to the application, the following steps are adopted: a method of PTZ camera frame selection screen control pan-tilt comprising: acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture; determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise starting point coordinates and end point coordinates during frame selection; acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length; calculating a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a width and height value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; according to the final PTZ value, the problem that the direction focal length of the cradle head needs to be manually adjusted when a user views a target in a directional manner in the related art is solved, and the effect that the direction focal length of the cradle head camera can be automatically adjusted through frame selection in a video picture is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for controlling a PTZ camera frame screen to control a pan/tilt head according to an embodiment of the present application;
fig. 2 is a schematic diagram of an apparatus for controlling a pan/tilt head of a frame selection screen of a PTZ camera according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
Examples
According to the embodiment of the application, a method for controlling a cradle head by a PTZ camera frame selection screen is provided.
Fig. 1 is a flowchart of a method for a PTZ camera to frame screen control a pan/tilt head according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture;
the upper left corner of the screen is used as the origin of the coordinate axis, and the coordinate axis is marked by the pixels of the screen, so that the starting point coordinate and the end point coordinate of the frame selection action can be obtained when the mouse frames the content.
Step S102, determining frame selection coordinates according to coordinate axes, wherein the frame selection coordinates comprise a starting point coordinate and an end point coordinate during frame selection;
the frame selection coordinates are obtained, the subsequent calculation is convenient, the frame selection can be performed from any direction, the maximum value of the abscissa of the starting point coordinates and the ending point coordinates is the width of the screen, and the maximum value of the ordinate is the height of the screen. The frame selection operation is not necessarily generated by manually operating the mouse by a user, and can be realized by using program instructions, and the key point of the operation is to frame-select picture elements played in real time in a screen display picture.
Step S103, obtaining camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length;
the method and the device acquire the initial PTZ value because the core thought of rotating the PTZ of the camera by the frame selection screen to perform pan-tilt control is to calculate the offset under the PTZ state of the current camera, then add the horizontal increment and the vertical increment on the basis of the current horizontal rotation angle and the vertical rotation angle, and reset the PTZ of the camera to achieve the effect of rotation and focusing.
In general, when the camera is installed, the horizontal view angle and the vertical view angle are not north and north, and because the monitoring equipment is generally used for monitoring the field of view on the ground, the installation is in a overlooking angle, and then the view angle deviation under the default condition exists.
Step S104, calculating a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a wide-high value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value;
above-mentioned ground, obtain PTZ value, adjust the camera according to final PTZ value, adjust the level and vertical angle and the focus of camera, make the camera can carry out automatic adjustment according to the regional that the user's frame selected, make the user can watch the detail of mark point.
Step S105, adjusting the camera according to the final PTZ value.
And the camera cradle head rotates and focuses according to the horizontal transfer angle, the vertical transfer angle and the zoom value, so that the accurate positioning target and the amplification of the mouse screen frame selection control cradle head can be realized.
The application does not need to control the actual cradle head when the same function is finished, and only needs to select by a mouse frame in a monitoring picture. For example, when a user wants to view the details of doors and windows of small houses in a monitoring picture, or if people and animals exist at a doorway, the user only needs to frame and select the small houses, the monitoring picture automatically rotates a camera holder, and the focal length is enlarged according to the requirement that the frame and select contents can be completely presented. The operation is very convenient, and the efficiency is also high.
In an alternative embodiment, the original picture of the camera is projected onto the screen, the aspect ratio of the original picture being the same as the aspect ratio of the screen display picture; and determining an origin of the coordinate axes, wherein the origin is the upper left corner of the screen display picture.
The initial values of the height (h) and the width (w) of the original picture of the monitoring video are agreed, so that the picture content and the resolution have a mapping relation when the video is projected on the display screen. And outputting a monitoring video picture, rendering the monitoring video picture on a display, and when the original picture is projected to the display, enabling the position of the upper left corner (0, 0) of the original picture to correspond to the position of the resolution (0, 0), and similarly enabling the position of the lower right corner (w, h) to correspond to the position of the lower right corner of the resolution of the display. For example, there is a small house in the original picture, and after the small house is projected onto the display, there is a house in the picture, so that the position of the house in the original picture can be calculated, and the position will be between (0, 0) and (w, h). It should be noted that the original frame width and height values w and h are only a preset value, and other values may be adopted, for example, 256×256 and 1024×1024 are all available, and the focus is that the original frame positions corresponding to the frame selection positions can be reversely calculated when the mouse frames the screen according to the preset proportion.
The projection relation of the original picture projected display pictures is utilized, the rotation of the cradle head can be controlled by selecting the display screen by frames, the operation is simple and convenient, the efficiency is higher, and the cradle head is more easily accepted by customers. The frame selection operation replaces the cradle head operation, and a cleaner interface can be obtained.
In an alternative embodiment, the center point offset is calculated according to the screen information and the frame selection information, wherein the center point offset comprises a horizontal offset and a vertical offset, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,as the amount of the horizontal offset to be used,is the abscissa of the origin coordinates,is the abscissa of the end point coordinates,for the width of the screen display,as a result of the vertical offset,is the ordinate of the origin coordinates,is the ordinate of the end point coordinates,is the high of the screen display.
The above-mentioned method is to calculate the offset of the center point of the frame selection area to provide the data basis for the subsequent adjustment of the PTZ, wherein the offset of the center point includes the offset in the horizontal direction and the offset in the vertical direction. The offset difference value calculating method comprises the following steps: the value of the center point of the frame selected area minus the center point of the original picture is divided by the original picture width (high) value.
In an alternative embodiment, the horizontal increment and the vertical increment are calculated according to the center point offset, the horizontal viewing angle, the vertical viewing angle and the focal length, and the calculation formula is:wherein, the method comprises the steps of, wherein,in a horizontal increment of the number of the horizontal increments,for a horizontal viewing angle,as the focal length of the lens is,in a vertical increment of the number of the vertical increments,is a vertical viewing angle.
The above-mentioned calculation of the delta angle requires the aid of the horizontal and vertical viewing angles of the camera at the time of installation. The ratio of the horizontal viewing angle is obtained by dividing the horizontal viewing angle at the time of installation by the current zoom value of the camera, and by default, the camera zoom value is 1, namely the visible field is the maximum field, and if the camera is zoomed through the pan-tilt operation before frame selection, the horizontal viewing angle of the camera becomes smaller, so the ratio of the horizontal viewing angle can be obtained by dividing the horizontal viewing angle at the time of installation of the camera by the zoom value of the current camera. Multiplying this ratio by the horizontal offset yields the angle of the horizontal increment, and the angle of the vertical increment is the same.
In an alternative embodiment, the horizontal transfer angle and the vertical transfer angle are calculated from the horizontal increment, the vertical increment, the horizontal rotation angle, and the vertical rotation angle, with the calculation formula:wherein, the method comprises the steps of, wherein,for the horizontal transfer angle to be the same,is a horizontal rotation angle, and the rotation angle is equal to the horizontal rotation angle,for the vertical transfer angle to be the same,is a vertical rotation angle.
The above-described incremental data of the horizontal and vertical angles are obtained, and then the rotated horizontal rotation angle and vertical rotation angle can be known, and the horizontal transfer angle and vertical transfer angle can be calculated from the vertical increment and horizontal increment.
In an alternative embodiment, the zoom value is calculated according to the screen information, the frame selection coordinates and the focal length, and when the value of the abscissa of the start point coordinate is greater than the value of the abscissa of the end point coordinate, the calculation formula is:when the value of the abscissa of the starting point coordinate is smaller than that of the abscissa of the ending point coordinate, the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to scale the value of the scaling factor,for the width of the screen display,is the abscissa of the origin coordinates,is the abscissa of the endpoint coordinates.
The scaling ratio can be obtained by calculating the relation between the start point coordinates, the end point coordinates, and the screen display width of the frame selection, and the scaling value can be calculated by calculating the screen display ordinate. Scaling may be calculated on both the abscissa and the ordinate.
In an alternative embodiment, the zoom value is calculated from the zoom value, with the formula:wherein, the method comprises the steps of, wherein,in order to achieve the zoom value,is the focal length.
Above-mentioned ground, calculate the zoom value through zoom value and focal length, zoom the camera according to this zoom value, in order to reach the technical effect that enlarges the specific goal.
The application calculates the offset of the center point by combining the original picture width and height values and the coordinates of the frame selection operation. And calculating the relative transfer angles of the horizontal direction and the vertical direction by combining the central point offset with the horizontal view angle and the vertical view angle of the camera and the current scaling value. And calculating the scaling by combining the original picture width value with the coordinates of the framing operation.
According to the method for controlling the cradle head by selecting the screen of the PTZ camera frame, provided by the embodiment of the application, the width and height values of the screen display picture are obtained, the coordinate axis is determined according to the width and height values, and the width and height values comprise the width of the screen display picture and the height of the screen display picture; determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise starting point coordinates and end point coordinates during frame selection; acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length; calculating a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a width and height value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; according to the final PTZ value, the problem that the direction focal length of the cradle head needs to be manually adjusted when a user views a target in a directional manner in the related art is solved, and the effect that the direction focal length of the cradle head camera can be automatically adjusted through frame selection in a video picture is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a device for selecting the screen control holder of the PTZ camera, and the device for selecting the screen control holder of the PTZ camera can be used for executing the method for selecting the screen control holder of the PTZ camera. The following describes a device for controlling a cradle head by a frame selection screen of a PTZ camera provided by the embodiment of the application.
Fig. 2 is a schematic diagram of an apparatus for controlling a pan/tilt/zoom (PTZ) camera frame screen according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: a first obtaining unit 201, configured to obtain a width and height value of a screen display, where the width and height value includes a width of the screen display and a height of the screen display, and determine a coordinate axis according to the width and height value; a determining unit 202, configured to determine frame selection coordinates according to the coordinate axes, where the frame selection coordinates include a start point coordinate and an end point coordinate during frame selection; a second obtaining unit 203, configured to obtain camera information, where the camera information includes an initial PTZ value, a horizontal viewing angle, and a vertical viewing angle, and the initial PTZ value includes a horizontal rotation angle, a vertical rotation angle, and a focal length; a calculating unit 204, configured to calculate a final PTZ value according to screen information, frame selection coordinates, and camera information, where the screen information includes a width and height value of a screen display and coordinate axes, and the final PTZ value includes a horizontal transition angle, a vertical transition angle, and a zoom value; an adjustment unit 205 for adjusting the camera according to the final PTZ value.
In an alternative embodiment, the first obtaining unit 201 includes: a projection subunit, configured to project an original picture of the camera onto the screen, where an aspect ratio of the original picture is the same as an aspect ratio of a screen display picture; and the determining subunit is used for determining an origin of the coordinate axes, wherein the origin is the upper left corner of the screen display picture.
In an alternative embodiment, the computing unit 204 includes: the first calculating subunit is configured to calculate a center point offset according to the screen information and the frame selection information, where the center point offset includes a horizontal offset and a vertical offset, and a calculation formula is as follows:wherein, the method comprises the steps of, wherein,as the amount of the horizontal offset to be used,is the abscissa of the origin coordinates,is the abscissa of the end point coordinates,for the width of the screen display,as a result of the vertical offset,is the ordinate of the origin coordinates,is the ordinate of the end point coordinates,is the high of the screen display.
In an alternative embodiment, the computing unit 204 includes: the second calculating subunit is configured to calculate a horizontal increment and a vertical increment according to the center point offset, the horizontal viewing angle, the vertical viewing angle, and the focal length, where a calculation formula is as follows:wherein, the method comprises the steps of, wherein,in a horizontal increment of the number of the horizontal increments,for a horizontal viewing angle,as the focal length of the lens is,in a vertical increment of the number of the vertical increments,is a vertical viewing angle.
In an alternative embodiment, the computing unit 204 includes: the third calculation subunit is configured to calculate a horizontal transfer angle and a vertical transfer angle according to a horizontal increment, a vertical increment, a horizontal rotation angle and a vertical rotation angle, where a calculation formula is as follows:wherein, the method comprises the steps of, wherein,for the horizontal transfer angle to be the same,is a horizontal rotation angle, and the rotation angle is equal to the horizontal rotation angle,for the vertical transfer angle to be the same,is a vertical rotation angle.
In an alternative embodiment, the computing unit 204 includes: the fourth calculating subunit is configured to calculate a scaling value according to the screen information, the frame selection coordinate, and the focal length, and when the value of the abscissa of the start point coordinate is greater than the value of the abscissa of the end point coordinate, the calculating formula is as follows:when the value of the abscissa of the starting point coordinate is smaller than that of the abscissa of the ending point coordinate, the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to scale the value of the scaling factor,for the width of the screen display,is the abscissa of the origin coordinates,is the abscissa of the endpoint coordinates.
In an alternative embodiment, the computing unit 204 includes: the fifth calculating subunit is configured to calculate a zoom value according to the zoom value, where a calculation formula is:wherein, the method comprises the steps of, wherein,in order to achieve the zoom value,is the focal length.
The device for controlling the cradle head by selecting the screen of the PTZ camera frame is provided by the embodiment of the application, and is used for acquiring the width and height values of a screen display picture through a first acquisition unit 201, and determining coordinate axes according to the width and height values, wherein the width and height values comprise the width of the screen display picture and the height of the screen display picture; a determining unit 202, configured to determine frame selection coordinates according to the coordinate axes, where the frame selection coordinates include a start point coordinate and an end point coordinate during frame selection; a second obtaining unit 203, configured to obtain camera information, where the camera information includes an initial PTZ value, a horizontal viewing angle, and a vertical viewing angle, and the initial PTZ value includes a horizontal rotation angle, a vertical rotation angle, and a focal length; a calculating unit 204, configured to calculate a final PTZ value according to screen information, frame selection coordinates, and camera information, where the screen information includes a width and height value of a screen display and coordinate axes, and the final PTZ value includes a horizontal transition angle, a vertical transition angle, and a zoom value; the adjusting unit 205 is configured to adjust the camera according to the final PTZ value, thereby solving the problem that the user needs to manually adjust the direction focal length of the pan-tilt camera when viewing the target in a directional manner in the related art, and further achieving the effect of automatically adjusting the direction focal length of the pan-tilt camera through frame selection in the video picture.
The apparatus for controlling the pan/tilt head of the PTZ camera frame selection screen comprises a processor and a memory, wherein the first determining unit 201 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can set one or more technical problems to be solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flashRAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application provides a computer readable storage medium, wherein a program is stored on the computer readable storage medium, and the program is executed by a processor to realize the method for controlling a PTZ camera frame screen selection control holder.
The embodiment of the application provides a processor for running a program, wherein the program runs to execute the method for controlling a cradle head by selecting a screen by a PTZ camera frame.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes the following steps when executing the program: acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture; determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise starting point coordinates and end point coordinates during frame selection; acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length; calculating a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a width and height value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; the camera is adjusted according to the final PTZ value.
Further, projecting an original picture of the camera onto a screen, wherein the aspect ratio of the original picture is the same as that of a screen display picture; and determining an origin of the coordinate axes, wherein the origin is the upper left corner of the screen display picture.
Further, calculating a center point offset according to the screen information and the frame selection information, wherein the center point offset comprises a horizontal offset and a vertical offset, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,as the amount of the horizontal offset to be used,is the abscissa of the origin coordinates,is the abscissa of the end point coordinates,for the width of the screen display,as a result of the vertical offset,is the ordinate of the origin coordinates,is the ordinate of the end point coordinates,is the high of the screen display.
Further, calculating the horizontal increment and the vertical increment according to the offset of the central point, the horizontal viewing angle, the vertical viewing angle and the focal length, wherein the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in a horizontal increment of the number of the horizontal increments,for a horizontal viewing angle,as the focal length of the lens is,in a vertical increment of the number of the vertical increments,is a vertical viewing angle.
Further, calculating the horizontal transfer angle and the vertical transfer angle according to the horizontal increment, the vertical increment, the horizontal rotation angle and the vertical rotation angle, wherein the calculation formula is as follows:wherein, the method comprises the steps of, wherein,for the horizontal transfer angle to be the same,is a horizontal rotation angle, and the rotation angle is equal to the horizontal rotation angle,for the vertical transfer angle to be the same,is a vertical rotation angle.
Further, a scaling value is calculated according to the screen information, the frame selection coordinates and the focal length, and when the value of the abscissa of the starting point coordinate is larger than the value of the abscissa of the ending point coordinate, the calculation formula is as follows:when the value of the abscissa of the starting point coordinate is smaller than that of the abscissa of the ending point coordinate, the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to scale the value of the scaling factor,for the width of the screen display,is the abscissa of the origin coordinates,is the abscissa of the endpoint coordinates.
Further, a zoom value is calculated according to the zoom value, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to achieve the zoom value,is the focal length.
The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: a method of PTZ camera frame selection screen control pan-tilt comprising: acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture; determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise starting point coordinates and end point coordinates during frame selection; acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length; calculating a final PTZ value according to screen information, frame selection coordinates and camera information, wherein the screen information comprises a width and height value and a coordinate axis of a screen display picture, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value; the camera is adjusted according to the final PTZ value.
Further, projecting an original picture of the camera onto a screen, wherein the aspect ratio of the original picture is the same as that of a screen display picture; and determining an origin of the coordinate axes, wherein the origin is the upper left corner of the screen display picture.
Further, calculating a center point offset according to the screen information and the frame selection information, wherein the center point offset comprises a horizontal offset and a vertical offset, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,as the amount of the horizontal offset to be used,is the abscissa of the origin coordinates,is the abscissa of the end point coordinates,for the width of the screen display,as a result of the vertical offset,is the ordinate of the origin coordinates,is the ordinate of the end point coordinates,is the high of the screen display.
Further, calculating the horizontal increment and the vertical increment according to the offset of the central point, the horizontal viewing angle, the vertical viewing angle and the focal length, wherein the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in a horizontal increment of the number of the horizontal increments,for a horizontal viewing angle,as the focal length of the lens is,in a vertical increment of the number of the vertical increments,is a vertical viewing angle.
Further, calculating the horizontal transfer angle and the vertical transfer angle according to the horizontal increment, the vertical increment, the horizontal rotation angle and the vertical rotation angle, wherein the calculation formula is as follows:wherein, the method comprises the steps of, wherein,for the horizontal transfer angle to be the same,is a horizontal rotation angle, and the rotation angle is equal to the horizontal rotation angle,for the vertical transfer angle to be the same,is a vertical rotation angle.
Further, a zoom value is calculated according to the screen information, the frame selection coordinates and the focal length, when the value of the abscissa of the starting point coordinates is larger than that of the ending point coordinatesThe value of the abscissa, the calculation formula is:when the value of the abscissa of the starting point coordinate is smaller than that of the abscissa of the ending point coordinate, the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to scale the value of the scaling factor,for the width of the screen display,is the abscissa of the origin coordinates,is the abscissa of the endpoint coordinates.
Further, a zoom value is calculated according to the zoom value, and the calculation formula is as follows:wherein, the method comprises the steps of, wherein,in order to achieve the zoom value,is the focal length.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash memory (flashRAM). Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transshipment) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method for a PTZ camera frame screen control pan/tilt comprising:
acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture;
determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise a starting point coordinate and an end point coordinate during frame selection;
acquiring camera information, wherein the camera information comprises an initial PTZ value, a horizontal viewing angle and a vertical viewing angle, and the initial PTZ value comprises a horizontal rotation angle, a vertical rotation angle and a focal length;
calculating a final PTZ value according to screen information, the frame selection coordinates and the camera information, wherein the screen information comprises a width and height value of a screen display picture and the coordinate axis, and the final PTZ value comprises a horizontal transfer angle, a vertical transfer angle and a zoom value;
and adjusting the camera according to the final PTZ value.
2. The method of claim 1, wherein obtaining a width-to-height value for a screen display, determining a coordinate axis based on the width-to-height value, the width-to-height value comprising a width of the screen display and a height of the screen display, comprises:
projecting an original picture of the camera onto a screen, wherein the aspect ratio of the original picture is the same as that of the screen display picture;
and determining an origin of the coordinate axis, wherein the origin is the upper left corner of the screen display picture.
3. The method of claim 1, wherein calculating a final PTZ value based on screen information, the frame selection coordinates, and the camera information comprises:
calculating a center point offset according to the screen information and the frame selection information, wherein the center point offset comprises a horizontal offset and a vertical offset, and a calculation formula is as follows:wherein->For the horizontal offset, +.>Is the abscissa of the origin coordinate, +.>For the abscissa of the end point coordinate, +.>For the width of the screen display, +.>For the vertical offset, +.>Is the ordinate of the starting point coordinate, +.>Is the ordinate of the end point coordinate, +.>And displaying the high picture for the screen.
4. A method according to claim 3, wherein calculating a final PTZ value from screen information, the frame selection coordinates and the camera information comprises:
according to the offset of the central point, the horizontal viewing angle and the vertical viewing angleThe angle and focal length calculate horizontal increment and vertical increment, and the calculation formula is:,/>wherein->For the level increment, ++>For the horizontal viewing angle, < >>For the focal length, +.>For the vertical increment, +.>Is the vertical viewing angle.
5. The method of claim 4, wherein calculating a final PTZ value based on screen information, the frame selection coordinates, and the camera information comprises:
calculating the horizontal transfer angle and the vertical transfer angle according to the horizontal increment, the vertical increment, the horizontal rotation angle and the vertical rotation angle, wherein the calculation formula is as follows:,/>wherein->For the horizontal transfer angle, < >>For the horizontal rotation angle, +.>For the vertical transfer angle, +.>Is the vertical rotation angle.
6. The method of claim 1, wherein calculating a final PTZ value based on screen information, the frame selection coordinates, and the camera information comprises:
and calculating a zoom value according to the screen information, the frame selection coordinates and the focal length, wherein when the value of the abscissa of the starting point coordinates is larger than the value of the abscissa of the end point coordinates, a calculation formula is as follows:when the value of the abscissa of the starting point coordinate is smaller than the value of the abscissa of the ending point coordinate, the calculation formula is as follows: />Wherein->For the scaling value, +.>For the width of the screen display, +.>Is the abscissa of the origin coordinate, +.>Is the abscissa of the end point coordinates.
7. The method of claim 6, wherein calculating a final PTZ value based on screen information, the frame selection coordinates, and the camera information comprises:
and calculating a zoom value according to the zoom value, wherein the calculation formula is as follows:wherein->For the zoom value, +.>Is the focal length.
8. An apparatus for controlling a pan/tilt head of a PTZ camera frame selection screen, comprising:
the first acquisition unit is used for acquiring a width and height value of a screen display picture, and determining a coordinate axis according to the width and height value, wherein the width and height value comprises the width of the screen display picture and the height of the screen display picture;
the determining unit is used for determining frame selection coordinates according to the coordinate axes, wherein the frame selection coordinates comprise a starting point coordinate and an end point coordinate during frame selection;
a second acquisition unit configured to acquire camera information including an initial PTZ value, a horizontal angle of view, and a vertical angle of view, wherein the initial PTZ value includes a horizontal angle of rotation, a vertical angle of rotation, and a focal length;
a calculating unit, configured to calculate a final PTZ value according to screen information, the frame selection coordinate, and the camera information, where the screen information includes a width-height value of the screen display and the coordinate axis, and the final PTZ value includes a horizontal transfer angle, a vertical transfer angle, and a zoom value;
and the adjusting unit is used for adjusting the camera according to the final PTZ value.
9. A computer readable storage medium, wherein the computer readable storage medium includes a stored program, and wherein the program when executed controls a device in which the computer readable storage medium is located to perform a method of controlling a PTZ camera frame screen control cradle head according to any one of claims 1 to 7.
10. A processor for running a program, wherein the program runs to perform a method of PTZ camera frame screen control cradle as claimed in any one of claims 1 to 7.
CN202311337792.7A 2023-10-17 2023-10-17 PTZ camera frame selection screen control holder method and device Pending CN117082345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311337792.7A CN117082345A (en) 2023-10-17 2023-10-17 PTZ camera frame selection screen control holder method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311337792.7A CN117082345A (en) 2023-10-17 2023-10-17 PTZ camera frame selection screen control holder method and device

Publications (1)

Publication Number Publication Date
CN117082345A true CN117082345A (en) 2023-11-17

Family

ID=88713796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311337792.7A Pending CN117082345A (en) 2023-10-17 2023-10-17 PTZ camera frame selection screen control holder method and device

Country Status (1)

Country Link
CN (1) CN117082345A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591366A (en) * 2012-02-17 2012-07-18 广州盈可视电子科技有限公司 Method and device for controlling cloud deck
CN104079882A (en) * 2014-07-07 2014-10-01 山东神戎电子股份有限公司 Laser night-vision device 3D positioning method based on list searching
CN111800576A (en) * 2020-07-01 2020-10-20 河北中创广电科技有限公司 Method and device for rapidly positioning picture shot by pan-tilt camera
CN113259615A (en) * 2021-04-01 2021-08-13 海南视联通信技术有限公司 Focal length adjusting method and device, terminal equipment and storage medium
CN113840084A (en) * 2021-08-27 2021-12-24 北京臻观数智科技有限公司 Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera
CN113938614A (en) * 2021-12-20 2022-01-14 苏州万店掌软件技术有限公司 Video image zooming method, device, equipment and storage medium
CN116030099A (en) * 2023-03-31 2023-04-28 北京尚优力达科技有限公司 PTZ camera-based multi-target tracking method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591366A (en) * 2012-02-17 2012-07-18 广州盈可视电子科技有限公司 Method and device for controlling cloud deck
CN104079882A (en) * 2014-07-07 2014-10-01 山东神戎电子股份有限公司 Laser night-vision device 3D positioning method based on list searching
CN111800576A (en) * 2020-07-01 2020-10-20 河北中创广电科技有限公司 Method and device for rapidly positioning picture shot by pan-tilt camera
CN113259615A (en) * 2021-04-01 2021-08-13 海南视联通信技术有限公司 Focal length adjusting method and device, terminal equipment and storage medium
CN113840084A (en) * 2021-08-27 2021-12-24 北京臻观数智科技有限公司 Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera
CN113938614A (en) * 2021-12-20 2022-01-14 苏州万店掌软件技术有限公司 Video image zooming method, device, equipment and storage medium
CN116030099A (en) * 2023-03-31 2023-04-28 北京尚优力达科技有限公司 PTZ camera-based multi-target tracking method and device

Similar Documents

Publication Publication Date Title
US10122997B1 (en) Automated matrix photo framing using range camera input
EP3149624B1 (en) Photo-video-camera with dynamic orientation lock and aspect ratio.
EP2225607B1 (en) Guided photography based on image capturing device rendered user recommendations
US20210306559A1 (en) Photographing methods and devices
JP2006262030A (en) Angle of view adjusting apparatus, camera system, and angle of view adjusting method
CN104639832A (en) Panoramic photography method and terminal
CN109525674B (en) System and method for making house panorama
CN112514368B (en) Image acquisition method, control device and movable platform
CN104917959A (en) Photographing method and terminal
CN105763795A (en) Focusing method and apparatus, cameras and camera system
US11902660B2 (en) Image processing device, image processing method, and program
CN106559656B (en) Monitoring picture covering method and device and network camera
CN110392202A (en) Image processing apparatus, camera chain, image processing method
WO2018014517A1 (en) Information processing method, device and storage medium
CN117082345A (en) PTZ camera frame selection screen control holder method and device
EP2672694B1 (en) Improved control of an image capturing device
US20220091487A1 (en) Shooting control method and shooting control device
US20220279128A1 (en) Systems and methods for horizon leveling videos
CN117095066B (en) Method and device for marking PTZ camera screen
CN117255247B (en) Method and device for linkage of panoramic camera and detail dome camera
CN107241612B (en) Network live broadcast method and device
US8054332B2 (en) Advanced input controller for multimedia processing
CN116823936B (en) Method and system for acquiring longitude and latitude by using camera screen punctuation
US20230298197A1 (en) Electronic device with gaze-based autofocus of camera during video rendition of scene
WO2023044789A1 (en) Zooming method and device for image acquisition device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination