GB2619136A - System for improving positioning precision of pan-tilt camera and control method therefor - Google Patents

System for improving positioning precision of pan-tilt camera and control method therefor Download PDF

Info

Publication number
GB2619136A
GB2619136A GB2303908.4A GB202303908A GB2619136A GB 2619136 A GB2619136 A GB 2619136A GB 202303908 A GB202303908 A GB 202303908A GB 2619136 A GB2619136 A GB 2619136A
Authority
GB
United Kingdom
Prior art keywords
video camera
gimbal
image
target
computing platform
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
GB2303908.4A
Inventor
Yin Rui
Yuan Jiantao
Wan Anping
Shen Yineng
Fang Chunyan
Sun Luyang
Lin Zhengyiwen
Wang Chenyang
Zhang Wenbin
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.)
Zhejiang University City College ZUCC
Original Assignee
Zhejiang University City College ZUCC
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 Zhejiang University City College ZUCC filed Critical Zhejiang University City College ZUCC
Publication of GB2619136A publication Critical patent/GB2619136A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The invention relates to the technical field of computer vision in a remote monitoring system. The invention relates to a control method for improving the positioning precision of a pan-tilt camera. The control method comprises: firstly, initialization is performed; a panoramic image of an application scenario is displayed on a display screen of a computing platform, a user selects a region of interest in the panoramic image of the application scenario, an image of the region of interest is stored as a target image, and the user selects one target image from a plurality of target images as a target to be rotated. The beneficial effects of the invention are that: control is performed on a software layer, so there is no need to modify the hardware elements of a traditional camera, the target can be accurately positioned through software operation even if the rotating axis of a camera is inaccurate, and there is no need to replace camera devices. Thus, hardware deployment costs can be greatly reduced, and the service life of camera hardware is prolonged. The present invention allows the user to balance the speed and precision of panorama composition and matching calculations based on the actual situation. The present invention is highly flexible.

Description

SYSTEM AND CONTROL METHOD FOR IMPROVING POSITIONING ACCURACY OF GIMBAL VIDEO CAMERA
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This patent application claims the benefit and priority of Chinese Patent Application No. 202111608415.3 filed on December 27, 2021 and entitled "SYSTEM AND CONTROL METHOD FOR IMPROVING POSITIONING ACCURACY OF GIMBAL VIDEO CAMERA", the disclosure of which is hereby incorporated by reference in its entirety.
TECHNICAL FIELD
100021 The present disclosure belongs to the technical field of computer vision in remote monitoring systems, and in particular, to a system and a control method for improving positioning accuracy of a gimbal video camera.
BACKGROUND
[0003] At present, the application of urban safety and monitoring devices has penetrated into all walks of life. The Chinese government continuously increases the investment in human, material, and financial resources in monitoring security, and makes efforts to the slogan of constructing "a harmonious society and a safe city". However, the traditional monitoring video camera is a gun video camera, and its monitoring position is fixed, which results in a limited monitoring range. In order to solve the problem, a gimbal video camera appears. Monitoring personnel can adjust the rotation of the gimbal video camera by operating a keyboard. Most gimbal cameras provide a preset point function to realize security defense. The preset point function is that the gimbal video camera saves a mechanical position of a current motor, and a user may turn to the position at any position. The preset point records photographing parameters such as a pitching angle and a deflection angle of a gimbal, a focal length of a camera lens, and the aperture, exposure, and white balance of a camera. The photographing parameters are stored in a Secure Digital (SD) card inside the camera and are endowed with numbers for the user to index. The user can make the camera recover its photographing parameters to the parameters values recorded by the preset point according to the preset point with a specified number, so as to photograph a picture of a preset area. The preset point function greatly facilitates the viewing of the monitoring personnel. 100041 However, the preset point function needs to be configured manually. A method taking the mechanical position as a rotating standard thereof determines that the preset point function cannot completely cover an on-site environment. When the monitoring personnel want to view the area beyond the preset point, the gimbal needs to be controlled to rotate manually, which hinders the monitoring personnel from grasping on-site situations in real time. In addition, due to the mechanical aging caused by the long-term operation of the motor, the preset point function often cannot accurately rotate to an area of interest/concern of the user after long-term use. Moreover, due to the aging of a rotating shaft of the camera, the camera is not accurate when rotating to the position of a point of concern of the user after being used for a period of time by the traditional mechanical rotation method. The camera needs to be replaced frequently, which increases the hardware cost.
SUMMARY
100051 An objective of the present disclosure is to provide a system and a control method for improving positioning accuracy of a gimbal video camera to overcome the disadvantages in the prior art.
[0006] To achieve the abovementioned objective, the present disclosure provides the following technical solutions: [0007] A control method for improving positioning accuracy of a gimbal video camera includes the following steps: [0008] S101, performing initialization first: powering on a computing platform and a gimbal video camera; after the computing platform and the gimbal video camera complete self-checking, calling, by the computing platform, network video stream sequences of the gimbal video camera frame by frame based on an tYmpeg library; then, controlling, by the computing platform, the gimbal video camera to collect image information of all application scenarios, and constructing a panoramic image of the application scenarios based on an image stitching method; [0009] S 102, displaying the panoramic image of the application scenarios on a display screen of the computing platform; selecting, by a user, an area of interest in the panoramic image of the application scenarios; saving an image of the area of interest as a target image; selecting, by the user, a target image from a plurality of target images as a target to be rotated; [0010] S 103, rough searching: receiving, by the computer platform, the target image provided by the user, obtaining coordinates of the target image and a current image by a FLANN matching algorithm, and calculating a coordinate difference between the target image and the current image; if the coordinate difference does not satisfy a threshold value condition, determining the rotating direction and the rotating distance of the gimbal video camera according to the coordinate difference, and controlling the gimbal video camera to rotate according to the rotating direction and the rotating distance; if the coordinate difference satisfies the threshold value condition, controlling the gimbal video camera not to rotate; repeatedly performing 5103 until the coordinate difference between the target image and the current image satisfies the threshold value condition; 100111 S104, accurate searching: selecting, by the computing platform, two images which are close to each other and are close to a target image matching point, and extracting a feature point; stitching the two images in the same coordinate system by a perspective transformation method, and obtaining an accurate horizontal coordinate difference Axe and an accurate vertical coordinate difference Aye; if the horizontal coordinate difference and the vertical coordinate difference satisfy the threshold value condition, transmitting, by the computing platform, a control command through a serial port of the gimbal video camera; continuously rotating the gimbal video camera according to the calculated accurate distance and direction, where the rotating time is a fixed time window length *1: ; if the horizontal coordinate difference and the vertical coordinate difference do not satisfy the threshold value condition, repeating S104 until the distance of the two images is less than a set threshold value R" and ending the image matching; and accurately positioning and outputting the longitude and latitude of the position where a target to be identified is located, so that a control circuit rotates the video camera to rotate the target area selected by the user.
100121 As a preference, the gimbal video camera is a camera which is adapted to a network video protocol, such as a Real Time Streaming Protocol (RTSP). The computing platform communicates with the gimbal video camera in a wired or wireless mode.
100131 As a preference, a specific mode in which the computing platform controls the gimbal video camera to collect the image information of all application scenarios is that: 100141 The computing platform transmits a rotation control command through a serial port of the gimbal video camera. The video camera stops after rotating leftwards or rightwards for a fixed time window length Ty In different scenarios, the user adjusts a balance factor a to balance the speed and the success rate of generating the panoramic image. A balance formula is as follows: [0015] A =1-o-, Ty o-T (1) 100161 Where, A represents the splicing success rate; T represents a fixed period of time; TI is the fixed time window length; when a =1, the speed of acquiring the image is the highest, and the success rate is the lowest; and when o -= 0, the speed of acquiring the image is the lowest, and the success rate is the highest.
[0017] After one rotation stops, the computing platform extracts a real-time video frame, and saves the video frame as a picture. The video camera continues extracting video frames and saving the video frames as pictures until all working scenario information is saved to the computing platform by the video camera.
[0018] As a preference, the image stitching method is an OpenCV-based stitching method. The computing platform performs stitching by using the saved scenario information images, so as to form a panoramic image of the application scenarios.
[0019] As a preference, S103 specifically includes the following steps: [0020] S103-1, after the computing platform receiving the target image provided by the user, matching the target image and the panoramic image based on the FLANN matching algorithm, and returning, by the FLANN matching algorithm, coordinates (X, Y) of target points with all features matched; comparing the coordinates of the two adjacent target points; if the distance between the coordinates of the two adjacent target points exceeds the length or width of the original image, redefining the target points as unmatched points; [0021] S103-2, traversing all matched points, and finding four vertexes in an area where the matched pointsare located: a point Phi'? = (min(X),min(Y))with the minimum x-axis and the minimum y-axis, a point P/,01,1,= (min(X),max(Y)) with the minimum x-axis and the maximum y-axis, a point Pht = (max(X),min(Y))with the maximum x-axis and the minimum, and a point 11n,:ht = (max(X), max(Y)) with the maximum x-axis and the maximum y-axis; if the width or the length of the area where the matched points are located is greater than that of the original image, discarding two matched points on the extreme edge of the x-axis or y-axis, and reconstructing four vertexes until the size of the image is smaller than that of the image acquired by the gimbal video camera; for the x-axis, if max(X)-min(X) is greater than the width of the original image, then discarding all coordinates with the x-axis coordinates containing max(X),min (X) of the coordinates (X, Y) of the matched target points; for the y-axis, if max(Y) -min(Y) is greater than the length of the original image, then discarding all coordinates with the y-axis coordinates containing max (Y),tniti(Y) of the coordinates (x, Y) of the matched target points; [0022] finally, calculating a midpoint (X', Y) in the matched image according to the four vertexes: [0023] Xtamax(X)-min(X) (2) nzrr - 10024 e, max(Y)-min(Y) (3) 1nud 2 [0025] S103-3, reading, by the computing platform, a current video frame, respectively comparing the current frame and the target image with the panoramic image of the application scenario, so as to obtain a matched midpoint (X: ) of the current image and a matched midpoint (X:" ,Yrn) of the target image; [0026] S103-4, determining the rotating direction of the video camera according to the distance Ax = (X"tg' -CD between the matched midpoint of the current image and the matched midpoint of the target image in an x-axis direction and the distance Ay = -Ymn,17) between the matched midpoint of the current image and the matched midpoint of the target image in a y-axis direction; transmitting, by the computing platform, a control command through a serial port of the gimbal video camera, so that the gimbal video camera continues rotating at the speed O, where the time of each rotation of the video camera is a fixed time window length T; after a rotation is completed, reading, by the computing platform, the current video frame again, and recalculating the coordinate difference between the midpoint of the matched image and the target image; if the coordinate difference is greater than a preset accuracy threshold value R" , repeating S103-1 to S103-4 until the distance between the two matched midpoints is less than the preset threshold value R. 100271 As a preference, a rotating time window is self-defined in the rough searching and accurate searching provided in S103 and S104.
[0028] T. = aT (4) 100291 T = fIT (5) 100301 Where a, fi c [0,1], and is used for assisting a user in flexibly adjusting a threshold value. When a =1, 13 =0, the maximum value is reached, the time of each rotation is long, the times of calculation is few, and the matching speed is high. When a = 0,p = 0, = T, = , T is the set minimum rotation time window. M77,
[0031] As a preference, in 5103 and S104, the computing platform controls the gimbal video camera to rotate according to the obtained rotating direction and the rotating distance. The rotating direction has the following eight cases: [0032] when Ax > 12, -R Ay R, the gimbal video camera rotates rightwards at the speed 100331 when Ax < R, -R Ay < 1?, the gimbal video camera rotates leftwards at the speed [0034] when -R Ax < R, Ay > R, the gimbal video camera rotates upwards at the speed Or; [0035] when -R Ax R Ay < R, the gimbal video camera rotates downwards at the speed 0 [0036] when Ax > R, Ay > R, the gimbal video camera rotates to the upper right part at the speed 0, ; 100371 when Ax > R, Ay -1?, the gimbal video camera rotates to the lower right part at the speed 8, ; [0038] when Ax -I?, Ay > R, the gimbal video camera rotates to the upper left part at the speed 8, ; [0039] when Ay < -I?, Ay < -I-?, the gimbal video camera rotates to the lower left part at the speed 61e; 100401 Where, R> 0, R is the preset accuracy threshold value 1?, or R. . During rough searching, when the difference between the coordinates of the camera and the target coordinates is less than or equal to RC, the rough searching is stopped. During accurate searching, when the difference between the coordinates of the camera and the target coordinates is less than or equal to R, the accurate searching is stopped.
[0041] A system for improving positioning accuracy of a gimbal video camera includes: [0042] a gimbal video camera, used for rotating for recording videos; [0043] a storage battery module and a power supply module, used for supplying power to a computing platform and the gimbal video camera; 100441 the computing platform, used for communicating with the gimbal video camera and controlling the gimbal video camera to rotate, including: [0045] an information receiving apparatus, used for calling network video stream sequences of the gimbal video camera frame by frame and receiving a target image provided by a user; [0046] a controlling apparatus, used for controlling the gimbal video camera to collect the image information of all application scenarios and controlling the gimbal video camera to rotate; [0047] a display apparatus, used for displaying the application scenario for the user to select the target image; [0048] a data processing apparatus, used for performing image feature extraction and image stitching, and acquiring the coordinate difference between the target image and the current image; and [0049] a data storage apparatus, used for saving a video frame which is extracted in real time as an image.
[0050] The present disclosure has the following beneficial effects: [0051] For the problems, in the prior art, that a preset point function needs to be configured manually and the camera needs to be replaced frequently due to the aging of a rotating shaft of the camera, the present disclosure provides a system and a control method for improving positioning accuracy of a gimbal video camera. By the system, the information of the overall scenario is gasped more clearly by constructing a panoramic image for the scenario of concern of a user; the panoramic image is compared with the target image provided by the user to a matching algorithm and the current video camera monitored image, and the algorithm controls the video camera to accurately and clearly rotate to the position of the target image provided by the user, so as to complete the monitoring of an area of interest. The problems that the traditional preset point function is inconvenient and inaccurate are solved, so that a monitoring system is more scientific.
[0052] In addition, the method of the present disclosure is controlled from a software level. A hardware part of the traditional camera does not need to be modified. A target may be positioned accurately through software operation even if the rotating shaft of the camera is not accurate. A camera device does not need to be replaced, so that the hardware deployment cost can be greatly reduced, and the service life of the hardware camera can also be prolonged. The present disclosure allows the user to balance the panorama construction and the speed and accuracy of the matching algorithm according to actual situations, so the flexibility is strong.
BRIEF DESCRIPTION OF THE DRAWINGS
[0053] To describe the technical solutions in the embodiment of the present disclosure or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiment. Apparently, the accompanying drawings in the following description are merely some embodiments of the present disclosure, and those of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts. [0054] FIG. I is a schematic diagram of system architecture for improving positioning accuracy of a gimbal video camera applied in the present disclosure; [0055] FIG. 2 is a working flowchart of a system control method for improving positioning accuracy of a gimbal video camera provided by the present disclosure; [0056] FIG. 3 is a schematic diagram of a first stage of the coordinates of a matched target image provided by the present disclosure; [0057] FIG. 4 is a schematic diagram of a second stage of the coordinates of a matched target image provided by the present disclosure; [0058] FIG. 5 is a result diagram of testing different target images in an outdoor environment in a campus in an embodiment of the present disclosure; [0059] FIG. 6 is a result diagram of testing different target images in an indoor environment in a campus in an embodiment of the present disclosure; and [0060] FIG. 7 is a result diagram of testing different target images in an indoor environment of an approximate factory in an embodiment of the present disclosure.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0061] Technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. Apparently, the described embodiments are merely part rather than all of the embodiments of the present di sclosure.On the basis of the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure.
[0062] Embodiment 1 [0063] As shown in FIG. 1, the embodiment of the present disclosure provides a system for improving positioning accuracy of a gimbal video camera, which includes: a gimbal video camera, a computing platform, a power supply module, and a storage battery. The gimbal video camera is used for rotating for recording videos. The storage battery module and the power supply module are used for supplying power to the computing platform and the gimbal video camera. The computing platform is used for communicating with the gimbal video camera and controlling the gimbal video camera to rotate, and includes: an information receiving apparatus, used for calling network video stream sequences of the gimbal video camera frame by frame and receiving a target image provided by a user; a controlling apparatus, used for controlling the gimbal video camera to collect the image information of all application scenarios and controlling the gimbal video camera to rotate; a display apparatus, used for displaying the application scenario for the user to select the target image; a data processing apparatus, used for performing image feature extraction and image stitching, and acquiring the coordinate difference between the target image and the current image; and a data storage apparatus, used for saving a video frame which is extracted in real time as an image.
[0064] Embodiment 2 100651 On the basis of Embodiment 1, Embodiment 2 of the present application provides a working flowchart of a system control method for improving positioning accuracy of a gimbal video camera in Embodiment 1, as shown in FIG. 2.Based on the commonly used and normally running computing platform, a gimbal video camera high-accuracy matching method combining a FLANN algorithm and an image perspective transformation method is used. The gimbal video camera continues interacting with an environment, and transmits a network video stream to the computing platform. The computing platform is displayed on a screen. A user selects an area of interest, and provides the image of the area to the matching algorithm. Then, the matching algorithm controls the video camera to accurately rotate to the area of interest of the user. [0066] The control method of the present disclosure includes S101 to S104.A specific process is introduced in detail below.
[0067] S101, images are stitched to construct a panoramic image.
[0068] Specifically, the computing platform transmits a rotation control command through a serial port of the gimbal video camera, so that the video camera stops after rotating leftwards (or rightwards, depending on a specific working scenario) for a fixed time window length i. T represents a fixed period of time, and a is a balance factor. In different scenarios, the user may adjust o-to balance the speed and the success rate of generating the panoramic image. A balance formula may be expressed follows: [0069] A =1-o- = o-2" (1) [0070] Where, A represents the success rate of stitching. When a = 1, it means that the speed of acquiring an image is the highest, but relatively, the success rate is the lowest. When o-= 0, it means that the speed of acquiring the image is the lowest, but relatively, the success rate is the highest. The balance factor may be adjusted by the user according to a target scenario and a specific requirement.
[0071] After one rotation stops, the computing platform extracts a real-time video frame, and the image is saved on the computing platform. The video camera continues this action until all required working scenario information has been saved on the computing platform by the video camera. Then, based on a stitching method in OpenCV, the computing platform performs stitching by using the saved scenario information image, so as to form a panoramic image. [0072] Step 102, the user selects an area of interest.
[0073] Specifically, the computing platform provides the panoramic image to the user. The user may take any area in the working scenario as an area of interest in advance, and the image of the area of interest is saved as a target image. Then, the user may select a target image from a plurality of target images as a target to be rotated.
[0074] S103, rough searching: coordinates of a target and a current image are acquired through a FLANN algorithm, and the video camera is controlled to rotate according to a coordinate difference. The coordinate difference is calculated again. If a threshold value condition is not satisfied, S103 is repeated until the threshold value condition is satisfied.
100751 Specifically, after the computing platform receives the target image of the user, the target image is matched with the panoramic image based on the FLANN matching algorithm. The FLANN will return the target point coordinates (X,Y) with all features matched. First, considering that there will be many similar devices or items in an industrial scenario, the FLANN will easily match two feature points that are far away from each other but have similar features.At this moment, compared with two adjacent points, if the distance exceeds the length (or the width) of the original image, then the points are redefined as unmatched points. Then, all matching points are traversed. Four vertexes are found, that is, a point Pr = (min(X), min(Y)) with the minimum x-axis and the minimum y-axis, a point 1 = (min(X),max(Y))with the minimum x-axis and the maximum y-axis, a point CI = (niax(X), min(Y)) with the maximum x-axis and the minimum y-axis, and a point Pkgighht = (max(X), max(Y)) with the maximum x-axis and the maximum y-axis. If the width or the length is greater than that of the original image, the two matched points on the extreme edge of the x-axis (or y-axis) are discarded, and four vertexes are reconstructed until the size of the image is smaller than that of the image of the video camera. Finally, a midpoint (X;;;lr,Car) in the matched image is calculated according to the four vertexes: [0076] X; -max(X)-min(X) (2) :dgel max(Y)-min(Y) (3) [00771 Ynt,,aftet = 100781 Further, rough searching is performed first in a searching stage. The computing platform reads the current video frame. The current frame and the target image are respectively compared with the panoramic image to obtain a current image matched midpoint (X7,11;; ) and the target image matched midpoint (X"r, Cadrg) . The rotating direction of the video camera is determined according to the x-axis distance Ay = (Cr' -X:) and the y-axis distance Ay = (Cadrget -Y) between the two points.
[0079] The computing platform transmits a control command through a serial port of the gimbal video camera, so that the video camera continues rotating at the speed BC. The rotating direction has the following eight cases: A::v R Ay: R [0080] when the gimbal video camera rotates rightwards at the speed [0081] when Ax <R, the gimbal video camera rotates leftwards at the speed BC.
[0082] when -R < Ar < R Ay > R, the gimbal video camera rotates upwards at the speed Bc; [0083] when -R < AY < R AY < , the gimbal video camera rotates downwards at the speed 0, . [0084] when Ax > R, Ay > R, the gimbal video camera rotates to the upper right part at the speed Be; [0085] when Ax > R Ay -R the gimbal video camera rotates to the lower right part at the speed Bt; [0086] when Ax < -R, Ay > R, the gimbal video camera rotates to the upper left part at the speed Be; [0087] when AY < -R, Ay -R the gimbal video camera rotates to the lower left part at the speed e; [0088] Where, R> 0, R is one of the preset accuracy threshold value R and R, . [0089] During this stage, each rotation time of the video camera is a fixed time window length T.After each rotation is completed, the computing platform reads the current video frame again, and recalculates a coordinate difference between the midpoint of the matched image and the target image. If a preset accuracy threshold value is not satisfied, the operation of the rough searching stage is repeated until the distance between the two matched midpoints is smaller than the set threshold value RC.
[0090] S104, accurate searching: a feature point is extracted, and image perspective transformation is performed to obtain an accurate coordinate difference. The video camera is controlled to rotate according to the coordinate difference. The coordinate difference is calculated again. If a threshold value condition is not satisfied, S104 is repeated until the threshold value condition is satisfied.
[0091] Specifically, the current video frame is close to but is not completely matched with the target image. The FLANN cannot complete a pixel level accurate matching function in this case. The computing platform extracts the feature points of the two images. Since the images are close, the distance between the matched points is close. The two images may be stitched in the same coordinate system by using perspective transformation, so that accurate distance Ax, , Ayis obtained. The computing platform transmits a control command through a serial port of the gimbal video camera, so that the video camera continues rotating according to the calculated accurate distance and direction. The rotating time is a fixed time window length T. The step is repeated, and the matching method is ended until the distance between the two images is less than the set threshold value R, . [0092] In the two-stage method of rough searching and accurate searching, the rotating time window of the two stages is 1,, and T may be set by self-defining, so as to achieve the balance of the speed and the accuracy.
100931 In the rough searching and accurate searching provided in S103 and S104, the rotating time window is self-defined: [0094] l = al (4) [0095] TI = FT (5) 100961 Where, a 13 e [0,1] and the parameters may assist a user in flexibly adjusting a threshold value. When a fi, at this moment, the system pursues speed in a rough matching stage, Ti reaches the maximum value, which means that the time of each rotation is long, the times of calculation is few, and the matching speed is high. However, there may be a problem about rotating too much. The system pursues the accuracy in the accurate matching stage, TN reaches the minimum value, which means that the time of each rotation is short, the times of calculation is more, and the matching speed is low. However, the matching accuracy is high, and the failure rate is low. It is particularlyto be noted that, when a = 0,0 = 0, Te and T, cannot drop to 0 directly. At this moment, T. =7 = T",,, where T",", is the set minimum rotating time window.
[0097] As shown in FIG. 3, the target image is matched with the current image in the first stage by using the FLANN algorithm. The midpoint (Cdget,Yin of the target image and the midpoint (XIY:"°,' ) of the current image is calculated, and the difference between the midpoints is further calculated. If the vertical and horizontal coordinates of the difference is greater than a threshold value Re, then the video camera needs to be adjusted. The method is that a rotating command is transmitted to the video camera through the serial port when the computing platform is non-nal, so that the video camera rotates to a target area, and a default system works at high-accuracy settings, that is, a = 0, fl = 0. When the difference is smaller than a threshold value R, , the computing platform transmits a stopping command to the video camera through the serial port; and if the difference does not exceeds the threshold value R, at the beginning, then the video camera stops.
100981 As shown in FIG. 4, after the matching of the first stage is completed, the current image is close to but is not completely accurately matched with the target image. In the second stage, the image perspective transformation is constructed by using the matched feature points obtained by FLANN, so as to obtain the accurate distance Ayr Ay" between the two images. The rotating method is the same as that in the first stage. Finally, the camera is rotated to the target image. The error does not exceed a threshold value R".
[0099] As shown in FIG. 5, FIG. 6, and FIG. 7, in an indoor environment of a campus in normal weather, one hundred tests are respectively performed in an indoor environment in the campus and in an indoor environment of an approximate factory, and one target image is changed after every ten tests. The success rates of the tests are 99%, 100%, and 100% respectively, which fully shows that the method provided by the present disclosure can perform accurate matching in various cases and different target images, and can greatly improve the work efficiency of monitoring personnel.
1001001Various embodiments in the present specification are described in a progressive manner. Each embodiment focuses on differences from other embodiments, and the same and similar parts of various embodiments may refer to one another.
[00101]In this specification, specific examples are used to describe the principle and implementation manners of the present disclosure. The description of the embodiments above is merely intended to help understand the method and core idea of the present disclosure. In addition, those skilled in the art may make modifications based on the idea of the present disclosure with respect to the specific implementation manners and the application scope. In conclusion, the content of the present description shall not be construed as a limitation to the present disclosure.

Claims (8)

  1. WHAT IS CLAIMED IS: 1. A control method for improving positioning accuracy of a gimbal video camera, comprising the following steps: 5101, performing initialization first: powering on a computing platform and a gimbal video camera; after the computing platform and the gimbal video camera complete self-checking, calling, by the computing platform, network video stream sequences of the gimbal video camera frame by frame based on an ffmpeg library; then, controlling, by the computing platform, the gimbal video camera to collect image information of all application scenarios, and constructing a panoramic image of the application scenarios based on an image stitching method; S102, displaying the panoramic image of the application scenarios on a display screen of the computing platform; selecting, by a user, an area of interest in the panoramic image of the application scenarios; saving an image of the area of interest as a target image; selecting, by the user, a target image from a plurality of target images as a target to be rotated; 5103, rough searching: receiving, by the computer platform, the target image provided by the user, obtaining coordinates of the target image and a current image by a FLANN matching algorithm, and calculating a coordinate difference between the target image and the current image; if the coordinate difference does not satisfy a threshold value condition, determining the rotating direction and the rotating distance of the gimbal video camera according to the coordinate difference, and controlling the gimbal video camera to rotate according to the rotating direction arid the rotating distance; if the coordinate difference satisfies the threshold value condition, controlling the gimbal video camera not to rotate; repeatedly performing 5103 until the coordinate difference between the target image and the current image satisfies the threshold value condition; S104, accurate searching: selecting, by the computing platform, two images which are close to each other and are close to a target image matching point, and extracting a feature point; stitching the two images in the same coordinate system by a perspective transformation method, and obtaining an accurate horizontal coordinate difference AxP and an accurate vertical coordinate difference Ay i P, f the horizontal coordinate difference and the vertical coordinate difference satisfy the threshold value condition, transmitting, by the computing platform, a control command through a serial port of the gimbal video camera; continuously rotating the gimbal video camera according to the calculated accurate distance and direction, where the rotating time is a fixed time window length s; if the horizontal coordinate difference and the vertical coordinate difference do not satisfy the threshold value condition, repeating S104 until the distance of the two images is less than a set threshold value Rs, and ending the image matching; and accurately positioning and outputting the longitude and latitude of the position where a target to be identified is located, so that a control circuit rotates the video camera to rotate the target area selected by the user.
  2. 2. The control method for improving positioning accuracy of a gimbal video camera according to claim 1, wherein the gimbal video camera is a camera which is adapted to a network video protocol; and the computing platform communicates with the gimbal video camera in a wired or wireless mode.
  3. 3. The control method for improving positioning accuracy of a gimbal video camera according to claim 1, wherein a specific mode in which the computing platform controls the gimbal video camera to collect the image information of all application scenarios is that: the computing platform transmits a rotation control command through a serial port of the gimbal video camera; the video camera stops after rotating leftwards or rightwards for a fixed time window length Tq; in different scenarios, the user adjusts a balance factor to balance the speed and the success rate of generating the panoramic image; and a balance formula is as follows: = crT wherein, A represents the splicing success rate; T represents a fixed period of time; q is the fixed time window length, when a =1, the speed of acquiring the image is the highest, and the success rate is the lowest; when a = 0, the speed of acquiring the image is the lowest, and the success rate is the highest, after one rotation stops, the computing platform extracts a real-time video frame, and saves the video frame as a picture; and the video camera continues extracting video frames and saving the video frames as pictures until all working scenario information is saved to the computing platform by the video camera.
  4. 4. The control method for improving positioning accuracy of a gimbal video camera according to claim 3, wherein the image stitching method is an OpenCV-based stitching method; and the computing platform performs stitching by using the saved scenario information images, so as to form a panoramic image of the application scenario.
  5. 5. The control method for improving positioning accuracy of a gimbal video camera according to claim 4, wherein 5103 specifically comprises the following steps: S103-1, after the computing platform receiving the target image provided by the user, matching the target image and the panoramic image based on the FLANN matching algorithm, and returning, by the FLANN matching algorithm, coordinates L1'11 of target points with all features matched; comparing the coordinates of the two adjacent target points; if the distance between the coordinates of the two adjacent target points exceeds the length or width of the original image, redefining the target points as unmatched points, 5103-2, traversing all matched points, and finding four vertexes in an area where the P'ff (min(X), min(Y)) matched pointsare located. a point 1- with the minimum x-axis and the P"(min(X), max(Y)) . minimum y-axis, a point h'gh with the minimum x-axis and the maximum Pt = (max(X), min(Y)) y-axis, a point /on with the maximum x-axis and the minimum, and a * pnght (max(X), max(Y)) . point 'ugh with the maximum x-axis and the maximum y-axis; if the width or the length of the area where the matched points are located is greater than that of the original image, discarding two matched points on the extreme edge of the x-axis or y-axis, and reconstructing four vertexes until the size of the image is smaller than that of the image acquired s X ( i m -X n) () by the gimbal video camera; for the x-axis, if max greater than the width of the original image, then discarding all coordinates with the x-axis coordinates containing max (X) ,min (X) of the coordinates (x,y) of the matched target points; for the y-axis, if max(Y) -min(Y) is greater than the length of the original image, then discarding all coordinates max (Y), mitt (V) with the y-axis coordinates containing of the coordinates of nates 'of the matched target points; 1-V=a,17,:i7a\ finally, calculating a midpoint) in the matched image according to the four vertexes: xrarg" _ max(X) -m n(X) mid 2 (2) max(Y)-min(Y) 2 (3) S103-3, reading, by the computing platform, a current video frame, respectively comparing the current frame and the target image with the panoramic image of the application scenario, so nOW Y"'" d ' nud) of the current image and a matched midpoint as to obtain a matched midpoint tralget ytarget mid of the target image; S103-4, determining the rotating direction of the video camera according to the distance AK (X,EL8 et -X"n:*) d between the matched midpoint of the current image and the matched A v = (Y 'rg -V-) midpoint of the target image in an x-axis direction and the distance d nnd mid between the matched midpoint of the current image and the matched midpoint of the target image in a y-axis direction; transmitting, by the computing platform, a control command through a serial port of the gimbal video camera, so that the gimbal video camera continues rotating at the speed where the time of each rotation of the video camera is a fixed time window length; after a rotation is completed, reading, by the computing platform, the current video frame again, and recalculating the coordinate difference between the midpoint of the matched image and the target image; if the coordinate difference is greater than a preset accuracy threshold value Re, repeating S103-1 to S103-4 until the distance between the two matched midpoints is less than the preset threshold value I?, . 6. The control method for improving positioning accuracy of a gimbal video camera according to claim 5, wherein a rotating time window is self-defined in the rough searching and accurate searching provided in S103 and S104. [-a]
  6. (4) T, fir (5) whereina' P e [0,1], and is used for assisting a user in flexibly adjusting a threshold value, when a - -0, the maximum value is reached, the time of each rotation is long, the times of T. calculation is few, and the matching speed is high; and when a -= ° T = = im!, mms the set minimum rotation time window.
  7. 7. The control method for improving positioning accuracy of a gimbal video camera according to claim 5, wherein in S103 and S104, the computing platform controls the gimbal video camera to rotate according to the obtained rotating direction arid the rotating distance; and the rotating direction has the following eight cases: when Ax R, Ay R, the gimbal video camera rotates rightwards at the speed 8, ; when Ax < R, Ay R the gimbal video camera rotates leftwards at the speed; when 61 when Ax, Ay > R, the gimbal video camera rotates upwards at the speed c; when Ax, Ay <1?, the gimbal video camera rotates downwards at the speed gd; Ax > R, Ay > R the gimbal video camera rotates to the upper right part at the speed when Ax >R, AY -R, the gimbal video camera rotates to the lower right part at the speed, when Ax -1?, AY R, the gimbal video camera rotates to the upper left part at the speed when Ax, AY -R, the gimbal video camera rotates to the lower left part at the 0. ; wherein, R> 0 R is the preset accuracy threshold value -1* or R. ; during rough searching, when the difference between the coordinates of the camera and the target coordinates is less than or equal to Rc, the rough searching is stopped; and during accurate searching, when the difference between the coordinates of the camera and the target coordinates is less than or equal to I?, , the accurate searching is stopped.
  8. 8. A control method for improving positioning accuracy of a gimbal video camera according to claim 1, comprising: a gimbal video camera, used for rotating for recording videos; a storage battery module and a power supply module, used for supplying power to a computing platform and the gimbal video camera; the computing platform, used for communicating with the gimbal video camera and controlling the gimbal video camera to rotate, including: an information receiving apparatus, used for calling network video stream sequences of the gimbal video camera frame by frame and receiving a target image provided by a user; a controlling apparatus, used for controlling the gimbal video camera to collect the image information of all application scenarios and controlling the gimbal video camera to rotate; a display apparatus, used for displaying the application scenario for the user to select the target image; a data processing apparatus, used for performing image feature extraction and image stitching, and acquiring the coordinate difference between the target image and the current image; and a data storage apparatus, used for saving a video frame which is extracted in real time as an image.
GB2303908.4A 2021-12-27 2022-12-15 System for improving positioning precision of pan-tilt camera and control method therefor Pending GB2619136A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111608415.3A CN113989124B (en) 2021-12-27 2021-12-27 System for improving positioning accuracy of pan-tilt-zoom camera and control method thereof
PCT/CN2022/139161 WO2023125028A1 (en) 2021-12-27 2022-12-15 System for improving positioning precision of pan-tilt camera and control method therefor

Publications (1)

Publication Number Publication Date
GB2619136A true GB2619136A (en) 2023-11-29

Family

ID=79734413

Family Applications (1)

Application Number Title Priority Date Filing Date
GB2303908.4A Pending GB2619136A (en) 2021-12-27 2022-12-15 System for improving positioning precision of pan-tilt camera and control method therefor

Country Status (3)

Country Link
CN (1) CN113989124B (en)
GB (1) GB2619136A (en)
WO (1) WO2023125028A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989124B (en) * 2021-12-27 2022-04-19 浙大城市学院 System for improving positioning accuracy of pan-tilt-zoom camera and control method thereof
CN115063452B (en) * 2022-06-13 2024-03-26 中国船舶重工集团公司第七0七研究所九江分部 Cloud deck camera tracking method for offshore targets

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140049600A1 (en) * 2012-08-16 2014-02-20 Nice-Systems Ltd. Method and system for improving surveillance of ptz cameras
CN103607540A (en) * 2013-12-02 2014-02-26 南京南自信息技术有限公司 Method for improving presetting bit accuracy of pan-tilt camera
CN105812724A (en) * 2014-12-31 2016-07-27 浙江大华技术股份有限公司 Panoramic head controlling method and system
WO2018135906A1 (en) * 2017-01-20 2018-07-26 한화에어로스페이스(주) Camera and image processing method of camera
CN109493278A (en) * 2018-10-24 2019-03-19 北京工业大学 A kind of large scene image mosaic system based on SIFT feature
CN113989124A (en) * 2021-12-27 2022-01-28 浙大城市学院 System for improving positioning accuracy of pan-tilt-zoom camera and control method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100919247B1 (en) * 2008-03-12 2009-09-30 중앙대학교 산학협력단 Apparatus and method for panorama image generation and apparatus and method for object tracking using the same
CN103826103B (en) * 2014-02-27 2017-03-22 浙江宇视科技有限公司 Cruise control method for tripod head video camera
CN108574825B (en) * 2017-03-10 2020-02-21 华为技术有限公司 Method and device for adjusting pan-tilt camera

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140049600A1 (en) * 2012-08-16 2014-02-20 Nice-Systems Ltd. Method and system for improving surveillance of ptz cameras
CN103607540A (en) * 2013-12-02 2014-02-26 南京南自信息技术有限公司 Method for improving presetting bit accuracy of pan-tilt camera
CN105812724A (en) * 2014-12-31 2016-07-27 浙江大华技术股份有限公司 Panoramic head controlling method and system
WO2018135906A1 (en) * 2017-01-20 2018-07-26 한화에어로스페이스(주) Camera and image processing method of camera
CN109493278A (en) * 2018-10-24 2019-03-19 北京工业大学 A kind of large scene image mosaic system based on SIFT feature
CN113989124A (en) * 2021-12-27 2022-01-28 浙大城市学院 System for improving positioning accuracy of pan-tilt-zoom camera and control method thereof

Also Published As

Publication number Publication date
CN113989124A (en) 2022-01-28
CN113989124B (en) 2022-04-19
WO2023125028A1 (en) 2023-07-06

Similar Documents

Publication Publication Date Title
GB2619136A (en) System for improving positioning precision of pan-tilt camera and control method therefor
US8319851B2 (en) Image capturing apparatus, face area detecting method and program recording medium
WO2016119301A1 (en) Terminal, and image capturing method and device
US20050179780A1 (en) Face detecting apparatus and method
EP1672915B1 (en) Method and apparatus for controlling privacy mask display
US20210051273A1 (en) Photographing control method, device, apparatus and storage medium
TWI420901B (en) Image capturing device, image capturing method and image capturing program
JP2008259056A (en) Imaging apparatus and universal head control method
CN113273172A (en) Panorama shooting method, device and system and computer readable storage medium
US20150334373A1 (en) Image generating apparatus, imaging apparatus, and image generating method
JP6529533B2 (en) Imaging device, control method of imaging device, and program
KR20150078275A (en) Digital Photographing Apparatus And Method For Capturing a Moving Subject
CN104170366B (en) Imaging device and image processing method
JP2000101895A (en) Image signal photographing device and its method
JP2005175970A (en) Imaging system
JP6831473B2 (en) Imaging device and its control method and control program
JPH10294890A (en) Automatic/manual photographic camera system
WO2021258249A1 (en) Image acquisition method, and electronic device, and mobile device
JP2011188225A (en) Electronic camera
US20220091487A1 (en) Shooting control method and shooting control device
JP7051586B2 (en) Imaging equipment, imaging methods and programs
JP2012099887A (en) Imaging device
CN114125256A (en) Shooting method for multi-camera module with built-in pan-tilt
JP2010028418A (en) Imaging apparatus
JP3726972B2 (en) Subject recognition apparatus and method

Legal Events

Date Code Title Description
789A Request for publication of translation (sect. 89(a)/1977)

Free format text: PCT PUBLICATION NOT PUBLISHED