A method and apparatus for acquiring camera parameter information of a PTZ camera
By acquiring the video stream from the PTZ camera and using the OCR recognition algorithm to extract parameter indication information, the limitations of manufacturer compatibility and network environment were resolved, achieving cross-manufacturer compatibility and real-time parameter acquisition, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HISCENE INFORMATION TECH CO LTD
- Filing Date
- 2023-07-20
- Publication Date
- 2026-06-30
Smart Images

Figure CN116801117B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a technique for acquiring camera parameter information of a PTZ camera device. Background Technology
[0002] After a client acquires video footage from a network camera (IP CAMERA, IPC) through a monitoring platform, real-time PTZ information of the corresponding IPC is essential for rendering augmented reality information within the video footage. Currently, most IPCs connect to monitoring platforms or network video surveillance systems via the GB / T28181—2011 or GB / T28181—2016 protocols. Limited by these protocols, obtaining the IPC's PTZ information currently relies on direct connection to the IPC using each manufacturer's proprietary SDK. This method has two drawbacks: First, different manufacturers' IPCs, and even different models of the same manufacturer's IPCs, may have different SDKs, resulting in significant adaptation work and compatibility issues. Second, direct connection to the IPC requires the connecting end and the IPC to be on the same network address segment. In current usage scenarios, IPCs are accessed through monitoring platforms or NVRs, which are often cascaded, making it difficult to guarantee that the connecting end and the IPC are on the same network address segment. If the monitoring platform or network video surveillance system is not directly connected to the IPC, it cannot obtain the current IPC's real-time PTZ information. Summary of the Invention
[0003] One object of this application is to provide a method and apparatus for acquiring camera parameter information of a PTZ camera device.
[0004] According to one aspect of this application, a method for acquiring camera parameter information of a PTZ camera device is provided, the method comprising:
[0005] Acquire the video stream captured by the corresponding PTZ camera device, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device;
[0006] The recognition result information of one or more target video frames in the video stream is determined by the OCR recognition algorithm based on the parameter indication information.
[0007] The camera parameter information of the PTZ camera device during the video stream acquisition process is determined based on the recognition result information of one or more target video frames.
[0008] According to another aspect of this application, a device for acquiring camera parameter information of a PTZ camera is provided, wherein the device includes:
[0009] The module is used to acquire the video stream captured by the corresponding PTZ camera device, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device;
[0010] The first and second modules are used to determine the recognition result information of one or more target video frames in the video stream based on the parameter indication information using an OCR recognition algorithm.
[0011] The first four modules are used to determine the camera parameter information of the PTZ camera device during the video stream acquisition process based on the recognition result information of the one or more target video frames.
[0012] According to one aspect of this application, a computer device is provided, wherein the device includes:
[0013] Processor; and
[0014] A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the steps of any of the methods described above.
[0015] According to one aspect of this application, a computer-readable storage medium is provided that stores a computer program / instructions thereon, characterized in that, when executed, the computer program / instructions cause a system to perform the steps of any of the methods described above.
[0016] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions, characterized in that, when executed by a processor, the computer program / instructions implement the steps of any of the methods described above.
[0017] Compared with existing technologies, this application overlays the camera parameter information of the PTZ camera device onto the video frame of the corresponding video stream and utilizes OCR technology to extract text information from the video frames, thereby achieving OCR recognition to obtain the real-time camera parameter information of the PTZ camera device. This application overcomes the limitations of specific PTZ camera device manufacturers, achieving compatibility with all mainstream manufacturers currently on the market. Simultaneously, it overcomes the direct network connection limitation between the PTZ camera device and the caller; as long as the video stream can be obtained, camera parameter information can be recognized via OCR, expanding the video application scenarios of the PTZ camera device and improving the user experience. Attached Figure Description
[0018] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0019] Figure 1This diagram illustrates a method for acquiring camera parameter information of a PTZ camera device according to an embodiment of this application.
[0020] Figure 2 This diagram illustrates a device structure of a computing device 100 according to another embodiment of the present application;
[0021] Figure 3 Exemplary systems that can be used to implement the various embodiments described in this application are shown.
[0022] The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation
[0023] The present application will now be described in further detail with reference to the accompanying drawings.
[0024] In a typical configuration of this application, the terminal, the device of the service network, and the trusted party all include one or more processors (e.g., a central processing unit (CPU)), input / output interfaces, network interfaces, and memory.
[0025] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of computer-readable media.
[0026] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), programmable random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0027] The devices referred to in this application include, but are not limited to, user equipment, network equipment, or devices composed of user equipment and network equipment integrated through a network. The user equipment includes, but is not limited to, any mobile electronic product capable of human-computer interaction, such as smartphones, tablets, network cameras, etc., and the mobile electronic product can use any operating system, such as Android, iOS, etc. The network equipment includes an electronic device capable of automatically performing numerical calculations and information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc. The network equipment includes, but is not limited to, computers, network hosts, single network servers, multiple network server sets, or clouds composed of multiple servers; here, the cloud consists of a large number of computers or network servers based on cloud computing, where cloud computing is a type of distributed computing, consisting of a virtual supercomputer composed of a group of loosely coupled computer sets. The network includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, VPN network, wireless ad hoc network, etc. Preferably, the device can also be a program running on the user equipment, network device, or a device formed by integrating user equipment and network device, network device, touch terminal, or network device and touch terminal through a network.
[0028] Of course, those skilled in the art should understand that the above-described devices are merely examples, and other existing or future devices that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0029] In the description of this application, "multiple" means two or more, unless otherwise expressly and specifically defined.
[0030] Figure 1A method for acquiring camera parameter information of a PTZ camera device according to one aspect of this application is illustrated. This method is applied to a computing device and specifically includes steps S101, S102, and S103. In step S101, a video stream acquired by the corresponding PTZ camera device is acquired, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device. In step S102, an OCR recognition algorithm is used to determine the recognition result information of one or more target video frames in the video stream based on the parameter indication information. In step S103, the camera parameter information of the PTZ camera device during the video stream acquisition process is determined based on the recognition result information of the one or more target video frames. For example, the computer equipment includes, but is not limited to, user equipment, network equipment, or a combination of user equipment and network equipment; wherein, the user equipment includes, but is not limited to, any electronic product that can interact with the user, such as smartphones, tablets, smart glasses, smart helmets, network cameras, etc.; the network equipment includes, but is not limited to, computers, network hosts, single network servers, sets of multiple network servers, or clouds composed of multiple servers, such as ground control center servers, etc.
[0031] Specifically, in step S101, a video stream acquired by the corresponding PTZ camera device is obtained. This video stream contains one or more target video frames, each including parameter indication information corresponding to the camera parameters of the PTZ camera device. For example, the PTZ camera device is used to acquire image information of the scene where it is located, such as a surveillance camera positioned in a fixed location. In some cases, the PTZ camera device also includes a corresponding communication module for establishing communication connections with other devices (e.g., computer equipment, ground control centers, etc.) and transmitting information. The computer equipment acquires the video stream of the current scene based on user operations or preset instructions. This video stream includes multiple video frames captured by the PTZ camera device in the current field of view. Simultaneously, the corresponding camera device also acquires the camera parameter information acquired during image acquisition and overlays the parameter indication information onto one or more target video streams. This includes reading the PTZ (Pan / Tilt / Zoom) value of the camera device, or reading the intrinsic and / or extrinsic parameters of the camera device, and presenting the corresponding parameters as watermarks on one or more target video frames of the video stream. The target video frame can be any of the captured video frames or a selection of video frames filtered according to preset rules. These preset rules include, but are not limited to, preset network quality, preset time intervals, preset frame counts, and changes in image quality compared to previous video frames exceeding a threshold; these are not specifically limited here. In some embodiments, the parameter indication information includes the superimposed information of the parameter values corresponding to the PTZ camera device's camera parameters in the target video frame. For example, the camera parameter information includes the Pan / Tilt / Zoom values of the PTZ camera device, and correspondingly, the parameter indication information includes the PTZ parameter values superimposed on the video frame, specifically in the form of P067, T19, Z001, etc. For example, the camera parameter information includes intrinsic and / or extrinsic parameter information about the corresponding target video frame (e.g., one or more video frames) among multiple video frames captured by the camera device. It also includes information for calculating the corresponding intrinsic and / or extrinsic parameters of the target video frame, specifically, such as Pan / Tilt / Zoom information or Pan / Tilt / Zoom information and camera position information for calculating the corresponding intrinsic and / or extrinsic parameters. Specifically, since the location of the PTZ camera device is fixed, the computing device can read the setting location of the corresponding PTZ camera device in the geographic system, or obtain the corresponding location through a communication connection with the PTZ camera device. Accordingly, the parameter indication information includes intrinsic and / or extrinsic parameter information superimposed on the video, or information superimposed on the video for calculating the corresponding intrinsic and / or extrinsic parameters. Furthermore, the parameter indication information exists in different forms depending on the manufacturer of the corresponding PTZ camera device, such as being presented in different positions within the target video frame or rendered with different fonts, colors, etc.
[0032] In some embodiments, the camera setting information of the PTZ camera device includes overlaid setting information of parameter indication information for the one or more target video frames; wherein, in step S101, based on the overlaid setting information of the parameter indication information, the video stream acquired by the PTZ camera device is received, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device. For example, the PTZ camera device has a corresponding camera setting page, which can be triggered by the PTZ camera device's own device controls and displayed on the corresponding display screen of the camera device (such as the display screen of the control terminal corresponding to the PTZ camera device), or triggered by a communication connection request between the computing device and the PTZ camera device and displayed on the display screen of the computing device, etc. Based on the setting page of the PTZ camera device itself or the setting page displayed by the computing device, the corresponding operator can set the relevant shooting parameters of the PTZ camera device in the setting page, such as adjusting the focal length, camera angle, or overlaying the corresponding parameter indication information, etc. The overlay settings information is used to configure the PTZ camera to overlay corresponding camera parameter information onto the target video frame using methods such as watermarking (with a certain degree of transparency). Specifically, this includes enabling settings for gimbal coordinates and setting PTZ OST display in the settings page. Based on this overlay settings information, the PTZ camera can overlay camera parameter information onto the corresponding video frame when needed during image acquisition to obtain the desired target video frame.
[0033] In some implementations, the target video frame includes, but is not limited to: each video frame in the video stream; video frames determined from the video stream at preset intervals; if the parameter difference between the camera parameter information of a certain video frame in the video stream and the camera parameter information of the preceding video frame is greater than or equal to a parameter difference threshold, then the certain video frame is determined as the corresponding target video frame. Here, the number of target video frames can be one or more. Correspondingly, when the number of target video frames is one, the parameter indication information when the multiple video frames are captured is the same, or the corresponding parameter indication information is the parameter indication information corresponding to the camera parameter information selected from the multiple camera parameter information acquired when the multiple video frames are captured, such as camera parameter information presented in the form of a watermark. When the number of target video frames is multiple, the video frame can be each video frame in the video stream. For example, the camera parameter information of the camera device is recorded once when each video frame is captured and the corresponding parameter indication information is superimposed and presented. In some cases, the target video frame can also be some representative video frames among the multiple video frames, and they do not correspond one-to-one. Here, the target video frame can be selected from multiple acquired video frames according to preset conditions, and the number of acquired video frames is unlimited. For example, to save transmission resources and improve transmission efficiency, it can be assumed that the changes in camera parameter information between consecutive video frames are small, and only intermittent camera parameter information is needed to describe the changing trend of camera parameter information in the real-time video stream. Therefore, during the video stream acquisition process, the PTZ camera device determines the target video frame that meets the conditions from the multiple acquired video frames according to preset intervals (e.g., preset time interval, preset number interval, or preset video frame number interval, etc.), such as taking the 1st, 6th, 11th… video frames as the corresponding target video frames. For example, to improve the sensitivity to changes in camera parameter information, and to save transmission resources and improve transmission efficiency, the transmission of video frames corresponding to the same / similar camera parameter information can be ignored. The PTZ camera device can determine one (e.g., the first) of the camera parameter information corresponding to multiple consecutive time points or multiple consecutive video frames as the camera parameter information. Thus, when the parameter difference between the camera parameter information of a certain video frame and the preceding camera parameter information of that video frame is greater than or equal to the parameter difference threshold, that video frame is determined as the target video frame. Here, "same / similar" camera parameter information at multiple consecutive time points or multiple consecutive video frames means that the parameter difference between the corresponding camera parameter information and the preceding camera parameter information (e.g., the camera parameter information corresponding to the first N or the first N video frames) all meet preset conditions, such as the corresponding Pan, Tilt, and Zoom changes being less than or equal to a preset change threshold, or the intrinsic or extrinsic parameter changes being less than or equal to a preset difference threshold, etc. This is only an example and is not a limitation.
[0034] In step S102, the recognition result information of one or more target video frames in the video stream is determined based on the parameter indication information using an OCR recognition algorithm. For example, after acquiring the corresponding video stream, the computing device can perform OCR (Optical Character Recognition) recognition on each target video frame based on the parameter indication information contained in the target video frames in the video stream, recognizing the camera parameter information of the corresponding PTZ camera device, such as Pan, Tilt, and Zoom parameter values. The recognition result information includes the camera parameter information of the PTZ camera device in the corresponding target video frame. The OCR recognition algorithm refers to the algorithm process used to scan text documents, then analyze and process image files to obtain text and layout information. The computing device can preset a certain number of sample images and sample recognition results to train the algorithm model, thereby obtaining an OCR recognition algorithm for PTZ parameter recognition. The identification result information that the computing device can determine includes the camera parameter information of the PTZ camera device. In some cases, the identification result information also includes the camera parameter identification information of the PTZ camera device, such as the identification letters corresponding to P, T, Z, etc., used to indicate the corresponding parameters.
[0035] In step S103, the camera parameter information of the PTZ camera device during the video stream acquisition process is determined based on the recognition result information of the one or more target video frames. For example, after the computing device obtains the corresponding recognition result information, it can determine the camera parameter information of each target video frame based on the recognition result information of each target video frame, such as recognizing the values of Pan, Tilt, and Zoom parameters in a preset order; or, if the recognition result information also includes parameter identification information of the camera parameters, the value of the corresponding parameter is determined based on the parameter values near each camera parameter identification information, thereby obtaining the camera parameter information of the target video frame. After the computing device determines the camera parameter information of each target video frame, it can further calculate the augmented reality information overlay position based on the camera parameter information.
[0036] In some embodiments, the method further includes step S104 (not shown), in which the camera manufacturer identification information corresponding to the PTZ camera device is obtained, and the OCR recognition algorithm corresponding to the video stream is determined based on the camera manufacturer identification information. For example, due to differences in the manufacturing of camera devices, the parameter indication information when overlaying settings is presented in the video frame may vary, such as different overlay positions, different overlay fonts, different parameter formats, or different overlay colors. To improve recognition accuracy, different OCR recognition algorithms can be set for camera devices from different manufacturers. Here, different OCR recognition algorithms can refer to different recognition algorithm models, or different algorithm branches within the same recognition algorithm model. Typically, the OCR recognition algorithm of the current PTZ camera device can be determined based on user selection, or based on system recognition, such as determining the corresponding camera manufacturer identification information by performing bitstream analysis on the video stream and calling the corresponding OCR recognition algorithm based on the camera manufacturer identification information, or determining the corresponding camera manufacturer identification information based on user input and calling the corresponding OCR recognition algorithm based on the camera manufacturer identification information, etc.
[0037] In some implementations, in step S103, one or more initial camera parameter information corresponding to the PTZ camera device is determined based on the recognition result information of the one or more target video frames; the initial camera parameter information that meets the preset parameter conditions among the one or more initial camera parameter information is determined as the camera parameter information of the PTZ camera device in the video stream acquisition process. For example, the computing device can directly determine the camera parameter information of the corresponding PTZ camera device in the video stream acquisition process based on the recognition result information, or it can perform calibration based on the preset parameter conditions to eliminate recognition result information with obvious large errors and determine more accurate camera parameter information. For example, the computing device first identifies and determines the initial camera parameter information corresponding to each target video frame based on the aforementioned process, and filters the initial camera parameter information of the target video frames based on the preset parameter conditions, determining the initial camera parameter information that meets the preset parameter conditions as the camera parameter information of the PTZ camera device. In some implementations, the preset parameter conditions include, but are not limited to: Pan parameter, with preset parameter conditions including a Pan parameter greater than 0 and less than 360; Tilt parameter, with preset parameter conditions including a Tilt parameter greater than -90 and less than 90; and Zoom parameter, with preset parameter conditions including a Zoom parameter greater than 0. For example, for initial camera parameter information that does not meet the above conditions, the corresponding recognition result information is obviously affected by environmental interference, such as strong light or nighttime, causing numerical recognition errors, thus causing the corresponding parameter values to exceed the normal parameter range. Furthermore, each camera parameter information is associated with a corresponding target video frame. We can sort the camera parameter information associated with the target video frame based on the sorting of the video frame sequence, thereby constructing a corresponding parameter cache queue, which can realize error detection and correction of the camera parameter information.
[0038] In some implementations, the number of camera parameter information items is multiple. Determining the initial camera parameter information items that meet preset parameter conditions from among the one or more initial camera parameter information items as the camera parameter information of the PTZ camera device during the video stream acquisition process includes: determining the camera parameter sequence of the PTZ camera device during the video stream acquisition process based on the initial camera parameter information items that meet preset parameter conditions from among the multiple initial camera parameter information items; if the current initial camera parameter information corresponding to the subsequent target video frame of the camera parameter sequence satisfies the parameter sequence prediction condition of the camera parameter sequence, then the current initial camera parameter information is determined as the camera parameter information of the PTZ camera device during the video stream acquisition process, and the camera parameter sequence is updated based on the current initial camera parameter information; otherwise, the current initial camera parameter information is removed. For example, after the computing device performs initial detection and eliminates corresponding interference items on the initial camera parameter information based on the aforementioned preset parameter conditions, it can also construct a corresponding camera parameter sequence to further detect errors in the camera parameter information in subsequently acquired video frames, thereby improving the accuracy and precision of the parameter recognition process. For example, the computing device can start counting from the first initial camera parameter acquired from the video stream, and construct a corresponding camera parameter sequence based on the corresponding acquisition time order of the initial camera parameter information that meets the preset parameter conditions. Each camera parameter information in this sequence corresponds to a target video frame. In some cases, optionally, the computing device also needs to perform step size detection on the camera parameter information that meets the preset parameter conditions. If the parameter difference between the corresponding camera parameter information and its preceding camera parameter information (e.g., the previous one or N camera parameter information) is less than or equal to the step size difference threshold, then the camera parameter information is determined to be one of the camera parameter information in the camera parameter sequence. After the computing device constructs the corresponding camera parameter sequence, it can determine the current initial camera parameter information of the current target video frame corresponding to the subsequent target video frame of the camera parameter sequence based on the parameter sequence prediction conditions. If the current initial camera parameter information meets the corresponding parameter sequence prediction conditions, then the current initial camera parameter information is determined as one of the camera parameter information in the camera parameter sequence; otherwise, it is determined that the current initial camera parameter information has too large an error and is removed. In some embodiments, before determining the current initial camera parameter information of the current target video frame corresponding to the subsequent target video frame of the camera parameter sequence, the method further includes: determining whether the current initial camera parameter information of the current target video frame meets preset parameter conditions, and determining the parameter sequence prediction conditions for the current initial camera parameter information that meets the preset parameter conditions.Optionally, the step of determining the parameter sequence prediction conditions for the current initial camera parameter information that meets the preset parameter conditions further includes: performing step size detection on the current initial camera parameter information that meets the preset parameter conditions; if the corresponding current initial camera parameter information passes the step size detection, then determining the parameter sequence prediction conditions for the current initial camera parameter information. In some embodiments, the parameter sequence prediction conditions include the difference between the camera parameter information and at least one initial camera parameter information in the camera parameter sequence being less than or equal to a difference threshold. For example, the parameter sequence prediction conditions may be the aforementioned step size detection, where the difference between each camera parameter information in the camera parameter sequence and the current initial camera parameter information is less than or equal to a difference threshold, etc. In other cases, the parameter sequence prediction condition can also be the parameter prediction interval of the preceding camera parameter information based on the current initial camera parameter information (for example, the corresponding parameter prediction interval is determined by a linear or nonlinear prediction algorithm). If the current initial camera parameter information is within the parameter prediction interval, it is determined that the current initial camera parameter information meets the corresponding parameter sequence prediction condition; otherwise, it is determined that the current initial camera parameter information does not meet the corresponding parameter sequence prediction condition.
[0039] In some implementations, determining the camera parameter sequence of the PTZ camera device during the video stream acquisition process based on the initial camera parameter information that meets preset parameter conditions from the plurality of initial camera parameter information includes: selecting a preset number of consecutive initial camera parameter information from the plurality of initial camera parameter information that meets preset parameter conditions, and arranging them according to the video frame sequence to form the camera parameter sequence of the PTZ camera device during the video stream acquisition process. For example, to improve the accuracy of camera parameter recognition and quickly and conveniently perform error detection on the current initial camera parameter information, we usually limit the number of parameters in the camera parameter sequence when constructing it. Specifically, the computing device can obtain multiple initial camera parameter information based on the recognition of parameter indication information in the video stream. We can select a preset number of consecutive initial camera parameter information that meets preset parameter conditions as the corresponding camera parameter sequence, and perform error detection on the current initial camera parameter information corresponding to subsequent target video frames based on this camera parameter sequence, etc. Of course, since the number of camera parameter sequences is limited, to maintain the timeliness of the camera parameter sequences, we usually update the camera parameter sequences based on the current initial camera parameter information corresponding to subsequent target video frames. For example, in some implementations, the current initial camera parameter information is added to the end of the camera parameter sequence, and the initial camera parameter information at the very beginning of the sequence is removed. For instance, the latest current initial camera parameter information that meets the preset conditions of the parameter sequence is added to the end of the camera parameter sequence, and the initial camera parameter information at the very beginning of the sequence is removed, thus simplifying computational resources while maintaining the accuracy of the camera parameter sequences.
[0040] In some implementations, the step of removing the current camera parameter information if not present includes: if not present, continuing to determine the parameter sequence prediction conditions for subsequent initial camera parameter information of the current initial camera parameter information; if a preset number of subsequent initial camera parameter information does not meet the parameter sequence prediction conditions, then updating the camera parameter sequence based on the preset number of subsequent initial camera parameter information; if no preset number of subsequent initial camera parameter information does not meet the parameter sequence prediction conditions, then removing the current initial camera parameter information. For example, for current initial camera parameter information whose changes exceed the range (does not meet the parameter sequence prediction conditions), the computing device can directly remove it, or it can determine whether to remove it after performing a reasonableness judgment. The reasonableness judgment is used to prevent erroneous exclusion caused by excessive normal changes in the PTZ camera device (such as a sudden large-span rotation of the camera, etc.) (corresponding to excessive changes in the camera parameter information). For example, if the current initial camera parameter information does not meet the parameter sequence prediction conditions, the computing device continues to determine the parameter sequence prediction conditions for subsequent initial camera parameter information. If a preset number of subsequent initial camera parameter information (e.g., multiple consecutive, within a certain time period, or a certain percentage of a certain number) does not meet the parameter sequence prediction conditions, then it is determined that the current PTZ camera angle is a normal large adjustment. The camera parameter sequence can be updated based on the preset number of subsequent initial camera parameter information. Specifically, for example, the preset number of subsequent initial camera parameter information can be used as a new camera parameter sequence. Alternatively, the preset number of subsequent initial camera parameter information and the current initial camera parameter information can be used as a new camera parameter sequence. Another example is that a portion of the preset number of subsequent initial camera parameter information, such as the latest second preset number of initial camera parameter information from multiple subsequent initial camera parameter information, can be added to the end of the camera parameter sequence, and the second preset number of initial camera parameter information at the beginning of the camera parameter sequence can be removed. Of course, if the current initial camera parameter information does not meet the parameter sequence prediction conditions, the computing device continues to determine the parameter sequence prediction conditions for subsequent initial camera parameter information. If none of the subsequent initial camera parameter information (e.g., multiple consecutive or a certain percentage of a certain number) does not meet the parameter sequence prediction conditions, then the current initial camera parameter information is determined to be an error value and is removed.In some embodiments, before the computing device continues to determine the parameter sequence prediction conditions for subsequent initial camera parameter information, it further includes: determining whether the subsequent initial camera parameter information meets preset parameter conditions, and determining the parameter sequence prediction conditions for subsequent initial camera parameter information that meets the preset parameter conditions.
[0041] The foregoing mainly described various embodiments of a method for obtaining camera parameter information of a PTZ camera device according to this application. Furthermore, this application also provides specific devices capable of implementing the above embodiments. Below, we will combine... Figure 2 Let me introduce it.
[0042] Figure 2 A computing device 100 for acquiring camera parameter information of a PTZ camera device according to one aspect of this application is shown, specifically including a first module 101, a second module 102, and a third module 103. The first module 101 is used to acquire a video stream captured by a corresponding PTZ camera device, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device; the second module 102 is used to determine the recognition result information of one or more target video frames in the video stream based on the parameter indication information using an OCR recognition algorithm; the third module 103 is used to determine the camera parameter information of the PTZ camera device during the video stream acquisition process based on the recognition result information of the one or more target video frames.
[0043] In some embodiments, the parameter indication information includes superimposed information of the parameter values of the PTZ camera device's corresponding camera parameter information in the target video frame. In some embodiments, the camera setting information of the PTZ camera device includes superimposed setting information of the parameter indication information for the one or more target video frames; wherein, module 101 is used to receive the video stream acquired by the PTZ camera device based on the superimposed setting information of the parameter indication information, wherein the video stream contains one or more target video frames, and each target video frame includes the parameter indication information of the PTZ camera device's corresponding camera parameter information. In some embodiments, the target video frame includes, but is not limited to: each video frame in the video stream; video frames determined from the video stream at preset intervals in the video stream; if the parameter difference information between the camera parameter information of a certain video frame in the video stream and the camera parameter information of the preceding video frame of the certain video frame is greater than or equal to a parameter difference threshold, then the certain video frame is determined as the corresponding target video frame.
[0044] In some embodiments, the computing device further includes a four-module (not shown) for acquiring camera manufacturer identification information corresponding to the PTZ camera device and determining the OCR recognition algorithm corresponding to the video stream based on the camera manufacturer identification information.
[0045] In some embodiments, module 103 is used to determine one or more initial camera parameter information corresponding to the PTZ camera device based on the recognition result information of the one or more target video frames; and to determine the initial camera parameter information that meets preset parameter conditions from the one or more initial camera parameter information as the camera parameter information of the PTZ camera device in the video stream acquisition process. In some embodiments, the preset parameter conditions include, but are not limited to: Pan parameter, corresponding to preset parameter conditions including a Pan parameter greater than 0 and less than 360; Tilt parameter, corresponding to preset parameter conditions including a Tilt parameter greater than -90 and less than 90; Zoom parameter, corresponding to preset parameter conditions including a Zoom parameter greater than 0. In some embodiments, the number of camera parameter information is multiple; determining the initial camera parameter information that meets preset parameter conditions from the one or more initial camera parameter information as the camera parameter information of the PTZ camera device in the video stream acquisition process includes: determining the camera parameter sequence of the PTZ camera device in the video stream acquisition process based on the initial camera parameter information that meets preset parameter conditions from the multiple initial camera parameter information; if the current initial camera parameter information corresponding to the subsequent target video frame of the camera parameter sequence satisfies the parameter sequence prediction condition of the camera parameter sequence, then the current initial camera parameter information is determined as the camera parameter information of the PTZ camera device in the video stream acquisition process, and the camera parameter sequence is updated based on the current initial camera parameter information; otherwise, the current initial camera parameter information is removed. In some embodiments, the parameter sequence prediction condition includes that the difference between the camera parameter information of a certain camera parameter information and the camera parameter information of at least one initial camera parameter information in the camera parameter sequence is less than or equal to a difference threshold. In some embodiments, determining the camera parameter sequence of the PTZ camera device during the video stream acquisition process based on the initial camera parameter information that meets preset parameter conditions from the plurality of initial camera parameter information includes: selecting a preset number of consecutive initial camera parameter information from the plurality of initial camera parameter information that meets preset parameter conditions, and arranging them according to the video frame sequence to form the camera parameter sequence of the PTZ camera device during the video stream acquisition process. In some embodiments, the current initial camera parameter information is added to the end of the camera parameter sequence, and the initial camera parameter information at the very beginning of the camera parameter sequence is removed.In some implementations, the step of removing the current camera parameter information if not includes: if not, continuing to determine the parameter sequence prediction conditions for subsequent initial camera parameter information of the current initial camera parameter information; if a preset number of subsequent initial camera parameter information does not meet the parameter sequence prediction conditions, then updating the camera parameter sequence based on the preset number of subsequent initial camera parameter information; if no preset number of subsequent initial camera parameter information does not meet the parameter sequence prediction conditions, then removing the current initial camera parameter information.
[0046] Here, the specific implementation methods corresponding to the first module 101, the second module 102, the third module 103 and the fourth module are the same as or similar to the embodiments of the aforementioned steps S101, S102, S103 and S104, and therefore will not be repeated here, but are included by reference.
[0047] In addition to the methods and devices described in the above embodiments, this application also provides a computer-readable storage medium storing computer code that, when executed, performs the method described in any of the preceding embodiments.
[0048] This application also provides a computer program product that, when executed by a computer device, performs the method described in any of the preceding claims.
[0049] This application also provides a computer device, the computer device comprising:
[0050] One or more processors;
[0051] Memory, used to store one or more computer programs;
[0052] When the one or more computer programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described in any of the preceding methods.
[0053] Figure 3 Exemplary systems that can be used to implement the various embodiments described in this application are shown;
[0054] like Figure 3As shown in some embodiments, system 300 can function as any of the aforementioned devices in each of the described embodiments. In some embodiments, system 300 may include one or more computer-readable media having instructions (e.g., system memory or NVM / storage device 320) and one or more processors (e.g., one or more processors 305) coupled to the one or more computer-readable media and configured to execute the instructions to implement the module and thus perform the actions described in this application.
[0055] In one embodiment, the system control module 310 may include any suitable interface controller to provide any suitable interface to at least one of the processors 305 and / or any suitable device or component communicating with the system control module 310.
[0056] The system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315. The memory controller module 330 may be a hardware module, a software module, and / or a firmware module.
[0057] System memory 315 can be used, for example, to load and store data and / or instructions for system 300. In one embodiment, system memory 315 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 315 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0058] In one embodiment, the system control module 310 may include one or more input / output (I / O) controllers to provide interfaces to the NVM / storage device 320 and (one or more) communication interfaces 325.
[0059] For example, NVM / storage device 320 may be used to store data and / or instructions. NVM / storage device 320 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0060] NVM / storage device 320 may include storage resources that are physically part of a device on which system 300 is mounted, or that can be accessed by the device without necessarily being part of it. For example, NVM / storage device 320 may be accessed via a network through one or more communication interfaces 325.
[0061] One or more communication interfaces 325 may provide the system 300 with an interface to communicate over one or more networks and / or with any other suitable device. The system 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0062] In one embodiment, at least one of the processors 305 may be logically packaged with one or more controllers of the system control module 310 (e.g., memory controller module 330). In one embodiment, at least one of the processors 305 may be logically packaged with one or more controllers of the system control module 310 to form a system-in-package (SiP). In one embodiment, at least one of the processors 305 may be integrated with the logic of one or more controllers of the system control module 310 on the same die. In one embodiment, at least one of the processors 305 may be integrated with the logic of one or more controllers of the system control module 310 on the same die to form a system-on-a-chip (SoC).
[0063] In various embodiments, system 300 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 300 may have more or fewer components and / or different architectures. For example, in some embodiments, system 300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0064] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.
[0065] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0066] Communication media include media through which communication signals containing, for example, computer-readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media can include guided transmission media (such as cables and wires (e.g., optical fibers, coaxial cables, etc.)) and wireless (unguided transmission) media capable of propagating energy waves, such as sound, electromagnetic, RF, microwave, and infrared. Computer-readable instructions, data structures, program modules, or other data can be embodied as modulated data signals in, for example, wireless media (such as carrier waves or similar mechanisms embodied as part of spread spectrum technology). The term "modulated data signal" refers to a signal whose one or more characteristics are altered or set in a manner that encodes information in the signal. Modulation can be analog, digital, or a hybrid modulation technique.
[0067] By way of example and not limitation, computer-readable storage media may include volatile and non-volatile, removable and non-removable media implemented by any method or technique for storing information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memories such as random access memory (RAM, DRAM, SRAM); and non-volatile memories such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or hereafter developed capable of storing computer-readable information / data for use by a computer system.
[0068] Herein, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the apparatus is triggered to run a method and / or technical solution based on the foregoing embodiments of this application.
[0069] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
Claims
1. A method for acquiring camera parameter information of a PTZ camera device, wherein, The method includes: Acquire the video stream captured by the corresponding PTZ camera device, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device; The recognition result information of one or more target video frames in the video stream is determined by the OCR recognition algorithm based on the parameter indication information. Based on the recognition result information of the one or more target video frames, determine multiple initial camera parameter information corresponding to the PTZ camera device; The camera parameter sequence of the PTZ camera device during the video stream acquisition process is determined based on the initial camera parameter information that meets the preset parameter conditions from the plurality of initial camera parameter information. If the current initial camera parameter information corresponding to the subsequent target video frame of the camera parameter sequence satisfies the parameter sequence prediction condition of the camera parameter sequence, then the current initial camera parameter information is determined as the camera parameter information of the PTZ camera device in the video stream acquisition process, and the camera parameter sequence is updated based on the current initial camera parameter information; If not, continue to determine the parameter sequence prediction conditions for the subsequent initial camera parameters based on the current initial camera parameter information; If a preset number of subsequent initial camera parameters do not meet the parameter sequence prediction conditions, then the camera parameter sequence is updated based on the preset number of subsequent initial camera parameters. If there are multiple subsequent initial camera parameter information that do not meet the parameter sequence prediction conditions, then the current initial camera parameter information is removed.
2. The method according to claim 1, wherein, The camera setting information of the PTZ camera device includes overlay setting information for parameter indication information of the one or more target video frames; wherein, acquiring the video stream captured by the corresponding PTZ camera device includes: Based on the superimposed setting information of the parameter indication information, the video stream acquired by the PTZ camera device is received, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device.
3. The method according to claim 1, wherein, The target video frame includes at least one of the following: Each video frame in the video stream; The video stream contains a preset number of video frames determined from the video stream; If the difference between the camera parameter information of a certain video frame in the video stream and the camera parameter information of the preceding video frame is greater than or equal to the parameter difference threshold, then the certain video frame is determined as the corresponding target video frame.
4. The method according to any one of claims 1 to 3, wherein, The parameter indication information includes the superposition information of the parameter values of the PTZ camera device corresponding to the camera parameter information in the target video frame.
5. The method according to claim 1, wherein, The method further includes: Obtain the camera manufacturer identification information corresponding to the PTZ camera device; The OCR recognition algorithm corresponding to the video stream is determined based on the camera manufacturer's identification information.
6. The method according to claim 1, wherein, The camera parameter information includes at least one of the following: The Pan parameter corresponds to preset parameter conditions including a Pan parameter greater than 0 and less than 360. The Tilt parameter corresponds to preset parameter conditions, including a Tilt parameter greater than -90 and less than 90. The Zoom parameter has the following preset conditions: the corresponding Zoom parameter must be greater than 0.
7. The method according to claim 1, wherein, The step of determining the camera parameter sequence of the PTZ camera device during the video stream acquisition process based on the initial camera parameter information that meets the preset parameter conditions from the plurality of initial camera parameter information includes: From the plurality of initial camera parameter information that meet the preset parameter conditions, a preset number of consecutive initial camera parameter information are selected and arranged in the order of the video frame sequence to form the camera parameter sequence of the PTZ camera device in the video stream acquisition process.
8. The method according to claim 1, wherein, The parameter sequence prediction condition includes a difference information between a certain camera parameter information and at least one initial camera parameter information in the camera parameter sequence that is less than or equal to a difference threshold, wherein the certain camera parameter information includes each camera parameter information in the camera parameter sequence.
9. The method according to any one of claims 1, 7, and 8, wherein, The step of updating the camera parameter sequence based on the current initial camera parameter information includes: The current initial camera parameter information is added to the end of the camera parameter sequence, and the initial camera parameter information at the very beginning of the camera parameter sequence is removed.
10. A device for acquiring camera parameter information of a PTZ camera, wherein, The device includes: The module is used to acquire the video stream captured by the corresponding PTZ camera device, wherein the video stream contains one or more target video frames, and each target video frame includes parameter indication information corresponding to the camera parameter information of the PTZ camera device; The first and second modules are used to determine the recognition result information of one or more target video frames in the video stream based on the parameter indication information using an OCR recognition algorithm. The first four modules are used to determine multiple initial camera parameter information corresponding to the PTZ camera device based on the recognition result information of the one or more target video frames; determine the camera parameter sequence of the PTZ camera device in the video stream acquisition process based on the initial camera parameter information that meets the preset parameter conditions among the multiple initial camera parameter information; if the current initial camera parameter information corresponding to the subsequent target video frame of the camera parameter sequence satisfies the parameter sequence prediction condition of the camera parameter sequence, then the current initial camera parameter information is determined as the camera parameter information of the PTZ camera device in the video stream acquisition process, and based on... The current initial camera parameter information updates the camera parameter sequence; otherwise, the parameter sequence prediction condition is determined for the subsequent initial camera parameter information of the current initial camera parameter information; if a preset number of subsequent initial camera parameter information does not meet the parameter sequence prediction condition, the camera parameter sequence is updated based on the preset number of subsequent initial camera parameter information; if no preset number of subsequent initial camera parameter information does not meet the parameter sequence prediction condition, the current initial camera parameter information is removed.
11. A computer device, wherein, The device includes: Processor; and A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the method as described in any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When executed, the computer program / instruction causes the system to perform the steps of the method as described in any one of claims 1 to 9.
13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 9.