[go: up one dir, main page]

CN118646857A - A method for measuring the response delay of a pan-tilt camera in a video monitoring system - Google Patents

A method for measuring the response delay of a pan-tilt camera in a video monitoring system Download PDF

Info

Publication number
CN118646857A
CN118646857A CN202410661248.6A CN202410661248A CN118646857A CN 118646857 A CN118646857 A CN 118646857A CN 202410661248 A CN202410661248 A CN 202410661248A CN 118646857 A CN118646857 A CN 118646857A
Authority
CN
China
Prior art keywords
pan
video
tilt camera
monitoring system
video monitoring
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
CN202410661248.6A
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 Metro Information Development Co ltd
Original Assignee
Beijing Metro Information Development 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 Metro Information Development Co ltd filed Critical Beijing Metro Information Development Co ltd
Priority to CN202410661248.6A priority Critical patent/CN118646857A/en
Publication of CN118646857A publication Critical patent/CN118646857A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/62Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/752Contour matching
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/48Matching video sequences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computational Linguistics (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

本发明公开了一种测量视频监测系统云台摄像头响应时延的方法,包括以下步骤:获取测试点位信息,基于所述测试点位信息确定待检测视频区域;基于鼠标单击操作对云台下达控制指令,捕获鼠标单击操作的时刻为开始时刻;基于特征匹配和背景减除算法,检测所述待检测视频区域内的视频变化并进行轮廓计算,获得视频变化轮廓面积;预设阈值,所述视频变化轮廓面积占比满足阈值的第一时刻为结束时刻;基于所述结束时刻与开始时刻的时间差,获得云台摄像头的响应时延。本发明提出的测量方法不仅简化了测试过程,还提高了测试的可操作性和实用性,为视频监测系统的云台摄像头的控制响应性能评估提供了一种便捷而可靠的时延测量手段。

The present invention discloses a method for measuring the response delay of a pan-tilt camera of a video monitoring system, comprising the following steps: obtaining test point information, determining a video area to be detected based on the test point information; issuing a control instruction to the pan-tilt based on a mouse click operation, capturing the moment of the mouse click operation as the start moment; detecting the video changes in the video area to be detected and performing contour calculation based on feature matching and background subtraction algorithms to obtain the video change contour area; presetting a threshold, and the first moment when the proportion of the video change contour area meets the threshold is the end moment; based on the time difference between the end moment and the start moment, obtaining the response delay of the pan-tilt camera. The measurement method proposed in the present invention not only simplifies the test process, but also improves the operability and practicality of the test, and provides a convenient and reliable delay measurement method for evaluating the control response performance of the pan-tilt camera of the video monitoring system.

Description

一种测量视频监测系统云台摄像头响应时延的方法A method for measuring the response delay of a pan-tilt camera in a video monitoring system

技术领域Technical Field

本发明属于电子设备技术领域,尤其涉及一种测量视频监测系统云台摄像头响应时延的方法。The invention belongs to the technical field of electronic equipment, and in particular relates to a method for measuring the response delay of a pan/tilt camera of a video monitoring system.

背景技术Background Art

随着技术的迅速发展,视频监测系统在安防、监控以及其他领域中的应用变得日益广泛。这些系统通常由摄像头、图像处理单元和中央服务器等组成,用于捕捉、处理和存储监测场景的图像和视频数据。其中,云台摄像头作为视频监测系统的关键组件之一,具备远程控制和调整视角的功能,为监控人员提供了极大的灵活性。With the rapid development of technology, video surveillance systems are becoming more and more widely used in security, monitoring and other fields. These systems are usually composed of cameras, image processing units and central servers, which are used to capture, process and store images and video data of monitoring scenes. Among them, PTZ cameras, as one of the key components of video surveillance systems, have the functions of remote control and adjustment of viewing angles, providing great flexibility for monitoring personnel.

云台摄像头的应用涵盖了安防领域、交通监管、工业监测以及智能城市建设等多个领域。其远程可控性和灵活性使得云台摄像头成为处理各种监测场景的理想选择,为实现有效的监控和管理提供了技术支持。The application of PTZ cameras covers many fields, including security, traffic supervision, industrial monitoring, and smart city construction. Its remote controllability and flexibility make PTZ cameras an ideal choice for handling various monitoring scenarios, providing technical support for effective monitoring and management.

然而,随着对监测场景复杂性的不断增加,远程控制云台摄像头所涉及的系统响应时延成为一个日益突出的技术挑战。这种时延受到多种因素的影响,包括但不限于网络延迟、系统处理速度和通信协议。这种响应时延的存在直接影响了监控人员对实时场景的迅速反应能力,从而可能影响到监测系统的实时性和响应性。However, with the increasing complexity of monitoring scenes, the system response delay involved in remotely controlling PTZ cameras has become an increasingly prominent technical challenge. This delay is affected by many factors, including but not limited to network latency, system processing speed, and communication protocol. The existence of this response delay directly affects the monitoring personnel's ability to respond quickly to real-time scenes, which may affect the real-time and responsiveness of the monitoring system.

尽管目前已经有一些方法用于测量系统响应时延,如人工使用秒表记录时延的方法,但在视频监测系统中云台摄像头的特殊情境下,现有技术可能存在一定的局限性。因此,迫切需要提出一种新的方法,以更准确地测量云台摄像头的响应时延,并有针对性地解决当前技术面临的问题。Although there are some methods for measuring system response delay, such as manually using a stopwatch to record the delay, the existing technology may have certain limitations in the special situation of PTZ cameras in video surveillance systems. Therefore, it is urgent to propose a new method to more accurately measure the response delay of PTZ cameras and solve the problems faced by current technologies in a targeted manner.

发明内容Summary of the invention

为解决上述技术问题,本发明提出了一种测量视频监测系统云台摄像头响应时延的方法,旨在利用计算机视觉有效测量和优化云台摄像头的响应时延,提高远程控制云台摄像头的效率,从而更好地满足不断增长的监测需求,以解决上述现有技术存在的问题。In order to solve the above technical problems, the present invention proposes a method for measuring the response delay of a pan-tilt camera in a video monitoring system, aiming to use computer vision to effectively measure and optimize the response delay of the pan-tilt camera, improve the efficiency of remote control of the pan-tilt camera, so as to better meet the growing monitoring needs and solve the problems existing in the above-mentioned prior art.

为实现上述目的,本发明提供了一种测量视频监测系统云台摄像头响应时延的方法,包括以下步骤:To achieve the above object, the present invention provides a method for measuring the response delay of a pan/tilt camera of a video monitoring system, comprising the following steps:

获取测试点位信息,基于所述测试点位信息确定待检测视频区域;Acquire test point information, and determine a video area to be detected based on the test point information;

基于鼠标单击操作对云台下达控制指令,捕获鼠标单击操作的时刻为开始时刻;Issue control instructions to the PTZ based on the mouse click operation, and the moment of capturing the mouse click operation is the start moment;

基于特征匹配和背景减除算法,检测所述待检测视频区域内的视频变化并进行轮廓计算,获得视频变化轮廓面积;Based on feature matching and background subtraction algorithms, detecting video changes in the video area to be detected and performing contour calculation to obtain a video change contour area;

预设阈值,所述视频变化轮廓面积占比满足阈值的第一时刻为结束时刻;A preset threshold value is used, and the first moment when the proportion of the contour area of the video change meets the threshold value is the end moment;

基于所述结束时刻与开始时刻的时间差,获得云台摄像头的响应时延。Based on the time difference between the end time and the start time, the response delay of the pan-tilt camera is obtained.

可选地,确定开始时刻的过程包括:测试开始,视频监测系统对鼠标单击操作进行监听,当监听到基于鼠标单击操作进行云台摄像头控制时,记录当前的视频监测系统时间戳,确定下达云台摄像头控制指令的时刻为开始时刻。Optionally, the process of determining the start time includes: when the test starts, the video monitoring system monitors the mouse click operation, and when the pan-tilt camera control based on the mouse click operation is monitored, the current video monitoring system timestamp is recorded, and the time when the pan-tilt camera control instruction is issued is determined as the start time.

可选地,确定结束时刻的过程包括:在待检测视频区域内,基于特征匹配算法对云台摄像头移动前后的两帧图像进行特征提取,基于提取的特征参数计算图像空间坐标变换参数,基于变换参数排除云台摄像头抖动干扰;然后采用基于OpenCV库的背景减除法算法,将云台视频监控画面中视频帧的前景与后景分离,获取前景图像的物体轮廓,基于所述前景图像的物体轮廓计算视频变化轮廓面积,预设阈值,所述视频变化轮廓面积满足阈值的第一时刻为结束时刻。Optionally, the process of determining the end time includes: in the video area to be detected, based on the feature matching algorithm, performing feature extraction on the two frames of images before and after the movement of the pan-tilt camera, calculating the image space coordinate transformation parameters based on the extracted feature parameters, and eliminating the interference of the pan-tilt camera jitter based on the transformation parameters; then using the background subtraction algorithm based on the OpenCV library to separate the foreground and background of the video frame in the pan-tilt video surveillance screen, obtain the object contour of the foreground image, calculate the video change contour area based on the object contour of the foreground image, preset a threshold, and the first moment when the video change contour area meets the threshold is the end time.

可选地,排除云台摄像头抖动干扰的过程包括:Optionally, the process of eliminating the interference of the PTZ camera jitter includes:

采用基于ORB关键点的特征匹配方法对图像进行特征描述,在图像中找到与周围像素存在明显差异的像素作为关键点,并计算每个关键点的描述子;The feature matching method based on ORB key points is used to describe the features of the image. The pixels that are significantly different from the surrounding pixels are found as key points in the image, and the descriptors of each key point are calculated.

通过描述子集合中每个描述子与查询描述子之间的汉明距离,对图像进行特征匹配;Perform feature matching on the image by using the Hamming distance between each descriptor in the descriptor set and the query descriptor;

对所有汉明距离按照从小到大的顺序排序,选择排序序列中前90%的描述子作为匹配结果;Sort all Hamming distances from small to large, and select the first 90% of the descriptors in the sorted sequence as the matching results;

计算单应性矩阵,判断画面水平和竖直两个方面的移动距离,通过视差的方法排除云台摄像头抖动干扰。Calculate the homography matrix to determine the horizontal and vertical movement distances of the image, and eliminate the interference of the gimbal camera shake through the parallax method.

可选地,基于单应性矩阵获取移动距离的过程包括:基于同一点在不同两张图像中的位置表示,获取两张图像之间的单应性矩阵;基于最小二乘法求解所述单应性矩阵,获得两个图像之间的映射关系,基于所述映射关系获得水平方位和垂直方位图像的移动距离。Optionally, the process of obtaining the moving distance based on the homography matrix includes: obtaining the homography matrix between the two images based on the position representation of the same point in two different images; solving the homography matrix based on the least squares method to obtain the mapping relationship between the two images, and obtaining the moving distance of the horizontal and vertical images based on the mapping relationship.

可选地,获取视频变化轮廓面积之前还包括:将前景图像转换为灰度图,并进行高斯模糊和二值化的预处理。Optionally, before obtaining the video change contour area, the method further includes: converting the foreground image into a grayscale image, and performing Gaussian blurring and binarization preprocessing.

可选地,获取视频变化轮廓面积的过程包括:基于OpenCV库的finfContours()函数和drawContours()函数描绘出预处理后的前景图像的物体轮廓,然后基于所述物体轮廓,通过contourArea()函数计算视频变化轮廓面积。Optionally, the process of obtaining the video change contour area includes: depicting the object contour of the preprocessed foreground image based on the finfContours() function and the drawContours() function of the OpenCV library, and then calculating the video change contour area based on the object contour through the contourArea() function.

可选地,所述测试点位信息包括测试点位名称以及测试数据次数。Optionally, the test point information includes a test point name and a test data number.

与现有技术相比,本发明具有如下优点和技术效果:Compared with the prior art, the present invention has the following advantages and technical effects:

相较于传统的人工方法,本发明准确获取测试人员在视频监测系统上进行云台摄像头的控制时刻和云台摄像头成功响应的时刻,即开始时刻和结束时刻,并通过开始时刻和结束时刻的时刻差来获取云台摄像头的控制响应时延,不仅简化了测试过程,还提高了测试的可操作性和实用性,为视频监测系统的云台摄像头的控制响应性能评估提供了一种便捷而可靠的时延测量手段。Compared with the traditional manual method, the present invention accurately obtains the moment when the tester controls the pan-tilt camera on the video monitoring system and the moment when the pan-tilt camera successfully responds, that is, the start time and the end time, and obtains the control response delay of the pan-tilt camera through the time difference between the start time and the end time. It not only simplifies the test process, but also improves the operability and practicality of the test, and provides a convenient and reliable delay measurement method for the control response performance evaluation of the pan-tilt camera of the video monitoring system.

本发明通过捕获测试人员的鼠标单击操作获取开始时刻,通过图像视频帧的变化获取结束时刻,从而提高了时延测量的准确性,能实现更高效、更准确的测量时延。The present invention obtains the start time by capturing the mouse click operation of the tester, and obtains the end time by the change of the image video frame, thereby improving the accuracy of delay measurement and achieving more efficient and accurate measurement of delay.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

图1为本发明实施例的测量云台摄像头控制响应时延方法的流程示意图;FIG1 is a schematic flow chart of a method for measuring a pan-tilt camera control response delay according to an embodiment of the present invention;

图2为本发明实施例的排除云台摄像头抖动对视频画面变化检测干扰的流程示意图;FIG2 is a schematic diagram of a process for eliminating interference of pan/tilt camera jitter on video picture change detection according to an embodiment of the present invention;

图3为本发明实施例的检测云台视频监测画面中图像变化的流程示意图。FIG. 3 is a schematic diagram of a process of detecting image changes in a PTZ video monitoring screen according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

实施例一Embodiment 1

本实施例中提供一种测量视频监测系统云台摄像头响应时延的方法,通过准确获取测试人员在视频监测系统上进行云台摄像头的控制时刻和云台摄像头成功响应的时刻之差,来获取云台摄像头的控制响应时延。该操作过程包括从测试人员开始鼠标单击云台摄像头操作按钮至视频监测系统画面中云台视频监控区域画面变化满足阈值要求。首先,捕获测试人员在视频监测系统通过鼠标单击对云台摄像头的控制事件,确定出针对云台摄像头控制操作的开始时刻ts。然后,基于特征匹配技术对待检视频区域S进行侦测,从移动的视频帧画面中确定出云台监控画面到达稳定画面的最后一帧的结束时刻te,将结束时刻和开始时刻之间的时间差确定为视频监测系统调用实时视频的时延。In this embodiment, a method for measuring the response delay of the pan-tilt camera of a video monitoring system is provided, and the control response delay of the pan-tilt camera is obtained by accurately obtaining the difference between the moment when the tester controls the pan-tilt camera on the video monitoring system and the moment when the pan-tilt camera successfully responds. The operation process includes the time from when the tester clicks the pan-tilt camera operation button with the mouse to when the pan-tilt video monitoring area screen changes in the video monitoring system screen meet the threshold requirements. First, the control event of the pan-tilt camera by the tester through the mouse click in the video monitoring system is captured, and the start time ts of the pan-tilt camera control operation is determined. Then, based on the feature matching technology, the video area S to be inspected is detected, and the end time te of the last frame of the pan-tilt monitoring screen reaching the stable screen is determined from the moving video frame screen, and the time difference between the end time and the start time is determined as the delay of the video monitoring system calling the real-time video.

具体的,图1为本实施例提供的测量云台摄像头控制响应时延方法的流程示意图,包括以下步骤:Specifically, FIG1 is a flow chart of a method for measuring a pan-tilt camera control response delay provided in this embodiment, comprising the following steps:

S101、输入测试点位信息,并框选视频监控系统中的云台视频监控的画面显示区域,即确定待检视频区域S。S101, input the test point information, and select the screen display area of the PTZ video monitoring in the video monitoring system, that is, determine the video area S to be tested.

具体实施时,测试点位信息包括测试点位名称以及测试数据次数。测试人员需要根据具体控制的云台摄像头及测试需求的需要,确定并输入本次响应时延测试的点位基本信息。During specific implementation, the test point information includes the test point name and the number of test data. The tester needs to determine and enter the basic information of the point for this response delay test according to the specific PTZ camera controlled and the test requirements.

S102、点击开始测试后,监听测试人员对云台下达控制指令的鼠标单击操作,并捕获鼠标单击操作的时刻为开始时刻tsS102, after clicking to start the test, monitor the tester's mouse click operation to issue a control command to the PTZ, and capture the moment of the mouse click operation as the start moment ts .

具体实施时,测试人员对云台下达控制指令为测试人员的鼠标单击视频监控系统中云台摄像头转动的按钮操作。本实施例使用pynput.mouse来监听测试人员的鼠标单击事件。一旦测试人员开始测试,系统开始监听鼠标单击事件。当检测到鼠标单击操作进行云台摄像头控制的事件后,记录当前的系统时间戳,确定出测试人员下达云台摄像头转动的控制指令的开始时刻tsIn specific implementation, the control instruction issued by the tester to the pan-tilt camera is the tester's mouse clicking the button operation of the pan-tilt camera rotation in the video surveillance system. This embodiment uses pynput.mouse to monitor the tester's mouse click event. Once the tester starts the test, the system starts to monitor the mouse click event. After the event of the mouse click operation to control the pan-tilt camera is detected, the current system timestamp is recorded to determine the start time ts when the tester issues the control instruction for the pan-tilt camera rotation.

S103、基于特征匹配和背景减除法算法,检测待检视频区域S的画面变化,确定待检视频区域云台摄像头完成指令,并成功转动摄像头的时刻为结束时刻te。所述云台摄像头开始响应控制指令,转动摄像头的时刻是云台摄像头成功响应测试人员的操作指示,测试人员所视的云台视频监控画面图像变化面积比,满足阈值的第一时刻为结束时刻te。所述测试人员所视的云台视频监控画面图像变化面积比满足阈值的第一时刻是指相邻前后两帧前景画面的视频变化轮廓面积差异比大于25%。S103, based on feature matching and background subtraction algorithms, detect the image changes of the video area to be tested S, determine the moment when the pan-tilt camera of the video area to be tested completes the instruction and successfully rotates the camera as the end time t e . The pan-tilt camera starts to respond to the control instruction, and the moment when the pan-tilt camera successfully responds to the operation instruction of the tester, and the first moment when the image change area ratio of the pan-tilt video monitoring screen viewed by the tester meets the threshold is the end time t e . The first moment when the image change area ratio of the pan-tilt video monitoring screen viewed by the tester meets the threshold means that the difference ratio of the video change contour area of the two adjacent foreground frames is greater than 25%.

具体的,当测试人员对云台下达控制指令后,系统将对测试人员待检视频区域S进行截图和分析。首先利用特征匹配的方法对云台摄像头移动前后两帧图像进行特征提取,根据提取的特征参数计算图像空间坐标变换参数,再以参数设定阈值,排除摄像头抖动的干扰。Specifically, when the tester issues a control command to the PTZ, the system will take screenshots and analyze the tester's video area S to be tested. First, the feature matching method is used to extract features from the two frames of images before and after the PTZ camera moves. The image space coordinate transformation parameters are calculated based on the extracted feature parameters, and then the threshold is set based on the parameters to eliminate the interference of camera shaking.

同时采用背景减除法对云台视频监控画面中视频帧的前景与后景分离,减少光照阴影等因素的干扰。然后对提取得到的前景图像中的物体进行轮廓面积计算,根据前景图像轮廓面积的占比,确定云台摄像头是否发生了转动。将前景图像视频变化轮廓面积占比满足阈值要求的第一时刻确定为结束时刻teAt the same time, the background subtraction method is used to separate the foreground and background of the video frame in the PTZ video surveillance screen to reduce the interference of factors such as lighting and shadows. Then, the contour area of the object in the extracted foreground image is calculated, and according to the proportion of the foreground image contour area, it is determined whether the PTZ camera has rotated. The first moment when the proportion of the foreground image video change contour area meets the threshold requirement is determined as the end time t e .

S104、将结束时刻te和开始时刻ts之间的时间差确定为视频监测系统中云台摄像头控制响应时延Δt=te-tsS104: Determine the time difference between the end time te and the start time ts as the pan/tilt camera control response delay Δt= te - ts in the video monitoring system.

图2为本发明一实施例提供的排除云台摄像头抖动对视频画面变化检测干扰的流程示意图。FIG. 2 is a schematic diagram of a process for eliminating interference of pan/tilt camera jitter on video picture change detection provided by an embodiment of the present invention.

云台摄像头响应判断利用基于图像移动距离检测和动态物体前景画面中物体轮廓面积的方式实现,具体包括以下步骤:The pan-tilt camera response judgment is realized by using the method based on the image movement distance detection and the object contour area in the dynamic object foreground picture, which specifically includes the following steps:

通过基于ORB关键点的特征匹配方法对云台摄像头移动前后两帧图像的特征提取和比较。具体地,首先提取图像的特征参数,然后计算图像空间坐标变换参数,并设定了阈值来排除摄像头抖动干扰。The feature matching method based on ORB key points is used to extract and compare the features of the two frames of images before and after the pan-tilt camera moves. Specifically, the feature parameters of the image are first extracted, then the image space coordinate transformation parameters are calculated, and the threshold is set to eliminate the interference of camera shaking.

S201、在进行图像特征点匹配时通过在图像中检测到的关键点上提取图像特征来找到图像关键点,本实施例选用ORB特征点进行图像特征描述,通过在图像中找到与周围像素存在明显差异的像素作为关键点,并计算每个关键点的BRIEF描述子来唯一确定ORB特征点。S201. When performing image feature point matching, the image key points are found by extracting image features from the key points detected in the image. In this embodiment, ORB feature points are selected for image feature description. The ORB feature points are uniquely determined by finding pixels in the image that are significantly different from the surrounding pixels and calculating the BRIEF descriptor of each key point.

S202、然后使用BF匹配方法进行初步的特征匹配。该算法会计算训练描述子集合中每个描述子与查询描述子之间的汉明距离;S202, then use the BF matching method to perform preliminary feature matching. The algorithm calculates the Hamming distance between each descriptor in the training descriptor set and the query descriptor;

S203、通过对所有汉明距离按照从小到大的顺序排序,选择排序序列中前90%的描述子作为匹配结果。S203 , sorting all Hamming distances in ascending order, and selecting the first 90% of the descriptors in the sorted sequence as matching results.

S204、计算转换矩阵,判断画面水平和竖直两个方面的移动距离,通过视差的方法来排除摄像头抖动对测试结果的影响。S204, calculating the conversion matrix, determining the horizontal and vertical movement distances of the image, and eliminating the influence of camera shaking on the test results by using a parallax method.

可实施的,所述汉明距离就是一组二进制数据变成另一组数据所需的步骤数,显然,这个数值可以衡量两张图片的差异,汉明距离越小,则代表相似度越高。It can be implemented that the Hamming distance is the number of steps required to transform a set of binary data into another set of data. Obviously, this value can measure the difference between two pictures. The smaller the Hamming distance, the higher the similarity.

所述转换矩阵采用单应性矩阵来说实现,单应性矩阵是计算机视觉中一种重要的变换矩阵,用于描述平面上两个不同视角或者不同姿态下的相机所观测到的同一个物体的投影关系。在实际应用中,单应性矩阵广泛应用于图像对齐、图像配准、三维重建和虚拟现实等领域。The transformation matrix is implemented using a homography matrix, which is an important transformation matrix in computer vision, used to describe the projection relationship of the same object observed by two cameras at different perspectives or different postures on a plane. In practical applications, homography matrices are widely used in image alignment, image registration, three-dimensional reconstruction, virtual reality and other fields.

单应性矩阵的求解方式如下:The homography matrix is solved as follows:

设第一张图像中的一个点p1=(x1,y1,1)T,它在第二张图像中对应点为p2=(x2,y2,1)T。两张图像之间的单应变换关系可以表示为:p2~Hp1Suppose a point p 1 =(x 1 ,y 1 ,1) T in the first image, and its corresponding point p 2 =(x 2 ,y 2 ,1) T in the second image. The homography transformation relationship between the two images can be expressed as: p 2 ~Hp 1 .

式中p1、p2是同一点在不同两张图像中的位置表示;H是单应性矩阵;“~”表示两个向量等比例。Where p 1 and p 2 are the position representations of the same point in two different images; H is the homography matrix; “~” indicates that the two vectors are of equal proportion.

由于p2和p1都是齐次坐标,所以H是一个3×3的齐次矩阵,即:Since p2 and p1 are both homogeneous coordinates, H is a 3×3 homogeneous matrix, that is:

将p2和p1的坐标带入可得:Substituting the coordinates of p2 and p1 , we get:

本实施例使用齐次坐标系进行计算,也就是hij乘以任意一个非零常数k并不改变等式结果,所以单应性矩阵H只有8个自由度,在下面的计算中本实施例令h33=1:This embodiment uses a homogeneous coordinate system for calculation, that is, multiplying h ij by any non-zero constant k does not change the result of the equation, so the homography matrix H has only 8 degrees of freedom. In the following calculation, this embodiment sets h33=1:

通过最小二乘法求解单应性矩阵H,可以得到两个图像之间的映射关系,最后根据单应性矩阵H来计算水平方位与竖直方位图像移动的距离。By solving the homography matrix H using the least squares method, the mapping relationship between the two images can be obtained. Finally, the distances of horizontal and vertical image movement are calculated based on the homography matrix H.

图3为本实施例提供的检测云台视频监测画面中图像变化的流程示意图。FIG3 is a schematic diagram of a process for detecting image changes in a PTZ video monitoring screen provided by this embodiment.

采用基于OpenCV库对移动物体进行识别以及轮廓面积计算的方法来实现粗略确定摄像头成功响应的功能,具体包括以下步骤:The method of identifying moving objects and calculating contour areas based on the OpenCV library is used to roughly determine the function of the camera's successful response, which specifically includes the following steps:

S301、使用OpenCV对移动物体进行识别就是将动态的前景从静态的背景中分离出来,将当前画面与假设是静态背景进行比较发现有明显的变化的区域,就可以认为该区域出现移动的物体。S301. Using OpenCV to identify moving objects is to separate the dynamic foreground from the static background. When the current image is compared with the assumed static background and an area with obvious changes is found, it can be considered that a moving object appears in the area.

但是在实际情况中,由于光照阴影等因素干扰比较大,通过像素直接进行比较很容易造成误检,因此本实施例采用基于OpenCV库的背景减除算法对云台视频监测画面图像的前后景分离,实现对运动物体和其他因素造成的变动的区分;However, in actual situations, due to the large interference of factors such as lighting and shadows, it is easy to cause false detection by directly comparing pixels. Therefore, this embodiment uses a background subtraction algorithm based on the OpenCV library to separate the foreground and background of the PTZ video monitoring screen image, so as to distinguish the changes caused by moving objects and other factors.

S302、当对轮廓面积进行计算前,首先将图片转换为灰度图,并进行高斯模糊处理、二值化得到一个清晰的二值图来减少背景干扰;S302, before calculating the contour area, first convert the image into a grayscale image, and perform Gaussian blur processing and binarization to obtain a clear binary image to reduce background interference;

S303、利用OpenCV库的finfContours()函数和drawContours()函数绘出前景图像中的物体轮廓,最后通过contourArea()函数计算视频变化轮廓面积C。S303, using the finfContours() function and drawContours() function of the OpenCV library to draw the contours of the objects in the foreground image, and finally calculating the contour area C of the video change through the contourArea() function.

如果相邻前后两帧前景视频变化轮廓面积差异比超过25%,则认为云台摄像头响应成功。If the difference in contour area between the two adjacent foreground video frames exceeds 25%, the PTZ camera is considered to have responded successfully.

根据《铁路综合视频监控系统技术规范》的要求,云台摄像头控制的响应时延不应超过500毫秒。在实验中,本实施例设定开始测试后的等待时间为500毫秒。若在此期间视频监控区域未发生变化,即视为云台摄像头响应失败。本实施例以某车站的铁路视频监测系统为对象,采用实际操作录屏视频进行云台摄像头控制的测试。According to the requirements of the "Technical Specifications for Railway Integrated Video Surveillance Systems", the response delay of the PTZ camera control should not exceed 500 milliseconds. In the experiment, this embodiment sets the waiting time after the test to 500 milliseconds. If the video surveillance area does not change during this period, it is considered that the PTZ camera response has failed. This embodiment takes the railway video monitoring system of a certain station as the object, and uses the actual operation screen recording video to test the PTZ camera control.

以下为某一次时延测试的数据结果。操作人员在框选待检测区域后点击“开始”进行测试,获得开始系统时间戳ts=1683114014127,结束系统时间戳te=1683114014316,因此本次云台摄像头控制响应的时延为t=te-ts=189ms。测试时延满足《铁路综合视频监控系统技术规范》要求。The following is the data result of a delay test. After selecting the area to be detected, the operator clicks "Start" to test, and obtains the start system timestamp ts = 1683114014127 and the end system timestamp te = 1683114014316. Therefore, the delay of the PTZ camera control response is t = te -ts = 189ms. The test delay meets the requirements of the "Technical Specifications for Railway Integrated Video Surveillance Systems".

以上,仅为本申请较佳的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (8)

1.一种测量视频监测系统云台摄像头响应时延的方法,其特征在于,包括以下步骤:1. A method for measuring the response delay of a pan-tilt camera of a video monitoring system, characterized in that it comprises the following steps: 获取测试点位信息,基于所述测试点位信息确定待检测视频区域;Acquire test point information, and determine a video area to be detected based on the test point information; 基于鼠标单击操作对云台下达控制指令,捕获鼠标单击操作的时刻为开始时刻;Issue control instructions to the PTZ based on the mouse click operation, and the moment of capturing the mouse click operation is the start moment; 基于特征匹配和背景减除算法,检测所述待检测视频区域内的视频变化并进行轮廓计算,获得视频变化轮廓面积;Based on feature matching and background subtraction algorithms, detecting video changes in the video area to be detected and performing contour calculation to obtain a video change contour area; 预设阈值,所述视频变化轮廓面积占比满足阈值的第一时刻为结束时刻;A preset threshold value is used, and the first moment when the proportion of the contour area of the video change meets the threshold value is the end moment; 基于所述结束时刻与开始时刻的时间差,获得云台摄像头的响应时延。Based on the time difference between the end time and the start time, the response delay of the pan-tilt camera is obtained. 2.根据权利要求1所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,2. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 1, characterized in that: 确定开始时刻的过程包括:测试开始,视频监测系统对鼠标单击操作进行监听,当监听到基于鼠标单击操作进行云台摄像头控制时,记录当前的视频监测系统时间戳,确定下达云台摄像头控制指令的时刻为开始时刻。The process of determining the start time includes: when the test starts, the video monitoring system monitors the mouse click operation. When the pan-tilt camera control based on the mouse click operation is monitored, the current video monitoring system timestamp is recorded, and the time when the pan-tilt camera control instruction is issued is determined as the start time. 3.根据权利要求1所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,3. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 1, characterized in that: 确定结束时刻的过程包括:在待检测视频区域内,基于特征匹配算法对云台摄像头移动前后的两帧图像进行特征提取,基于提取的特征参数计算图像空间坐标变换参数,基于变换参数排除云台摄像头抖动干扰;然后采用基于OpenCV库的背景减除法算法,将云台视频监控画面中视频帧的前景与后景分离,获取前景图像的物体轮廓,基于所述前景图像的物体轮廓计算视频变化轮廓面积,预设阈值,所述视频变化轮廓面积满足阈值的第一时刻为结束时刻。The process of determining the end time includes: in the video area to be detected, based on the feature matching algorithm, feature extraction is performed on the two frames of images before and after the movement of the pan-tilt camera, the image space coordinate transformation parameters are calculated based on the extracted feature parameters, and the interference of the pan-tilt camera jitter is eliminated based on the transformation parameters; then, a background subtraction algorithm based on the OpenCV library is used to separate the foreground and background of the video frame in the pan-tilt video monitoring screen, and the object contour of the foreground image is obtained. The video change contour area is calculated based on the object contour of the foreground image, and a threshold is preset. The first moment when the video change contour area meets the threshold is the end time. 4.根据权利要求3所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,4. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 3, characterized in that: 排除云台摄像头抖动干扰的过程包括:The process of eliminating the interference of PTZ camera jitter includes: 采用基于ORB关键点的特征匹配方法对图像进行特征描述,在图像中找到与周围像素存在明显差异的像素作为关键点,并计算每个关键点的描述子;The feature matching method based on ORB key points is used to describe the features of the image. The pixels that are significantly different from the surrounding pixels are found as key points in the image, and the descriptors of each key point are calculated. 通过描述子集合中每个描述子与查询描述子之间的汉明距离,对图像进行特征匹配;Perform feature matching on the image by using the Hamming distance between each descriptor in the descriptor set and the query descriptor; 对所有汉明距离按照从小到大的顺序排序,选择排序序列中前90%的描述子作为匹配结果;Sort all Hamming distances from small to large, and select the first 90% of the descriptors in the sorted sequence as the matching results; 计算单应性矩阵,判断画面水平和竖直两个方面的移动距离,通过视差的方法排除云台摄像头抖动干扰。Calculate the homography matrix to determine the horizontal and vertical movement distances of the image, and eliminate the interference of the gimbal camera shake through the parallax method. 5.根据权利要求4所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,5. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 4, characterized in that: 基于单应性矩阵获取移动距离的过程包括:基于同一点在不同两张图像中的位置表示,获取两张图像之间的单应性矩阵;基于最小二乘法求解所述单应性矩阵,获得两个图像之间的映射关系,基于所述映射关系获得水平方位和垂直方位图像的移动距离。The process of obtaining the moving distance based on the homography matrix includes: obtaining the homography matrix between the two images based on the position representation of the same point in two different images; solving the homography matrix based on the least squares method to obtain the mapping relationship between the two images, and obtaining the moving distance of the horizontal and vertical images based on the mapping relationship. 6.根据权利要求3所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,6. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 3, characterized in that: 获取视频变化轮廓面积之前还包括:将前景图像转换为灰度图,并进行高斯模糊和二值化的预处理。Before obtaining the contour area of the video change, the foreground image is converted into a grayscale image, and pre-processed with Gaussian blur and binarization. 7.根据权利要求6所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,7. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 6, characterized in that: 获取视频变化轮廓面积的过程包括:基于OpenCV库的finfContours()函数和drawContours()函数描绘出预处理后的前景图像的物体轮廓,然后基于所述物体轮廓,通过contourArea()函数计算视频变化轮廓面积。The process of obtaining the video change contour area includes: depicting the object contour of the preprocessed foreground image based on the finfContours() function and the drawContours() function of the OpenCV library, and then calculating the video change contour area based on the object contour through the contourArea() function. 8.根据权利要求1所述的测量视频监测系统云台摄像头响应时延的方法,其特征在于,8. The method for measuring the response delay of a pan-tilt camera of a video monitoring system according to claim 1, characterized in that: 所述测试点位信息包括测试点位名称以及测试数据次数。The test point information includes the test point name and the number of test data.
CN202410661248.6A 2024-05-27 2024-05-27 A method for measuring the response delay of a pan-tilt camera in a video monitoring system Pending CN118646857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410661248.6A CN118646857A (en) 2024-05-27 2024-05-27 A method for measuring the response delay of a pan-tilt camera in a video monitoring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410661248.6A CN118646857A (en) 2024-05-27 2024-05-27 A method for measuring the response delay of a pan-tilt camera in a video monitoring system

Publications (1)

Publication Number Publication Date
CN118646857A true CN118646857A (en) 2024-09-13

Family

ID=92666424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410661248.6A Pending CN118646857A (en) 2024-05-27 2024-05-27 A method for measuring the response delay of a pan-tilt camera in a video monitoring system

Country Status (1)

Country Link
CN (1) CN118646857A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120499508A (en) * 2025-07-21 2025-08-15 深圳市永泰光电有限公司 Panoramic lens pairing method and panoramic lens

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120499508A (en) * 2025-07-21 2025-08-15 深圳市永泰光电有限公司 Panoramic lens pairing method and panoramic lens

Similar Documents

Publication Publication Date Title
CN112669344B (en) A method, device, electronic device and storage medium for positioning a moving object
US9277165B2 (en) Video surveillance system and method using IP-based networks
WO2020094091A1 (en) Image capturing method, monitoring camera, and monitoring system
WO2021017882A1 (en) Image coordinate system conversion method and apparatus, device and storage medium
WO2021136386A1 (en) Data processing method, terminal, and server
CN110264493A (en) A kind of multiple target object tracking method and device under motion state
TW200818916A (en) Wide-area site-based video surveillance system
CN108229475A (en) Wireless vehicle tracking, system, computer equipment and readable storage medium storing program for executing
CN111383204A (en) Video image fusion method, fusion device, panoramic monitoring system and storage medium
CN112422909B (en) Video behavior analysis management system based on artificial intelligence
CN114511592B (en) Personnel track tracking method and system based on RGBD camera and BIM system
CN113763466A (en) Loop detection method and device, electronic equipment and storage medium
CN109934873B (en) Method, device and equipment for acquiring marked image
CN118646857A (en) A method for measuring the response delay of a pan-tilt camera in a video monitoring system
Ren et al. Multi-camera video surveillance for real-time analysis and reconstruction of soccer games
KR102614895B1 (en) Real-time object tracking system and method in moving camera video
CN106558069A (en) A kind of method for tracking target and system based under video monitoring
CN111708907B (en) Target person query method, device, equipment and storage medium
CN102291568A (en) Accelerated processing method of large-view-field intelligent video monitoring system
CN104202533B (en) Motion detection device and movement detection method
CN112565630B (en) A video frame synchronization method for video splicing
CN111279352B (en) Three-dimensional information acquisition system through pitching exercise and camera parameter calculation method
JP6798609B2 (en) Video analysis device, video analysis method and program
Cho et al. A benchmark dataset for event-guided human pose estimation and tracking in extreme conditions
CN118351572A (en) Personnel detection method and related device

Legal Events

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