WO2022241805A1 - 一种视频浓缩方法、系统及设备 - Google Patents

一种视频浓缩方法、系统及设备 Download PDF

Info

Publication number
WO2022241805A1
WO2022241805A1 PCT/CN2021/095961 CN2021095961W WO2022241805A1 WO 2022241805 A1 WO2022241805 A1 WO 2022241805A1 CN 2021095961 W CN2021095961 W CN 2021095961W WO 2022241805 A1 WO2022241805 A1 WO 2022241805A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
current frame
pixel
target
feature vector
Prior art date
Application number
PCT/CN2021/095961
Other languages
English (en)
French (fr)
Inventor
杨焰
魏东
金晓峰
徐天适
黄社阳
Original Assignee
广州广电运通金融电子股份有限公司
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 广州广电运通金融电子股份有限公司 filed Critical 广州广电运通金融电子股份有限公司
Publication of WO2022241805A1 publication Critical patent/WO2022241805A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/738Presentation of query results
    • G06F16/739Presentation of query results in form of a video summary, e.g. the video summary being a video sequence, a composite still image or having synthesized frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/7837Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using objects detected or recognised in the video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/7847Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using low-level visual features of the video content
    • G06F16/785Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using low-level visual features of the video content using colour or luminescence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the technical field of video processing, in particular to a video concentration method, system and equipment.
  • video surveillance technology has become an important means of ensuring social public safety, and tens of thousands of cameras are installed in public places. These cameras work 24 hours a day, recording massive amounts of video data. For massive video data, it not only needs to consume a lot of storage resources, but also it is a very difficult task to look up video clues from it later.
  • the application of video enrichment is to solve the above problems.
  • Video enrichment is a simple summary of the video content.
  • the moving objects are extracted, and then the trajectory of each object is analyzed, and different objects are spliced into one Common background scenes and combine them in a certain way to generate a new condensed video.
  • the still images are removed, and only the images with objects are kept, so as to realize the compression of video data, but the required content is not lost.
  • the present invention provides a video concentration method, system and equipment, which are used to solve the problem of light disturbance in the video during the video concentration process of some scenes in the video concentration method of the prior art, causing large noises, resulting in A technical issue where the effect of video condensing is poor.
  • a video concentration method provided by the present invention comprises the following steps:
  • Connected domain analysis is performed on the second foreground image mask to obtain the detection target queue of the current frame
  • acquiring the image of the current frame and based on the image of the current frame, acquiring the background image specifically includes:
  • the multi-Gaussian background model is updated based on the image of the current frame to obtain a background image.
  • the multi-Gaussian background model is updated based on the image of the current frame, and the acquisition of the background image is specifically:
  • the weight of the distribution model is normalized and its parameters are updated according to the preset second formula to obtain the background image.
  • the calculation is performed based on each first pixel of the background image, and the acquisition of the first LBP feature vector is specifically:
  • Calculation is performed on each of the first pixel points based on a third preset formula to obtain a first LBP feature vector.
  • the calculation is performed based on each second pixel of the image of the current frame to obtain a second LBP feature vector
  • Calculation is performed on each of the second pixel points based on a third preset formula to obtain a second LBP feature vector.
  • the first LBP feature vector is compared with the second LBP feature vector to obtain a static pixel mask:
  • the acquisition of static pixel point embedding based on the first comparison embedding and the second contrast embedding is specifically:
  • the moving target tracking is performed on the detection target queue of the current frame, and the output position and id of the detection target in the current frame are specifically:
  • the position information of the detected target team is updated to the matched target in the candidate queue, and the matching count of the detected target team is increased by 1.
  • the match count is set to 0, and the unmatched count of other targets is incremented by 1;
  • the target position and id are output.
  • the embodiment of the present invention also provides a kind of video concentration system, and described system comprises following module:
  • a first acquisition module the first acquisition module is used to acquire the image of the current frame and acquire the background image based on the image of the current frame;
  • a first calculation module the second calculation module is used to perform calculations based on each first pixel of the background image to obtain a first LBP feature vector
  • a second calculation module the second calculation module is used to calculate based on each second pixel of the image of the current frame, and obtain a second LBP feature vector;
  • a first comparison module the first comparison module is used to compare the first LBP feature vector with the second LBP feature vector to obtain a static pixel point mask
  • a second acquisition module configured to acquire a first foreground image mask based on the background image and the image of the current frame
  • a third acquisition module is used to reset the first foreground image mask based on the static pixel point mask, and acquire a second foreground image mask;
  • a first analysis module the first analysis module is used to perform connected domain analysis on the second foreground image mask to obtain the detection target queue of the current frame;
  • a processing module the processing module is used to track the moving target to the detection target queue of the current frame, and output the position and id of the detection target in the current frame;
  • a generating module the generating module is used to generate a condensed video file based on the position and id of the current frame detection target.
  • An embodiment of the present invention provides a video enrichment device, including a processor and a memory;
  • the memory is used to store program codes and transmit the program codes to the processor
  • the processor is configured to execute the above-mentioned video concentrating method according to instructions in the program code.
  • An embodiment of the present invention provides a video concentrating method.
  • the video concentrating method includes the following steps: obtaining an image of a current frame and obtaining a background image based on the image of the current frame; obtaining a background image based on each first pixel of the background image point to calculate, to obtain the first LBP feature vector; to calculate based on each second pixel of the image of the current frame, to obtain the second LBP feature vector; to the first LBP feature vector and the second LBP feature Vectors are compared to obtain a static pixel mask;
  • the present invention effectively solves the technical problem that in the video concentration method of the prior art, during the video concentration process of some scenes, there will be light disturbance in the video, causing a large area of noise, resulting in a poorer effect after video concentration.
  • An embodiment of the present invention provides a video concentration system, the system includes the following modules: a first acquisition module, the first acquisition module is used to acquire the image of the current frame and based on the image of the current frame, acquire a background image ; The first calculation module, the second calculation module is used to calculate based on each first pixel of the background image, and obtain the first LBP feature vector; the second calculation module, the second calculation module is used to calculate based on Each second pixel of the image of the current frame is calculated to obtain a second LBP feature vector; a first comparison module, the first comparison module is used to compare the first LBP feature vector and the second LBP The feature vectors are compared to obtain a static pixel point mask; the second acquisition module is used to obtain a first foreground image mask based on the background image and the image of the current frame; the third acquisition module , the third acquisition module is used to reset the first foreground image mask based on the static pixel point mask, and acquire the second foreground image mask; the first analysis module, the first analysis module is
  • An embodiment of the present invention also provides a video concentrating device, including a processor and a memory; the memory is used to store program codes, and transmit the program codes to the processor; the processor is used to The instruction in the program code executes the above-mentioned video concentration method; effectively solves the problem of light disturbance in the video during the video concentration process of some scenes in the video concentration method of the prior art, causing a large area of noise, A technical issue that results in poor video performance after condensing.
  • Fig. 1 is a method flowchart of a video concentration method, system and device provided by an embodiment of the present invention.
  • FIG. 2 is a logic diagram of a video concentrating method, system and device provided in an embodiment of the present invention for a moving target tracking step of a detection target queue in a current frame.
  • Fig. 3 is a logic diagram of obtaining a still pixel mask of a video concentration method, system and device provided by an embodiment of the present invention.
  • Fig. 4 is a system configuration diagram of a video concentration method, system and device provided by an embodiment of the present invention.
  • Fig. 5 is a device frame diagram of a video concentration method, system and device provided by an embodiment of the present invention.
  • the embodiment of the present invention provides a video concentration method, system and device, which are used to solve the technical problem that the prior art does not provide a high-concurrency read-write lock strategy when performing data labeling, resulting in high-concurrency read-write in the data labeling service .
  • Video enrichment is a simple summary of the video content.
  • the moving objects are extracted, and then the trajectory of each object is analyzed, and different objects are spliced into one Common background scenes and combine them in a certain way to generate a new condensed video.
  • FIG. 1 is a method flowchart of a video concentration method, system and device provided by an embodiment of the present invention.
  • a kind of video concentration method provided by the present invention comprises the following steps:
  • Connected domain analysis is performed on the second foreground image mask to obtain the detection target queue of the current frame
  • the video concentration method provided by the embodiments of the present invention aims at the problem of detecting non-moving objects caused by light disturbances in some scenes, thus effectively solving the problem of video concentration in some scenes existing in the video concentration method of the prior art.
  • the enrichment process there will be light disturbance in the video, which will cause a large area of noise, resulting in a technical problem that the effect of video enrichment is poor.
  • the embodiment of the present invention provides a kind of video concentrating method, described video concentrating method comprises the following steps:
  • obtaining the background image specifically includes:
  • the multi-Gaussian background model is updated based on the image of the current frame to obtain a background image.
  • the multi-Gaussian background model represents the background by the number of models, the mean and standard deviation of each model.
  • each pixel of the image is modeled by the superposition of multiple Gaussian distributions with different weights, and a single sampling point x t obeys the mixed Gaussian distribution probability density function p(x t ), as shown in the formula ( 1):
  • ⁇ i,t is its mean value
  • w i,t is the weight of the i-th Gaussian distribution at time t
  • the expression of ⁇ (x t , ⁇ i,t , ⁇ i,t ) is as follows (2):
  • ⁇ i,t is its covariance matrix
  • expression of ⁇ i,t is as follows:
  • ⁇ i,t is the variance
  • I is the three-dimensional identity matrix
  • the multi-Gaussian background model is updated based on the image of the current frame to acquire a background image.
  • the pixel value of each pixel is compared with the current k background models according to the preset first formula to obtain a matching distribution model; wherein, the formula (3) is the preset first formula.
  • the weight of the distribution model is normalized and its parameters are updated according to the preset second formula to obtain the background image.
  • the formulas (4), (5), (6) and (7) are preset second formulas.
  • Formula (4) updates the model weight
  • formula (5) calculates the mean value update weight
  • formula (6) updates the mean value
  • formula (7) updates the variance
  • the value of the pixel of the background image B I is equal to the mean value with the largest weight among the k Gaussian models
  • Calculation is performed on each of the first pixel points based on a third preset formula to obtain a first LBP feature vector.
  • the background image B I is converted into the first grayscale image B Ig ;
  • the third preset formula is formula (8)
  • Calculation is performed on each of the second pixel points based on a fourth preset formula to obtain a second LBP feature vector.
  • the image C I of the current frame is converted into the second grayscale image C Ig ;
  • the fourth preset formula is formula (9);
  • y m,x is the value of y m pixel point x, is the value of the neighborhood p point of the pixel point x.
  • n is a constant threshold
  • V m,x is the value at the pixel point x of the comparison mask V m , is the R component value, is the G component value, is the B component value.
  • the calculation formula is as (13)(14)(15).
  • S m,x is the value at pixel point x of S m .
  • the static pixel point mask S m is obtained by formula (17).
  • the acquisition of static pixel point burying is specifically:
  • the difference between the first pixel value and the second pixel value is not less than the first value, it is determined that the value of the static pixel buried on the pixel is 0; that is, the pixel value of the background image and the pixel value The pixel values of the image of the current frame are not close.
  • the first LBP is judged Whether the difference between the feature vector and the second LBP feature vector is smaller than the second value, that is, whether the LBP feature vector of the background image is close to the LBP feature vector of the image of the current frame;
  • the first LBP feature vector and the second LBP feature vector are less than the second value, it means that the LBP feature vector of the background image is close to the LBP feature vector of the image of the current frame; then determine the static pixel The value buried on the pixel is 1;
  • the first LBP feature vector and the second LBP feature vector are not less than the second value, it means that the LBP feature vector of the background image is not close to the LBP feature vector of the image of the current frame; then it is determined that it is still The value of the pixel buried on the pixel is 0.
  • the first foreground image is buried as the image of the current frame minus the background image to obtain the first foreground image mask;
  • the noise points of the second foreground image mask F I can be reduced to achieve the purpose of noise removal.
  • S7 Perform connected domain analysis on the second foreground image mask to obtain the detection target queue of the current frame
  • S8 Carry out moving target tracking on the detection target queue of the current frame, and output the position and id of the detection target in the current frame;
  • the candidate teams are obtained, wherein the candidate teams are used to store all frame-screened target information;
  • the position information of the detected target team is updated to the matched target in the candidate queue, and the matching count of the detected target team is increased by 1.
  • the match count is set to 0, and the unmatched count of other targets is incremented by 1;
  • the target position and id are output.
  • S9 Generate a condensed video file based on the position and id of the detected target in the current frame.
  • the video enrichment method in this embodiment adopts a multi-Gaussian background modeling method with robust target detection effect, which solves the problem of non-moving targets being detected due to noise caused by light disturbance in some scenes, and the anti-noise algorithm is time-consuming It is effective for contiguous noise, thus effectively solving the problem of light disturbance in the video during the video concentration process of some scenes in the video concentration method of the prior art, which causes a large area of noise, resulting in a large area of noise after video concentration. The effect is poor.
  • Embodiments of the present invention provide a video concentration system, the system includes the following modules:
  • a first acquiring module 201 the first acquiring module 201 is configured to acquire an image of a current frame and acquire a background image based on the image of the current frame;
  • a first calculation module 202 the second calculation module 202 is configured to perform calculation based on each first pixel of the background image, and obtain a first LBP feature vector;
  • the second calculation module 203 is configured to perform calculation based on each second pixel of the image of the current frame, and obtain a second LBP feature vector;
  • the first comparison module 204 the first comparison module 204 is used to compare the first LBP feature vector and the second LBP feature vector to obtain a static pixel mask;
  • a second acquiring module 205 configured to acquire a first foreground image mask based on the background image and the image of the current frame
  • a third acquisition module 206 is configured to reset the first foreground image mask based on the static pixel point mask, and acquire a second foreground image mask;
  • the first analysis module 207 the first analysis module 207 is used to perform connected domain analysis on the second foreground image mask to obtain the detection target queue of the current frame;
  • Processing module 208 described processing module 208 is used for carrying out moving target tracking to the detection target formation of current frame, outputs the position and id of current frame detection target;
  • a generating module 209 configured to generate a condensed video file based on the position and id of the detected target in the current frame.
  • acquiring the image of the current frame and based on the image of the current frame, acquiring the background image specifically includes:
  • the multi-Gaussian background model is updated based on the image of the current frame to obtain a background image.
  • the multi-Gaussian background model is updated based on the image of the current frame, and the acquisition of the background image is specifically:
  • the weight of the distribution model is normalized and its parameters are updated according to the preset second formula to obtain the background image.
  • the calculation is performed based on each first pixel of the background image, and the acquisition of the first LBP feature vector is specifically:
  • Calculation is performed on each of the first pixel points based on a third preset formula to obtain a first LBP feature vector.
  • the calculation is performed based on each second pixel of the image of the current frame to obtain a second LBP feature vector
  • Calculation is performed on each of the second pixel points based on a third preset formula to obtain a second LBP feature vector.
  • the first LBP feature vector is compared with the second LBP feature vector to obtain a static pixel mask:
  • the acquisition of static pixel point embedding based on the first comparison embedding and the second contrast embedding is specifically:
  • the moving target tracking is performed on the detection target queue of the current frame, and the output position and id of the detection target in the current frame are specifically:
  • the position information of the detected target team is updated to the matched target in the candidate queue, and the matching count of the detected target team is increased by 1.
  • the match count is set to 0, and the unmatched count of other targets is incremented by 1;
  • the target position and id are output.
  • the embodiment of the present invention also provides a video enrichment device, the device includes a processor 300 and a memory 301;
  • the memory 301 is used to store the program code 302, and transmit the program code 302 to the processor;
  • the processor 300 is configured to execute the steps in the above-mentioned video concentrating method according to the instructions in the program code 302 .
  • the computer program 302 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 301 and executed by the processor 300 to complete this application.
  • the one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 302 in the terminal device 30 .
  • the terminal device 30 may be a computing device such as a desktop computer, a notebook, a palmtop computer, or a cloud server.
  • the terminal device may include, but not limited to, a processor 300 and a memory 301 .
  • FIG. 5 is only an example of the terminal device 30, and does not constitute a limitation to the terminal device 30. It may include more or less components than those shown in the figure, or combine certain components, or different components.
  • the terminal device may also include an input and output device, a network access device, a bus, and the like.
  • the so-called processor 300 can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field -ProgrammaBleGateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the storage 301 may be an internal storage unit of the terminal device 30 , for example, a hard disk or a memory of the terminal device 30 .
  • the memory 301 may also be an external storage device of the terminal device 30, such as a plug-in hard disk equipped on the terminal device 30, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash memory Card (FlashCard), etc. Further, the memory 301 may also include both an internal storage unit of the terminal device 30 and an external storage device.
  • the memory 301 is used to store the computer program and other programs and data required by the terminal device.
  • the memory 301 can also be used to temporarily store data that has been output or will be output.
  • the disclosed system, device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disk or optical disk and other media that can store program codes.
  • the client sends a request for obtaining the labeling task picture to the labeling platform server; after the labeling platform server receives the request, the distributed buffer registers with the coordination module; after the registration service is completed, the coordination module reads and writes the index The time-stamped image index information in the library, and the image index information is sent to the distributed buffer; the distributed buffer feeds back the amount of concurrent visits to the coordination module;
  • the coordination module adjusts and distributes the image index information to the distributed buffer according to the concurrent visits; the client reads the image index information of the distributed buffer, and downloads the annotation task image according to the image index information;
  • the client submits the labeling information to the labeling platform server, and the labeling platform server updates the labeling status of the index information of the labeling task image.
  • the embodiment of the present invention solves the problem of high concurrent reading and writing by increasing the memory buffer under the distributed storage of big data, and provides a high-throughput concurrent labeling service method, which solves the problem that the existing technology does not provide data labeling when performing data labeling.
  • a high-concurrency read-write lock strategy leads to high-concurrency read-write technical problems in the data labeling service.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Image Analysis (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种视频浓缩方法、系统及设备,获取当前帧的图像并基于所述当前帧的图像,获取背景图像;基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;基于当前帧检测目标的位置和id,生成浓缩后的视频文件。

Description

一种视频浓缩方法、系统及设备 技术领域
本发明涉及视频处理的技术领域,尤其涉及一种视频浓缩方法、系统及设备。
背景技术
目前,视频监控技术已成为保障社会公共安全的重要手段,安装在公共场所的摄像头数以万计。这些摄像头一天24小时不停地工作,录制了海量的视频数据。对于海量的视频数据,不仅需要消耗大量的存储资源,而且后期要从中查阅视频线索,也是一项非常艰巨的任务。视频浓缩的应用,就是为了解决上面的问题。
视频浓缩是对视频内容的一个简单概括,以自动或半自动的方式,通过对视频中的运动目标进行算法分析,提取运动目标,然后对各个目标的运动轨迹进行分析,将不同的目标拼接到一个共同的背景场景中,并将它们以某种方式进行组合,生成新的浓缩后视频的一种技术。视频浓缩的过程中,通过运动目标分析,去除静止画面,只保留有目标的画面,实现视频数据的压缩,但是需要的内容并没有损失。
然而当视频画面出现噪声干扰时,视频浓缩系统会检测到非运动目标,影响浓缩效果。现有的视频浓缩系统没有关注噪声的去除,而是主要关注在处理速度和目标检测率的提升方面。针对处理速度提升,提出隔帧处理等方法。针对目标检测率提高,采用图像分网格等策略。视频浓缩实现的主要步骤是背景建模,提取活动目标。背景建模作为视频浓缩的关键技术,一般的噪声去除方法是针对摄像机抖动,引起前景中包含很多虚景噪声值的问题。
但本申请发明人在实现本申请实施例中发明技术方案的过程中,发现上述技术至少存在如下技术问题:
现有技术的视频浓缩方法中存在着对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差。
发明内容
本发明提供了一种视频浓缩方法、系统及设备,用于解决现有技术的视频浓缩方法中存在着的对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差的技术问题。
本发明提供的一种视频浓缩方法,包括以下步骤:
获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
在一些实施例中,获取当前帧的图像并基于所述当前帧的图像,获取背景图像具体包括:
基于视频文件,获取RGB图像;
基于所述RGB图像建立多高斯背景模型;
获取当前帧的图像;
基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像。
在一些实施例中,所述基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像具体为:
基于所述当前帧的图像,获取当前帧的图像的每个像素点的像素值;
基于所述每个像素点的像素值分别同当前k个所述背景模型根据预置第一公式进行比较,获取相匹配的分布模型;
将所述分布模型的权重进行归一化处理并将其参数根据预置第二公式进行更新,获取背景图像。
在一些实施例中,所述基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量具体为:
对所述背景图像进行转化,生成第一灰度图像;
基于所述第一灰度图像,获取所述第一灰度图像的所有的第一像素点;
对每个所述第一像素点基于第三预置公式进行计算,获取第一LBP特征向量。
在一些实施例中,所述基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
对所述当前帧的图像进行转换,获取第二灰度图像;
基于所述第二灰度图像,获取所述第二灰度图像的所有的第二像素点;
对每个所述第二像素点基于第三预置公式进行计算,获取第二LBP特征向量。
在一些实施例中,对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模:
对所述第一LBP特征向量和所述第二LBP特征向量进行计算,获取第一比对掩模;
获取所述背景图像的第一像素值和所述当前帧的图像的第二像素值;
根据所述背景图像的像素值与所述当前帧的图像的像素值进行计算,获取第二比对掩模;
基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋。
在一些实施例中,所述基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋具体为:
基于所述第二比对掩埋和所述第二对比掩埋,判断所述第一像素值和所述第二像素点值之差是否小于第一值,
当所述第一像素值和所述第二像素点值之差不小于第一值时,则确定静止像素点掩埋在像素点上的值为0;
当所述第一像素值和所述第二像素点值之差小于第一值时,则判断所述第一LBP特征向量和所述第二LBP特征向量之差是否小于第二值,
当所述第一LBP特征向量和所述第二LBP特征向量小于第二值时,则确定静止像素点掩埋在像素点上的值为1;
当当所述第一LBP特征向量和所述第二LBP特征向量不小于第二值时,则确定静止像素点掩埋在像素点上的值为0。
在一些实施例中,所述对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id具体为:
获取所候选队伍,其中,所述候选队伍用于存储所有帧筛选后的目标信息;
判断所述候选队伍是否为空,当所述候选队伍为空时,则所述检测目标队伍加入候选队列,并将所述目标匹配队伍的目标的匹配计数为1、未匹配计数为0以及目标id为0;
当所述候选队列不为空时,则将所述检测目标队伍与候选队列中的所有目标进行匹配,当所述检测目标队伍与候选队列中的所有目标都不匹配时,则将所述目标匹配队伍中的目标的匹配计数为1,未匹配计数为0,目标id在当前的基础上增加1,并将所述目标匹配队伍加入候选队列中;
当所述检测目标队伍与候选队列中的任一个目标匹配时,则将检测目标队伍的位置信息更新到候选队列中匹配到的目标中,并将所述检测目标队伍的匹配计数加1,未匹配计数置为0,其它目标未匹配计数加1;
判断所述候选队列中匹配到的目标的匹配计数是否大于阈值,
当候选队列中目标的未匹配计数大于阈值时,则删除该未匹配到的目标;
当候选队列中目标的匹配计数大于阈值,则输出目标位置和id。
本发明的实施例还提供了一种视频浓缩系统,所述系统包括如下模块:
第一获取模块,所述第一获取模块用于获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
第一计算模块,所述第二计算模块用于基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
第二计算模块,所述第二计算模块用于基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
第一比较模块,所述第一比较模块用于对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
第二获取模块,所述第二获取模块用于基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
第三获取模块,第三获取模块用于基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
第一分析模块,所述第一分析模块用于对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
处理模块,所述处理模块用于对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
生成模块,所述生成模块用于基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
本发明的实施例提供了一种视频浓缩设备,包括处理器以及存储器;
所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;
所述处理器用于根据所述程序代码中的指令执行上述的一种视频浓缩方法。
从以上技术方案可以看出,本发明实施例具有以下优点:
本发明实施例提供了一种视频浓缩方法,所述视频浓缩方法包括以下步骤:获取当前帧的图像并基于所述当前帧的图像,获取背景图像;基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;基于当前帧检测目标的位置和id,生成浓缩后的视频文件。有效地解决了现有技术的视频浓缩方法中存在着的对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差的技术问题。
本发明的实施例提供了一种视频浓缩系统,所述系统包括如下模块:第一获取模块,所述第一获取模块用于获取当前帧的图像并基于所述当前帧的图像,获取背景图像;第一计算模块,所述第二计算模块用于基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;第二计算模块,所述第二计算模块用于基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;第一比较模块,所述第一比较模块用于对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;第二获取模块,所述第二获取模块用于基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;第三获取模块,第三获取模块用于基于所述静止像素点掩模重置第一前 景图像掩模,获取第二前景图像掩模;第一分析模块,所述第一分析模块用于对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;处理模块,所述处理模块用于对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;生成模块,所述生成模块用于基于当前帧检测目标的位置和id,生成浓缩后的视频文件。有效地解决了现有技术的视频浓缩方法中存在着的对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差的技术问题。
本发明的实施例还提供了一种视频浓缩设备,包括处理器以及存储器;所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;所述处理器用于根据所述程序代码中的指令执行上述的一种视频浓缩方法;有效地解决了现有技术的视频浓缩方法中存在着的对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差的技术问题。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。
图1为本发明实施例提供的一种视频浓缩方法、系统及设备的方法流程图。
图2为本发明实施例提供的一种视频浓缩方法、系统及设备的对当前帧的检测目标队列进行运动目标跟踪步骤的逻辑图。
图3为本发明实施例提供的一种视频浓缩方法、系统及设备的获取静止像素点掩模的逻辑图。
图4为本发明实施例提供的一种视频浓缩方法、系统及设备的系统构造图。
图5为本发明实施例提供的一种视频浓缩方法、系统及设备的设备框架图。
具体实施方式
本发明实施例提供了一种视频浓缩方法、系统及设备,用于解决现有技术在进行数据标注时没有提供一个高并发读写锁的策略,导致数据标注服务出现高并发读写的技术问题。
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
除非另有定义,本发明实施例所使用的所有的技术和科学术语与属于本发明实施例的技术领域的技术人员通常理解的含义相同。本发明中所使用的术语 只是为了描述具体的实施例的目的,不是旨在限制本发明。
在对本发明实施例进行进一步详细说明之前,先对本发明实施例中涉及的名词和术语进行说明,本发明实施例中涉及的名词和术语适用于如下的解释。
视频浓缩是对视频内容的一个简单概括,以自动或半自动的方式,通过对视频中的运动目标进行算法分析,提取运动目标,然后对各个目标的运动轨迹进行分析,将不同的目标拼接到一个共同的背景场景中,并将它们以某种方式进行组合,生成新的浓缩后视频的一种技术。
实施例1
请参阅图1,图1为本发明实施例提供的一种视频浓缩方法、系统及设备的方法流程图。
如图1所示,本发明提供的一种视频浓缩方法,所述视频浓缩方法包括以下步骤:
获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
本发明的实施例提供的视频浓缩方法针对某些场景下光线扰动引起噪声,导致检测到非运动目标的问题,从而有效的解决了现有技术的视频浓缩方法中存在着的对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差的技术问题。
实施例2
本发明的实施例提供了一种视频浓缩方法,所述视频浓缩方法包括如下步骤:
S1:获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
具体为:
获取当前帧的图像并基于所述当前帧的图像,获取背景图像具体包括:
基于视频文件,获取RGB图像;
基于所述RGB图像建立多高斯背景模型;
获取当前帧的图像;
基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像。
多高斯背景模型由模型数量、每个模型的均值和标准差来表示背景。对于多峰高斯分布模型,图像的每一个像素点按不同权值的多个高斯分布的叠加来建模,单个采样点x t服从的混合高斯分布概率密度函数p(x t),如式(1):
Figure PCTCN2021095961-appb-000001
其中k为分布模型总数,μ i,t为其均值,w i,t为t时刻第i个高斯分布的权重,η(x ti,ti,t)的表达式如式(2):
Figure PCTCN2021095961-appb-000002
其中τ i,t为其协方差矩阵,τ i,t的表达式如下:
Figure PCTCN2021095961-appb-000003
δ i,t为方差,I为三维单位矩阵。
基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像。
具体为:
基于所述当前帧的图像,获取当前帧的图像的每个像素点的像素值;
基于所述每个像素点的像素值分别同当前k个所述背景模型根据预置第一公式进行比较,获取相匹配的分布模型;其中,公式(3)为预置第一公式。
S11:当前帧的图像一个像素点的像素值X t同当前k个模型公式(3)进行
比较,直到找到相匹配的分布模型既同该模型的均值偏差在2.5σ内,
|X ti,t-1|≤2.5δ i,t-1;   (3)
如果像素点的值X t符合(3)式,则该像素点属于背景
Figure PCTCN2021095961-appb-000004
否则属于前景
Figure PCTCN2021095961-appb-000005
各多高斯模型权值按如下公式更新,其中α是学习速率,对于匹配的模型M k,t=1,否则M k,t=0;
将所述分布模型的权重进行归一化处理并将其参数根据预置第二公式进行更新,获取背景图像。所述公式(4)、(5)、(6)和(7)为预置第二公式。
S12:然后匹配模型的权重进行归一化,参数按照公式(4)、(5)、(6) 和(7)更新,未匹配模型的均值μ和σ不变;
W k,t=(1-α)*w k,t-1+α*M k,t   (4)
ρ=α*η(X tkk)   (5)
μ t=(1-ρ)*μ t-1+ρ*X t   (6)
Figure PCTCN2021095961-appb-000006
公式(4)更新模型权重,公式(5)计算均值更新权重,公式(6)更新均值,公式(7)更新方差。
背景图像B I的像素点的值等于k个高斯模型中权重最大的均值,
Figure PCTCN2021095961-appb-000007
S2:基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
具体为:
对所述背景图像进行转化,生成第一灰度图像;
基于所述第一灰度图像,获取所述第一灰度图像的所有的第一像素点;
对每个所述第一像素点基于第三预置公式进行计算,获取第一LBP特征向量。
背景图像B I转化为第一灰度图像B Ig;所述第三预置公式为公式(8)
第一灰度图像B Ig每个像素点x c计算LBP特征向量
Figure PCTCN2021095961-appb-000008
如公式(8):
Figure PCTCN2021095961-appb-000009
其中
Figure PCTCN2021095961-appb-000010
是背景图像x c像素点的值,
Figure PCTCN2021095961-appb-000011
是x c的8邻域第p个像素点的值,
Figure PCTCN2021095961-appb-000012
是像素点x c邻域第p个像素点的比对值,T是常量。
S3:基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
具体为:
对所述当前帧的图像进行转换,获取第二灰度图像;
基于所述第二灰度图像,获取所述第二灰度图像的所有的第二像素点;
对每个所述第二像素点基于第四预置公式进行计算,获取第二LBP特征向量。
当前帧的图像C I转化为第二灰度图像C Ig;所述第四预置公式为公式(9);
第一灰度图像C Ig每个像素点x c计算LBP特征向量
Figure PCTCN2021095961-appb-000013
如公式(9):
Figure PCTCN2021095961-appb-000014
其中
Figure PCTCN2021095961-appb-000015
是背景图像x c像素点的值,
Figure PCTCN2021095961-appb-000016
是x c的8邻域第p个像素点的值,
Figure PCTCN2021095961-appb-000017
是像素点x c邻域第p个像素点的比对值,T是常量。
S4:对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
具体为:
对所述第一LBP特征向量和所述第二LBP特征向量进行计算,获取第一比对掩模;
S41:计算背景图像与当前帧图像的LBP特征比对掩模y m
y m,x是y m像素点x的值,
Figure PCTCN2021095961-appb-000018
是像素点x的邻域p点的值。
计算
Figure PCTCN2021095961-appb-000019
的值,如公式(10)
Figure PCTCN2021095961-appb-000020
计算y m,x的值,如公式(11)
Figure PCTCN2021095961-appb-000021
y m,x进行二值化,如公式(12)
Figure PCTCN2021095961-appb-000022
其中n是常数阈值。
从而得到第一比对掩模y m
S42:计算背景RGB图像B I与当前帧RGB图像C I的像素值比对掩模V m
V m,x是比对掩模V m像素点x处的值,
Figure PCTCN2021095961-appb-000023
是R分量值,
Figure PCTCN2021095961-appb-000024
是G分 量值,
Figure PCTCN2021095961-appb-000025
是B分量值。计算公式如(13)(14)(15)。
Figure PCTCN2021095961-appb-000026
是背景图像像素点x的R分量值,其余2个同理。
Figure PCTCN2021095961-appb-000027
是当前帧图像像素点x的R分量值,其余2个同理。
Figure PCTCN2021095961-appb-000028
Figure PCTCN2021095961-appb-000029
Figure PCTCN2021095961-appb-000030
其中T是常数阈值,计算背景图像B I与当前帧图像C I的比对掩模V m,如公式(16):
Figure PCTCN2021095961-appb-000031
S43.计算背景RGB图像B I与当前帧RGB图像C I的静止像素点掩模S m,计算公式如(17):
Figure PCTCN2021095961-appb-000032
S m,x是S m像素点x处的值。通过式(17)就获得静止像素点掩模S m
进一步为,获取所述背景图像的第一像素值和所述当前帧的图像的第二像素值;
根据所述背景图像的第一像素值与所述当前帧的图像的第二像素值进行计算,获取第二比对掩模;
基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋。
进一步地,所述基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋具体为:
如图2所示,基于所述第二比对掩埋和所述第二对比掩埋,判断所述第一像素值和所述第二像素点值之差是否小于第一值,即判断所述第一像素值和所述第二像素点值之差是否接近,即为所述背景图像的像素值与所述当前帧的图像的像素值是否接近。
当所述第一像素值和所述第二像素点值之差不小于第一值时,则确定静止像素点掩埋在像素点上的值为0;即,所述背景图像的像素值与所述当前帧的图像的像素值不接近。
当所述第一像素值和所述第二像素点值之差小于第一值时,即所述背景图像的像素值与所述当前帧的图像的像素值接近;则判断所述第一LBP特征向量和所述第二LBP特征向量之差是否小于第二值,即为所述背景图像的LBP特征向量与所述当前帧的图像的LBP特征向量是否接近;
当所述第一LBP特征向量和所述第二LBP特征向量小于第二值时,即为所述背景图像的LBP特征向量与所述当前帧的图像的LBP特征向量接近;则确定静止像素点掩埋在像素点上的值为1;
当所述第一LBP特征向量和所述第二LBP特征向量不小于第二值时,即为所述背景图像的LBP特征向量与所述当前帧的图像的LBP特征向量不接近;则确定静止像素点掩埋在像素点上的值为0。
S5:基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
所述第一前景图像掩埋为当前帧的图像减背景图像,得到第一前景图像掩模;
S6:基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
具体地,计算公式如(18)
Figure PCTCN2021095961-appb-000033
通过以上步骤,可以减少第二前景图像掩模F I的噪声点,达到去除噪声目的。
S7:对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
S8:对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
具体为:如图3所示,获取所候选队伍,其中,所述候选队伍用于存储所有帧筛选后的目标信息;
判断所述候选队伍是否为空,当所述候选队伍为空时,则所述检测目标队伍加入候选队列,并将所述目标匹配队伍的目标的匹配计数为1、未匹配计数为0以及目标id为0;
当所述候选队列不为空时,则将所述检测目标队伍与候选队列中的所有目标进行匹配,当所述检测目标队伍与候选队列中的所有目标都不匹配时,则将所述目标匹配队伍中的目标的匹配计数为1,未匹配计数为0,目标id在当前的基础上增加1,并将所述目标匹配队伍加入候选队列中;
当所述检测目标队伍与候选队列中的任一个目标匹配时,则将检测目标队伍的位置信息更新到候选队列中匹配到的目标中,并将所述检测目标队伍的匹配计数加1,未匹配计数置为0,其它目标未匹配计数加1;
判断所述候选队列中匹配到的目标的匹配计数是否大于阈值,
当候选队列中目标的未匹配计数大于阈值时,则删除该未匹配到的目标;
当候选队列中目标的匹配计数大于阈值,则输出目标位置和id。
S9:基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
本实施例的所述视频浓缩方法采用了目标检测效果鲁棒的多高斯背景建模方法,解决了某些场景下光线扰动引起噪声,导致检测到非运动目标的问题,且防噪声算法耗时少,对于连片的噪声有效,从而有效地解决了现有技术的视频浓缩方法中存在着对于一些场景的视频浓缩过程中,视频中会存在光线扰动问题,引起大片噪声,导致视频浓缩后的效果较差。
实施例3
本发明的实施例提供了一种视频浓缩系统,所述系统包括如下模块:
第一获取模块201,所述第一获取模块201用于获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
第一计算模块202,所述第二计算模块202用于基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
第二计算模块203,所述第二计算模块203用于基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
第一比较模块204,所述第一比较模块204用于对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
第二获取模块205,所述第二获取模块205用于基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
第三获取模块206,第三获取模块206用于基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
第一分析模块207,所述第一分析模块207用于对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
处理模块208,所述处理模块208用于对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
生成模块209,所述生成模块209用于基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
在一些实施例中,获取当前帧的图像并基于所述当前帧的图像,获取背景图像具体包括:
基于视频文件,获取RGB图像;
基于所述RGB图像建立多高斯背景模型;
获取当前帧的图像;
基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像。
在一些实施例中,所述基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像具体为:
基于所述当前帧的图像,获取当前帧的图像的每个像素点的像素值;
基于所述每个像素点的像素值分别同当前k个所述背景模型根据预置第一公式进行比较,获取相匹配的分布模型;
将所述分布模型的权重进行归一化处理并将其参数根据预置第二公式进行更新,获取背景图像。
在一些实施例中,所述基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量具体为:
对所述背景图像进行转化,生成第一灰度图像;
基于所述第一灰度图像,获取所述第一灰度图像的所有的第一像素点;
对每个所述第一像素点基于第三预置公式进行计算,获取第一LBP特征向量。
在一些实施例中,所述基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
对所述当前帧的图像进行转换,获取第二灰度图像;
基于所述第二灰度图像,获取所述第二灰度图像的所有的第二像素点;
对每个所述第二像素点基于第三预置公式进行计算,获取第二LBP特征向量。
在一些实施例中,对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模:
对所述第一LBP特征向量和所述第二LBP特征向量进行计算,获取第一比对掩模;
获取所述背景图像的第一像素值和所述当前帧的图像的第二像素值;
根据所述背景图像的像素值与所述当前帧的图像的像素值进行计算,获取第二比对掩模;
基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋。
在一些实施例中,所述基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋具体为:
基于所述第二比对掩埋和所述第二对比掩埋,判断所述第一像素值和所述第二像素点值之差是否小于第一值,
当所述第一像素值和所述第二像素点值之差不小于第一值时,则确定静止像素点掩埋在像素点上的值为0;
当所述第一像素值和所述第二像素点值之差小于第一值时,则判断所述第一LBP特征向量和所述第二LBP特征向量之差是否小于第二值,
当所述第一LBP特征向量和所述第二LBP特征向量小于第二值时,则确定静止像素点掩埋在像素点上的值为1;
当当所述第一LBP特征向量和所述第二LBP特征向量不小于第二值时,则 确定静止像素点掩埋在像素点上的值为0。
在一些实施例中,所述对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id具体为:
获取所候选队伍,其中,所述候选队伍用于存储所有帧筛选后的目标信息;
判断所述候选队伍是否为空,当所述候选队伍为空时,则所述检测目标队伍加入候选队列,并将所述目标匹配队伍的目标的匹配计数为1、未匹配计数为0以及目标id为0;
当所述候选队列不为空时,则将所述检测目标队伍与候选队列中的所有目标进行匹配,当所述检测目标队伍与候选队列中的所有目标都不匹配时,则将所述目标匹配队伍中的目标的匹配计数为1,未匹配计数为0,目标id在当前的基础上增加1,并将所述目标匹配队伍加入候选队列中;
当所述检测目标队伍与候选队列中的任一个目标匹配时,则将检测目标队伍的位置信息更新到候选队列中匹配到的目标中,并将所述检测目标队伍的匹配计数加1,未匹配计数置为0,其它目标未匹配计数加1;
判断所述候选队列中匹配到的目标的匹配计数是否大于阈值,
当候选队列中目标的未匹配计数大于阈值时,则删除该未匹配到的目标;
当候选队列中目标的匹配计数大于阈值,则输出目标位置和id。
实施例4
如图5所示,本发明的实施例还提供了一种视频浓缩设备,所述设备包括处理器300以及存储器301;
所述存储器301用于存储程序代码302,并将所述程序代码302传输给所述处理器;
所述处理器300用于根据所述程序代码302中的指令执行上述的一种视频浓缩方法中的步骤。
示例性的,所述计算机程序302可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器301中,并由所述处理器300执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序302在所述终端设备30中的执行过程。
所述终端设备30可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器300、存储器301。本领域技术人员可以理解,图5仅仅是终端设备30的示例,并不构成对终端设备30的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器300可以是中央处理单元(CentralProcessingUnit,CPU),还可以是其他通用处理器、数字信号处理器(DigitalSignalProcessor,DSP)、专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、现成可编程门阵列(Field-ProgrammaBleGateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶 体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器301可以是所述终端设备30的内部存储单元,例如终端设备30的硬盘或内存。所述存储器301也可以是所述终端设备30的外部存储设备,例如所述终端设备30上配备的插接式硬盘,智能存储卡(SmartMediaCard,SMC),安全数字(SecureDigital,SD)卡,闪存卡(FlashCard)等。进一步地,所述存储器301还可以既包括所述终端设备30的内部存储单元也包括外部存储设备。所述存储器301用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器301还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,RandomAccessMemory)、磁碟或者光盘等各种可以存储程序代码的介质。
本发明实施例通过客户端向标注平台服务端发送获取标注任务图片的请求;标注平台服务端接收到请求后,分布式缓冲区向协调模块进行注册服务; 完成注册服务后,协调模块读写索引库中带时间戳的图片索引信息,将图片索引信息发送至分布式缓冲区;分布式缓冲区向协调模块反馈并发访问量;
协调模块根据并发访问量,调节和分配图片索引信息至分布式缓冲区;客户端读取分布式缓冲区的图片索引信息,根据图片索引信息下载标注任务图片;
客户端向标注平台服务端提交标注信息,标注平台服务端更新标注任务图片的索引信息的标注状态。本发明实施例在大数据分布式存储下,利用增加内存缓冲区来解决高并发读写问题,提供了一种高吞吐量并发的标注服务方法,解决了现有技术在进行数据标注时没有提供一个高并发读写锁的策略,导致数据标注服务出现高并发读写的技术问题。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种视频浓缩方法,其特征在于,所述视频浓缩方法包括以下步骤:
    获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
    基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
    基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
    对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
    基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
    基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
    对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
    对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
    基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
  2. 根据权利要求1所述的一种视频浓缩方法,其特征在于,获取当前帧的图像并基于所述当前帧的图像,获取背景图像具体包括:
    基于视频文件,获取RGB图像;
    基于所述RGB图像建立多高斯背景模型;
    获取当前帧的图像;
    基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像。
  3. 根据权利要求2所述的一种视频浓缩方法,其特征在于,所述基于所述当前帧的图像对所述多高斯背景模型进行更新,获取背景图像具体为:
    基于所述当前帧的图像,获取当前帧的图像的每个像素点的像素值;
    基于所述每个像素点的像素值分别同当前k个所述背景模型根据预置第一公式进行比较,获取相匹配的分布模型;
    将所述分布模型的权重进行归一化处理并将其参数根据预置第二公式进行更新,获取背景图像。
  4. 根据权利要求1所述的一种视频浓缩方法,其特征在于,所述基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量具体为:
    对所述背景图像进行转化,生成第一灰度图像;
    基于所述第一灰度图像,获取所述第一灰度图像的所有的第一像素点;
    对每个所述第一像素点基于第三预置公式进行计算,获取第一LBP特征向量。
  5. 根据权利要求1所述的一种视频浓缩方法,其特征在于,所述基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
    对所述当前帧的图像进行转换,获取第二灰度图像;
    基于所述第二灰度图像,获取所述第二灰度图像的所有的第二像素点;
    对每个所述第二像素点基于第四预置公式进行计算,获取第二LBP特征向 量。
  6. 根据权利要求1所述的一种视频浓缩方法,其特征在于,对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模:
    对所述第一LBP特征向量和所述第二LBP特征向量进行计算,获取第一比对掩模;
    获取所述背景图像的第一像素值和所述当前帧的图像的第二像素值;
    根据所述背景图像的第一像素值与所述当前帧的图像的第二像素值进行计算,获取第二比对掩模;
    基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋。
  7. 根据权利要求6所述的一种视频浓缩方法,其特征在于,所述基于所述第一对比掩埋和所述第二比对掩埋,获取静止像素点掩埋具体为:
    基于所述第二比对掩埋和所述第二对比掩埋,判断所述第一像素值和所述第二像素点值之差是否小于第一值,
    当所述第一像素值和所述第二像素点值之差不小于第一值时,则确定静止像素点掩埋在像素点上的值为0;
    当所述第一像素值和所述第二像素点值之差小于第一值时,则判断所述第一LBP特征向量和所述第二LBP特征向量之差是否小于第二值,
    当所述第一LBP特征向量和所述第二LBP特征向量小于第二值时,则确定静止像素点掩埋在像素点上的值为1;
    当所述第一LBP特征向量和所述第二LBP特征向量不小于第二值时,则确定静止像素点掩埋在像素点上的值为0。
  8. 根据权利要求1所述的一种视频浓缩方法,其特征在于,所述对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id具体为:
    获取所候选队伍,其中,所述候选队伍用于存储所有帧筛选后的目标信息;
    判断所述候选队伍是否为空,当所述候选队伍为空时,则所述检测目标队伍加入候选队列,并将所述目标匹配队伍的目标的匹配计数为1、未匹配计数为0以及目标id为0;
    当所述候选队列不为空时,则将所述检测目标队伍与候选队列中的所有目标进行匹配,当所述检测目标队伍与候选队列中的所有目标都不匹配时,则将所述目标匹配队伍中的目标的匹配计数为1,未匹配计数为0,目标id在当前的基础上增加1,并将所述目标匹配队伍加入候选队列中;
    当所述检测目标队伍与候选队列中的任一个目标匹配时,则将检测目标队伍的位置信息更新到候选队列中匹配到的目标中,并将所述检测目标队伍的匹配计数加1,未匹配计数置为0,其它目标未匹配计数加1;
    判断所述候选队列中匹配到的目标的匹配计数是否大于阈值,
    当候选队列中目标的未匹配计数大于阈值时,则删除该未匹配到的目标;
    当候选队列中目标的匹配计数大于阈值,则输出目标位置和id。
  9. 一种视频浓缩系统,其特征在于,所述系统包括如下模块:
    第一获取模块,所述第一获取模块用于获取当前帧的图像并基于所述当前帧的图像,获取背景图像;
    第一计算模块,所述第二计算模块用于基于所述背景图像的每个第一像素点进行计算,获取第一LBP特征向量;
    第二计算模块,所述第二计算模块用于基于所述当前帧的图像的每个第二像素点进行计算,获取第二LBP特征向量;
    第一比较模块,所述第一比较模块用于对所述第一LBP特征向量和所述第二LBP特征向量进行比较,获取静止像素点掩模;
    第二获取模块,所述第二获取模块用于基于所述背景图像和所述当前帧的图像,获取第一前景图像掩模;
    第三获取模块,第三获取模块用于基于所述静止像素点掩模重置第一前景图像掩模,获取第二前景图像掩模;
    第一分析模块,所述第一分析模块用于对第二前景图像掩模做连通域分析,获得当前帧的检测目标队列;
    处理模块,所述处理模块用于对当前帧的检测目标队列进行运动目标跟踪,输出当前帧检测目标的位置和id;
    生成模块,所述生成模块用于基于当前帧检测目标的位置和id,生成浓缩后的视频文件。
  10. 一种视频浓缩设备,其特征在于,包括处理器以及存储器;
    所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;
    所述处理器用于根据所述程序代码中的指令执行权利要求1~5任一项所述的一种视频浓缩方法。
PCT/CN2021/095961 2021-05-20 2021-05-26 一种视频浓缩方法、系统及设备 WO2022241805A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110553205.2 2021-05-20
CN202110553205.2A CN113254710B (zh) 2021-05-20 2021-05-20 一种视频浓缩方法、系统及设备

Publications (1)

Publication Number Publication Date
WO2022241805A1 true WO2022241805A1 (zh) 2022-11-24

Family

ID=77183160

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/095961 WO2022241805A1 (zh) 2021-05-20 2021-05-26 一种视频浓缩方法、系统及设备

Country Status (2)

Country Link
CN (1) CN113254710B (zh)
WO (1) WO2022241805A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903119A (zh) * 2012-05-22 2013-01-30 北京国铁华晨通信信息技术有限公司 一种目标跟踪方法和装置
US20150278616A1 (en) * 2014-03-27 2015-10-01 Xerox Corporation Feature- and classifier-based vehicle headlight/shadow removal in video
CN105469425A (zh) * 2015-11-24 2016-04-06 上海君是信息科技有限公司 一种视频浓缩方法
CN106937120A (zh) * 2015-12-29 2017-07-07 北京大唐高鸿数据网络技术有限公司 基于对象的监控视频浓缩方法
CN107872644A (zh) * 2016-09-23 2018-04-03 亿阳信通股份有限公司 视频监控方法及装置
CN112084880A (zh) * 2020-08-14 2020-12-15 江铃汽车股份有限公司 一种图像处理方法、装置、存储介质及设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651782A (zh) * 2016-09-26 2017-05-10 江苏科海智能系统有限公司 一种面向ViBe的前景鬼影消除方法
CN106780548A (zh) * 2016-11-16 2017-05-31 南宁市浩发科技有限公司 基于交通视频的运动车辆检测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903119A (zh) * 2012-05-22 2013-01-30 北京国铁华晨通信信息技术有限公司 一种目标跟踪方法和装置
US20150278616A1 (en) * 2014-03-27 2015-10-01 Xerox Corporation Feature- and classifier-based vehicle headlight/shadow removal in video
CN105469425A (zh) * 2015-11-24 2016-04-06 上海君是信息科技有限公司 一种视频浓缩方法
CN106937120A (zh) * 2015-12-29 2017-07-07 北京大唐高鸿数据网络技术有限公司 基于对象的监控视频浓缩方法
CN107872644A (zh) * 2016-09-23 2018-04-03 亿阳信通股份有限公司 视频监控方法及装置
CN112084880A (zh) * 2020-08-14 2020-12-15 江铃汽车股份有限公司 一种图像处理方法、装置、存储介质及设备

Also Published As

Publication number Publication date
CN113254710A (zh) 2021-08-13
CN113254710B (zh) 2023-08-22

Similar Documents

Publication Publication Date Title
CN108898086B (zh) 视频图像处理方法及装置、计算机可读介质和电子设备
Hannuna et al. DS-KCF: a real-time tracker for RGB-D data
CN111627045B (zh) 单镜头下的多行人在线跟踪方法、装置、设备及存储介质
WO2019218824A1 (zh) 一种移动轨迹获取方法及其设备、存储介质、终端
US8983200B2 (en) Object segmentation at a self-checkout
WO2021139324A1 (zh) 图像识别方法、装置、计算机可读存储介质及电子设备
CN110431560B (zh) 目标人物的搜索方法和装置、设备和介质
WO2020155518A1 (zh) 物体检测方法、装置、计算机设备及存储介质
WO2021051545A1 (zh) 基于行为识别模型的摔倒动作判定方法、装置、计算机设备及存储介质
WO2020082258A1 (zh) 一种多目标实时跟踪方法、装置及电子设备
WO2022037541A1 (zh) 图像处理模型训练方法、装置、设备及存储介质
Hou et al. Multiview detection with shadow transformer (and view-coherent data augmentation)
Fang et al. Efficient and robust fragments-based multiple kernels tracking
WO2022218396A1 (zh) 图像处理方法、装置和计算机可读存储介质
Li et al. YOLO-PL: Helmet wearing detection algorithm based on improved YOLOv4
CN113902932A (zh) 特征提取方法、视觉定位方法及装置、介质和电子设备
WO2022241805A1 (zh) 一种视频浓缩方法、系统及设备
WO2019163699A1 (ja) 特徴抽出装置、特徴抽出方法、照合システム、および記憶媒体
CN113657219A (zh) 一种视频对象检测跟踪方法、装置及计算设备
CN114998814A (zh) 目标视频生成方法、装置、计算机设备和存储介质
CN113762027A (zh) 一种异常行为的识别方法、装置、设备及存储介质
CN107767401B (zh) 基于核相关滤波的红外目标实时跟踪方法及装置
CN114973057B (zh) 基于人工智能的视频图像检测方法及相关设备
Ding et al. Who is partner: A new perspective on data association of multi-object tracking
CN116580063B (zh) 目标追踪方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21940258

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21940258

Country of ref document: EP

Kind code of ref document: A1