[go: up one dir, main page]

CN110688510B - Face background image acquisition method and system - Google Patents

Face background image acquisition method and system Download PDF

Info

Publication number
CN110688510B
CN110688510B CN201810634805.XA CN201810634805A CN110688510B CN 110688510 B CN110688510 B CN 110688510B CN 201810634805 A CN201810634805 A CN 201810634805A CN 110688510 B CN110688510 B CN 110688510B
Authority
CN
China
Prior art keywords
image
face
video image
storage
face image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810634805.XA
Other languages
Chinese (zh)
Other versions
CN110688510A (en
Inventor
杨春燕
汤利波
谢会斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201810634805.XA priority Critical patent/CN110688510B/en
Publication of CN110688510A publication Critical patent/CN110688510A/en
Application granted granted Critical
Publication of CN110688510B publication Critical patent/CN110688510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The embodiment of the invention provides a method and a system for acquiring a face background image, wherein the method comprises the following steps: the image pickup equipment sends the face image to an analysis server and sends the video image to a storage server. The analysis server analyzes the face image to obtain face data, stores the face data in a database, and sends the face image to the storage server. And the storage server encodes and stores the video image and returns the storage information of the face image and the video image to the analysis server. After receiving the face image to be queried of the client, the analysis server identifies the face image to be queried to obtain storage information of the face image and the video image corresponding to the face image and the video image. And the client acquires a corresponding video image containing the background image of the face image to be inquired from one end of the storage server according to the storage information. The human face background acquisition scheme avoids the burden of a large number of video images on the analysis server, and improves the efficiency of human face background retrieval.

Description

人脸背景图像获取方法及系统Method and system for acquiring face background image

技术领域technical field

本发明涉及计算机视觉技术领域,具体而言,涉及一种人脸背景图像获取方法及系统。The invention relates to the technical field of computer vision, and in particular, to a method and system for acquiring a background image of a human face.

背景技术Background technique

人脸识别是基于人的脸部特征信息进行身份识别的一种生物识别技术。包括用摄像机或摄像头采集含有人脸的图像或视频流,并自动在图像中检测和跟踪人脸进而对检测到的人脸进行识别的一系列相关技术。在对人脸进行识别之后,一般会保留一张人脸抠图和一张人脸背景图,一般做人脸检索对比时,只需要呈现人脸抠图即可。但是有时候需要知道该人脸出现的时间、地点以及周边情况等信息,因此需要能够查询到人脸的背景图片Face recognition is a kind of biometric identification technology based on human facial feature information. It includes a series of related technologies that capture images or video streams containing human faces with cameras or cameras, and automatically detect and track human faces in the images to identify the detected human faces. After the face is recognized, a face cutout and a face background image are generally reserved. Generally, when performing face retrieval and comparison, only the face cutout needs to be presented. But sometimes you need to know the time, place and surrounding situation of the face, so you need to be able to query the background picture of the face

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于,提供一种人脸背景图像获取方法及系统以解决上述问题。In view of this, the purpose of the present invention is to provide a method and system for acquiring a background image of a human face to solve the above problems.

本发明的较佳实施例提供一种人脸背景图像获取方法,应用于人脸背景图像获取系统,该系统包括通信连接的分析服务器、存储服务器及摄像设备,所述分析服务器和存储服务器还可与客户端建立通信连接,所述方法包括:A preferred embodiment of the present invention provides a method for acquiring a background image of a human face, which is applied to a system for acquiring a background image of a human face. The system includes an analysis server, a storage server, and a camera device that are connected in communication. The analysis server and the storage server can also be Establishing a communication connection with the client, the method includes:

所述摄像设备将采集到的视频图像中提取出的人脸图像发送至所述分析服务器,并将所述视频图像发送至所述存储服务器,所述视频图像包括人脸背景图像;The camera device sends the face image extracted from the collected video image to the analysis server, and sends the video image to the storage server, where the video image includes a face background image;

所述分析服务器对所述人脸图像进行分析处理以得到对应的人脸数据,将所述人脸数据保存在数据库中,并将所述人脸图像发送至所述存储服务器;The analysis server analyzes and processes the face image to obtain corresponding face data, saves the face data in a database, and sends the face image to the storage server;

所述存储服务器对接收到视频图像进行编码,将所述人脸图像及编码后的视频图像进行存储,并将人脸图像和视频图像的存储组合信息返回至所述分析服务器;The storage server encodes the received video image, stores the face image and the encoded video image, and returns the storage combination information of the face image and the video image to the analysis server;

所述分析服务器在接收到客户端发送的待查询人脸图像时,获得该人脸图像的存储组合信息,并反馈至所述客户端,以使所述客户端将所述存储组合信息发送至所述存储服务器;When receiving the face image to be queried sent by the client, the analysis server obtains the storage combination information of the face image, and feeds it back to the client, so that the client sends the storage combination information to the storage server;

所述存储服务器根据所述存储组合信息查找到与所述待查询人脸图像对应的人脸图像,以及与该人脸图像对应的视频图像,并将所述人脸图像和所述视频图像返回至所述客户端。The storage server finds the face image corresponding to the face image to be queried and the video image corresponding to the face image according to the storage combination information, and returns the face image and the video image. to the client.

可选地,所述摄像设备将采集到的视频图像中提取出的人脸图像发送至所述分析服务器的步骤,包括:Optionally, the step of the camera device sending the face image extracted from the collected video image to the analysis server includes:

所述摄像设备从采集到的视频图像中提取出人脸图像,并获得该视频图像的参考帧图像;The camera device extracts a face image from the collected video image, and obtains a reference frame image of the video image;

获得所述视频图像和所述参考帧图像的时间戳信息,将携带有所述时间戳信息的人脸图像发送至所述分析服务器。The timestamp information of the video image and the reference frame image is obtained, and the face image carrying the timestamp information is sent to the analysis server.

可选地,所述获得所述视频图像和所述参考帧图像的时间戳信息,将携带有所述时间戳信息的人脸图像发送至所述分析服务器的步骤,包括:Optionally, the step of obtaining the time stamp information of the video image and the reference frame image, and sending the face image carrying the time stamp information to the analysis server, includes:

获取所述参考帧图像的第一时间戳、所述视频图像的第二时间戳以及所述视频图像相对于所述参考帧图像的偏移量;acquiring a first timestamp of the reference frame image, a second timestamp of the video image, and an offset of the video image relative to the reference frame image;

将所述第一时间戳、第二时间戳以及偏移量组成时间戳信息,并将携带有所述时间戳信息的人脸图像发送至所述分析服务器。The first timestamp, the second timestamp and the offset are formed into timestamp information, and the face image carrying the timestamp information is sent to the analysis server.

可选地所述存储服务器对接收到视频图像进行编码,将所述人脸图像及编码后的视频图像进行存储,并将人脸图像和视频图像的存储组合信息返回至所述分析服务器的步骤,包括:Optionally, the storage server encodes the received video image, stores the face image and the encoded video image, and returns the storage combination information of the face image and the video image to the analysis server. ,include:

所述存储服务器根据从所述分析服务器获得的人脸图像所携带的时间戳信息获得所述人脸图像所在的视频图像在视频帧中的位置信息;The storage server obtains, according to the time stamp information carried by the face image obtained from the analysis server, the position information in the video frame of the video image where the face image is located;

根据所述位置信息及所述时间戳信息获得所述视频图像的参考帧图像,根据所述参考帧图像获得所述人脸图像所在的视频图像,并将所述视频图像及所述人脸图像进行存储;Obtain a reference frame image of the video image according to the location information and the timestamp information, obtain a video image where the face image is located according to the reference frame image, and combine the video image and the face image to store;

将所述视频图像以及所述人脸图像的存储组合信息发送至所述分析服务器。Send the storage combination information of the video image and the face image to the analysis server.

可选地,根据所述位置信息及所述时间戳信息获得所述视频图像的参考帧图像,根据所述参考帧图像获得所述人脸图像所在的视频图像的步骤,包括:Optionally, the steps of obtaining a reference frame image of the video image according to the location information and the time stamp information, and obtaining a video image where the face image is located according to the reference frame image, include:

根据所述位置信息以及所述时间戳信息中所述视频图像与其参考帧图像之间的偏移量获得所述视频图像的参考帧图像;Obtain the reference frame image of the video image according to the position information and the offset between the video image and its reference frame image in the timestamp information;

根据所述参考帧图像以及所述偏移量对所述参考帧图像进行编码以得到所述人脸图像所在的视频图像。The reference frame image is encoded according to the reference frame image and the offset to obtain a video image where the face image is located.

可选地,将所述视频图像以及所述人脸图像的存储组合信息发送至所述分析服务器的步骤,包括:Optionally, the step of sending the storage combination information of the video image and the face image to the analysis server includes:

所述存储服务器将所述视频图像的存储位置以及所述人脸图像的存储位置拼装成URL格式的存储组合信息,并将所述存储组合信息发送至所述分析服务器。The storage server assembles the storage location of the video image and the storage location of the face image into storage combination information in URL format, and sends the storage combination information to the analysis server.

本发明另一较佳实施例提供一种人脸背景图像获取系统,所述系统包括通信连接的分析服务器、存储服务器及摄像设备,所述分析服务器和存储服务器还可与客户端建立通信连接,所述分析服务器包括处理模块和存储组合信息获取模块,所述存储服务器包括存储模块和视频图像查找模块,所述摄像设备包括发送模块:Another preferred embodiment of the present invention provides a system for acquiring a background image of a human face. The system includes an analysis server, a storage server, and a camera device that are connected in communication. The analysis server and the storage server can also establish a communication connection with a client. The analysis server includes a processing module and a storage combination information acquisition module, the storage server includes a storage module and a video image search module, and the camera device includes a sending module:

所述发送模块用于将采集到的视频图像中提取出的人脸图像发送至所述分析服务器,并将所述视频图像发送至所述存储服务器,所述视频图像包括人脸背景图像;The sending module is configured to send the face image extracted from the collected video image to the analysis server, and send the video image to the storage server, where the video image includes a face background image;

所述处理模块用于对所述人脸图像进行分析处理以得到对应的人脸数据,将所述人脸数据保存在数据库中,并将所述人脸图像发送至所述存储服务器;The processing module is used to analyze and process the face image to obtain corresponding face data, save the face data in a database, and send the face image to the storage server;

所述存储模块用于对接收到视频图像进行编码,将所述人脸图像及编码后的视频图像进行存储,并将人脸图像和视频图像的存储组合信息返回至所述分析服务器;The storage module is used to encode the received video image, store the face image and the encoded video image, and return the storage combination information of the face image and the video image to the analysis server;

所述存储组合信息获取模块用于在接收到客户端发送的待查询人脸图像时,获得该人脸图像的存储组合信息,并反馈至所述客户端,以使所述客户端将所述存储组合信息发送至所述存储服务器;The storage combination information acquisition module is used to obtain the storage combination information of the face image when receiving the face image to be queried sent by the client, and feed it back to the client, so that the client can Sending the storage combination information to the storage server;

所述视频图像查找模块用于根据所述存储组合信息查找到与所述待查询人脸图像对应的人脸图像,以及与该人脸图像对应的视频图像,并将所述人脸图像和所述视频图像返回至所述客户端。The video image search module is used to find the face image corresponding to the face image to be queried and the video image corresponding to the face image according to the stored combination information, and compare the face image and all the face images. The video image is returned to the client.

可选地,所述发送模块包括提取单元和时间戳信息获取单元;Optionally, the sending module includes an extraction unit and a timestamp information acquisition unit;

所述提取单元用于从采集到的视频图像中提取出人脸图像,并获得该视频图像的参考帧图像;The extraction unit is used to extract a face image from the collected video image, and obtain a reference frame image of the video image;

所述时间戳信息获取单元用于获得所述视频图像和所述参考帧图像的时间戳信息,将携带有所述时间戳信息的人脸图像发送至所述分析服务器。The time stamp information obtaining unit is configured to obtain time stamp information of the video image and the reference frame image, and send the face image carrying the time stamp information to the analysis server.

可选地,所述时间戳信息获取单元包括偏移信息获取子单元和发送子单元;Optionally, the time stamp information obtaining unit includes an offset information obtaining subunit and a sending subunit;

所述偏移信息获取子单元用于获取所述参考帧图像的第一时间戳、所述视频图像的第二时间戳以及所述视频图像相对于所述参考帧图像的偏移量;The offset information obtaining subunit is configured to obtain a first timestamp of the reference frame image, a second timestamp of the video image, and an offset of the video image relative to the reference frame image;

所述发送子单元用于将所述第一时间戳、第二时间戳以及偏移量组成时间戳信息,并将携带有所述时间戳信息的人脸图像发送至所述分析服务器。The sending subunit is configured to combine the first timestamp, the second timestamp and the offset into timestamp information, and send the face image carrying the timestamp information to the analysis server.

可选地,所述存储模块包括位置信息获取单元、存储单元以及发送单元;Optionally, the storage module includes a location information acquisition unit, a storage unit and a sending unit;

所述位置信息获取单元用于根据从所述分析服务器获得的人脸图像所携带的时间戳信息获得所述人脸图像所在的视频图像在视频帧中的位置信息;The position information obtaining unit is configured to obtain the position information in the video frame of the video image where the face image is located according to the time stamp information carried by the face image obtained from the analysis server;

所述存储单元用于根据所述位置信息及所述时间戳信息获得所述视频图像的参考帧图像,根据所述参考帧图像获得所述人脸图像所在的视频图像,并将所述视频图像及所述人脸图像进行存储;The storage unit is configured to obtain a reference frame image of the video image according to the position information and the time stamp information, obtain a video image where the face image is located according to the reference frame image, and store the video image. and the face image for storage;

所述发送单元用于将所述视频图像以及所述人脸图像的存储组合信息发送至所述分析服务器。The sending unit is configured to send the storage combination information of the video image and the face image to the analysis server.

本发明实施例提供的人脸背景图像获取方法及系统,通过将人脸图像及人脸图像所在的视频图像的存储信息存储在分析服务器中,并将人脸图像及人脸图像所在的视频图像保存在存储服务器。从而在分析服务器接收到客户端发送的待查询人脸图像时,可对待查询人脸图像进行分析以从存储的人脸数据中查找到匹配的人脸数据,并根据人脸数据找到对应的人脸图像和人脸图像所在的视频图像的存储信息。客户端可根据该存储信息从存储服务器一端获得与待查询人脸图像对应的视频图像,从而获得待查询人脸图像的人脸背景图像。该人脸背景获取方案,通过将人脸图像和人脸图像的视频图像在存储服务器中的存储信息保存在分析服务器中,并将人脸图像和人脸图像所在的视频图像保存在存储服务器中,如此避免了大量的视频图像对分析服务器造成的负担,提高了人脸背景检索的效率。The method and system for obtaining a face background image provided by the embodiments of the present invention store the storage information of the face image and the video image where the face image is located in the analysis server, and store the face image and the video image where the face image is located in the analysis server. Saved on the storage server. Therefore, when the analysis server receives the face image to be queried sent by the client, it can analyze the face image to be queried to find matching face data from the stored face data, and find the corresponding person according to the face data. The storage information of the face image and the video image where the face image is located. The client can obtain the video image corresponding to the face image to be queried from the storage server according to the stored information, so as to obtain the background image of the face of the face image to be queried. The face background acquisition scheme saves the storage information of the face image and the video image of the face image in the storage server in the analysis server, and saves the face image and the video image where the face image is located in the storage server. , which avoids the burden of a large number of video images on the analysis server, and improves the efficiency of face background retrieval.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below, and are described in detail as follows in conjunction with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.

图1为本发明较佳实施例提供的人脸背景图像获取方法的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of a method for acquiring a background image of a face provided by a preferred embodiment of the present invention.

图2为本发明较佳实施例提供的人脸背景图像获取方法的流程图。FIG. 2 is a flowchart of a method for acquiring a background image of a human face provided by a preferred embodiment of the present invention.

图3为图2中步骤S110的子步骤的流程图。FIG. 3 is a flowchart of sub-steps of step S110 in FIG. 2 .

图4为图2中步骤S130的子步骤的流程图。FIG. 4 is a flowchart of sub-steps of step S130 in FIG. 2 .

图5为本发明较佳实施例提供的人脸背景图像获取系统的功能模块框图。FIG. 5 is a block diagram of functional modules of a system for acquiring a background image of a human face provided by a preferred embodiment of the present invention.

图6为本发明较佳实施例提供的发送模块的功能模块框图。FIG. 6 is a functional block diagram of a sending module provided by a preferred embodiment of the present invention.

图7为本发明较佳实施例提供的时间戳信息获取单元的功能模块框图。FIG. 7 is a functional block diagram of a time stamp information obtaining unit provided by a preferred embodiment of the present invention.

图8为本发明较佳实施例提供的存储模块的功能模块框图。FIG. 8 is a functional block diagram of a storage module provided by a preferred embodiment of the present invention.

图标:100-分析服务器;110-处理模块;120-存储组合信息获取模块;200-存储服务器;210-存储模块;211-位置信息获取单元;212-存储单元;213-发送单元;220-视频图像查找模块;300-摄像设备;310-发送模块;311-提取单元;312-时间戳信息获取单元;3121-偏移信息获取子单元;3122-发送子单元。Icon: 100-analysis server; 110-processing module; 120-storage combination information acquisition module; 200-storage server; 210-storage module; 211-location information acquisition unit; 212-storage unit; 213-transmission unit; 220-video 300-camera equipment; 310-sending module; 311-extracting unit; 312-time stamp information obtaining unit; 3121-offset information obtaining subunit; 3122-sending subunit.

具体实施方式Detailed ways

发明人经研究发现,现有的人脸背景的存储方式中,一般是人脸抓拍相机将人脸小图抠出来后,将视频大图(包含背景图)和人脸小图一起发给人脸分析服务器,人脸分析服务器根据人脸小图提取完人脸特征后,将人脸小图和视频大图存入存储服务器等存储设备。同时将对人脸的分析数据,例如结构化和非结构化特征信息存入数据库中。另外,人脸抓拍相机同时也是一台视频监控用的摄像机,因此相关的视频录像也同时存入存储服务器中。The inventor found through research that, in the existing storage methods of face backgrounds, the face capture camera generally pulls out the small face image, and then sends the large video image (including the background image) and the small face image to people. The face analysis server, after the face analysis server extracts the face features according to the small face image, stores the small face image and the large video image in a storage device such as a storage server. At the same time, the analysis data of the face, such as structured and unstructured feature information, is stored in the database. In addition, the face capture camera is also a video surveillance camera, so the related video recordings are also stored in the storage server at the same time.

在这种方式中,人脸识别摄像机同时将大、小图都推送至人脸分析服务器,而人脸设备摄像机一般部署在地铁、车站等前端,带宽非常有限,因此采用上述方式会增加识别摄像机上传的带宽。并且人脸分析服务器本身并不处理人脸背景大图,而将人脸背景大图从人脸分析服务器一进一出将占用人脸分析服务器带宽,而且多路人脸抓拍摄像机都将图片传送至同一台服务器后,占用的带宽将非常大。In this method, the face recognition camera pushes both large and small images to the face analysis server at the same time, while the face device camera is generally deployed at the front end of subways, stations, etc., and the bandwidth is very limited. Therefore, the above method will increase the number of recognition cameras. Upload bandwidth. In addition, the face analysis server itself does not process the large face background image, and the large face background image will take up the bandwidth of the face analysis server to enter and exit from the face analysis server, and the multi-channel face capture cameras will send the pictures to After the same server, the bandwidth occupied will be very large.

基于上述研究发现,本发明实施例提供一种人脸背景图像获取方案,通过将摄像设备采集的视频图像中的人脸图像发送至分析服务器,并将该视频图像发送至存储服务器。在分析服务器对人脸图像进行处理后,将人脸图像再存入存储服务器中。并且,存储服务器将人脸图像和视频图像的存储信息返回至分析服务器。如此,客户端发送的待查询人脸图像时,可利用分析服务器对该人脸图像进行分析,并提供其存储位置。再利用存储服务器根据存储位置查找到对应的包含该人脸图像的视频图像,并返回给客户端。如此,避免了大量的视频图像的存储对分析服务器造成的负担,提高了人脸检索的效率。Based on the above research findings, an embodiment of the present invention provides a solution for acquiring a background image of a face, by sending a face image in a video image collected by a camera device to an analysis server, and sending the video image to a storage server. After the analysis server processes the face image, the face image is then stored in the storage server. And, the storage server returns the storage information of the face image and the video image to the analysis server. In this way, when the client sends the face image to be queried, the analysis server can be used to analyze the face image and provide its storage location. Then use the storage server to find the corresponding video image containing the face image according to the storage location, and return it to the client. In this way, the burden on the analysis server caused by the storage of a large number of video images is avoided, and the efficiency of face retrieval is improved.

下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. The components of the embodiments of the invention generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Thus, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but is merely representative of selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present invention.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,除非另有明确的规定和限定,术语“安装”、“设置”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present invention, unless otherwise expressly specified and limited, the terms "installation", "arrangement" and "connection" should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection, or It can be connected in one piece; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be internal communication between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood in specific situations.

请参阅图1,为本发明实施例提供的一种人脸背景图像获取方法的应用场景示意图。该场景包括人脸背景图像获取系统,该系统包括分析服务器100、存储服务器200及摄像设备300。所述分析服务器100、存储服务器200和摄像设备300之间通过网络进行通信连接,以进行通信或交互。在本实施例中,所述摄像设备300可包括多个,多个摄像设备300分别与所述分析服务器100和所述存储服务器200通信连接。在本实施例中,所述摄像设备300可以为相机、摄像头等具有图像采集功能的终端设备。所述分析服务器100为对人脸图像进行分析处理的服务端,所述存储服务器200为存储设备,例如IPSAN设备。Please refer to FIG. 1 , which is a schematic diagram of an application scenario of a method for acquiring a background image of a face provided by an embodiment of the present invention. The scene includes a face background image acquisition system, which includes an analysis server 100 , a storage server 200 and a camera device 300 . The analysis server 100 , the storage server 200 and the camera device 300 are connected through a network for communication or interaction. In this embodiment, the camera device 300 may include a plurality of camera devices, and the plurality of camera devices 300 are respectively connected in communication with the analysis server 100 and the storage server 200 . In this embodiment, the imaging device 300 may be a terminal device with an image capturing function, such as a camera or a camera. The analysis server 100 is a server that analyzes and processes face images, and the storage server 200 is a storage device, such as an IPSAN device.

请参阅图2,是本发明实施例提供的一种应用于上述人脸背景图像获取系统的人脸背景图像获取方法的流程图。所应说明的是,本发明提供的方法不以图2及以下所述的具体顺序为限制。下面将对图2中示出的各步骤进行详细说明。Please refer to FIG. 2 , which is a flowchart of a method for acquiring a background image of a face applied to the above-mentioned system for acquiring a background image of a face provided by an embodiment of the present invention. It should be noted that the method provided by the present invention is not limited to the specific sequence described in FIG. 2 and the following. Each step shown in FIG. 2 will be described in detail below.

步骤S110,所述摄像设备300将采集到的视频图像中提取出的人脸图像发送至所述分析服务器100,并将所述视频图像发送至所述存储服务器200,所述视频图像包括人脸背景图像。Step S110, the camera device 300 sends the face image extracted from the collected video image to the analysis server 100, and sends the video image to the storage server 200, where the video image includes a face background image.

本实施例中,所述摄像设备300进行抓拍以获取视频图像数据,判定获得的视频图像数据中是否包含有人脸,若包含人脸,则可选择出一张质量最好的,例如清晰度最好、人脸角度最好等,包含该人脸的视频图像。所述摄像设备300可判定人脸在该视频图像中的位置以及大小,并从该视频图像中提取出人脸图像,并将提取出的人脸图像发送至分析服务器100,将该视频图像发送至所述存储服务器200。其中,该视频图像中包括有该人脸图像的背景图像。In this embodiment, the camera device 300 captures video image data to obtain video image data, and determines whether the obtained video image data contains a human face. Good, the face angle is the best, etc., including the video image of the face. The camera device 300 can determine the position and size of the face in the video image, extract the face image from the video image, and send the extracted face image to the analysis server 100, and send the video image to the storage server 200. Wherein, the video image includes a background image of the face image.

在本实施例中,为了方便后续存储服务器200对人脸图像以及视频图像的存储以及还原,可选地,请参阅图3,在本实施例中,步骤S110可以包括以下子步骤:In this embodiment, in order to facilitate the subsequent storage and restoration of face images and video images by the storage server 200, optionally, referring to FIG. 3, in this embodiment, step S110 may include the following sub-steps:

步骤S111,所述摄像设备300从采集到的视频图像中提取出人脸图像,并获得该视频图像的参考帧图像。Step S111, the camera device 300 extracts a face image from the collected video image, and obtains a reference frame image of the video image.

步骤S112,获得所述视频图像和所述参考帧图像的时间戳信息,将携带有所述时间戳信息的人脸图像发送至所述分析服务器100。Step S112: Obtain time stamp information of the video image and the reference frame image, and send the face image carrying the time stamp information to the analysis server 100.

在视频数据传输及存储的过程中,由于视频数据量非常大,对网络和存储来说都会带来很大负担。因此,为了使视频便于传输和存储,一般会在发送时对视频数据进行压缩,在接收端接收到时再恢复出来,如此来减少视频数据的文件。这就涉及到视频数据压缩标准中的I帧和P帧。In the process of video data transmission and storage, since the amount of video data is very large, it will bring a great burden to the network and storage. Therefore, in order to facilitate the transmission and storage of the video, the video data is generally compressed when it is sent, and then restored when the receiving end receives it, so as to reduce the file size of the video data. This relates to the I-frame and P-frame in the video data compression standard.

I帧又称帧内编码帧,是一种自带全部信息的独立帧,无需参考其他图像便可独立进行解码,可以简单理解为一张静态画面。视频序列中的第一个帧始终都是I帧,因为它是关键帧。P帧又称帧间预测编码帧,需要参考前面的I帧才能进行编码。表示的是当前帧画面与前一帧(前一帧可能是I帧也可能是P帧)的差别。解码时需要用之前缓存的画面叠加上本帧定义的差别,生成最终画面。与I帧相比,P帧通常占用更少的数据位,但不足是,由于P帧对前面的P和I参考帧有着复杂的依耐性,因此对传输错误非常敏感。An I frame, also known as an intra-frame coded frame, is an independent frame with all its own information. It can be decoded independently without referring to other images. It can be simply understood as a static picture. The first frame in a video sequence is always an I-frame because it is a keyframe. A P frame is also called an inter-frame predictive coding frame, which needs to be encoded with reference to the previous I frame. Indicates the difference between the current frame and the previous frame (the previous frame may be an I frame or a P frame). When decoding, it is necessary to superimpose the difference defined in this frame with the previously buffered picture to generate the final picture. Compared with I-frames, P-frames usually occupy fewer data bits, but the disadvantage is that P-frames are very sensitive to transmission errors due to their complex dependencies on previous P and I reference frames.

本实施例中,假设当前的视频图像为P帧,可获得该帧视频图像的参考帧图像,并记录下该参考帧图像的第一时间戳和该视频图像的第二时间戳。进一步地,获得该视频图像与其参考帧图像之间的偏移量,其中,偏移量以该GOP长度内I帧为初始参考帧,如GOP长度为25,人脸抓拍摄像机当前选取的是第10个P帧,则偏移量为10。将第一时间戳、第二时间戳和偏移量组合为时间戳信息。摄像设备300在将人脸图像发送至分析服务器100时,可携带所述时间戳信息。In this embodiment, assuming that the current video image is a P frame, a reference frame image of this frame of video image can be obtained, and the first time stamp of the reference frame image and the second time stamp of the video image are recorded. Further, obtain the offset between the video image and its reference frame image, wherein, the offset takes I frame in the GOP length as the initial reference frame, if the GOP length is 25, the face capture camera currently selects the first reference frame. 10 P frames, then the offset is 10. Combine the first timestamp, the second timestamp and the offset into timestamp information. When the camera device 300 sends the face image to the analysis server 100, the time stamp information may be carried.

步骤S120,所述分析服务器100对所述人脸图像进行分析处理以得到对应的人脸数据,将所述人脸数据保存在数据库中,并将所述人脸图像发送至所述存储服务器200。Step S120, the analysis server 100 analyzes and processes the face image to obtain corresponding face data, saves the face data in a database, and sends the face image to the storage server 200 .

在本实施例中,所述分析服务器100在接收到人脸图像后对人脸图像进行特征提取转换为二进制形式的人脸数据,可选地,可根据人脸器官的形状描述以及他们之间的距离特效来获得有助于人脸分类的特征数据。人脸由眼睛、鼻子、嘴、下巴等局部构成,对这些局部和它们之间结构关系的几何描述,可作为识别人脸的重要特征。本实施例中得到的人脸数据包括结构化数据和半结构化数据,其中结构化数据可包括例如性别、短发、长发等直观化信息。所述半结构化数据可包括例如瞳距、眼睛和鼻子的距离、人眼在脸上的位置等人脸数据。In this embodiment, after receiving the face image, the analysis server 100 performs feature extraction on the face image and converts it into binary form of face data. The distance effect is used to obtain feature data that is helpful for face classification. The human face is composed of parts such as eyes, nose, mouth, and chin. The geometric description of these parts and the structural relationship between them can be used as an important feature for face recognition. The face data obtained in this embodiment includes structured data and semi-structured data, wherein the structured data may include intuitive information such as gender, short hair, long hair and the like. The semi-structured data may include face data such as interpupillary distance, distance between eyes and nose, position of human eyes on the face, and the like.

所述分析服务器100将上述分析得到的人脸数据保存在数据库中,并将携带有时间戳信息的人脸图像发送至所述存储服务器200。The analysis server 100 stores the face data obtained by the above analysis in a database, and sends the face image carrying the timestamp information to the storage server 200 .

步骤S130,所述存储服务器200对接收到视频图像进行编码,将所述人脸图像及编码后的视频图像进行存储,并将人脸图像和视频图像的存储组合信息返回至所述分析服务器100。Step S130, the storage server 200 encodes the received video image, stores the face image and the encoded video image, and returns the storage combination information of the face image and the video image to the analysis server 100 .

所述存储服务器200在接收到分析服务器100发送的人脸图像后,将人脸图像进行存储。并且对人脸图像携带的时间戳信息进行分析以根据利用该时间戳信息并根据该人脸图像所在的视频图像的参考帧图像对该视频图像进行还原以获得清晰的视频图像。The storage server 200 stores the face image after receiving the face image sent by the analysis server 100 . And the time stamp information carried by the face image is analyzed to restore the video image according to the time stamp information and the reference frame image of the video image where the face image is located to obtain a clear video image.

请参阅图4,在本实施例中,步骤S130可以包括步骤S131、步骤S132以及步骤S133三个子步骤。Referring to FIG. 4 , in this embodiment, step S130 may include three sub-steps of step S131 , step S132 and step S133 .

步骤S131,所述存储服务器200根据从所述分析服务器100获得的人脸图像所携带的时间戳信息获得所述人脸图像所在的视频图像在视频帧中的位置信息。Step S131, the storage server 200 obtains the position information in the video frame of the video image where the face image is located according to the timestamp information carried by the face image obtained from the analysis server 100.

步骤S132,根据所述位置信息及所述时间戳信息获得所述视频图像的参考帧图像,根据所述参考帧图像获得所述人脸图像所在的视频图像,并将所述视频图像及所述人脸图像进行存储。Step S132: Obtain a reference frame image of the video image according to the location information and the time stamp information, obtain a video image where the face image is located according to the reference frame image, and combine the video image and the face images are stored.

步骤S133,将所述视频图像以及所述人脸图像的存储组合信息发送至所述分析服务器100。Step S133: Send the storage combination information of the video image and the face image to the analysis server 100.

由于视频数据存储时,后面的P帧是参考前面的帧进行存储的,因此,该P帧图像并不是清晰完整的图像,不能直接将该帧提取出来使用,需要根据前面帧的参考关系先解码,再重新编码成一帧完整清晰的图像,以存入磁盘。Since the following P frame is stored with reference to the previous frame when the video data is stored, the P frame image is not a clear and complete image, and the frame cannot be directly extracted and used. It needs to be decoded first according to the reference relationship of the previous frame. , and then re-encoded into a complete and clear image for storage on disk.

在本实施例中,所述存储服务器200根据从分析服务器100获得的人脸图像所携带的时间戳信息获得人脸图像所在的视频图像在视频帧中的位置信息。根据该位置信息及时间戳信息获得该视频图像的参考帧图像。可选地,根据位置信息以及时间戳信息中所述视频图像与其参考帧图像之间的偏移量获得所述视频图像的参考帧图像。如此,可利用该参考帧图像并结合该视频图像与参考帧图像之间的偏移量对视频图像进行重新编码,从而获得清晰的视频图像。In this embodiment, the storage server 200 obtains the position information in the video frame of the video image where the face image is located according to the timestamp information carried by the face image obtained from the analysis server 100 . A reference frame image of the video image is obtained according to the location information and the timestamp information. Optionally, the reference frame image of the video image is obtained according to the position information and the offset between the video image and its reference frame image in the time stamp information. In this way, the video image can be re-encoded by using the reference frame image in combination with the offset between the video image and the reference frame image, so as to obtain a clear video image.

其中,所述存储服务器200一般为块结构存储方式,一般按二级索引的方式存储音视频文件数据包。其中,使用一个16K的SUPER DATA来标示各文件,该SUPER DATA主要包含一个版本号和一个文件标示。SUPER DATA后面为一级索引块,大小为64K。一级索引块后面是一系列的256M大小的数据块,用于保存数据,一级索引块的作用为检索后面的256M数据块。256M的数据块是以一个二级索引块开始的,二级索引块后面跟随的是一系列的I帧组数据块,二级索引块的作用为检索其后面的I帧组数据块。在存储数据的时候,当256M的数据块的剩余空间不足以存储一个I帧组的时候,系统会取下一个256M的数据块进行存储,在本数据块中以0填充满整个256M空间。在I帧组数据块中存储的是该I帧组的所有的数据包。文件中的索引是以时间记录的,最小的记录单位是秒。The storage server 200 generally uses a block structure storage mode, and generally stores audio and video file data packets in a secondary index mode. Among them, a 16K SUPER DATA is used to mark each file, and the SUPER DATA mainly includes a version number and a file mark. SUPER DATA is followed by a first-level index block with a size of 64K. The first-level index block is followed by a series of 256M data blocks, which are used to save data. The function of the first-level index block is to retrieve the following 256M data blocks. The 256M data block starts with a secondary index block. The secondary index block is followed by a series of I frame group data blocks. The function of the secondary index block is to retrieve the following I frame group data blocks. When storing data, when the remaining space of the 256M data block is not enough to store an I frame group, the system will take a 256M data block for storage, and fill the entire 256M space with 0 in this data block. All data packets of the I frame group are stored in the I frame group data block. The index in the file is recorded in time, and the minimum recording unit is seconds.

由于分析服务器100携带的图像索引信息和存储服务器200中视频存储的索引信息不一致,因此需要做一个转换。存储服务器200首先获取携带的时间戳信息,根据时间戳信息找到对应的I帧组结构,然后根据偏移量计算I帧组结构中属于哪一帧,找出该帧以及之前的所有参考帧,进行解码,再编码以获得该帧对应的清晰的视频帧。Since the image index information carried by the analysis server 100 is inconsistent with the index information stored in the video storage server 200, a conversion is required. The storage server 200 first obtains the time stamp information carried, finds the corresponding I frame group structure according to the time stamp information, then calculates which frame belongs to the I frame group structure according to the offset, and finds out this frame and all previous reference frames, Decode and encode again to obtain a clear video frame corresponding to the frame.

在本实施例中,存储服务器200获得清晰完整的视频图像后,将视频图像及人脸图像进行存储,并将两者的存储组合信息发送至所述分析服务器100。如此,所述分析服务器100中可存储摄像设备300在一段时间内所采集到的人脸图像的人脸数据,以及人脸图像和人脸图像所在的视频图像在存储服务器200中的存储信息。如此,后续在需要对某个人脸图像进行检索以获得其出现的背景图像时,可从存储服务器200中提取。In this embodiment, after the storage server 200 obtains a clear and complete video image, it stores the video image and the face image, and sends the storage combination information of the two to the analysis server 100 . In this way, the analysis server 100 can store the face data of the face image collected by the camera device 300 within a period of time, and the storage information of the face image and the video image where the face image is located in the storage server 200 . In this way, when a certain face image needs to be retrieved subsequently to obtain the background image where it appears, it can be extracted from the storage server 200 .

可选地,所述存储服务器200将所述视频图像的存储位置以及所述人脸图像的存储位置拼装成URL格式的存储组合信息,并将该存储组合信息发送至所述分析服务器100。该URL格式的存储组合信息的格式可如下:Optionally, the storage server 200 assembles the storage location of the video image and the storage location of the face image into storage combination information in URL format, and sends the storage combination information to the analysis server 100 . The format of the stored combination information in the URL format may be as follows:

http://IPSANIpAddr:端口http://IPSANIpAddr:Port

/record#UsrCode/YYYY/MM/DD/HH/pic.jpg?dev=ndcode&fid/record#UsrCode/YYYY/MM/DD/HH/pic.jpg? dev=ndcode&fid

其中,fid是图片在磁盘上的具体位置,fid=file block id+resid+sliceid+sliceops+len,resid是资源的ID,sliceid是分配的存储块的ID,sliceops是图片在存储块中的偏移,len表示图片文件大小的长度。Among them, fid is the specific location of the image on the disk, fid=file block id+resid+sliceid+sliceops+len, resid is the ID of the resource, sliceid is the ID of the allocated storage block, and sliceops is the partial size of the image in the storage block. Shift, len represents the length of the image file size.

步骤S140,所述分析服务器100在接收到客户端发送的待查询人脸图像时,获得该人脸图像的存储组合信息,并反馈至所述客户端,以使所述客户端将所述存储组合信息发送至所述存储服务器200。Step S140, when receiving the face image to be queried sent by the client, the analysis server 100 obtains the storage combination information of the face image, and feeds it back to the client, so that the client can store the stored face image. The combined information is sent to the storage server 200 .

用户可通过客户端输入一种人脸图片,即待查询人脸图像,该待查询人脸图像可能来自手机拍摄、摄像拍摄或者其他渠道拷贝过来。所述客户端将所述待查询人脸图像发送至所述分析服务器100。所述分析服务器100对所述待查询图像进行特征提取,以获得该待查询人脸图像的特征值。由上述可知,所述分析服务器100中存储有多组人脸数据,因此,所述分析服务器100可将得到的特征值与数据库中的人脸数据进行比对,以查找到与所述待查询人脸图像的特征值匹配的人脸数据。此外,在所述分析服务器100中还存储有多组人脸图像及人脸图像所在的视频图像的存储组合信息,可选地,所述分析服务器100可获得查找到的人脸数据对应的人脸图像,并得到该人脸图像及该人脸图像所在的视频图像在存储服务器200中的存储位置。The user can input a face image through the client, that is, the face image to be queried, and the face image to be queried may be taken from a mobile phone, a camera, or copied from other channels. The client sends the face image to be queried to the analysis server 100 . The analysis server 100 performs feature extraction on the image to be queried to obtain feature values of the face image to be queried. It can be seen from the above that there are multiple groups of face data stored in the analysis server 100. Therefore, the analysis server 100 can compare the obtained feature values with the face data in the database, so as to find the data that is the same as the face data to be queried. The face data matched with the eigenvalues of the face image. In addition, the analysis server 100 also stores the storage combination information of multiple groups of face images and the video images where the face images are located. Optionally, the analysis server 100 can obtain the person corresponding to the found face data. face image, and obtain the storage location of the face image and the video image where the face image is located in the storage server 200 .

所述分析服务器100将所述存储组合信息返回至所述客户端。所述客户端可根据该存储组合信息从所述存储服务器200中获得该待查询人脸图像对应的包含其背景图像的视频图像。The analysis server 100 returns the stored combination information to the client. The client may obtain, from the storage server 200 according to the storage combination information, a video image corresponding to the face image to be queried and including its background image.

步骤S150,所述存储服务器200根据所述存储组合信息查找到与所述待查询人脸图像对应的人脸图像,以及与该人脸图像对应的视频图像,并将所述人脸图像和所述视频图像返回至所述客户端。Step S150, the storage server 200 finds a face image corresponding to the face image to be queried and a video image corresponding to the face image according to the storage combination information, and combines the face image and all the face images. The video image is returned to the client.

所述存储服务器200在接收到客户端发送的存储组合信息后,可查找到该待查询人脸图像对应的人脸图像及该人脸图像所在的视频图像,并将其发送至所述客户端。如此,客户端即可获得需要查询的人脸图像的背景图像。After receiving the storage combination information sent by the client, the storage server 200 can find the face image corresponding to the face image to be queried and the video image where the face image is located, and send them to the client. . In this way, the client can obtain the background image of the face image to be queried.

此外,在本实施例中,在采用上述的人脸背景图像获取方案时,存储服务器200需要对人脸图片背景帧做解码再编码的过程,然后另外再存储一份,需要消耗存储服务器200的CPU等资源以及存储空间。因此,在上述基础上考虑采用客户端在做人脸背景图片检索时,直接返回该时间所在的一个GOP长度,按照正常配置,GOP长度为25,检索时播放1秒录像。该方案相比于前面的方案好处是既节省了后端存储设备的CPU等资源消耗,同时也节省了存储空间。In addition, in this embodiment, when the above-mentioned scheme for acquiring the background image of the face is adopted, the storage server 200 needs to perform the process of decoding and re-encoding the background frame of the face image, and then store another copy, which needs to consume the storage server 200's Resources such as CPU and storage space. Therefore, on the basis of the above, consider using the client to directly return the length of a GOP at the time when retrieving the face background image. According to the normal configuration, the GOP length is 25, and a 1-second video is played during retrieval. Compared with the previous solution, the advantage of this solution is that it not only saves resource consumption such as CPU of the back-end storage device, but also saves storage space.

可选地,所述前端设备在抓拍并提取出人脸图像后,将该人脸图像以及该人脸图像所在的I帧组的时间戳发送至所述分析服务器100。所述分析服务器100在对所述人脸图像进行分析处理后,将摄像设备300的设备ID和人脸图像发送至存储服务器200。存储服务器200在接收到该人脸图像后进行存储,并将URL的存储信息返回至分析服务器100。Optionally, after capturing and extracting the face image, the front-end device sends the face image and the timestamp of the I-frame group where the face image is located to the analysis server 100 . After analyzing and processing the face image, the analysis server 100 sends the device ID of the camera device 300 and the face image to the storage server 200 . The storage server 200 stores the face image after receiving it, and returns the stored information of the URL to the analysis server 100 .

分析服务器100将该人脸图像的存储信息和该人脸图像所在的I帧组的时间戳和其余的人脸数据存入数据库中。在分析服务器100接收到客户端发送的待查询图像时,分析服务器100对其进行识别后可获得该待查询人脸图像匹配的人脸数据,并将该人脸数据对应的人脸图像的I帧组时间戳返回至所述客户端。客户端根据该I帧组时间戳从所述存储服务器200中获得该待查询人脸图像的I帧组,从而可在客户端上播放包含所述待查询人脸图像的时长为1秒的I帧组对应的视频图像,以获得该待查询人脸图像的背景图像。The analysis server 100 stores the storage information of the face image, the time stamp of the I-frame group where the face image is located, and the rest of the face data into the database. When the analysis server 100 receives the image to be queried sent by the client, the analysis server 100 can obtain the face data matched with the face image to be queried after identifying it, and use the I of the face image corresponding to the face data to be obtained. The frame group timestamp is returned to the client. The client obtains the I-frame group of the face image to be queried from the storage server 200 according to the I-frame group timestamp, so that the I-frame group that contains the face image to be queried can be played on the client and is 1 second long. The video image corresponding to the frame group is obtained to obtain the background image of the face image to be queried.

请参阅图5,为本发明实施例提供的人脸背景图像获取系统,该系统包括通信连接的分析服务器100、存储服务器200及摄像设备300,所述分析服务器100和存储服务器200还可与客户端建立通信连接。所述分析服务器100包括处理模块110和存储组合信息获取模块120,所述存储服务器200包括存储模块210和视频图像查找模块220,所述摄像设备300包括发送模块310。Please refer to FIG. 5 , which is a system for acquiring a background image of a face provided by an embodiment of the present invention. The system includes an analysis server 100, a storage server 200, and a camera device 300 that are connected in communication. The analysis server 100 and the storage server 200 can also communicate with clients The terminal establishes a communication connection. The analysis server 100 includes a processing module 110 and a storage combination information acquisition module 120 , the storage server 200 includes a storage module 210 and a video image search module 220 , and the camera device 300 includes a sending module 310 .

所述发送模块310用于将采集到的视频图像中提取出的人脸图像发送至所述分析服务器100,并将所述视频图像发送至所述存储服务器200,所述视频图像包括人脸背景图像。所述发送模块310可用于执行图2中所示的步骤S110,具体的操作方法可参考步骤S110的详细描述。The sending module 310 is configured to send the face image extracted from the collected video image to the analysis server 100, and send the video image to the storage server 200, where the video image includes the face background. image. The sending module 310 may be configured to execute step S110 shown in FIG. 2 , and the specific operation method can refer to the detailed description of step S110.

所述处理模块110用于对接收到视频图像进行编码,将所述人脸图像及编码后的视频图像进行存储,并将人脸图像和视频图像的存储组合信息返回至所述分析服务器100。所述处理模块110可用于执行图2中所示的步骤S120,具体的操作方法可参考步骤S120的详细描述。The processing module 110 is configured to encode the received video image, store the face image and the encoded video image, and return the storage combination information of the face image and the video image to the analysis server 100 . The processing module 110 may be configured to execute step S120 shown in FIG. 2 , and the specific operation method may refer to the detailed description of step S120 .

所述存储模块210用于将接收到的人脸图像和视频图像进行存储,并将人脸图像和视频图像的存储组合信息返回至所述分析服务器100。所述存储模块210可用于执行图2中所示的步骤S130,具体的操作方法可参考步骤S130的详细描述。The storage module 210 is configured to store the received face image and video image, and return the storage combination information of the face image and the video image to the analysis server 100 . The storage module 210 can be used to execute step S130 shown in FIG. 2 , and the specific operation method can refer to the detailed description of step S130 .

所述存储组合信息获取模块120用于在接收到客户端发送的待查询人脸图像时,获得该人脸图像的存储组合信息,并反馈至所述客户端,以使所述客户端将所述存储组合信息发送至所述存储服务器200。所述存储组合信息获取模块120可用于执行图2中所示的步骤S140,具体的操作方法可参考步骤S140的详细描述。The storage combination information acquisition module 120 is configured to obtain the storage combination information of the face image when receiving the face image to be queried sent by the client, and feed it back to the client, so that the client can retrieve all the information. The storage combination information is sent to the storage server 200 . The storage combination information acquisition module 120 may be configured to execute step S140 shown in FIG. 2 , and the specific operation method may refer to the detailed description of step S140.

所述视频图像查找模块220用于根据所述存储组合信息查找到与所述待查询人脸图像对应的人脸图像,以及与该人脸图像对应的视频图像,并将所述人脸图像和所述视频图像返回至所述客户端。所述视频图像查找模块220可用于执行图2中所示的步骤S150,具体的操作方法可参考步骤S150的详细描述。The video image search module 220 is configured to search for a face image corresponding to the face image to be queried and a video image corresponding to the face image according to the storage combination information, and compare the face image and the face image. The video image is returned to the client. The video image search module 220 may be configured to perform step S150 shown in FIG. 2 , and the specific operation method may refer to the detailed description of step S150.

可选地,请参阅图6,在本实施例中,所述发送模块310包括提取单元311和时间戳信息获取单元312。Optionally, referring to FIG. 6 , in this embodiment, the sending module 310 includes an extraction unit 311 and a timestamp information acquisition unit 312 .

所述提取单元311用于从采集到的视频图像中提取出人脸图像,并获得该视频图像的参考帧图像。所述提取单元311可用于执行图3中所示的步骤S111,具体的操作方法可参考步骤S111的详细描述。The extraction unit 311 is configured to extract a face image from the collected video image, and obtain a reference frame image of the video image. The extracting unit 311 may be configured to perform step S111 shown in FIG. 3 , and reference may be made to the detailed description of step S111 for a specific operation method.

所述时间戳信息获取单元312用于获得所述视频图像和所述参考帧图像的时间戳信息,将携带有所述时间戳信息的人脸图像发送至所述分析服务器100。所述视频图像查找模块220可用于执行图3中所示的步骤S112,具体的操作方法可参考步骤S112的详细描述。The time stamp information obtaining unit 312 is configured to obtain time stamp information of the video image and the reference frame image, and send the face image carrying the time stamp information to the analysis server 100 . The video image search module 220 may be configured to execute step S112 shown in FIG. 3 , and the specific operation method may refer to the detailed description of step S112 .

可选地,请参阅图7,在本实施例中,所述时间戳信息获取单元312包括偏移信息获取子单元3121和发送子单元3122。Optionally, referring to FIG. 7 , in this embodiment, the time stamp information obtaining unit 312 includes an offset information obtaining subunit 3121 and a sending subunit 3122 .

所述偏移信息获取子单元3121用于获取所述参考帧图像的第一时间戳、所述视频图像的第二时间戳以及所述视频图像相对于所述参考帧图像的偏移量。The offset information obtaining subunit 3121 is configured to obtain the first timestamp of the reference frame image, the second timestamp of the video image, and the offset of the video image relative to the reference frame image.

所述发送子单元3122用于将所述第一时间戳、第二时间戳以及偏移量组成时间戳信息,并将携带有所述时间戳信息的人脸图像发送至所述分析服务器100。The sending subunit 3122 is configured to combine the first timestamp, the second timestamp and the offset into timestamp information, and send the face image carrying the timestamp information to the analysis server 100 .

可选地,请参阅图8,在本实施例中,所述存储模块210包括位置信息获取单元211、存储单元212以及发送单元213。Optionally, referring to FIG. 8 , in this embodiment, the storage module 210 includes a location information acquiring unit 211 , a storage unit 212 and a sending unit 213 .

所述位置信息获取单元211用于根据从所述分析服务器100获得的人脸图像所携带的时间戳信息获得所述人脸图像所在的视频图像在视频帧中的位置信息。所述位置信息获取单元211可用于执行图4中所示的步骤S131,具体的操作方法可参考步骤S131的详细描述。The position information obtaining unit 211 is configured to obtain position information in the video frame of the video image where the face image is located according to the timestamp information carried by the face image obtained from the analysis server 100 . The location information obtaining unit 211 may be configured to execute step S131 shown in FIG. 4 , and the specific operation method may refer to the detailed description of step S131 .

所述存储单元212用于根据所述位置信息及所述时间戳信息获得所述视频图像的参考帧图像,根据所述参考帧图像获得所述人脸图像所在的视频图像,并将所述视频图像及所述人脸图像进行存储。所述存储单元212可用于执行图4中所示的步骤S132,具体的操作方法可参考步骤S132的详细描述。The storage unit 212 is configured to obtain a reference frame image of the video image according to the position information and the timestamp information, obtain a video image where the face image is located according to the reference frame image, and store the video image. The image and the face image are stored. The storage unit 212 can be used to execute step S132 shown in FIG. 4 , and the specific operation method can refer to the detailed description of step S132 .

所述发送单元213用于将所述视频图像以及所述人脸图像的存储组合信息发送至所述分析服务器100。所述发送单元213可用于执行图4中所示的步骤S133,具体的操作方法可参考步骤S133的详细描述。The sending unit 213 is configured to send the storage combination information of the video image and the face image to the analysis server 100 . The sending unit 213 may be configured to perform step S133 shown in FIG. 4 , and reference may be made to the detailed description of step S133 for the specific operation method.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法中的对应过程,在此不再过多赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method, which will not be repeated here.

综上所述,本发明实施例提供的人脸背景图像获取方法及系统,通过将人脸图像及人脸图像所在的视频图像的存储信息存储在分析服务器100中,并将人脸图像及人脸图像所在的视频图像保存在存储服务器200。从而在分析服务器100接收到客户端发送的待查询人脸图像时,可对待查询人脸图像进行分析以从存储的人脸数据中查找到匹配的人脸数据,并根据人脸数据找到对应的人脸图像和人脸图像所在的视频图像的存储信息。客户端可根据该存储信息从存储服务器200一端获得与待查询人脸图像对应的视频图像,从而获得待查询人脸图像的人脸背景图像。该人脸背景获取方案,通过将人脸图像和人脸图像的视频图像在存储服务器200中的存储信息保存在分析服务器100中,并将人脸图像和人脸图像所在的视频图像保存在存储服务器200中,如此避免了大量的视频图像对分析服务器100造成的负担,提高了人脸背景检索的效率。To sum up, the method and system for obtaining a background image of a face provided by the embodiments of the present invention store the storage information of the face image and the video image where the face image is located in the analysis server 100, and store the face image and the human face image in the analysis server 100. The video image where the face image is located is stored in the storage server 200 . Thus, when the analysis server 100 receives the face image to be queried sent by the client, it can analyze the face image to be queried to find matching face data from the stored face data, and find the corresponding face data according to the face data. The storage information of the face image and the video image where the face image is located. The client can obtain the video image corresponding to the face image to be queried from one end of the storage server 200 according to the stored information, so as to obtain the face background image of the face image to be queried. In the face background acquisition scheme, the storage information of the face image and the video image of the face image in the storage server 200 is stored in the analysis server 100, and the face image and the video image where the face image is located are stored in the storage server 200. In the server 200, the burden caused by a large number of video images to the analysis server 100 is avoided, and the efficiency of face background retrieval is improved.

在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the embodiments provided in this application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, eg, the flowcharts and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods and computer program products according to embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention. It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.

Claims (10)

1. A face background image acquisition method is characterized in that the method is applied to a face background image acquisition system, the system comprises an analysis server, a storage server and a camera device which are in communication connection, the analysis server and the storage server can also establish communication connection with a client, and the method comprises the following steps:
the camera equipment sends a face image extracted from the collected video image to the analysis server and sends the video image to the storage server, wherein the video image comprises a face background image;
the analysis server analyzes and processes the face image to obtain corresponding face data, stores the face data in a database and sends the face image to the storage server;
the storage server encodes the received video image, stores the face image and the encoded video image, and returns the storage combination information of the face image and the video image to the analysis server;
when receiving a face image to be inquired sent by a client, the analysis server obtains storage combination information of the face image and feeds the storage combination information back to the client so that the client sends the storage combination information to the storage server;
And the storage server searches the face image corresponding to the face image to be inquired and the video image corresponding to the face image according to the storage combination information, and returns the face image and the video image to the client.
2. The method for acquiring the face background image according to claim 1, wherein the step of sending the face image extracted from the acquired video image to the analysis server by the camera device comprises:
the camera equipment extracts a face image from the acquired video image and obtains a reference frame image of the video image;
and acquiring the time stamp information of the video image and the reference frame image, and sending the face image carrying the time stamp information to the analysis server.
3. The method for acquiring the face background image according to claim 2, wherein the step of obtaining the time stamp information of the video image and the reference frame image and sending the face image carrying the time stamp information to the analysis server comprises:
acquiring a first time stamp of the reference frame image, a second time stamp of the video image and an offset of the video image relative to the reference frame image;
And forming timestamp information by the first timestamp, the second timestamp and the offset, and sending the face image carrying the timestamp information to the analysis server.
4. The method for obtaining the face background image according to claim 2, wherein the step of the storage server encoding the received video image, storing the face image and the encoded video image, and returning the storage combination information of the face image and the video image to the analysis server comprises:
the storage server obtains the position information of the video image where the face image is located in the video frame according to the timestamp information carried by the face image obtained from the analysis server;
obtaining a reference frame image of the video image according to the position information and the timestamp information, obtaining a video image where the face image is located according to the reference frame image, and storing the video image and the face image;
and sending the storage combination information of the video image and the face image to the analysis server.
5. The method for obtaining the face background image according to claim 4, wherein the step of obtaining a reference frame image of the video image according to the position information and the timestamp information, and obtaining a video image where the face image is located according to the reference frame image comprises:
Obtaining a reference frame image of the video image according to the position information and the offset between the video image and the reference frame image in the timestamp information;
and coding the reference frame image according to the reference frame image and the offset to obtain a video image where the face image is located.
6. The method for acquiring the face background image according to claim 4, wherein the step of sending the storage combination information of the video image and the face image to the analysis server includes:
and the storage server splices the storage position of the video image and the storage position of the face image into storage combination information in a URL format and sends the storage combination information to the analysis server.
7. The system for acquiring the face background image is characterized by comprising an analysis server, a storage server and a camera device which are in communication connection, wherein the analysis server and the storage server can also be in communication connection with a client, the analysis server comprises a processing module and a storage combination information acquisition module, the storage server comprises a storage module and a video image searching module, and the camera device comprises a sending module:
The sending module is used for sending a face image extracted from the collected video image to the analysis server and sending the video image to the storage server, wherein the video image comprises a face background image;
the processing module is used for analyzing and processing the face image to obtain corresponding face data, storing the face data in a database and sending the face image to the storage server;
the storage module is used for coding the received video image, storing the face image and the coded video image and returning the storage combination information of the face image and the video image to the analysis server;
the storage combination information acquisition module is used for acquiring the storage combination information of the face image when receiving the face image to be inquired sent by the client and feeding the storage combination information back to the client so that the client sends the storage combination information to the storage server;
the video image searching module is used for searching the face image corresponding to the face image to be inquired and the video image corresponding to the face image according to the storage combination information, and returning the face image and the video image to the client.
8. The face background image acquisition system according to claim 7, wherein the transmission module includes an extraction unit and a time stamp information acquisition unit;
the extraction unit is used for extracting a face image from the acquired video image and obtaining a reference frame image of the video image;
the time stamp information acquisition unit is used for acquiring the time stamp information of the video image and the reference frame image and sending the face image carrying the time stamp information to the analysis server.
9. The face background image acquisition system according to claim 8, wherein the time stamp information acquisition unit includes an offset information acquisition subunit and a transmission subunit;
the offset information acquisition subunit is used for acquiring a first time stamp of the reference frame image, a second time stamp of the video image and an offset of the video image relative to the reference frame image;
and the sending subunit is configured to combine the first timestamp, the second timestamp, and the offset into timestamp information, and send the face image carrying the timestamp information to the analysis server.
10. The system for acquiring a face background image according to claim 8, wherein the storage module comprises a position information acquisition unit, a storage unit and a transmission unit;
The position information acquisition unit is used for acquiring the position information of the video image in which the face image is positioned in the video frame according to the timestamp information carried by the face image acquired from the analysis server;
the storage unit is used for obtaining a reference frame image of the video image according to the position information and the timestamp information, obtaining a video image where the face image is located according to the reference frame image, and storing the video image and the face image;
the sending unit is used for sending the storage combination information of the video image and the face image to the analysis server.
CN201810634805.XA 2018-06-20 2018-06-20 Face background image acquisition method and system Active CN110688510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810634805.XA CN110688510B (en) 2018-06-20 2018-06-20 Face background image acquisition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810634805.XA CN110688510B (en) 2018-06-20 2018-06-20 Face background image acquisition method and system

Publications (2)

Publication Number Publication Date
CN110688510A CN110688510A (en) 2020-01-14
CN110688510B true CN110688510B (en) 2022-06-14

Family

ID=69106223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810634805.XA Active CN110688510B (en) 2018-06-20 2018-06-20 Face background image acquisition method and system

Country Status (1)

Country Link
CN (1) CN110688510B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255399A (en) * 2020-02-10 2021-08-13 北京地平线机器人技术研发有限公司 Target matching method and system, server, cloud, storage medium and equipment
CN113190707B (en) * 2021-05-24 2023-04-07 浙江大华技术股份有限公司 Face library management system, method and device, storage equipment and storage medium
CN113642519B (en) * 2021-08-31 2025-03-07 京东方科技集团股份有限公司 A face recognition system and a face recognition method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030365A (en) * 2007-04-10 2007-09-05 北京中星微电子有限公司 Digital image storage displaying method and device
CN103581626A (en) * 2013-11-04 2014-02-12 浙江宇视科技有限公司 Video monitoring system and video storage information recording method
CN106445315A (en) * 2016-09-08 2017-02-22 乐视控股(北京)有限公司 Picture query method and apparatus
CN106781168A (en) * 2011-05-24 2017-05-31 韩华泰科株式会社 Monitoring system
CN106878676A (en) * 2017-01-13 2017-06-20 吉林工商学院 A kind of storage method for intelligent monitoring video data
CN106980844A (en) * 2017-04-06 2017-07-25 武汉神目信息技术有限公司 A kind of character relation digging system and method based on face identification system
KR101775650B1 (en) * 2016-12-29 2017-09-07 주식회사 포커스에이치엔에스 A facial recognition management system using portable terminal
CN107798093A (en) * 2017-10-25 2018-03-13 成都尽知致远科技有限公司 Image search method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7847815B2 (en) * 2006-10-11 2010-12-07 Cisco Technology, Inc. Interaction based on facial recognition of conference participants

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030365A (en) * 2007-04-10 2007-09-05 北京中星微电子有限公司 Digital image storage displaying method and device
CN106781168A (en) * 2011-05-24 2017-05-31 韩华泰科株式会社 Monitoring system
CN103581626A (en) * 2013-11-04 2014-02-12 浙江宇视科技有限公司 Video monitoring system and video storage information recording method
CN106445315A (en) * 2016-09-08 2017-02-22 乐视控股(北京)有限公司 Picture query method and apparatus
KR101775650B1 (en) * 2016-12-29 2017-09-07 주식회사 포커스에이치엔에스 A facial recognition management system using portable terminal
CN106878676A (en) * 2017-01-13 2017-06-20 吉林工商学院 A kind of storage method for intelligent monitoring video data
CN106980844A (en) * 2017-04-06 2017-07-25 武汉神目信息技术有限公司 A kind of character relation digging system and method based on face identification system
CN107798093A (en) * 2017-10-25 2018-03-13 成都尽知致远科技有限公司 Image search method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Face database generation based on text–video correlation;Dan Zeng et al.;《Neurocomputing》;20160513;第240-249页 *
超算云环境下监控视频的人脸识别研究;邹江;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20180415;第2018年卷(第04期);第I138-3205页 *

Also Published As

Publication number Publication date
CN110688510A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN114079820B (en) Video generation by recording events/objects of interest-centered intervals entered on a camera device by means of a neural network
CN101374234B (en) A content-based video copy monitoring method and device
CN104349074B (en) Method, apparatus and system for generating combined digital video sequences
US20050265603A1 (en) Image processing
CN110688510B (en) Face background image acquisition method and system
CN114125371B (en) Intelligent time-lapse video capture on camera devices using neural network input to reduce the video bit rate to save bandwidth
CN101971621B (en) Image processing device and imaging device equipped with the same
JP2018515006A (en) Entity-based temporal segmentation of video streams
KR20120130936A (en) Surveillance system
CN103581705A (en) Method and system for recognizing video program
KR101087194B1 (en) Video encoding system and method
CN105323634A (en) Method and system for generating thumbnail of video
CN111131825A (en) Video processing method and related device
CN108881119B (en) Method, device and system for video concentration
JP6238255B2 (en) Surveillance method and video segmentation apparatus using surveillance camera system
US11095901B2 (en) Object manipulation video conference compression
WO2011127859A2 (en) Method for processing video data and method and apparatus for displaying video images
CN108932254A (en) A kind of detection method of similar video, equipment, system and storage medium
JPWO2014065033A1 (en) Similar image search device
CN112714336B (en) Video segmentation method and device, electronic equipment and computer readable storage medium
CN114245167A (en) Video storage method and device and computer readable storage medium
CN115379236B (en) Video processing method, device, medium and equipment
CN115297323B (en) RPA flow automation method and system
CN103702123B (en) A kind of Video coding and the method and equipment of processing
JP7211373B2 (en) MOVING IMAGE ANALYSIS DEVICE, MOVING IMAGE ANALYSIS SYSTEM, MOVING IMAGE ANALYSIS METHOD, AND PROGRAM

Legal Events

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