CN110267095A - Video flowing intercept method, device and storage medium - Google Patents

Video flowing intercept method, device and storage medium Download PDF

Info

Publication number
CN110267095A
CN110267095A CN201910367384.3A CN201910367384A CN110267095A CN 110267095 A CN110267095 A CN 110267095A CN 201910367384 A CN201910367384 A CN 201910367384A CN 110267095 A CN110267095 A CN 110267095A
Authority
CN
China
Prior art keywords
video
picture
client
palmmprint
backstage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910367384.3A
Other languages
Chinese (zh)
Inventor
秦勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910367384.3A priority Critical patent/CN110267095A/en
Priority to PCT/CN2019/103615 priority patent/WO2020224127A1/en
Publication of CN110267095A publication Critical patent/CN110267095A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/13Sensors therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/1365Matching; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream

Abstract

The present invention relates to field of artificial intelligence, proposes that a kind of video flowing intercept method, device and storage medium, method therein include: to open photographic device in the front end html, the video of the client of identity to be confirmed is obtained using photographic device;Video is processed into picture, wherein parsing is carried out to video using canvas and generates video stream data, video stream data includes the Video stream information of each frame image, and picture is intercepted in Video stream information;By the picture transfer of interception to backstage, picture is identified on backstage, determines the identity of client.The present invention obtains video by opening photographic device in the front end html, and by video intercepting picture in the way of canvas, then picture is being identified from the background, to solve the problems, such as that current image procossing also must be in background process, development amount is saved, and reduces man power and material.

Description

Video flowing intercept method, device and storage medium
Technical field
The present invention relates to field of artificial intelligence more particularly to a kind of video flowing intercept method, device and computer can Read storage medium.
Background technique
Currently, being done shopping when paying the bill in unmanned supermarket, needs to acquire video information and carry out matching identity, it will be collected Video flowing intercepts picture, and the picture of screenshot is handled, and is then matched with the normal pictures in database, matching at After function, the payment for goods for needing to pay is with regard to direct payment to unmanned supermarket;This means of payment is more convenient and quick.
But this means of payment is to open camera by writing a set of image processing software from the background, obtain view at present Frequency flows and interception picture is come what is completed, and due to being in background application, this series of processes is taken time and effort, to the performance requirement of computer Also relatively high.
To solve the above problems, needing a kind of new video flowing intercept method.
Summary of the invention
The present invention provides a kind of video flowing intercept method, electronic device and computer readable storage medium, main purpose It is to obtain video by opening photographic device in the front end html, and by video intercepting picture in the way of canvas, then will The picture of interception is being identified from the background, to solve the problems, such as that current image procossing must also be saved in background process Development amount, and reduce man power and material.
To achieve the above object, the present invention provides a kind of electronic device, which includes: memory, processor and camera shooting Device includes that video flowing intercepts program in the memory, and the video flowing interception program is realized when being executed by the processor Following steps:
Photographic device is opened in the front end html, the video of the client of identity to be confirmed is obtained using the photographic device;
The video is processed into picture, wherein parsing is carried out to the video using canvas and generates video stream data, The video stream data includes the Video stream information of each frame image, intercepts picture in the Video stream information;
By the picture transfer of interception to backstage, the picture is identified on the backstage, determines the body of client Part.
Preferably, the video is palmmprint video or face's video;Wherein,
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
By the palmmprint picture transfer being truncated to backstage, on the backstage, by the palmmprint picture and back-end data Standard palmmprint picture in library determines the identity of client into matching.
Preferably, the described the step of video is processed into picture, includes:
Painting canvas is created using canvas.getContext, the picture of interception is placed in the painting canvas and is shown;
Using context.drawImage according to the preset figure for providing to draw the currently interception shown in the painting canvas Piece;
The picture of the interception drawn is converted into base64 form and is transmitted to the backstage.
Preferably, the body for learning to determine client is trained to the palmmprint and the picture by machine learning model Part, wherein the machine learning model includes convolutional neural networks and shot and long term memory network.
In addition, to achieve the above object, the present invention also provides a kind of video flowing intercept methods, which comprises
Photographic device is opened in the front end html, the video of the client of identity to be confirmed is obtained using the photographic device;
The video is processed into picture, wherein parsing is carried out to the video using canvas and generates video stream data, The video stream data includes the Video stream information of each frame image, intercepts picture in the Video stream information;
By the picture transfer of interception to backstage, the backstage identifies the palmmprint and the picture, determines The identity of client.
Preferably, the video is palmmprint video or face's video;Wherein,
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
By the palmmprint picture transfer being truncated to backstage, on the backstage, by the palmmprint picture and back-end data Standard palmmprint picture in library determines the identity of client into matching.
Preferably, when the video is face's video, the picture intercepted in the Video stream information is face picture;
The face picture being truncated to is transmitted to backstage, on the backstage, by the face picture and back-end data Standard face picture in library determines the identity of client into matching.
Preferably, the described the step of video is processed into picture, includes:
Painting canvas is created using canvas.getContext, the picture of interception is placed in the painting canvas and is shown;
Using context.drawImage according to the preset figure for providing to draw the currently interception shown in the painting canvas Piece;
The picture of the interception drawn is converted into base64 form and is transmitted to the backstage.
Preferably, passed through machine learning model is trained the body for learning to determine client to the palmmprint and the picture Part, wherein the machine learning model includes convolutional neural networks and shot and long term memory network.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium It include that video flowing intercepts program in storage medium, when the video flowing interception program is executed by processor, realization is as described above Arbitrary steps in video flowing intercept method.
Video flowing intercept method, device and computer readable storage medium proposed by the present invention, by from the front end html Photographic device is opened, the video of the client of identity to be confirmed is obtained using photographic device;Video is processed into picture, is utilized Canvas carries out parsing to video and generates video stream data, and video stream data includes the Video stream information of each frame image, is being regarded Picture is intercepted in frequency stream information.By combining machine learning model to be trained the body for learning to determine client to the picture of interception Part, the working efficiency of research and development is effectively improved, reduces man power and material, and to computer performance requirement.
Detailed description of the invention
Fig. 1 is the application environment schematic diagram of video flowing intercept method preferred embodiment of the present invention;
Fig. 2 is the module diagram that video flowing intercepts program preferred embodiment in Fig. 1;
Fig. 3 is the flow chart of video flowing intercept method preferred embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of video flowing intercept method, is applied to a kind of electronic device 1.Shown in referring to Fig.1, for the present invention The application environment schematic diagram of video flowing intercept method preferred embodiment.
In the present embodiment, electronic device 1 can be server, smart phone, tablet computer, portable computer, on table Type computer etc. has the terminal device of calculation function.
The electronic device 1 includes: processor 12, memory 11, photographic device 13, network interface 14 and communication bus 15.
Memory 11 includes the readable storage medium storing program for executing of at least one type.The readable storage medium storing program for executing of at least one type It can be the non-volatile memory medium of such as flash memory, hard disk, multimedia card, card-type memory 11.In some embodiments, described Readable storage medium storing program for executing can be the internal storage unit of the electronic device 1, such as the hard disk of the electronic device 1.At other In embodiment, the readable storage medium storing program for executing is also possible to the external memory 11 of the electronic device 1, such as the electronic device The plug-in type hard disk being equipped on 1, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) block, flash card (Flash Card) etc..
In the present embodiment, the readable storage medium storing program for executing of the memory 11 is installed on the electronic device commonly used in storage 1 video flowing interception program 10 etc..The memory 11, which can be also used for temporarily storing, have been exported or will export Data.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, program code or processing data for being stored in run memory 11, example Such as execute video flowing interception program 10.
Photographic device 13 either the electronic device 1 a part, can also be independently of electronic device 1.Some In embodiment, the electronic device 1 is the terminal device with camera such as smart phone, tablet computer, portable computer, then The photographic device 13 is the camera of the electronic device 1.In other embodiments, the electronic device 1 can be clothes Business device, the photographic device 13 passes through network connection independently of the electronic device 1, with the electronic device 1, for example, the camera shooting fills It sets 13 and is installed on particular place, such as office space, monitoring area, the target captured in real-time for entering the particular place is obtained in real time The realtime graphic that shooting obtains is transmitted to processor 12 by network by image.
Network interface 14 optionally may include standard wireline interface and wireless interface (such as WI-FI interface), be commonly used in Communication connection is established between the electronic device 1 and other electronic equipments.
Communication bus 15 is for realizing the connection communication between these components.
Fig. 1 illustrates only the electronic device 1 with component 11-15, it should be understood that being not required for implementing all show Component out, the implementation that can be substituted is more or less component.
Optionally, which can also include user interface, and user interface may include input unit such as keyboard (Keyboard), speech input device such as microphone (microphone) etc. has the equipment of speech identifying function, voice defeated Device such as sound equipment, earphone etc. out, optionally user interface can also include standard wireline interface and wireless interface.
Optionally, which can also include display, and display is referred to as display screen or display unit. It can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and Organic Light Emitting Diode in some embodiments (Organic Light-Emitting Diode, OLED) touches device etc..Display is used to show and handle in the electronic apparatus 1 Information and for showing visual user interface.
Optionally, which further includes touch sensor.It is touched provided by the touch sensor for user The region for touching operation is known as touch area.In addition, touch sensor described here can be resistive touch sensor, capacitor Formula touch sensor etc..Moreover, the touch sensor not only includes the touch sensor of contact, proximity may also comprise Touch sensor etc..In addition, the touch sensor can be single sensor, or such as multiple biographies of array arrangement Sensor.
In addition, the area of the display of the electronic device 1 can be identical as the area of the touch sensor, it can also not Together.Optionally, display and touch sensor stacking are arranged, to form touch display screen.The device is based on touching aobvious Display screen detects the touch control operation of user's triggering.
Optionally, which can also include radio frequency (Radio Frequency, RF) circuit, sensor, audio Circuit etc., details are not described herein.
In Installation practice shown in Fig. 1, as may include in a kind of memory 11 of computer storage medium behaviour Make system and video flowing interception program 10;Processor 12 executes real when the video flowing interception program 10 stored in memory 11 Existing following steps:
Photographic device 13 is opened in the front end html, the view of the client of identity to be confirmed is obtained using the photographic device 13 Frequently;
The video is processed into picture, parsing is carried out to the video using canvas and generates video stream data, it is described Video stream data includes the Video stream information of each frame image, intercepts picture in the Video stream information;
By the picture transfer of interception to backstage, the picture is identified on the backstage, determines the body of client Part.
Wherein, the video is palmmprint video or face's video;In the present invention, it can be obtained by photographic device 13 Palmmprint video or face's video are taking the photograph the centre of the palm of client gesture as requested and position when obtaining palmmprint video In the range of capable of shooting as device, photographic device 13 obtains the palmmprint video of effective client;When the face's view for obtaining client When frequency, in the range of client can shoot in front of photographic device 13 according to the requirement station of regulation, so that photographic device takes Face's video of effective client.
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
By the palmmprint picture transfer being truncated to backstage, on the backstage, by the palmmprint picture and back-end data Standard palmmprint picture in library determines the identity of client into matching.
When the video is face's video, the picture intercepted in the Video stream information is face picture;
The face picture being truncated to is transmitted to backstage, on the backstage, by the face picture and back-end data Standard face picture in library determines the identity of client into matching.
In the present invention, camera is opened using code in the front end html, bottom function is integrated into navigator object In;That is: in the front end html, photographic device is opened using navigator and video;Wherein, Navigator object includes Information in relation to browser, all browsers all support the object;Specifically, the attribute description that Navigator object includes The configuration that these attributes carry out platform-specific can be used in browser currently in use.Although the title of this object is aobvious and easy What is seen is the Navigator browser of Netscape, but other browsers for realizing JavaScript also support this object. The example of Navigator object is uniquely, can to quote it with the navigator attribute of Window object.
When photographic device 13 takes video, the video taken is sent processor 12 by photographic device 13, works as place After reason device 12 receives the video, the video flowing taken is buffered or parsed first, and according to canvas standard pair Video stream data is parsed, and the video stream data of the corresponding each frame image of video stream data is generated;Then according to every 300ms (0.3 second) intercepts a picture in video streaming, and the picture of interception is changed into base64 form and is transmitted to backstage.
Specifically, in video processing procedure, detailed process is as follows:
First using canvas.getContext (' 2d') creation painting canvas;Wherein, creation painting canvas is for interception later Picture is prepared, and is truncated to picture and is placed in painting canvas and shows, corresponding format (png or jpg) is then changed into.
Then context.drawImage (video, 0,0,800,600) is used;Draw the figure shown in current video Piece, picture size 800*600;
Wherein, every (0.3 second) one picture of interception of 300ms, 10 are intercepted altogether in the present invention, can according to need and cut Take more pictures.
The purpose of the step for above-mentioned is in order to which the specification size for being provided with the picture of interception is truncated in video streaming The size of picture be all 800*600, and the time interval of interception.
In the present invention, the identity for learning to determine client is trained by picture of the machine learning model to interception, In, the machine learning model includes convolutional neural networks and shot and long term memory network.
Specifically, image analysis, analysis are carried out using palmmprint of the shot and long term memory network to the supermarket shopping client of input Whether the standard palmmprint of the client of the database of the palmmprint and rear end of client matches, to determine the body of client by palm print information Part;Or image analysis is carried out to the face picture of the client of input, analysis obtains the face picture and back-end data base of client In the standard face picture of client whether match, to determine the identity of client by facial information.
Palmmprint picture or face picture are learnt by machine learning model knowledge, machine learning model can not be done It refers in particular to, what is used at present is deep learning model.
Wherein, deep learning seeks to one network of building, this network namely refers to deep learning neural network model, Deep learning can generally be summarized as 3 steps as shown below:
First step, neural network model are the complicated functions being made of simple function, are commonly designed a mind Through network model, then with computer, training obtains some parameters from given training data, these parameters guarantee model energy It is enough to achieve the effect that expected design in test set, and there is generalization ability.
Second step defines a cost function according to training data, can assess m odel validity by cost function, Defining a cost function is designed according to specific tasks and actual training data.
Third step is found out optimal function according to the result of two step of front, such as is looked for the method that gradient declines This optimal function out.
Wherein, deep learning model in the present invention can be CNN (Convolutional NeuralNetwork, volume Product neural network) and LSTM (Long Short-Term Memory, shot and long term memory network).
Wherein, convolutional neural networks CNN is a kind of feedforward neural network, its artificial neuron can respond a part and cover Surrounding cells within the scope of lid have outstanding performance for large-scale image procossing, it includes convolutional layer (convolutional ) and pond layer (pooling layer) layer.
The basic structure of CNN includes two layers, and one is characterized extract layer, the input of each neuron and the part of preceding layer Acceptance region is connected, and extracts the feature of the part.After the local feature is extracted, its positional relationship between other feature Also it decides therewith;The second is Feature Mapping layer, each computation layer of network is made of multiple Feature Mappings, and each feature is reflected Penetrating is a plane, and the weight of all neurons is equal in plane.The Feature Mapping structure sigmoid small using influence function core Activation primitive of the function as convolutional network, so that Feature Mapping has shift invariant.
LSTM (is shot and long term memory network, is a kind of time recurrent neural network, be suitable for processing and predicted time sequence It is middle to be spaced and postpone relatively long critical event.System based on LSTM can learn interpreter language, control robot, image Analysis, documentation summary, speech recognition image recognition, handwriting recognition, control chat robots, predictive disease, clicking rate and stock, The tasks such as composite music.
It should be noted that using shot and long term memory network to the palmmprint of the supermarket shopping client of input in above-described embodiment Picture or face picture are analyzed, determine client palmmprint whether the standard palmprint match with the client of database, or Determine whether the face picture of client matches with face's normal pictures of the client in database, so that it is determined that the identity of client.
The electronic device 1 that above-described embodiment proposes is obtained by opening photographic device from the front end html using photographic device Take the video of the client of identity to be confirmed;Video is processed into picture, parsing is carried out to video using canvas and generates video flowing Data, video stream data include the Video stream information of each frame image, and picture is intercepted in Video stream information.By combining machine Learning model is trained the identity for learning to determine client to the picture of interception, effectively improves the working efficiency of research and development, reduces people Power and material resources, and to computer performance requirement.
In other embodiments, video flowing interception program 10 can also be divided into one or more module, one or The multiple modules of person are stored in memory 11, and are executed by processor 12, to complete the present invention.The so-called module of the present invention is Refer to complete the series of computation machine program instruction section of specific function.It is that video flowing intercepts program in Fig. 1 referring to shown in Fig. 2 The Program modual graph of 10 preferred embodiments.The video flowing interception program 10 can be divided into: video acquiring module 110, figure Piece interception module 120 and picture recognition module 130.The functions or operations step that the module 110-130 is realized is and above Similar, and will not be described here in detail, illustratively, such as wherein:
Video acquiring module 110 is obtained to be confirmed for opening photographic device in the front end html using the photographic device The video of the client of identity;
Picture interception module 120, for the video to be processed into picture, wherein using canvas to the video into Row parsing generates video stream data, and the video stream data includes the Video stream information of each frame image, believes in the video flowing Picture is intercepted in breath;
Picture recognition module 130, the picture transfer for that will intercept to backstage, the backstage to the picture into Row identification, determines the identity of client.
In addition, the present invention also provides a kind of video flowing intercept methods.It is video flowing interception side of the present invention referring to shown in Fig. 3 The flow chart of method preferred embodiment.This method can be executed by a device, which can be by software and or hardware realization.
In the present embodiment, video flowing intercept method includes: step S110- step S130.
Step S110 is opened photographic device in the front end html, the client of identity to be confirmed is obtained using the photographic device Video.
In the front end html, photographic device is opened using navigator and video.In the present invention, in the front end html Camera is opened using code, bottom function is integrated into navigator object.Wherein, Navigator object includes related clear Look at the information of device, all browsers all support the object.
The code wherein specifically used is as follows:
By above-mentioned code in the front end html, photographic device is opened using navigator and video.
Wherein, the video is palmmprint video or face's video;In the present invention, it can be obtained and be slapped by photographic device Line video or face's video are imaging the centre of the palm of client gesture as requested and position when obtaining palmmprint video In the range of device can be shot, photographic device obtains the palmmprint video of effective client;When obtaining face's video of client, In the range of client can shoot in front of photographic device according to the requirement station of regulation, so that photographic device takes effective visitor Face's video at family.
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
By the palmmprint picture transfer being truncated to backstage, on the backstage, by the palmmprint picture and back-end data Standard palmmprint picture in library determines the identity of client into matching.
When the video is face's video, the picture intercepted in the Video stream information is face picture;
The face picture being truncated to is transmitted to backstage, on the backstage, by the face picture and back-end data Standard face picture in library determines the identity of client into matching.The video is processed into picture by step S130, wherein benefit Parsing is carried out to the video with canvas and generates video stream data, the video stream data includes the video flowing of each frame image Information intercepts picture in the Video stream information.
In the present invention, picture is processed into using the video that canvas mode takes camera, wherein every 300ms intercepts a picture.
In video processing procedure, the video flowing taken is buffered or parsed first, and according to canvas system Formula parses video stream data, generates the video stream data of the corresponding each frame image of video stream data;Then according to every A picture is intercepted in video streaming every 300ms (0.3 second).
The step of video is processed into picture include:
First using canvas.getContext (' 2d') creation painting canvas;Wherein, creation painting canvas is for interception later Picture is prepared, and is truncated to picture and is placed in painting canvas and shows, corresponding format (png or jpg) is then changed into.
Then context.drawImage (video, 0,0,800,600) is used;Draw the figure shown in current video Piece, picture size 800*600, that is to say, that drawn currently according to preset regulation in institute using context.drawImage State the picture of interception shown in painting canvas.
Wherein, every (0.3 second) one picture of interception of 300ms, 10 are intercepted altogether in the present invention, can according to need and cut Take more pictures.
The purpose of the step for above-mentioned is in order to which the specification size for being provided with the picture of interception is truncated in video streaming The size of picture be all 800*600, and the time interval of interception.
10 pictures are intercepted using following code:
Finally, the picture of interception, which is changed into base64 form, is transmitted to backstage.
Step S130 identifies the picture transfer of interception to backstage on the backstage to the picture, determines The identity of client.
In the present invention, the identity for learning to determine client is trained to the picture by machine learning model, wherein The machine learning model includes convolutional neural networks and shot and long term memory network.
Specifically, image analysis, analysis are carried out using palmmprint of the shot and long term memory network to the supermarket shopping client of input Whether the standard palmmprint of the client of the database of the palmmprint and rear end of client matches, to determine the body of client by palm print information Part;Or image analysis is carried out to the face picture of the client of input, analysis obtains the face picture and back-end data base of client In the standard face picture of client whether match, to determine the identity of client by facial information.
Palmmprint picture and face picture are learnt by machine learning model knowledge, machine learning model can not be spy Refer to, what is used at present is deep learning model.
Wherein, deep learning seeks to one network of building, this network namely refers to deep learning neural network model, Deep learning can generally be summarized as 3 steps as shown below:
First step, neural network model are the complicated functions being made of simple function, are commonly designed a mind Through network model, then with computer, training obtains some parameters from given training data, these parameters guarantee model energy It is enough to achieve the effect that expected design in test set, and there is generalization ability.
Second step defines a cost function according to training data, can assess m odel validity by cost function, Defining a cost function is designed according to specific tasks and actual training data.
Third step is found out optimal function according to the result of two step of front, such as is looked for the method that gradient declines This optimal function out.
Wherein, deep learning model in the present invention can be CNN (Convolutional NeuralNetwork, volume Product neural network) and LSTM (Long Short-Term Memory, shot and long term memory network).
Wherein, convolutional neural networks CNN is a kind of feedforward neural network, its artificial neuron can respond a part and cover Surrounding cells within the scope of lid have outstanding performance for large-scale image procossing, it includes convolutional layer (convolutional ) and pond layer (pooling layer) layer.
The basic structure of CNN includes two layers, and one is characterized extract layer, the input of each neuron and the part of preceding layer Acceptance region is connected, and extracts the feature of the part.After the local feature is extracted, its positional relationship between other feature Also it decides therewith;The second is Feature Mapping layer, each computation layer of network is made of multiple Feature Mappings, and each feature is reflected Penetrating is a plane, and the weight of all neurons is equal in plane.The Feature Mapping structure sigmoid small using influence function core Activation primitive of the function as convolutional network, so that Feature Mapping has shift invariant.
LSTM (is shot and long term memory network, is a kind of time recurrent neural network, be suitable for processing and predicted time sequence It is middle to be spaced and postpone relatively long critical event.System based on LSTM can learn interpreter language, control robot, image Analysis, documentation summary, speech recognition image recognition, handwriting recognition, control chat robots, predictive disease, clicking rate and stock, The tasks such as composite music.
It should be noted that using shot and long term memory network to the palmmprint of the supermarket shopping client of input in above-described embodiment Picture or face picture are analyzed, determine client palmmprint whether the standard palmprint match with the client of database, or Determine whether the face picture of client matches with face's normal pictures of the client in database, so that it is determined that the identity of client.
The video flowing intercept method that above-described embodiment proposes utilizes camera shooting by opening photographic device from the front end html Device obtains the video of the client of identity to be confirmed;Video is processed into picture, parsing generation is carried out to video using canvas Video stream data, video stream data include the Video stream information of each frame image, and picture is intercepted in Video stream information.Pass through knot It closes machine learning model and is trained the identity for learning to determine client to the picture of interception, effectively improve the working efficiency of research and development, Man power and material is reduced, and to computer performance requirement.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium In include that video flowing intercepts program, video flowing interception program realizes following operation when being executed by processor:
Photographic device is opened in the front end html, the video of the client of identity to be confirmed is obtained using the photographic device;
The video is processed into picture, wherein parsing is carried out to the video using canvas and generates video stream data, The video stream data includes the Video stream information of each frame image, intercepts picture in the Video stream information;
By the picture transfer of interception to backstage, the picture is identified on the backstage, determines the body of client Part.
Preferably, the video is palmmprint video or face's video;Wherein,
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
By the palmmprint picture transfer being truncated to backstage, on the backstage, by the palmmprint picture and back-end data Standard palmmprint picture in library determines the identity of client into matching.
Preferably, when the video is face's video, the picture intercepted in the Video stream information is face picture;
The face picture being truncated to is transmitted to backstage, on the backstage, by the face picture and back-end data Standard face picture in library determines the identity of client into matching.
Preferably, the described the step of video is processed into picture, includes:
Painting canvas is created using canvas.getContext, the picture of interception is placed in the painting canvas and is shown;
Using context.drawImage according to the preset figure for providing to draw the currently interception shown in the painting canvas Piece;
The picture of the interception drawn is converted into base64 form and is transmitted to the backstage.
Preferably, passed through machine learning model is trained the identity for learning to determine client to the picture, wherein institute Stating machine learning model includes convolutional neural networks and shot and long term memory network.
The specific embodiment of the computer readable storage medium of the present invention and above-mentioned video flowing intercept method, electronic device Specific embodiment it is roughly the same, details are not described herein.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, device of element, article or method.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.Pass through above embodiment party The description of formula, it is required general that those skilled in the art can be understood that above-described embodiment method can add by software The mode of hardware platform is realized, naturally it is also possible to which by hardware, but in many cases, the former is more preferably embodiment.It is based on Such understanding, substantially the part that contributes to existing technology can be with software product in other words for technical solution of the present invention Form embody, which is stored in a storage medium (such as ROM/RAM, magnetic disk, light as described above Disk) in, including some instructions use is so that a terminal device (can be mobile phone, computer, server or the network equipment Deng) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of video flowing intercept method is applied to electronic device, which is characterized in that the described method includes:
Photographic device is opened in the front end html, the video of the client of identity to be confirmed is obtained using the photographic device;
The video is processed into picture, wherein parsing is carried out to the video using canvas and generates video stream data, it is described Video stream data includes the Video stream information of each frame image, intercepts picture in the Video stream information;
By the picture transfer of interception to backstage, the picture is identified on the backstage, determines the identity of client.
2. video flowing intercept method according to claim 1, which is characterized in that
The video is palmmprint video or face's video;Wherein,
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
It will be in the palmmprint picture and background data base on the backstage by the palmmprint picture transfer being truncated to backstage Standard palmmprint picture into matching, determine the identity of client.
3. video flowing intercept method according to claim 2, which is characterized in that
When the video is face's video, the picture intercepted in the Video stream information is face picture;
The face picture being truncated to is transmitted to backstage, it, will be in the face picture and background data base on the backstage Standard face picture into matching, determine the identity of client.
4. video flowing intercept method according to claim 1, which is characterized in that
The described the step of video is processed into picture includes:
Painting canvas is created using canvas.getContext, the picture of interception is placed in the painting canvas and is shown;
Using context.drawImage according to the preset picture for providing to draw the currently interception shown in the painting canvas;
The picture of the interception drawn is converted into base64 form and is transmitted to the backstage.
5. video flowing intercept method according to claim 1-4, which is characterized in that
The identity for learning to determine client is trained to the picture by machine learning model, wherein the machine learning mould Type includes convolutional neural networks and shot and long term memory network.
6. a kind of electronic device, which is characterized in that the electronic device includes: memory, processor and photographic device, the storage Include that video flowing intercepts program in device, the video flowing interception program realizes following steps when being executed by the processor:
Photographic device is opened in the front end html, the video of the client of identity to be confirmed is obtained using the photographic device;
The video is processed into picture, wherein parsing is carried out to the video using canvas and generates video stream data, it is described Video stream data includes the Video stream information of each frame image, intercepts picture in the Video stream information;
By the picture transfer of interception to backstage, the picture is identified on the backstage, determines the identity of client.
7. electronic device according to claim 6, which is characterized in that
The video is palmmprint video or face's video;Wherein,
When the video is palmmprint video, the picture intercepted in the Video stream information is palmmprint picture;
It will be in the palmmprint picture and background data base on the backstage by the palmmprint picture transfer being truncated to backstage Standard palmmprint picture into matching, determine the identity of client.
8. electronic device according to claim 6, which is characterized in that
The described the step of video is processed into picture includes:
Painting canvas is created using canvas.getContext, the picture of interception is placed in the painting canvas and is shown;
Using context.drawImage according to the preset picture for providing to draw the currently interception shown in the painting canvas;
The picture of the interception drawn is converted into base64 form and is transmitted to the backstage.
9. according to the described in any item electronic devices of claim 6-8, which is characterized in that
The identity for learning to determine client is trained to the picture by machine learning model, wherein the machine learning mould Type includes convolutional neural networks and shot and long term memory network.
10. a kind of computer readable storage medium, which is characterized in that cut in the computer readable storage medium including video flowing Program fetch realizes the video as described in any one of claims 1 to 5 when the video flowing interception program is executed by processor The step of flowing intercept method.
CN201910367384.3A 2019-05-05 2019-05-05 Video flowing intercept method, device and storage medium Pending CN110267095A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910367384.3A CN110267095A (en) 2019-05-05 2019-05-05 Video flowing intercept method, device and storage medium
PCT/CN2019/103615 WO2020224127A1 (en) 2019-05-05 2019-08-30 Video stream capturing method and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910367384.3A CN110267095A (en) 2019-05-05 2019-05-05 Video flowing intercept method, device and storage medium

Publications (1)

Publication Number Publication Date
CN110267095A true CN110267095A (en) 2019-09-20

Family

ID=67914144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910367384.3A Pending CN110267095A (en) 2019-05-05 2019-05-05 Video flowing intercept method, device and storage medium

Country Status (2)

Country Link
CN (1) CN110267095A (en)
WO (1) WO2020224127A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901630A (en) * 2020-06-17 2020-11-06 视联动力信息技术股份有限公司 Data transmission method, device, terminal equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763671A (en) * 2021-09-08 2021-12-07 升维科技有限公司 Building monitoring system, building monitoring method, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140049593A1 (en) * 2012-08-14 2014-02-20 Avaya Inc. Protecting Privacy of a Customer and an Agent Using Face Recognition in a Video Contact Center Environment
CN107067429A (en) * 2017-03-17 2017-08-18 徐迪 Video editing system and method that face three-dimensional reconstruction and face based on deep learning are replaced
CN108320345A (en) * 2018-05-04 2018-07-24 珠海横琴盛达兆业科技投资有限公司 A method of the B/S framework based on Baidu recognition of face API realizes Intelligent human-face attendance
CN108345454A (en) * 2018-04-16 2018-07-31 珠海横琴盛达兆业科技投资有限公司 The method that drugstore management system based on clmtrackr calls html5 video real-time automatic collecting face image datas

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140049593A1 (en) * 2012-08-14 2014-02-20 Avaya Inc. Protecting Privacy of a Customer and an Agent Using Face Recognition in a Video Contact Center Environment
CN107067429A (en) * 2017-03-17 2017-08-18 徐迪 Video editing system and method that face three-dimensional reconstruction and face based on deep learning are replaced
CN108345454A (en) * 2018-04-16 2018-07-31 珠海横琴盛达兆业科技投资有限公司 The method that drugstore management system based on clmtrackr calls html5 video real-time automatic collecting face image datas
CN108320345A (en) * 2018-05-04 2018-07-24 珠海横琴盛达兆业科技投资有限公司 A method of the B/S framework based on Baidu recognition of face API realizes Intelligent human-face attendance

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴传文: "人脸识别技术在招生考试系统中的研究与应用", 《中国优秀硕士学位论文数据库信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901630A (en) * 2020-06-17 2020-11-06 视联动力信息技术股份有限公司 Data transmission method, device, terminal equipment and storage medium

Also Published As

Publication number Publication date
WO2020224127A1 (en) 2020-11-12

Similar Documents

Publication Publication Date Title
CN107862292B (en) Personage's mood analysis method, device and storage medium
CN109961009A (en) Pedestrian detection method, system, device and storage medium based on deep learning
US20220335748A1 (en) Method for identifying an object within an image and mobile device for executing the method
CN107918634A (en) Intelligent answer method, apparatus and computer-readable recording medium
CN110334344A (en) A kind of semanteme intension recognizing method, device, equipment and storage medium
CN107679448A (en) Eyeball action-analysing method, device and storage medium
CN107679546A (en) Face image data acquisition method, device, terminal device and storage medium
WO2021012494A1 (en) Deep learning-based face recognition method and apparatus, and computer-readable storage medium
WO2024041479A1 (en) Data processing method and apparatus
CN109919003A (en) Face identification method, terminal device and computer readable storage medium
CN107784316A (en) A kind of image-recognizing method, device, system and computing device
WO2021047587A1 (en) Gesture recognition method, electronic device, computer-readable storage medium, and chip
CN107944398A (en) Based on depth characteristic association list diagram image set face identification method, device and medium
WO2021012493A1 (en) Short video keyword extraction method and apparatus, and storage medium
CN113516227B (en) Neural network training method and device based on federal learning
CN112395979A (en) Image-based health state identification method, device, equipment and storage medium
CN109739223A (en) Robot obstacle-avoiding control method, device and terminal device
CN110267095A (en) Video flowing intercept method, device and storage medium
CN113449548A (en) Method and apparatus for updating object recognition model
CN112528978A (en) Face key point detection method and device, electronic equipment and storage medium
US20210092283A1 (en) Systems and methods for guiding image sensor angle settings in different environments
WO2023130613A1 (en) Facial recognition model construction method, facial recognition method, and related device
Parashar et al. A robust covariate‐invariant gait recognition based on pose features
CN115223239A (en) Gesture recognition method and system, computer equipment and readable storage medium
CN115457308A (en) Fine-grained image recognition method and device and computer equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190920

RJ01 Rejection of invention patent application after publication