CN113840084A - Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera - Google Patents

Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera Download PDF

Info

Publication number
CN113840084A
CN113840084A CN202110999994.2A CN202110999994A CN113840084A CN 113840084 A CN113840084 A CN 113840084A CN 202110999994 A CN202110999994 A CN 202110999994A CN 113840084 A CN113840084 A CN 113840084A
Authority
CN
China
Prior art keywords
dome camera
fov
camera
ver
pano
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
CN202110999994.2A
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.)
Beijing Zhenguan Shuzhi Technology Co ltd
Original Assignee
Beijing Zhenguan Shuzhi 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 Beijing Zhenguan Shuzhi Technology Co ltd filed Critical Beijing Zhenguan Shuzhi Technology Co ltd
Priority to CN202110999994.2A priority Critical patent/CN113840084A/en
Publication of CN113840084A publication Critical patent/CN113840084A/en
Pending legal-status Critical Current

Links

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Stereoscopic And Panoramic Photography (AREA)

Abstract

The invention discloses a method for realizing control of a panoramic tripod head based on a PTZ (pan/tilt/zoom) return technology of a dome camera, which comprises the following steps: and (3) calculating the field angle: calculating the horizontal field angle and the vertical field angle of the dome camera; and (3) calculating the visual field coordinate of the dome camera: calculating the visual field coordinate of the dome camera; panoramic view coordinate calculation: calculating scanning parameters of the panoramic image, and splicing to generate a target panoramic image and panoramic image view coordinates; mapping the screen coordinates of the panoramic picture into coordinates of a dome camera; mapping the boundary coordinates of the visual range of the dome camera into screen coordinates; and (3) selecting the focal length zoom multiple of the inverse ball computer by a panoramic screen frame: calculating a zooming numerical value according to the horizontal field angle of the framed rectangle; the panorama tripod head is controlled: and clicking any point on the panoramic picture, automatically rotating the ball machine, zooming and focusing to a view field range corresponding to the panoramic picture frame area. The invention realizes more intuitive, accurate and convenient control of the ball machine, and effectively improves the user experience.

Description

Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera
Technical Field
The invention relates to an image processing method, in particular to a method for realizing control of a panoramic holder based on a PTZ (pan/tilt/zoom) return technology of a dome camera.
Background
In the existing software for controlling the dome camera through the cloud platform, the control mode of the cloud platform is usually to determine a position scene to be watched based on a video picture of the rotating dome camera, that is, to observe a real-time picture shot by the dome camera while rotating the dome camera, so as to confirm the position scene, or to control the dome camera by using a preset position (coordinate) which is preset. For example, by using the acquired panoramic image, a preset area is selected in the panoramic image, the position coordinate in the selected panoramic image is converted into the position coordinate which can be identified by the dome camera through the coordinate conversion relation between the dome camera controller where the panoramic image is located and the dome camera, a setting response is returned to the dome camera controller when the dome camera rotates to a monitoring scene corresponding to the position coordinate, the dome camera controller stores the corresponding relation between the position coordinate in the panoramic image and the index value according to the setting response, and the preset area is determined to be the set preset point, so that the preset point is set in the panoramic image. Obviously, the panoramic control of the dome camera is realized based on the calibration of the preset position of the dome camera in the panoramic image, and the control mode is not only not intuitive, but also not convenient enough in operation.
Therefore, the prior art has at least the following disadvantages:
1) the ball machine cannot be operated at any point of the panoramic image, and only the preset position area can be operated and selected.
2) The controllable area on the panorama is limited because ball machines typically provide 255, or 128, or 64 preset positions, with the maximum controllable area equal to the preset upper limit.
3) Points on the panoramic view cannot correspond to the visual angle central point of the dome camera one by one, and the accurate control of the visual angle cannot be realized.
4) Since the preset bit area is selected in advance on the panorama and the corresponding relationship is saved, once the preset bit is reset by other systems, the panorama is controlled to an incorrect position or the corresponding relationship of the index is reestablished.
5) The picture frame cannot be drawn on the panoramic spliced picture, the ball cannot be rotated to the area, and the zoom and the focus are automatically adjusted to the visual field area range corresponding to the picture frame.
Most of the existing dome cameras have a PTZ (Pan/Tilt/zoom) return function, and an operation party can acquire real-time PTZ position information of the dome camera, namely the current horizontal angle coordinate (P), the current vertical angle coordinate (T) and the focal length zoom value (Z) of the dome camera. The ball machine with PTZ return technology provides PTZ positioning function, namely inputting horizontal coordinate, vertical coordinate and zoom parameter of the ball machine, and controlling the ball machine to rotate to the position and perform corresponding focal length zoom.
Disclosure of Invention
Aiming at the problems, the invention provides a method for realizing the control of a panoramic tripod head based on a PTZ (pan/tilt/zoom) return technology of a dome camera, which does not need to establish a preset index relationship, realizes the real-time display of the current visual field range of a panoramic picture, has a picture frame control visual field function and is more intuitive, accurate and convenient to control the dome camera.
The technical scheme of the invention is as follows:
a method for realizing control of a panoramic tripod head based on a PTZ (pan/tilt/zoom) return technology of a dome camera comprises the following steps:
and (3) calculating the field angle: calculating the horizontal field angle of the dome camera according to the width of a target surface CCD (charge coupled device) and the focal length of a dome camera lens, and calculating the vertical field angle of the dome camera according to the height of the target surface CCD and the focal length of the dome camera lens;
and (3) calculating the visual field coordinate of the dome camera: determining the PTZ coordinate of the dome camera according to the visual field coordinate of the dome camera, wherein P is the horizontal coordinate range of the dome camera lens: [0,360] °; t is the vertical coordinate range of the lens of the dome camera: -90,90 °; z is the focal length zooming times of the lens of the ball machine; obtaining a view field coordinate of the dome camera through the PTZ coordinate of the dome camera and the calculated view field angle;
panoramic view coordinate calculation: calculating according to the vertical visual field of the panoramic image and the vertical field angle of the dome camera to obtain the scanning times of the panoramic image and the start/stop coordinates of each scanning, further splicing to generate a target panoramic image, and obtaining the visual field coordinates of the panoramic image;
mapping relation of panoramic picture screen coordinates and dome camera coordinates: mapping the panoramic screen coordinates (x, y) to dome camera coordinates (P, T);
the mapping relation between the visual range of the dome camera and the screen coordinates of the panoramic image is as follows: mapping the boundary coordinates of the visual range of the dome camera into screen coordinates;
and (3) selecting the focal length zoom multiple of the inverse ball computer by a panoramic screen frame: calculating a variable magnification value z according to a horizontal field angle corresponding to the framed rectangle on the panoramic screen, wherein the variable magnification value z is the minimum field angle of the dome camera containing the framed rectangle field angle;
the panorama tripod head is controlled: and clicking any point on the panoramic picture, obtaining the required PTZ numerical value and the zoom multiple of the focal length of the dome camera according to the steps, and automatically rotating the dome camera and zooming and focusing the dome camera to the visual field range corresponding to the panoramic picture frame area.
The working principle of the technical scheme is as follows:
the field angle is an angle formed by two edges of the optical instrument, which takes the lens of the optical instrument as a vertex and allows the object image of the measured object to pass through the maximum range of the lens. The size of the field angle determines the field range of the optical instrument, the larger the field angle is, the larger the field is, the smaller the optical magnification is, and the target object beyond the angle cannot be received in the lens.
The invention is based on PTZ return technology of the dome camera, calculates the current field angle and field of view coordinates of the dome camera and the field of view coordinates of a panoramic image according to the focal length of the dome camera and the technical parameters of a CCD (charge coupled device), and realizes the control of the dome camera on the panoramic image through the PTZ positioning technology of the dome camera by the conversion of screen coordinates, the field of view coordinates of the panoramic image and the coordinates of the dome camera. The method has the key points of calculating the visual field coordinate of the ball machine, calculating the visual field coordinate of the panoramic view and back-calculating the PTZ coordinate of the ball machine, so that the control accuracy of the ball machine is ensured.
In a further technical scheme, in the step of calculating the view coordinates of the dome camera, the view coordinates of the dome camera are as follows:
horizontal field coordinate range: [ theta ] ofhminhmax],θhmin=P-2/θhorhmax=P+2/θhor
Vertical field coordinate range: [ theta ] ofvminvmax],θvmin=T-2/θvervmax=T+2/θver
Wherein, thetahminAnd thetahmaxRespectively, a minimum and a maximum of the horizontal field of view coordinate, thetavminAnd thetavmaxRespectively minimum and maximum values of the vertical field of view coordinate, thetahorFor the calculated horizontal field of view, θ, of the dome cameraverThe vertical field angle of the ball machine is obtained through calculation.
In a visual field coordinate system, a horizontal coordinate is a clockwise included angle between a lens of the dome camera in the horizontal direction and the due north direction, the range is [0,360] °, and the due north direction is 0 °; the vertical coordinate is the included angle between the lens of the vertical ball machine and the horizontal plane, which is negative upwards and positive downwards, and the range is [ -90,90] °, and the horizontal plane is 0 °.
The visual field coordinate system of the dome camera is generally the same as the visual field coordinate system, if not, the visual field coordinate system is converted, and P: horizontal coordinate range of the dome camera: [0,360] °; t: vertical coordinate range of the ball machine: -90,90 °; z: and the focal length of the ball machine is multiplied.
In a further technical scheme, in the panorama view coordinate calculating step, the panorama scanning times n calculated according to the panorama vertical visible area and the dome camera vertical field angle is as follows:
n=(pano_fov_ver+0.5*camera_max_fov_ver)/camera_max_fov_ver;
wherein pano _ fov _ ver is a panoramic vertical angle of view, and camera _ max _ fov _ ver is the maximum vertical angle of view of the dome camera;
the starting point of the first scan is:
camera_start_hov[1]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[1]=pano_start_ver+camera_fov_ver/2;
the starting point for the last scan is:
camera_start_hov[n]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[n]=pano_start_ver+pano_fov_ver-camera_fov_ver/2;
the starting point for the intermediate i-th scan (1< i < n) is:
camera_start_hov[i]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[i]=pano_start_ver+i*camera_fov_ver-camera_fov_ver/2;
wherein:
pano _ start _ hov is the horizontal start coordinate of the panorama;
pano _ start _ ver is the vertical start coordinate of the panoramic image;
camera _ start _ hov is the horizontal start coordinate of the dome camera;
the camera _ start _ ver is a vertical starting point coordinate of the dome camera;
the camera _ fov _ hor is the horizontal field angle of the dome camera;
the camera _ fov _ ver is the vertical field angle of the dome camera.
The maximum field angle of the dome camera is the field angle at the minimum focal length, namely the field angle at variable magnification of 1 time, and the larger the field angle is, the smaller the scanning times are required, and the faster the panoramic image is generated. When the panorama is generated by scanning, the camera _ fov _ ver is equal to camera _ max _ fov _ ver, that is: scanning is carried out at the maximum vertical field angle of the dome camera, namely the vertical field angle of the dome camera at the minimum focal length variable magnification. And the target panorama generated by the splicing is obtained by recording the panorama generated at the ith time as pano [ i ], then,
the target panorama pano [1] + … + pano [ i ] + pano [ n ];
the panoramic picture generated each time is the same as a panoramic picture shot by a mobile phone, and the invention only adopts the PTZ positioning technology to control the ball machine to automatically finish the rotation process, namely, the rotation is started from the scanning starting point each time and is finished when the ball machine rotates to the horizontal visual field length of the panoramic picture, so that the panoramic picture is generated once. The continuous image synthesis panoramic image technology is not the focus of the invention, and the prior art has many technical references, can be retrieved from a network, and can also be realized by an open source OPENCV library.
In a further technical solution, the panoramic view field coordinates are:
horizontal coordinate range: [ pano _ start _ hov, pano _ start _ hov + pano _ fov _ hor ];
vertical coordinate range: [ pano _ start _ ver, pano _ start _ ver + pano _ fov _ ver ];
where pano _ fov _ hor is the panorama horizontal field angle and pano _ fov _ ver is the panorama vertical field angle.
In a further technical scheme, in the mapping relation step of the panoramic screen coordinate and the dome camera coordinate, the mapping relation of the panoramic screen coordinate (x, y) and the dome camera coordinate (P, T) is as follows:
panoramic picture screen coordinates (x, y), upper left corner (0,0), width w, height h,
mapped to dome coordinates (P, T):
P=x*pano_fov_hor/w+pano_start_hov;
T=y*pano_fov_ver/h+pano_start_ver。
the P coordinate of the ball shooting machine is mapped through the horizontal angle of view of the panoramic picture and the horizontal starting point coordinate of the panoramic picture, and the T coordinate of the ball shooting machine is mapped through the vertical angle of view of the panoramic picture and the vertical starting point coordinate of the panoramic picture.
In a further technical scheme, in the step of mapping relationship between the visual range of the dome camera and the screen coordinates of the panoramic image, the mapping relationship between the boundary coordinates of the visual range of the dome camera and the screen coordinates is as follows:
the visible range of the dome camera is recorded as r _ fov, then:
r_fov.left=P-θhor/2;
r_fov.right=P+θhor/2;
r_fov.top=T-θver/2;
r_fov.bottom=T+θver/2;
wherein, thetahorFor the calculated horizontal field of view, θ, of the dome cameraverCalculating the vertical field angle of the ball machine;
mapped to screen coordinates r _ screen:
r_screen.left=(r_fov.left-pano_start_hov)*w/pano_fov_hor;
r_screen.right=(r_fov.right-pano_start_hov)*w/pano_fov_hor;
r_screen.top=(r_fov.top-pano_start_ver)*h/pano_fov_ver;
r_screen.bottom=(r_fov.bottom-pano_start_ver)*h/pano_fov_ver。
in a further technical scheme, the step of selecting the focal length variable multiple of the inverse dome camera by the panoramic screen frame comprises the following steps:
establishing an array fov _ array of panorama horizontal field angles from 1 to the maximum zoom max _ zoom, wherein the element subscripts i [0, max _ zoom-1] in the array fov _ array, and the zoom multiple of the dome camera focal length is i + 1;
and (3) selecting a horizontal field angle fov corresponding to the rectangle r:
fov=r.w*pano_fov_hor/w;
wherein w is the width of the panorama screen, and r.w is the width of the box selection rectangle r;
and calculating a zooming numerical value z, wherein the z is the minimum field angle of the dome camera meeting the field angle of the rectangular field containing the frame selection.
And the zoom multiple of the focal length of the dome camera corresponding to the frame selection range of the panoramic screen is obtained through back calculation, so that the automatic zooming of the dome camera is realized.
The invention has the beneficial effects that:
1. the control of the dome camera is realized through the mapping of the panoramic view coordinate and the dome camera coordinate;
2. the operation of selecting and establishing the index relation by the user is reduced, and the complexity of system operation is reduced;
3. the panoramic view can not only display the current visual field of the dome camera in real time, but also position the visual field of the dome camera through the linkage of the picture frame, so that the control of the dome camera is more visual, accurate and convenient;
4. because the coordinate and the dome camera do not establish a special binding relationship, the operation influence caused by changing the setting of the dome camera by other systems can be avoided;
5. the number of the selected areas is not limited, and the pan-tilt can be accurately controlled by clicking at any position of the panoramic image.
Drawings
FIG. 1 is a flow chart of a method for implementing a pan-tilt control based on a PTZ pass-back technique of a dome camera according to the present invention;
Detailed Description
The embodiments of the present invention will be further described with reference to the accompanying drawings.
Example (b):
as shown in fig. 1, a method for implementing a pan-tilt control based on a ball machine PTZ return technology includes the steps of:
and (3) calculating the field angle: calculating the horizontal field angle of the dome camera according to the width of a target surface CCD (charge coupled device) and the focal length of a dome camera lens, and calculating the vertical field angle of the dome camera according to the height of the target surface CCD and the focal length of the dome camera lens;
the principle of calculating the angle of view is that many technical data in the prior art can be referred to, and is not the key point of the present invention, and the present embodiment can be implemented by the following calculation formula:
horizontal field angle of the dome camera: thetahor=2×arctan(ccd_w/2f);
Vertical field angle of the dome camera: thetaver=2×arctan(ccd_h/2f);
CCD _ w is the width of the target surface CCD in millimeters (mm);
CCD _ h is the height of the target surface CCD in millimeters (mm);
f, focal length of the lens.
And (3) calculating the visual field coordinate of the dome camera: determining the PTZ coordinate of the dome camera according to the visual field coordinate of the dome camera, wherein P is the horizontal coordinate range of the dome camera lens: [0,360] °; t is the vertical coordinate range of the lens of the dome camera: -90,90 °; z is the focal length zooming times of the lens of the ball machine; obtaining a view field coordinate of the dome camera through the PTZ coordinate of the dome camera and the calculated view field angle;
panoramic view coordinate calculation: calculating according to the vertical visual field of the panoramic image and the vertical field angle of the dome camera to obtain the scanning times of the panoramic image and the start/stop coordinates of each scanning, further splicing to generate a target panoramic image, and obtaining the visual field coordinates of the panoramic image;
mapping relation of panoramic picture screen coordinates and dome camera coordinates: mapping the panoramic screen coordinates (x, y) to dome camera coordinates (P, T);
the mapping relation between the visual range of the dome camera and the screen coordinates of the panoramic image is as follows: mapping the boundary coordinates of the visual range of the dome camera into screen coordinates;
and (3) selecting the focal length zoom multiple of the inverse ball computer by a panoramic screen frame: calculating a variable magnification value z according to a horizontal field angle corresponding to the framed rectangle on the panoramic screen, wherein the variable magnification value z is the minimum field angle of the dome camera containing the framed rectangle field angle;
the panorama tripod head is controlled: and clicking any point on the panoramic picture, obtaining the required PTZ numerical value and the zoom multiple of the focal length of the dome camera according to the steps, and automatically rotating the dome camera and zooming and focusing the dome camera to the visual field range corresponding to the panoramic picture frame area.
The working principle of the technical scheme is as follows:
the field angle is an angle formed by two edges of the optical instrument, which takes the lens of the optical instrument as a vertex and allows the object image of the measured object to pass through the maximum range of the lens. The size of the field angle determines the field range of the optical instrument, the larger the field angle is, the larger the field is, the smaller the optical magnification is, and the target object beyond the angle cannot be received in the lens.
The invention is based on PTZ return technology of the dome camera, calculates the current field angle and field of view coordinates of the dome camera and the field of view coordinates of a panoramic image according to the focal length of the dome camera and the technical parameters of a CCD (charge coupled device), and realizes the control of the dome camera on the panoramic image through the PTZ positioning technology of the dome camera by the conversion of screen coordinates, the field of view coordinates of the panoramic image and the coordinates of the dome camera. The method has the key points of calculating the visual field coordinate of the ball machine, calculating the visual field coordinate of the panoramic view and back-calculating the PTZ coordinate of the ball machine, so that the control accuracy of the ball machine is ensured.
In another embodiment, in the step of calculating the dome camera view coordinates, the dome camera view coordinates are:
horizontal field coordinate range: [ theta ] ofhminhmax],θhmin=P-2/θhorhmax=P+2/θhor
Vertical field coordinate range: [ theta ] ofvminvmax],θvmin=T-2/θvervmax=T+2/θver
Wherein, thetahminAnd thetahmaxRespectively, a minimum and a maximum of the horizontal field of view coordinate, thetavminAnd thetavmaxRespectively minimum and maximum values of the vertical field of view coordinate, thetahorFor the calculated horizontal field of view, θ, of the dome cameraverThe vertical field angle of the ball machine is obtained through calculation.
In a visual field coordinate system, a horizontal coordinate is a clockwise included angle between a lens of the dome camera in the horizontal direction and the due north direction, the range is [0,360] °, and the due north direction is 0 °; the vertical coordinate is the included angle between the lens of the vertical ball machine and the horizontal plane, which is negative upwards and positive downwards, and the range is [ -90,90] °, and the horizontal plane is 0 °.
The visual field coordinate system of the dome camera is generally the same as the visual field coordinate system, if not, the visual field coordinate system is converted, and P: horizontal coordinate range of the dome camera: [0,360] °; t: vertical coordinate range of the ball machine: -90,90 °; z: and the focal length of the ball machine is multiplied.
In another embodiment, in the panorama view field coordinate calculating step, the panorama scanning number n calculated from the panorama vertical viewable area and the dome vertical field angle is:
n=(pano_fov_ver+0.5*camera_max_fov_ver)/camera_max_fov_ver;
wherein pano _ fov _ ver is a panoramic vertical angle of view, and camera _ max _ fov _ ver is the maximum vertical angle of view of the dome camera;
the starting point of the first scan is:
camera_start_hov[1]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[1]=pano_start_ver+camera_fov_ver/2;
the starting point for the last scan is:
camera_start_hov[n]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[n]=pano_start_ver+pano_fov_ver-camera_fov_ver/2;
the starting point for the intermediate i-th scan (1< i < n) is:
camera_start_hov[i]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[i]=pano_start_ver+i*camera_fov_ver-camera_fov_ver/2;
wherein:
pano _ start _ hov is the horizontal start coordinate of the panorama;
pano _ start _ ver is the vertical start coordinate of the panoramic image;
camera _ start _ hov is the horizontal start coordinate of the dome camera;
the camera _ start _ ver is a vertical starting point coordinate of the dome camera;
the camera _ fov _ hor is the horizontal field angle of the dome camera;
the camera _ fov _ ver is the vertical field angle of the dome camera.
The maximum field angle of the dome camera is the field angle at the minimum focal length, namely the field angle at variable magnification of 1 time, and the larger the field angle is, the smaller the scanning times are required, and the faster the panoramic image is generated. When the panorama is generated by scanning, the camera _ fov _ ver is equal to camera _ max _ fov _ ver, that is: scanning is carried out at the maximum vertical field angle of the dome camera, namely the vertical field angle of the dome camera at the minimum focal length variable magnification. And the target panorama generated by the splicing is obtained by recording the panorama generated at the ith time as pano [ i ], then,
the target panorama pano [1] + … + pano [ i ] + pano [ n ];
the panoramic picture generated each time is the same as a panoramic picture shot by a mobile phone, and the invention only adopts the PTZ positioning technology to control the ball machine to automatically finish the rotation process, namely, the rotation is started from the scanning starting point each time and is finished when the ball machine rotates to the horizontal visual field length of the panoramic picture, so that the panoramic picture is generated once. The continuous image synthesis panoramic image technology is not the focus of the invention, and the prior art has many technical references, can be retrieved from a network, and can also be realized by an open source OPENCV library.
In another embodiment, the panoramic view field coordinates are:
horizontal coordinate range: [ pano _ start _ hov, pano _ start _ hov + pano _ fov _ hor ];
vertical coordinate range: [ pano _ start _ ver, pano _ start _ ver + pano _ fov _ ver ];
where pano _ fov _ hor is the panorama horizontal field angle and pano _ fov _ ver is the panorama vertical field angle.
In another embodiment, in the step of mapping the panoramic screen coordinates and the dome camera coordinates, the mapping relationship between the panoramic screen coordinates (x, y) and the dome camera coordinates (P, T) is:
panoramic picture screen coordinates (x, y), upper left corner (0,0), width w, height h,
mapped to dome coordinates (P, T):
P=x*pano_fov_hor/w+pano_start_hov;
T=y*pano_fov_ver/h+pano_start_ver。
the P coordinate of the ball shooting machine is mapped through the horizontal angle of view of the panoramic picture and the horizontal starting point coordinate of the panoramic picture, and the T coordinate of the ball shooting machine is mapped through the vertical angle of view of the panoramic picture and the vertical starting point coordinate of the panoramic picture.
In another embodiment, in the step of mapping relationship between the visual range of the dome camera and the screen coordinates of the panorama, the mapping relationship between the boundary coordinates of the visual range of the dome camera and the screen coordinates is as follows:
the visible range of the dome camera is recorded as r _ fov, then:
r_fov.left=P-θhor/2;
r_fov.right=P+θhor/2;
r_fov.top=T-θver/2;
r_fov.bottom=T+θver/2;
wherein, thetahorFor the calculated horizontal field of view, θ, of the dome cameraverCalculating the vertical field angle of the ball machine;
mapped to screen coordinates r _ screen:
r_screen.left=(r_fov.left-pano_start_hov)*w/pano_fov_hor;
r_screen.right=(r_fov.right-pano_start_hov)*w/pano_fov_hor;
r_screen.top=(r_fov.top-pano_start_ver)*h/pano_fov_ver;
r_screen.bottom=(r_fov.bottom-pano_start_ver)*h/pano_fov_ver。
in another embodiment, the step of selecting the zoom multiple of the focal length of the inverse dome camera by the panoramic screen frame comprises the following steps:
establishing an array fov _ array of panorama horizontal field angles from 1 to the maximum zoom max _ zoom, wherein the element subscripts i [0, max _ zoom-1] in the array fov _ array, and the zoom multiple of the dome camera focal length is i + 1;
and (3) selecting a horizontal field angle fov corresponding to the rectangle r:
fov=r.w*pano_fov_hor/w;
wherein w is the width of the panorama screen, and r.w is the width of the box selection rectangle r;
calculating a zoom numerical value z, wherein z is the minimum field angle of the dome camera meeting the field angle containing the frame selection rectangle, and the schematic codes are as follows:
Figure BDA0003233594320000121
Figure BDA0003233594320000131
and the zoom multiple of the focal length of the dome camera corresponding to the frame selection range of the panoramic screen is obtained through back calculation, so that the automatic zooming of the dome camera is realized.
According to the invention, through the calculation of the visual field coordinates of the dome camera, the calculation of the coordinates of the visual field of the spliced panoramic image, the back calculation of the PTZ coordinates of the dome camera, and the PTZ feedback technology and the positioning technology of the dome camera, the control of the dome camera is more visual, accurate and convenient, and the user experience is effectively improved.
The above-mentioned embodiments only express the specific embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (7)

1. A method for realizing control of a panoramic holder based on a PTZ (pan/tilt/zoom) return technology of a dome camera is characterized by comprising the following steps:
and (3) calculating the field angle: calculating the horizontal field angle of the dome camera according to the width of the target surface CCD and the focal length of the dome camera lens, and calculating the vertical field angle of the dome camera according to the height of the target surface CCD and the focal length of the dome camera lens;
and (3) calculating the visual field coordinate of the dome camera: determining the PTZ coordinate of the dome camera according to the visual field coordinate of the dome camera, wherein P is the horizontal coordinate range of the dome camera lens: [0,360] °; t is the vertical coordinate range of the lens of the dome camera: -90,90 °; z is the focal length zooming times of the lens of the ball machine; obtaining a view field coordinate of the dome camera through the PTZ coordinate of the dome camera and the calculated view field angle;
panoramic view coordinate calculation: calculating according to the vertical visual field of the panoramic image and the vertical field angle of the dome camera to obtain the scanning times of the panoramic image and the start/stop coordinates of each scanning, further splicing to generate a target panoramic image, and obtaining the visual field coordinates of the panoramic image;
mapping relation of panoramic picture screen coordinates and dome camera coordinates: mapping the panoramic screen coordinates (x, y) to dome camera coordinates (P, T);
the mapping relation between the visual range of the dome camera and the screen coordinates of the panoramic image is as follows: mapping the boundary coordinates of the visual range of the dome camera into screen coordinates;
and (3) selecting the focal length zoom multiple of the inverse ball computer by a panoramic screen frame: calculating a variable magnification value z according to a horizontal field angle corresponding to the framed rectangle on the panoramic screen, wherein the variable magnification value z is the minimum field angle of the dome camera containing the framed rectangle field angle;
the panorama tripod head is controlled: and clicking any point on the panoramic picture, obtaining the required PTZ numerical value and the zoom multiple of the focal length of the dome camera according to the steps, and automatically rotating the dome camera and zooming and focusing the dome camera to the visual field range corresponding to the panoramic picture frame area.
2. The method for realizing the control of the panoramic tripod head based on the PTZ feedback technology of the dome camera according to claim 1, wherein in the step of calculating the visual field coordinates of the dome camera, the visual field coordinates of the dome camera are as follows:
horizontal field coordinate range: [ theta ] ofhminhmax],θhmin=P-2/θhorhmax=P+2/θhor
Vertical field coordinate range: [ theta ] ofvminvmax],θvmin=T-2/θvervmax=T+2/θver
Wherein, thetahminAnd thetahmaxRespectively, a minimum and a maximum of the horizontal field of view coordinate, thetavminAnd thetavmaxRespectively minimum and maximum values of the vertical field of view coordinate, thetahorFor the calculated horizontal field of view, θ, of the dome cameraverThe vertical field angle of the ball machine is obtained through calculation.
3. The method for realizing the pan-tilt control of the dome camera based on the PTZ feedback technology of the dome camera according to claim 1, wherein in the panorama view coordinate calculating step, the panorama scanning times n calculated according to the vertical visual field of the panorama and the vertical field angle of the dome camera are as follows:
n=(pano_fov_ver+0.5*camera_max_fov_ver)/camera_max_fov_ver;
wherein pano _ fov _ ver is a panoramic vertical angle of view, and camera _ max _ fov _ ver is the maximum vertical angle of view of the dome camera;
the starting point of the first scan is:
camera_start_hov[1]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[1]=pano_start_ver+camera_fov_ver/2;
the starting point for the last scan is:
camera_start_hov[n]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[n]=pano_start_ver+pano_fov_ver-camera_fov_ver/2;
the starting point for the intermediate i-th scan (1< i < n) is:
camera_start_hov[i]=pano_start_hov+camera_fov_hor/2;
camera_start_ver[i]=pano_start_ver+i*camera_fov_ver-camera_fov_ver/2;
wherein:
pano _ start _ hov is the horizontal start coordinate of the panorama;
pano _ start _ ver is the vertical start coordinate of the panoramic image;
camera _ start _ hov is the horizontal start coordinate of the dome camera;
the camera _ start _ ver is a vertical starting point coordinate of the dome camera;
the camera _ fov _ hor is the horizontal field angle of the dome camera;
the camera _ fov _ ver is the vertical field angle of the dome camera.
4. The method for realizing manipulation of the panoramic holder based on the PTZ feedback technology of the dome camera according to claim 3, wherein the visual field coordinates of the panoramic view are as follows:
horizontal coordinate range: [ pano _ start _ hov, pano _ start _ hov + pano _ fov _ hor ];
vertical coordinate range: [ pano _ start _ ver, pano _ start _ ver + pano _ fov _ ver ];
where pano _ fov _ hor is the panorama horizontal field angle and pano _ fov _ ver is the panorama vertical field angle.
5. The method for realizing the pan/tilt control of the dome camera based on the PTZ feedback technology of the dome camera as claimed in claim 4, wherein in the step of mapping relationship between the screen coordinates of the panorama and the coordinates of the dome camera, the mapping relationship between the screen coordinates (x, y) of the panorama and the coordinates (P, T) of the dome camera is as follows:
panoramic picture screen coordinates (x, y), upper left corner (0,0), width w, height h,
mapped to dome coordinates (P, T):
P=x*pano_fov_hor/w+pano_start_hov;
T=y*pano_fov_ver/h+pano_start_ver。
6. the method for realizing the pan/tilt control of the dome camera based on the PTZ feedback technology of the dome camera according to claim 5, wherein in the step of the mapping relationship between the visual range of the dome camera and the screen coordinates of the panorama, the mapping relationship between the boundary coordinates of the visual range of the dome camera and the screen coordinates is as follows:
the visible range of the dome camera is recorded as r _ fov, then:
r_fov.left=P-θhor/2;
r_fov.right=P+θhor/2;
r_fov.top=T-θver/2;
r_fov.bottom=T+θver/2;
wherein, thetahorFor the calculated horizontal field of view, θ, of the dome cameraverCalculating the vertical field angle of the ball machine;
mapped to screen coordinates r _ screen:
r_screen.left=(r_fov.left-pano_start_hov)*w/pano_fov_hor;
r_screen.right=(r_fov.right-pano_start_hov)*w/pano_fov_hor;
r_screen.top=(r_fov.top-pano_start_ver)*h/pano_fov_ver;
r_screen.bottom=(r_fov.bottom-pano_start_ver)*h/pano_fov_ver。
7. the method for realizing the control of the panoramic tripod head based on the PTZ return technology of the dome camera according to claim 6, wherein the step of selecting the focal length of the inverse dome camera by the panoramic screen frame to change the multiple comprises the following steps:
establishing an array fov _ array of panorama horizontal field angles from 1 to the maximum zoom max _ zoom, wherein the element subscripts i [0, max _ zoom-1] in the array fov _ array, and the zoom multiple of the dome camera focal length is i + 1;
and (3) selecting a horizontal field angle fov corresponding to the rectangle r:
fov=r.w*pano_fov_hor/w;
wherein w is the width of the panorama screen, and r.w is the width of the box selection rectangle r;
and calculating a zooming numerical value z, wherein the z is the minimum field angle of the dome camera meeting the field angle of the rectangular field containing the frame selection.
CN202110999994.2A 2021-08-27 2021-08-27 Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera Pending CN113840084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110999994.2A CN113840084A (en) 2021-08-27 2021-08-27 Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110999994.2A CN113840084A (en) 2021-08-27 2021-08-27 Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera

Publications (1)

Publication Number Publication Date
CN113840084A true CN113840084A (en) 2021-12-24

Family

ID=78961487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110999994.2A Pending CN113840084A (en) 2021-08-27 2021-08-27 Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera

Country Status (1)

Country Link
CN (1) CN113840084A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117082345A (en) * 2023-10-17 2023-11-17 智广海联(天津)大数据技术有限公司 PTZ camera frame selection screen control holder method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207234938U (en) * 2017-09-08 2018-04-13 云南晨玉智能交通系统有限公司 High definition linkage camera system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207234938U (en) * 2017-09-08 2018-04-13 云南晨玉智能交通系统有限公司 High definition linkage camera system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117082345A (en) * 2023-10-17 2023-11-17 智广海联(天津)大数据技术有限公司 PTZ camera frame selection screen control holder method and device

Similar Documents

Publication Publication Date Title
CN102148965B (en) Video monitoring system for multi-target tracking close-up shooting
US6519359B1 (en) Range camera controller for acquiring 3D models
US7848628B2 (en) Camera system, camera control apparatus, panorama image making method and computer program product
CN108432230B (en) Imaging device and method for displaying an image of a scene
WO2016119301A1 (en) Terminal, and image capturing method and device
CN104853105B (en) The fast automatic focusing method of three-dimensional based on the inclined photographic device of controllable camera lens
US20050264655A1 (en) Camera controller
CN111935410B (en) Quick view finding method and system for multi-camera shooting
CN110213493B (en) Device imaging method and device, storage medium and electronic device
JP3907008B2 (en) Method and means for increasing the depth of field for a photograph
CN111614951B (en) Optical axis calibration equipment and method for integrated pan-tilt camera
CN111866370A (en) Method, device, equipment, medium, camera array and assembly for synthesizing panoramic deep image
JP2002325199A (en) Electronic imaging device
CN110602376B (en) Snapshot method and device and camera
TWI484285B (en) Panorama photographing method
CN114785961A (en) Patrol route generation method, device and medium based on holder camera
CN114363522A (en) Photographing method and related device
CN113840084A (en) Method for realizing control of panoramic tripod head based on PTZ (Pan/Tilt/zoom) return technology of dome camera
CN108540720B (en) System and method for automatically selecting optimal image for bullet time
JP2001036898A (en) Camera system for generating panoramic video
CN112804450A (en) Opening method, electronic equipment and computer storage medium
JP6483661B2 (en) Imaging control apparatus, imaging control method, and program
CN113596441B (en) Optical axis adjusting device, method, system and readable storage medium
WO2020015754A1 (en) Image capture method and image capture device
KR100579135B1 (en) Method for capturing convergent-type multi-view image

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240322

AD01 Patent right deemed abandoned