CN113891070B - Method and device for measuring delay time of network camera - Google Patents

Method and device for measuring delay time of network camera Download PDF

Info

Publication number
CN113891070B
CN113891070B CN202111270320.5A CN202111270320A CN113891070B CN 113891070 B CN113891070 B CN 113891070B CN 202111270320 A CN202111270320 A CN 202111270320A CN 113891070 B CN113891070 B CN 113891070B
Authority
CN
China
Prior art keywords
dimensional code
code image
detected
timestamp
determining
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.)
Active
Application number
CN202111270320.5A
Other languages
Chinese (zh)
Other versions
CN113891070A (en
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 Institute of Environmental Features
Original Assignee
Beijing Institute of Environmental Features
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 Institute of Environmental Features filed Critical Beijing Institute of Environmental Features
Priority to CN202111270320.5A priority Critical patent/CN113891070B/en
Publication of CN113891070A publication Critical patent/CN113891070A/en
Application granted granted Critical
Publication of CN113891070B publication Critical patent/CN113891070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for measuring delay time of a network camera. The method comprises the following steps: determining a first timestamp corresponding to each two-dimensional code image displayed on the software interface; receiving a video shot by a network camera and containing the two-dimensional code image; extracting each two-dimensional code image from the video, and determining a second time stamp and a first time stamp corresponding to each two-dimensional code image when the two-dimensional code image is extracted; and determining the delay time of the network camera based on the average value of the difference value of the second time stamp and the first time stamp of each two-dimensional code image. The application can effectively cope with the condition of blurring of the picture by using the two-dimensional code image with the unique identifier, and determines the delay time of the network camera by using the clock difference, thereby realizing the automatic measurement of the delay time.

Description

Method and device for measuring delay time of network camera
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for measuring delay time of a network camera.
Background
In the secondary development of a network camera, it is sometimes necessary to measure the signal delay time from the input end to the output end of the network camera. At present, the existing delay test method firstly uses a clock to compare the delay of a test network, and then obtains the transmission delay of video acquisition, encoding and decoding equipment through monitor test, however, the method cannot effectively cope with the condition of blurring of pictures, relies on manual operation, and cannot realize automatic measurement of delay time.
Therefore, there is a need for a method for measuring delay time of a network camera to solve the above problems.
Disclosure of Invention
The application provides a method and a device for measuring delay time of a network camera, which can realize automatic measurement of signal delay time of the network camera.
In a first aspect, an embodiment of the present application provides a method for measuring delay time of a network camera, including:
determining a first timestamp corresponding to the two-dimensional code image displayed on the software interface;
receiving a video shot by a network camera and containing the two-dimensional code image;
extracting a two-dimensional code image from the video, and determining a second time stamp and a first time stamp corresponding to the two-dimensional code image when the two-dimensional code image is extracted;
a delay time of the network camera is determined based on the first timestamp and the second timestamp.
In one possible design, before the determining the first timestamp corresponding to the two-dimensional code image displayed on the software interface, the method further includes:
creating a two-dimensional code image with a unique identifier based on a preset two-dimensional code dictionary;
and sending a re-rendering instruction to the software interface so that the software interface displays the two-dimensional code image.
In one possible design, the created two-dimensional code images are multiple, and the software interface circularly plays the two-dimensional code images in the two-dimensional code dictionary after receiving the re-rendering instruction.
In one possible design, after the determining the first timestamp corresponding to the two-dimensional code image displayed on the software interface and before the receiving the video containing the two-dimensional code image captured by the web camera, the method further includes:
creating a mapping relation between a unique identifier and a first timestamp for each two-dimensional code image;
in one possible design, the extracting the two-dimensional code image from the video, determining the second timestamp when the two-dimensional code image is extracted and the first timestamp corresponding to the two-dimensional code image, includes:
extracting two-dimensional code images from the video, and determining a second timestamp when each two-dimensional code image is extracted;
screening the extracted two-dimensional code image based on the outline of the extracted two-dimensional code image to obtain a two-dimensional code image to be detected;
screening an effective two-dimensional code image of an actual mark from the two-dimensional code image to be detected;
extracting a unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image;
and determining a first timestamp corresponding to the unique identifier based on the extracted unique identifier and the mapping relation.
In one possible design, the screening the valid two-dimensional code image of the actual mark from the two-dimensional code image to be tested includes:
performing perspective conversion on the obtained two-dimensional code image to be detected to obtain a standard form two-dimensional code image to be detected;
performing threshold processing on the two-dimensional code image to be detected by using an Ojin threshold segmentation method so as to separate white pixels and black pixels;
dividing the two-dimensional code image into different unit lattices based on the size of each mark and the size of the boundary in the two-dimensional code image to be detected;
calculating the number of the black pixels or the white pixels in each of the unit cells to determine whether each of the unit cells is a white bit or a black bit;
determining whether the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary or not by analyzing the mark formed by the white bits or the black bits, and adopting an error correction technology if necessary;
if the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary, the two-dimensional code image to be detected is an effective two-dimensional code image, and the extraction of the unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image is continuously executed;
if the mark of the two-dimensional code image to be detected does not belong to the two-dimensional code dictionary, the two-dimensional code image to be detected is not an effective two-dimensional code image, and the two-dimensional code image to be detected is abandoned.
In one possible design, the determining the delay time of the network camera based on the first timestamp and the second timestamp includes:
calculating a difference value between a second time stamp and a first time stamp corresponding to each effective two-dimensional code image;
and taking the average value of the difference values corresponding to each effective two-dimensional code as the delay time of the network camera.
In a second aspect, an embodiment of the present application provides a delay time measurement apparatus of a network camera, including:
the construction module is used for determining a first time stamp corresponding to the two-dimensional code image displayed on the software interface;
the transmission module is used for receiving the video containing the two-dimensional code image shot by the network camera;
the extraction module is used for extracting the two-dimensional code image from the video and determining a second time stamp when the two-dimensional code image is extracted and a first time stamp corresponding to the two-dimensional code image;
and the calculating module is used for determining the delay time of the network camera by using the first timestamp and the second timestamp.
In a third aspect, an embodiment of the present application further provides a computing device, including a memory and a processor, where the memory stores a computer program, and the processor implements a method according to any of the preceding claims when executing the computer program.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of the above.
The embodiment provides a method and a device for measuring delay time of a network camera, which are characterized in that firstly, a plurality of two-dimensional code images with unique identifiers are created, then a display instruction is sent to a software interface, so that the software interface circularly plays the two-dimensional code images, a first time stamp corresponding to each two-dimensional code image is recorded, and the mapping relation between the first time stamp of each two-dimensional code image and the unique identifier is stored in a memory; receiving a video shot by a network camera and containing the two-dimensional code images, extracting the two-dimensional code images from the video, determining a second time stamp and a unique identifier of each two-dimensional code image, determining the starting time of each two-dimensional code image based on the unique identifier of each two-dimensional code image, calculating the difference value between the second time stamp and the first time stamp corresponding to each two-dimensional code image, and taking the average value of the difference values corresponding to each two-dimensional code image as the delay time of the network camera.
From the above, the present application can effectively cope with the condition of blurred images by using the two-dimensional code image with the unique identifier, and determine the delay time of the network camera by using the clock difference, thereby realizing the automatic measurement of the delay time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a method for measuring delay time of a network camera according to an embodiment of the present application;
FIG. 2 is a hardware architecture diagram of a computing device according to one embodiment of the present application;
fig. 3 is a block diagram of a delay time measuring apparatus of a network camera according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In the description of embodiments of the present application, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying any relative importance unless explicitly specified or limited otherwise; the term "plurality" means two or more, unless specified or indicated otherwise; the terms "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, integrally connected, or electrically connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
In the description of the present specification, it should be understood that the terms "upper", "lower", and the like used in the embodiments of the present application are described in terms of the angles shown in the drawings, and should not be construed as limiting the embodiments of the present application. In the context of this document, it will also be understood that when an element is referred to as being "on" or "under" another element, it can be directly on the other element or be indirectly on the other element through intervening elements.
In the secondary development of a network camera, it is sometimes necessary to measure the signal delay time from the input end to the output end of the network camera.
In the prior art, the delay time testing method of the network camera firstly uses a clock to compare the delay of a testing network, and then uses a monitor picture to test the transmission delay of video acquisition, encoding and decoding equipment, however, the method cannot effectively cope with the condition of picture blurring, relies on manual operation, and cannot realize automatic measurement of delay time.
In order to solve the technical problem, it is considered to use a two-dimensional code image with a unique identification and clock analysis software to cope with the problems of blurring of pictures and inability to automatically measure.
As shown in fig. 1, an embodiment of the present application provides a method for measuring delay time of a network camera, including the following steps:
step 100: determining a first timestamp corresponding to the two-dimensional code image displayed on the software interface;
step 102: receiving a video shot by a network camera and containing the two-dimensional code image;
step 104: extracting a two-dimensional code image from the video, and determining a second time stamp and a first time stamp corresponding to the two-dimensional code image when the two-dimensional code image is extracted;
step 106: a delay time of the network camera is determined based on the first timestamp and the second timestamp.
In the embodiment of the application, firstly, a two-dimensional code image is circularly played on a software interface to obtain a first timestamp corresponding to each two-dimensional code image, and the mapping relation between the first timestamp of each two-dimensional code image and a unique identifier thereof is stored in a memory; then receiving video shot by a network camera and containing the two-dimensional code images, extracting the two-dimensional code images from the video, determining a second time stamp and a unique identifier of each two-dimensional code image, and determining the starting time of each two-dimensional code image based on the unique identifier of each two-dimensional code image; and finally, calculating the difference value between the second time stamp and the first time stamp corresponding to each two-dimensional code image, and taking the average value of the difference values corresponding to each two-dimensional code image as the delay time of the network camera.
The application can effectively cope with the condition of fuzzy pictures by using the two-dimensional code image with the unique identifier, and determines the delay time of the network camera by the clock difference, thereby realizing the automatic measurement of the delay time.
It should be noted that the present application is not limited to the model and type of the network camera, and may be any digital camera adopting the RTSP video streaming protocol, for example.
The implementation of each step is described below.
For step 100, in some embodiments, before determining the first timestamp corresponding to the two-dimensional code image displayed on the software interface, further comprises:
creating a two-dimensional code image with a unique identifier based on a preset two-dimensional code dictionary;
and sending a re-rendering instruction to the software interface so that the software interface displays the two-dimensional code image.
In the embodiment, a function is used for creating a predefined two-dimensional code dictionary, so that each two-dimensional code in the two-dimensional code dictionary has a unique identifier, thus, the camera can be ensured to shoot that each frame of effective two-dimensional code image can be matched with the two-dimensional code image with the same identifier in a software interface through the unique identifier, and a first timestamp corresponding to the two-dimensional code image is acquired through the unique identifier and is used for determining the delay time of the network camera.
It should be noted that the number and the size of the marks of the two-dimensional code dictionary are not particularly limited, for example, the two-dimensional code dictionary composed of 250 marks with the size of 6x6 bits can be used in the embodiment, wherein each two-dimensional code in the two-dimensional code dictionary is composed of different 36-bit binary codes, and thus the marks are effectively marked from 0 to 249. After the mark two-dimensional code is acquired, it is necessary to specify the mark black frame width and output a mark image using a size exceeding the number of dictionary bits. In order to avoid distortion, the parameter should be proportional to the number of marking bits so that the distortion is negligible and the contour screening step is smoothly performed.
For step 100, in some embodiments, the created two-dimensional code images are multiple, and after receiving the re-rendering instruction, the software interface circularly plays the two-dimensional code images in the two-dimensional code dictionary.
In this embodiment, by circularly playing the two-dimensional code images, the network camera can shoot a video including a plurality of non-repeated two-dimensional code images, so as to extract as many effective two-dimensional code images as possible from the video, obtain the difference value between the second timestamp and the first timestamp corresponding to the effective two-dimensional code images, and take the average value of all the difference values as the delay time of the network camera, thereby avoiding errors caused by single difference values and improving the detection accuracy of the delay time.
It should be noted that, in order to enable the two-dimensional code image included in the video shot by the network camera to truly record the same two-dimensional code image rendered by the software interface at the previous moment, instead of the time before the previous moment, the prior camera expected delay cannot be too long, for example, we can take the 30S time as the prior camera expected longest delay, at this time, in order to prevent the valid two-dimensional code image in the video from being repeated, it is necessary to ensure that the duration of playing all the two-dimensional codes in the two-dimensional code dictionary once by the software interface is longer than 30S. In this case, if the two-dimensional code dictionary is not sufficiently specified, the estimated delay (less than 30S) may be shorter than the actual delay (more than 30S). This can be solved by the following strategies: for example, the 5×5 arucco 100 mark dictionary can reduce the frequency of updating the two-dimensional code or adjust the two-dimensional code dictionary to 7×7 arucco 1000 mark dictionary without changing the updating frequency, but both methods need to ensure that the time window contains a sufficient number of valid two-dimensional codes.
It can be understood that each two-dimensional code image extracted from the video of the camera can be guaranteed to be matched with only one two-dimensional code image with the same identification, and the unique first timestamp corresponding to the two-dimensional code image is obtained through the unique identification, so that the difference value between the second timestamp and the first timestamp corresponding to each two-dimensional code image can be calculated unambiguously.
After step 100 and before step 102, in some embodiments, after determining the first timestamp corresponding to the two-dimensional code image displayed on the software interface and before receiving the video containing the two-dimensional code image captured by the web camera, further includes:
and creating a mapping relation between the unique identification and the first timestamp of each two-dimensional code image.
In this embodiment, the delay time of the network camera is determined based on the difference value between the second timestamp and the first timestamp of each two-dimensional code image, and the second timestamp and the first timestamp of each two-dimensional code image are corresponding to each other through the unique identifier of the two-dimensional code image, so when the two-dimensional code image is displayed on a software interface, the mapping relation between the two-dimensional code image and the first timestamp is first established, and stored in the memory, so when the two-dimensional code image is extracted from the video of the camera again, the first timestamp corresponding to the two-dimensional code image can be obtained through the unique identifier and the mapping relation. Lifting deviceFor example, the unique identifier of the A two-dimensional code is ID A The first timestamp when the software interface displays the A two-dimensional code image is 12:00, and the identification ID is created at the moment A And the mapping relation of the first timestamp 12:00 is stored in a memory, and after new frame data is obtained from the video of the camera, the second timestamp 12:00 '01' is recorded in advance before the A or other two-dimensional code images are extracted again; after successfully extracting the A two-dimensional code image, the ID is identified by the identification A And the mapping relation can acquire a first timestamp 12:00 corresponding to the A two-dimensional code image. Therefore, the unique first time stamp of each two-dimensional code image can be accurately obtained by establishing the mapping relation.
It should be noted that, because the display software scrolls and plays the two-dimensional code images in the two-dimensional code dictionary, the mapping relationship between the unique identifier of each two-dimensional code image and the first timestamp is updated continuously, so as to ensure the synchronism of the first timestamp corresponding to the two-dimensional code image in the video acquired by the video camera at any moment.
For step 104, in some embodiments, extracting a two-dimensional code image from a video, determining a second timestamp when the two-dimensional code image is obtained and a first timestamp corresponding to the two-dimensional code image includes:
extracting two-dimensional code images from the video, and obtaining a second timestamp of each two-dimensional code image by a high-precision clock service provided by an operating system;
screening the extracted two-dimensional code image based on the outline of the extracted two-dimensional code image to obtain a two-dimensional code image to be detected;
screening an effective two-dimensional code image of an actual mark from the two-dimensional code image to be detected;
extracting a unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image;
based on the extracted unique identifier and the mapping relationship, a first timestamp corresponding to the unique identifier is determined.
In this embodiment, each frame image is first extracted from the received video, and a second time stamp at the time of extracting each frame image is recorded. It can be understood that, in the process of capturing video, the camera inevitably captures some invalid data, for example, a two-dimensional code-like mark possibly existing in the background and noise generated during the switching of the two-dimensional code image in the display process, so that the camera captures some invalid images, and therefore, pre-screening is required for each extracted frame of image. Firstly, using an adaptive threshold segmentation mark, then extracting the contours of an image from a threshold image, discarding contours which are not close to square, and removing contours which are too small, too large or too close to each other to obtain a two-dimensional code image to be detected. Through image pre-screening, the obvious invalid graph is removed, the calculated amount can be reduced, the computer resource is saved, and the measurement speed is improved. After the two-dimensional code to be detected is obtained, an effective two-dimensional code image is further detected, and a first timestamp corresponding to the two-dimensional code image is determined through a unique identifier and a mapping relation corresponding to the effective two-dimensional code image and is used for determining delay time of the network camera.
For step 104, in some embodiments, screening the valid two-dimensional code image of the actual mark from the two-dimensional code image to be tested includes:
performing perspective conversion on the obtained two-dimensional code image to be detected to obtain a standard form two-dimensional code image to be detected;
performing threshold processing on the two-dimensional code image to be detected by using an Ojin threshold segmentation method so as to separate white pixels and black pixels;
dividing the two-dimensional code image into different unit lattices based on the size of each mark and the size of the boundary in the two-dimensional code image to be detected;
calculating the number of black pixels or white pixels in each unit cell to determine whether each unit cell is a white bit or a black bit;
determining whether the mark of the two-dimensional code image to be detected belongs to a two-dimensional code dictionary or not by analyzing the mark formed by the white bits or the black bits, and adopting an error correction technology if necessary;
if the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary, the two-dimensional code image to be detected is an effective two-dimensional code image, and the extraction of the unique mark corresponding to the two-dimensional code image from the effective two-dimensional code image is continuously executed;
if the mark of the two-dimensional code image to be detected does not belong to the two-dimensional code dictionary, the two-dimensional code image to be detected is not an effective two-dimensional code image, and the two-dimensional code image to be detected is abandoned.
In the embodiment, by detecting whether the image to be detected is actually marked, the invalid two-dimensional code image can be further removed, only the actually marked two-dimensional code image which can find the unique identification from the two-dimensional code dictionary is reserved, computer resources can be further saved, and the unique identification of each valid two-dimensional code image can be ensured to be matched with the corresponding first timestamp.
For step 106, in some embodiments, determining the delay time of the network camera based on the first timestamp and the second timestamp includes:
calculating a difference value between a second time stamp and a first time stamp corresponding to each two-dimensional code image;
and taking the average value of the difference values corresponding to each two-dimensional code as the delay time of the network camera.
In this embodiment, for each valid two-dimensional code image, the unique identifier of the valid two-dimensional code image can be matched with the corresponding second timestamp and first timestamp, and as described in the previous embodiment, the first timestamp of the a two-dimensional code image is 12:00, the second timestamp is 12:00'01 ", and the difference between the second timestamp and the first timestamp of the a two-dimensional code image can be calculated to be 1 second, so that the primary delay time of the camera is 1 second. In order to make the delay time more accurate, an average value of delay time in a preset time window needs to be counted, for example, the preset time window is 30 seconds, 15 effective two-dimensional images are detected in the 30 seconds, then 15 delay time data can be obtained, and the 15 delay time is averaged to be used as the delay time of the network camera, so that the accuracy of a test result can be ensured;
in addition, the clock difference corresponding to each two-dimensional code image is calculated by computer software, so that the automatic measurement of delay time is realized, the manual discrimination is not relied on, and the accuracy is high.
It should be noted that the clock analysis software used in the present application needs to be accurate to millisecond to ensure the accuracy of the measurement result.
As shown in fig. 2 and 3, an embodiment of the present application provides a device for measuring delay time of a network camera. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. In terms of hardware, as shown in fig. 2, a hardware architecture diagram of a computing device where a delay time measuring apparatus for a network camera is provided in an embodiment of the present application is shown, where in addition to a processor, a memory, a network interface, and a nonvolatile memory shown in fig. 2, the computing device where the embodiment is shown may generally include other hardware, such as a forwarding chip responsible for processing a packet, and so on. Taking a software implementation as an example, as shown in fig. 3, as a device in a logic sense, the device is formed by reading a corresponding computer program in a nonvolatile memory into a memory by a CPU of a computing device where the device is located.
As shown in fig. 3, the apparatus for measuring delay time of a network camera according to this embodiment includes:
a construction module 300, configured to determine a first timestamp corresponding to the two-dimensional code image displayed on the software interface;
the transmission module 302 is configured to receive a video containing a two-dimensional code image captured by the network camera;
the extracting module 304 is configured to extract a two-dimensional code image from a video, and determine a second timestamp when the two-dimensional code image is extracted and a first timestamp corresponding to the two-dimensional code image;
a confirmation module 306, configured to determine a delay time of the network camera using the first timestamp and the second timestamp.
In an embodiment of the present application, the constructing module 300 may be used to perform the step 100 in the above method embodiment, the transmitting module 302 may be used to perform the step 102 in the above method embodiment, the extracting module 304 may be used to perform the step 104 in the above method embodiment, and the confirming module 306 may be used to perform the step 106 in the above method embodiment.
In one embodiment of the present application, prior to executing build module 300, the following operations need to be performed:
creating a two-dimensional code image with a unique identifier based on a preset two-dimensional code dictionary;
and sending a re-rendering instruction to the software interface so that the software interface displays the two-dimensional code image.
In one embodiment of the present application, the two-dimensional code images created are multiple, and when the building module 300 is executed, it is necessary to perform cyclic playing of the two-dimensional code images in the two-dimensional code dictionary.
In one embodiment of the present application, after executing the build module 300 and before executing the transfer module 302, the following operations need to be performed:
and creating a mapping relation between the unique identification and the first timestamp of each two-dimensional code image.
In one embodiment of the present application, when executing the extraction module 304, the following operations need to be performed:
extracting two-dimensional code images from the video, and determining a second timestamp when each two-dimensional code image is extracted;
screening the extracted two-dimensional code image based on the outline of the extracted two-dimensional code image to obtain a two-dimensional code image to be detected;
screening an effective two-dimensional code image of an actual mark from the two-dimensional code image to be detected;
extracting a unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image;
based on the extracted unique identifier and the mapping relationship, a first timestamp corresponding to the unique identifier is determined.
In one embodiment of the present application, when executing the extraction module 304, the following operations are further performed:
performing perspective conversion on the obtained two-dimensional code image to be detected to obtain a standard form two-dimensional code image to be detected;
dividing a two-dimensional code image to be detected in a standard form by using an Ojin threshold dividing method to obtain a white mark bit and a black mark bit;
judging whether the two-dimensional code image to be detected belongs to a two-dimensional code dictionary or not based on the white mark bit and the black mark bit;
if so, the two-dimensional code image to be detected is an effective two-dimensional code image, and the extraction of the unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image is continuously executed;
if not, the two-dimensional code image to be detected is not the effective two-dimensional code image, and the two-dimensional code image to be detected is abandoned.
In one embodiment of the present application, when the validation module 306 is executed, the following operations need to be performed:
calculating a difference value between a second time stamp and a first time stamp corresponding to each two-dimensional code image;
and taking the average value of the difference values corresponding to each two-dimensional code as the delay time of the network camera.
It should be understood that the configuration illustrated in the embodiment of the present application does not constitute a specific limitation on a device for measuring delay time of a network camera. In other embodiments of the application, a network camera delay time measurement device may include more or fewer components than shown, or may combine certain components, or may split certain components, or may have a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the modules in the device is based on the same conception as the embodiment of the method of the present application, and specific content can be referred to the description in the embodiment of the method of the present application, which is not repeated here.
The embodiment of the application also provides a computing device which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the method for measuring the delay time of the network camera in any embodiment of the application when executing the computer program.
The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the method for measuring the delay time of the network camera in any embodiment of the application.
Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present application.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Further, it should be apparent that the functions of any of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion module connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion module is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
It is noted that relational terms such as first and second, and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of additional identical elements in a process, method, article or apparatus that comprises the element.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (5)

1. A method for measuring delay time of a network camera, comprising:
determining a first timestamp corresponding to the two-dimensional code image displayed on the software interface;
receiving a video shot by a network camera and containing the two-dimensional code image;
extracting a two-dimensional code image from the video, and determining a second time stamp and a first time stamp corresponding to the two-dimensional code image when the two-dimensional code image is extracted;
determining a delay time of the network camera based on the first timestamp and the second timestamp;
the network camera is a digital camera adopting an RTSP video streaming protocol; before determining the first timestamp corresponding to the two-dimensional code image displayed on the software interface, the method further comprises:
creating a group of two-dimensional code images with unique identifications based on a preset two-dimensional code dictionary;
sending a re-rendering instruction to a software interface so that the software interface displays a two-dimensional code image; the number of the created two-dimensional code images is multiple, and the software interface circularly plays the two-dimensional code images in the two-dimensional code dictionary after receiving the re-rendering instruction; after the determining of the first timestamp corresponding to the two-dimensional code image displayed on the software interface and before the receiving of the video containing the two-dimensional code image shot by the network camera, the method further comprises:
creating a mapping relation between a unique identifier and a first timestamp for each two-dimensional code image;
the method for extracting the two-dimensional code image from the video and determining the second time stamp and the first time stamp corresponding to the two-dimensional code image when the two-dimensional code image is extracted comprises the following steps:
extracting two-dimensional code images from the video, and determining a second timestamp when each two-dimensional code image is extracted;
screening the extracted two-dimensional code image based on the outline of the extracted two-dimensional code image to obtain a two-dimensional code image to be detected;
screening an effective two-dimensional code image of an actual mark from the two-dimensional code image to be detected;
extracting a unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image;
determining a first timestamp corresponding to the unique identifier based on the extracted unique identifier and the mapping relation;
the effective two-dimensional code image of the actual mark is screened from the two-dimensional code image to be detected, which comprises the following steps:
performing perspective conversion on the obtained two-dimensional code image to be detected to obtain a standard form two-dimensional code image to be detected;
performing threshold processing on the two-dimensional code image to be detected by using an Ojin threshold segmentation method so as to separate white pixels and black pixels;
dividing the two-dimensional code image into different unit lattices based on the size of each mark and the size of the boundary in the two-dimensional code image to be detected;
calculating the number of the black pixels or the white pixels in each of the unit cells to determine whether each of the unit cells is a white bit or a black bit;
determining whether the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary or not by analyzing the mark formed by the white bits or the black bits, and adopting an error correction technology if necessary;
if the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary, the two-dimensional code image to be detected is an effective two-dimensional code image, and the extraction of the unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image is continuously executed;
if the mark of the two-dimensional code image to be detected does not belong to the two-dimensional code dictionary, the two-dimensional code image to be detected is not an effective two-dimensional code image, and the two-dimensional code image to be detected is abandoned.
2. The method of claim 1, wherein the determining the delay time of the webcam based on the first timestamp and the second timestamp comprises:
calculating a difference value between a second time stamp and a first time stamp corresponding to each effective two-dimensional code image;
and taking the average value of the difference values corresponding to each effective two-dimensional code as the delay time of the network camera.
3. A network camera delay time measuring apparatus, comprising:
the construction module is used for determining a first time stamp corresponding to the two-dimensional code image displayed on the software interface;
the transmission module is used for receiving the video containing the two-dimensional code image shot by the network camera;
the extraction module is used for extracting the two-dimensional code image from the video and determining a second time stamp when the two-dimensional code image is extracted and a first time stamp corresponding to the two-dimensional code image;
a confirmation module, configured to determine a delay time of the network camera using the first timestamp and the second timestamp;
the network camera is a digital camera adopting an RTSP video streaming protocol;
before executing the build module (300), the following operations need to be performed:
creating a group of two-dimensional code images with unique identifications based on a preset two-dimensional code dictionary;
sending a re-rendering instruction to a software interface so that the software interface displays a two-dimensional code image;
the two-dimensional code images are created in a plurality, and when the building module (300) is executed, the two-dimensional code images in the two-dimensional code dictionary need to be circularly played;
after execution of the build module (300) and before execution of the transfer module (302), the following operations need to be performed:
creating a mapping relation between a unique identifier and a first timestamp for each two-dimensional code image;
the method for extracting the two-dimensional code image from the video and determining the second time stamp and the first time stamp corresponding to the two-dimensional code image when the two-dimensional code image is extracted comprises the following steps:
extracting two-dimensional code images from the video, and determining a second timestamp when each two-dimensional code image is extracted;
screening the extracted two-dimensional code image based on the outline of the extracted two-dimensional code image to obtain a two-dimensional code image to be detected;
screening an effective two-dimensional code image of an actual mark from the two-dimensional code image to be detected;
extracting a unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image;
determining a first timestamp corresponding to the unique identifier based on the extracted unique identifier and the mapping relation;
in executing the extraction module (304), the following operations are also required:
performing perspective conversion on the obtained two-dimensional code image to be detected to obtain a standard form two-dimensional code image to be detected;
performing threshold processing on the two-dimensional code image to be detected by using an Ojin threshold segmentation method so as to separate white pixels and black pixels;
dividing the two-dimensional code image into different unit lattices based on the size of each mark and the size of the boundary in the two-dimensional code image to be detected;
calculating the number of the black pixels or the white pixels in each of the unit cells to determine whether each of the unit cells is a white bit or a black bit;
determining whether the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary or not by analyzing the mark formed by the white bits or the black bits, and adopting an error correction technology if necessary;
if the mark of the two-dimensional code image to be detected belongs to the two-dimensional code dictionary, the two-dimensional code image to be detected is an effective two-dimensional code image, and the extraction of the unique identifier corresponding to the two-dimensional code image from the effective two-dimensional code image is continuously executed;
if the mark of the two-dimensional code image to be detected does not belong to the two-dimensional code dictionary, the two-dimensional code image to be detected is not an effective two-dimensional code image, and the two-dimensional code image to be detected is abandoned.
4. A computing device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the method of any of claims 1-2 when the computer program is executed.
5. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-2.
CN202111270320.5A 2021-10-29 2021-10-29 Method and device for measuring delay time of network camera Active CN113891070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111270320.5A CN113891070B (en) 2021-10-29 2021-10-29 Method and device for measuring delay time of network camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111270320.5A CN113891070B (en) 2021-10-29 2021-10-29 Method and device for measuring delay time of network camera

Publications (2)

Publication Number Publication Date
CN113891070A CN113891070A (en) 2022-01-04
CN113891070B true CN113891070B (en) 2023-12-15

Family

ID=79014482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111270320.5A Active CN113891070B (en) 2021-10-29 2021-10-29 Method and device for measuring delay time of network camera

Country Status (1)

Country Link
CN (1) CN113891070B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002526A (en) * 2022-05-23 2022-09-02 阿里巴巴(中国)有限公司 Video frame time delay determining method and device
CN117859324A (en) * 2022-06-23 2024-04-09 北京小米移动软件有限公司 Camera module testing method and device, electronic equipment and storage medium
CN116760973B (en) * 2023-08-18 2023-10-24 天津华来科技股份有限公司 Intelligent camera long connection performance test method and system based on two-dimensional code clock

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169664A (en) * 2011-01-28 2011-08-31 北京视博云科技有限公司 Time delay detecting method and device of display device
CN103826117A (en) * 2014-01-17 2014-05-28 浙江大学 Method of measuring end-to-end delay of mobile phone video communication application
CN105791986A (en) * 2014-12-23 2016-07-20 中国移动通信集团公司 Video time delay detection method and device
US9619045B1 (en) * 2014-04-28 2017-04-11 Amazon Technologies, Inc. User input source identification based on delayed input
CN106791815A (en) * 2016-12-26 2017-05-31 百度在线网络技术(北京)有限公司 Method and apparatus for determining the acquisition time of image
CN106941428A (en) * 2017-02-28 2017-07-11 中国航空工业集团公司沈阳飞机设计研究所 A kind of picture delay method of testing based on eletric watermark
CN107094249A (en) * 2017-03-31 2017-08-25 腾讯科技(上海)有限公司 A kind of method and device for testing camera delay
CN110766831A (en) * 2019-09-29 2020-02-07 深圳深岚视觉科技有限公司 Dynamic two-dimensional code generation method and device and storage medium
CN111355950A (en) * 2020-03-13 2020-06-30 随锐科技集团股份有限公司 Video transmission quality detection method and system in real-time video communication
CN111372105A (en) * 2020-03-26 2020-07-03 深圳市微测检测有限公司 Video information transmission delay test method, device, terminal and storage medium
CN111460198A (en) * 2019-01-18 2020-07-28 阿里巴巴集团控股有限公司 Method and device for auditing picture timestamp
CN112511816A (en) * 2020-11-03 2021-03-16 中航航空电子有限公司 Video delay test system, method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11334561B2 (en) * 2019-07-24 2022-05-17 Vmware, Inc. Flexible byzantine fault tolerant protocol using message delay upper bound for client commit decision

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169664A (en) * 2011-01-28 2011-08-31 北京视博云科技有限公司 Time delay detecting method and device of display device
CN103826117A (en) * 2014-01-17 2014-05-28 浙江大学 Method of measuring end-to-end delay of mobile phone video communication application
US9619045B1 (en) * 2014-04-28 2017-04-11 Amazon Technologies, Inc. User input source identification based on delayed input
CN105791986A (en) * 2014-12-23 2016-07-20 中国移动通信集团公司 Video time delay detection method and device
CN106791815A (en) * 2016-12-26 2017-05-31 百度在线网络技术(北京)有限公司 Method and apparatus for determining the acquisition time of image
CN106941428A (en) * 2017-02-28 2017-07-11 中国航空工业集团公司沈阳飞机设计研究所 A kind of picture delay method of testing based on eletric watermark
CN107094249A (en) * 2017-03-31 2017-08-25 腾讯科技(上海)有限公司 A kind of method and device for testing camera delay
CN111460198A (en) * 2019-01-18 2020-07-28 阿里巴巴集团控股有限公司 Method and device for auditing picture timestamp
CN110766831A (en) * 2019-09-29 2020-02-07 深圳深岚视觉科技有限公司 Dynamic two-dimensional code generation method and device and storage medium
CN111355950A (en) * 2020-03-13 2020-06-30 随锐科技集团股份有限公司 Video transmission quality detection method and system in real-time video communication
CN111372105A (en) * 2020-03-26 2020-07-03 深圳市微测检测有限公司 Video information transmission delay test method, device, terminal and storage medium
CN112511816A (en) * 2020-11-03 2021-03-16 中航航空电子有限公司 Video delay test system, method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QR码在电厂物资管理系统中的应用;王鹰;王勇;杨灵敏;;电网技术(第S1期);全文 *

Also Published As

Publication number Publication date
CN113891070A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN113891070B (en) Method and device for measuring delay time of network camera
US8750613B2 (en) Detecting objects in images using color histograms
CN112511821B (en) Video jamming detection method and device and storage medium
CN110475124B (en) Video jamming detection method and device
US9176043B2 (en) Cell image analysis apparatus, cell image analysis method, and program
CN106056028A (en) Rapid scanning and waybill recording method and device thereof
EP2239952B1 (en) A method and apparatus for testing a digital video broadcast display product and a method of data communication
CN114007014B (en) Method and device for generating panoramic image, electronic equipment and storage medium
US20080144923A1 (en) Test apparatus and method for testing contact finger
CN112073713B (en) Video leakage test method, device, equipment and storage medium
CN110430424B (en) FOV testing method and device, storage medium and electronic equipment
CN113068021B (en) Delay testing method, device, equipment and storage medium
CN110992299B (en) Method and device for detecting browser compatibility
CN113141433B (en) Method and device for testing screen sensitivity and processor
CN114926627A (en) Oral cavity structure positioning model training method, positioning method, device and electronic equipment
CN111256609B (en) Method and device for detecting USB interface depth
CN111292374B (en) Method and equipment for automatically plugging and unplugging USB interface
CN113923443A (en) Network video recorder testing method and device and computer readable storage medium
CN108447107B (en) Method and apparatus for generating video
CN113689378A (en) Method and device for judging accurate positioning of test strip, storage medium and terminal
CN112052150A (en) Page loading time detection method, equipment, storage medium and device
CN111160279A (en) Method, apparatus, device and medium for generating target recognition model using small sample
CN112423121B (en) Video test file generation method and device and player test method and device
CN117354491A (en) Analysis method, system and storage medium for video stream processing quality
CN115243030B (en) Terminal capability test system, method, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant