CN108108696A - A kind of safety protecting method, apparatus and system - Google Patents
A kind of safety protecting method, apparatus and system Download PDFInfo
- Publication number
- CN108108696A CN108108696A CN201711407129.4A CN201711407129A CN108108696A CN 108108696 A CN108108696 A CN 108108696A CN 201711407129 A CN201711407129 A CN 201711407129A CN 108108696 A CN108108696 A CN 108108696A
- Authority
- CN
- China
- Prior art keywords
- image
- mrow
- region
- target
- target 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000011218 segmentation Effects 0.000 claims abstract description 27
- 230000008569 process Effects 0.000 claims abstract description 26
- 238000000605 extraction Methods 0.000 claims abstract description 22
- 238000010801 machine learning Methods 0.000 claims abstract description 18
- 238000012545 processing Methods 0.000 claims description 19
- 230000002087 whitening effect Effects 0.000 claims description 6
- 230000015572 biosynthetic process Effects 0.000 claims description 5
- 239000003086 colorant Substances 0.000 claims description 5
- 238000003708 edge detection Methods 0.000 claims description 5
- 238000005070 sampling Methods 0.000 claims description 5
- 238000003786 synthesis reaction Methods 0.000 claims description 5
- 210000000746 body region Anatomy 0.000 claims description 3
- 230000002194 synthesizing effect Effects 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 claims 1
- 230000007613 environmental effect Effects 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 9
- 238000001514 detection method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 3
- 210000004209 hair Anatomy 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004888 barrier function Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 210000004709 eyebrow Anatomy 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000009545 invasion Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B13/00—Burglar, theft or intruder alarms
- G08B13/18—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength
- G08B13/189—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems
- G08B13/19—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using infrared-radiation detection systems
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B13/00—Burglar, theft or intruder alarms
- G08B13/18—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength
- G08B13/189—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems
- G08B13/194—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems
- G08B13/196—Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems using television cameras
Abstract
The embodiment of the invention discloses a kind of safety protecting method, apparatus and systems.Wherein, the marginal portion progress color that method includes the target object in the target image to camera acquisition unitizes, to treated, target image carries out binary segmentation, obtain the shade image comprising target object region and background area, shade image and original target image progress are being synthesized, extraction obtains the image information of target object, feature extraction finally is carried out to image information using the face machine learning model pre-established, and similarity-rough set is carried out according to the identification feature and pre-stored human face data of extraction, obtain the recognition result of image information.The application is by removing the environmental impact factor in image information, make the environmental information included in image information less, reduce the data volume handled in identification process, effectively avoid interference of the external environment to recognition of face, the accuracy rate of recognition of face is improved, so as to promote the security performance of smart home security protection.
Description
Technical field
The present embodiments relate to technical field of image processing, more particularly to a kind of safety protecting method, device and are
System.
Background technology
With the fast development of computer technology and image processing techniques, smart home technology obtains broad development with answering
With, and in smart home technology, user is high to the demand of security protection.
In existing intelligent domestic system, security protection system is captured with detecting based on invasion by using camera
Image, is then compared invader or Given Face judgement, and realization has detected whether invader and detection invader
Identity.
When the facial image to capturing is identified, the image that the prior art generally captures camera is sent to
It is trained in learning framework, the distinctiveness ratio or similar of the image relatively captured by trained model and the human face data that prestores
Degree, final output recognition result.Since the image data amount of processing is big, redundancy is more, extra information can be led this method
It causes machine processing speed slower, can also generate over-fitting, reduced so as to cause face identification rate.
It is this so as to promote the security performance of smart home security protection in consideration of it, how to improve face recognition accuracy rate
Field technology personnel's urgent problem to be solved.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of safety protecting method, apparatus and system, and it is accurate to improve recognition of face
Rate, so as to promote the security performance of smart home security protection.
In order to solve the above technical problems, the embodiment of the present invention provides following technical scheme:
On the one hand the embodiment of the present invention provides a kind of safety protecting method, including:
Obtain the target image of camera acquisition;
The color of the target image is handled using preset algorithm, by the target object in the target image
The color of marginal portion unitize;
Binary segmentation is carried out to processed target image, obtains the shade figure comprising target object region and background area
Picture;
The shade image and target image progress are being synthesized, obtaining the image information of the target object;
Feature extraction is carried out to described image information using the face machine learning model pre-established, and according to extraction
Identification feature carries out similarity-rough set with pre-stored human face data, obtains the recognition result of described image information.
Optionally, the target image for obtaining camera acquisition includes:
It obtains the camera and the target image sent after image is gathered according to image capture instruction;
Wherein, described image acquisition instructions for hot outer obstacle sensor detect have obstacle in security protection region when,
The instruction sent to the camera gathers the corresponding safety protection region of the infrared obstacle sensor to trigger the camera
The target image in domain;The infrared obstacle sensor sets to form security protection region according to default safety protection standard.
Optionally, it is described that binary segmentation is carried out to processed target image, it obtains comprising target object region and background
The shade image in region includes:
Boundary demarcation is carried out to the target image using edge detection algorithm;
Judge the target image whether comprising more than two regions;
If so, determine the region of area maximum in multiple regions, using as the target object region, by the non-mesh
Other regions of mark object area merge, using as the background area;If it is not, then using the big region of area as described in
Target object region, the small region of area is as the background area;
Different colors to the target object region and the background area respectively, generates the shade image.
Optionally, in the region that area maximum is determined in multiple regions, using as after target object region, and also
Including:
Judge the target object region whether comprising multiple zonules;
It is if so, each zonule is unified into the target object region.
Optionally, it is described to synthesize the shade image and target image progress, obtain the target object
Image information includes:
The shade image and target image progress are being synthesized, the big region of area is object in composograph
Body region;
Other regions in the non-target object region are subjected to transparency process;
The target object region is subjected to black whitening processing, obtains the image information of the target object.
Optionally, it is described using preset algorithm to the color of the target image carry out processing include:
The target image is handled using sampling algorithm:
T (c_n)=s_T (c_m)=s_T (c_m*T);
The size of processed image is reduced using following formula:
T (x)=s (x- (c_n-c_m*T));
In formula, s (x) is the pixel in the target image, and t (x) is the pixel in processed target image,
For sample frequency, s_T (x) is the pixel in sampled images, and s (n*T) is the sample of s (x);N is picture in the target image
Plain number, c_n are the pixel center of the target image, and m is number of pixels in processed target image, and c_m is treated
Target image pixel center.
Optionally, further include:
When the similarity of described image information and pre-stored human face data is more than threshold value, alarm is carried out.
On the other hand the embodiment of the present invention provides a kind of safety device, including:
Acquisition module, for obtaining the target image of camera acquisition;
Color processing module, for being handled using preset algorithm the color of the target image, by the mesh
The color of the marginal portion of target object in logo image unitizes;
Binary segmentation module for carrying out binary segmentation to pretreated target image, is obtained comprising target object area
Domain and the shade image of background area;
Image synthesis unit for the shade image and target image progress to be synthesized, obtains the target
The image information of object;
Face recognition module, for carrying out feature to described image information using the face machine learning model pre-established
Extraction, and similarity-rough set is carried out according to the identification feature and pre-stored human face data of extraction, obtain described image information
Recognition result.
The embodiment of the present invention additionally provides a kind of security protection system, and including camera and processor, the processor is used
The step of safety protecting method as described in preceding any one is realized when the security protection program stored in memory is performed.
Optionally, further include:
Infrared obstacle sensor is connected with the camera, for when detect have obstacle in security protection region when, to
The camera sends image capture instruction;
Wherein, the infrared obstacle sensor is to be arranged on according to default safety protection standard in security protection region;
The number of infrared obstacle sensor is determined by the area in security protection region, shape.
An embodiment of the present invention provides a kind of safety protecting methods, the target image of camera acquisition are utilized first default
Algorithm carries out colors countenance, and the color of the marginal portion of the target object in target image is unitized;To processed target
Image carries out binary segmentation, obtains the shade image comprising target object region and background area;By shade image and target figure
As carrying out synthesizing, the image information of target object is obtained;Finally using the face machine learning model pre-established to image
Information carries out feature extraction, and carries out similarity-rough set according to the identification feature and pre-stored human face data of extraction, obtains
The recognition result of image information.
The advantages of technical solution that the application provides is, by the marginal portion of target image that is gathered to camera into
Row color unitizes, and using binary segmentation by the region comprising target object and background environment region segmentation, will be obtained after segmentation
Image synthesized with original target image, extraction obtain the image information of target object, eliminate mesh to the greatest extent
Environmental impact factor in logo image, the environmental information included in image information is less, greatly reduces in later stage identification process
The data volume of processing, so as to improve the recognition efficiency of face machine learning model, the effective total consumption for reducing security protection process
When;In addition, by removing environmental impact factor from image information, effectively avoid external environment and recognition of face is done
It disturbs, effectively avoids the over-fitting in identification process, improve the accuracy rate of recognition of face, so as to promote smart home security protection
Security performance.
In a kind of specific embodiment, infrared obstacle sensor is set to form security protection region, infrared obstacle passes
Sensor has monitored whether foreign object intrusion security protection region in real time, when having detected that foreign object invades security protection region, to this
Region carries out Image Acquisition, and the image collected is identified, and can realize positioning and identification effractor simultaneously, effectively
Judge whether clientele or unauthorized person enter security protection region, avoid clientele that contingency occurs, avoid
Damage caused by unauthorized person invades is conducive to ensure personal safety as well as the property safety, promotes the security performance of smart home security protection.
In addition, the embodiment of the present invention provides corresponding realization device and system also directed to safety protecting method, further
So that the method has more practicability, described device and system have the advantages that corresponding.
Description of the drawings
It, below will be to embodiment or existing for the clearer technical solution for illustrating the embodiment of the present invention or the prior art
Attached drawing is briefly described needed in technology description, it should be apparent that, the accompanying drawings in the following description is only this hair
Some bright embodiments, for those of ordinary skill in the art, without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of safety protecting method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another safety protecting method provided in an embodiment of the present invention;
Fig. 3 is a kind of specific embodiment structure chart of safety device provided in an embodiment of the present invention;
Fig. 4 is another specific embodiment structure chart of safety device provided in an embodiment of the present invention;
Fig. 5 is a kind of specific embodiment structure chart of security protection system provided in an embodiment of the present invention;
Fig. 6 is another specific embodiment structure chart of security protection system provided in an embodiment of the present invention.
Specific embodiment
In order to which those skilled in the art is made to more fully understand the present invention program, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiment be only part of the embodiment of the present invention rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower all other embodiments obtained, belong to the scope of protection of the invention.
Term " first ", " second ", " the 3rd " " in the description and claims of this application and above-mentioned attached drawing
Four " etc. be for distinguishing different objects rather than for describing specific order.In addition term " comprising " and " having " and
Their any deformations, it is intended that cover non-exclusive include.Such as contain the process of series of steps or unit, method,
The step of system, product or equipment are not limited to list or unit, but the step of may include not list or unit.
After the technical solution of the embodiment of the present invention is described, the various nonrestrictive realities of detailed description below the application
Apply mode.
Referring first to Fig. 1, Fig. 1 be a kind of flow diagram of safety protecting method provided in an embodiment of the present invention, this hair
Bright embodiment may include herein below:
S101:Obtain the target image of camera acquisition.
S102:The color of target image is handled using preset algorithm, by the target object in target image
The color of marginal portion unitizes.
When handling the color of target image, picture sampling can be used, can be specifically:
Target image is handled using sampling algorithm:
Target image has as the central pixel point of processed target image:
T (c_n)=s_T (c_m)=s_T (c_m*T);
For example, in target image comprising three pixels, T=3, then processed target image have 9 pixels, have m
=3, c_m=1, n=9, c_n=4.
It can be become larger using the image size of processed target image by above-mentioned, in order to ensure the standard of subsequent image identification
True rate reduces the size of processed image using following formula:
T (x)=s (x- (c_n-c_m*T));
In formula, s (x) is the pixel in target image, and t (x) is the pixel in processed target image,To adopt
Sample frequency, T are influence factor, and s_T (x) is the pixel in sampled images, and s (n*T) is the sample of s (x);N is target image
Middle number of pixels, c_n are the pixel center of target image, and m is number of pixels in processed target image, and c_m is treated
Target image pixel center.
S103:Binary segmentation is carried out to processed target image, is obtained comprising target object region and background area
Shade image.
Binary segmentation is that target image is divided into target object and background, such as the environment of clientele and surrounding, is had
The process of body can be:
Boundary demarcation is carried out to target image using edge detection algorithm;
Judge target image whether comprising more than two regions;
If so, determine the region of area maximum in multiple regions, using as target object region, by non-targeted object areas
Other regions in domain merge, using as background area;If it is not, then using the big region of area as target object region, face
The small region of product is as background area;
Different colors to target object region and background area respectively, generates shade image.
For example, target image is divided into protected two regions of human and environment after binary segmentation, such as yellow to represent
Insured person region, purple represent environment, and two chromatic graph pieces of generation are as shade image.
After the boundary information processing of target image, using edge detection algorithm, border is divided.If target
Image has a multiple regions, can all merge beyond maximum region (i.e. target object region), if inside maximum region also
Comprising some zonules, i.e. whether target object region includes multiple zonules;Zonule is all unified in this big region, finally
Two regions are formed, during image is gathered, environment tries not to include multicolour.
S104:Shade image and target image progress are being synthesized, obtaining the image information of target object.
Specifically process can be:
Shade image and target image are synthesized, the big region of area is target object region in composograph;
Other regions of non-targeted object area are subjected to transparency process;
Target object region is subjected to black whitening processing, obtains the image information of target object.
It, can be to mesh since in the image recognition processes in later stage, face machine learning model is not concerned with the color of image
It marks object area and carries out black whitening processing.To the region of non-targeted object into transparency process, whole target image is eliminated
Environmental color.
Obtain the main information feature for only retaining target object in image information, such as the information characteristics of clientele.
S105:Feature extraction is carried out to image information using the face machine learning model pre-established, and according to extraction
Identification feature and pre-stored human face data carry out similarity-rough set, obtain the recognition result of image information.
Face machine learning model to image information by carrying out feature extraction, such as the eyebrow width of clientele, nose
The information such as feature, shoulder breadth, figure.By the various features for learning people, it is possible to by these features to pre-stored picture
It is compared, the identity of target object in final recognition target image.Face machine learning model can be of the prior art
It anticipates a kind of human face recognition model, specific operation principle can refer to the prior art, and details are not described herein again.
In technical solution provided in an embodiment of the present invention, by the marginal portion of target image that is gathered to camera into
Row color unitizes, and using binary segmentation by the region comprising target object and background environment region segmentation, will be obtained after segmentation
Image synthesized with original target image, extraction obtain the image information of target object, eliminate mesh to the greatest extent
Environmental impact factor in logo image, the environmental information included in image information is less, greatly reduces in later stage identification process
The data volume of processing, so as to improve the recognition efficiency of face machine learning model, the effective total consumption for reducing security protection process
When;In addition, by removing environmental impact factor from image information, effectively avoid external environment and recognition of face is done
It disturbs, effectively avoids the over-fitting in identification process, improve the accuracy rate of recognition of face, so as to promote smart home security protection
Security performance.
If intelligent domestic system only can detect someone and swarm into, if other outer persons of invading in addition to authorized person swarm into
Row alarm.And if this intrusion detection is protected for household internal, if kinsfolk's special behavior detects, is not then applied to.
For example, whether the child of detection family close to window, if close to window, automatic close window and alarm.Such as
Fruit captures face just with camera, even if being distinguished this child as " invader " and household, but due to staying at home,
This child is constantly detected, and will constantly alarm, and intruding detection system will be made to lose value.That is, not only
It needs to carry out identification to current unauthorized person, it is also necessary to confirm the position of current unauthorized person.
In consideration of it, present invention also provides another embodiments, refer to shown in Fig. 2, specifically may include:
S201:Whether there is obstacle in infrared obstacle sensor monitoring security protection region, if so, S202 is performed, if it is not,
Then continue to monitor.
Infrared obstacle sensor, can be according to default security protection for detecting whether there is foreign object to enter infrared detection region
Standard setting forms a security protection region.One infrared obstacle sensor can only detect the region of infrared both sides, such as
The region of fruit detection for rectangular area or other shapes region when, infrared obstacle sensor number can be increased, specific infrared barrier
Hinder sensor determines that those skilled in the art can be according to specific reality using number by the area in security protection region, shape
Border situation is determined, and the application does not do this any restriction.
Security protection region is the not enterable region of unauthorized person, and unauthorized person can be according to different application scenarios for not
With people, for example, in the security protection system of smart home, when security protection region is window, unauthorized person
The as child of family;When in for the relevant security protection system of property, property is protected in security protection region to place
Region, unauthorized person is extraneous effractor.
Infrared obstacle sensor detects security protection region in real time, if having detected obstacle, shows have foreign object to enter to be somebody's turn to do
Region.
S202:The image capture instruction that camera is sent according to infrared obstacle sensor gathers infrared obstacle sensor pair
The target image in the security protection region answered, and it is sent to microprocessor.
Image capture instruction is detected for hot outer obstacle sensor when having obstacle in security protection region, to camera shooting hair
The instruction sent, to trigger the target image that camera gathers the corresponding security protection region of infrared obstacle sensor.
S203:Microprocessor obtains target image, and the color of target image is handled using preset algorithm, will
The color of the marginal portion of target object in target image unitizes;Binary segmentation is carried out to processed target image, is obtained
To the shade image for including target object region and background area;Shade image and target image progress are being synthesized, obtaining mesh
Mark the image information of object.
Specifically, being described with the S101-S104 of above-described embodiment consistent, details are not described herein again.
S204:Feature extraction is carried out to image information using the face machine learning model pre-established, and according to extraction
Identification feature and pre-stored human face data carry out similarity-rough set, obtain the recognition result of image information.
Specifically, being described with the S105 of above-described embodiment consistent, details are not described herein again.
S205:Whether the similarity for judging image information and pre-stored human face data is more than threshold value, if so, performing
S206;If it is not, then return to S201.
The similarity of image information and pre-stored human face data is bigger, it was demonstrated that the target object in present image information
The possibility of artificial same person corresponding with the face of storage is bigger;Image information is similar to pre-stored human face data
It spends smaller, it was demonstrated that the two is smaller for the possibility of same person.
Threshold value can be determined according to specific application scenarios, can be to judge the corresponding target object of image information with depositing
The corresponding artificial same person of human face data of storage, at this point, threshold setting values are larger.Or judge the corresponding mesh of image information
Marking object, people corresponding with the human face data stored is not same person, at this point, threshold setting values are smaller.
When more than predetermined threshold value, it was demonstrated that the target object in the image information currently gathered is anti-not allow access into safety
Protect the people in region;When being not above predetermined threshold value, it was demonstrated that the target object in the image information currently gathered is to allow access into
The people in security protection region.
S206:Carry out alarm.
Buzzer can be used to alarm, other kinds of alarm can also be used and alarm, this does not influence this Shen
Realization please.
Certainly, while being alarmed, voice prompt can be also carried out, specific voice prompt can prompt to be currently entering
The people in security protection region, also can voice prompt guardian, also can both all prompt, suggestion content can be configured in advance, this
Any restriction is not done this in application.
From the foregoing, it will be observed that the embodiment of the present invention is based on above-described embodiment, infrared obstacle sensor is set to form safety protection region
Domain, infrared obstacle sensor have monitored whether foreign object intrusion security protection region in real time, prevent when having detected that foreign object intrusion is safe
When protecting region, Image Acquisition is carried out to the region, the image collected is identified, can realize positioning and identification simultaneously
Effractor effectively judges whether clientele or unauthorized person enter security protection region, avoids clientele
Contingency avoids unauthorized person from being damaged caused by invading, and is conducive to ensure personal safety as well as the property safety, it is anti-safely to promote smart home
The security performance of shield.
The embodiment of the present invention provides corresponding realization device also directed to safety protecting method, further such that the method
With more practicability.Safety device provided in an embodiment of the present invention is introduced below, security protection described below
Device can correspond reference with above-described safety protecting method.
Referring to Fig. 3, Fig. 3 is a kind of structure of the safety device provided in an embodiment of the present invention under specific embodiment
Figure, the device may include:
Acquisition module 301, for obtaining the target image of camera acquisition.
Color processing module 302, for being handled using preset algorithm the color of the target image, by described in
The color of the marginal portion of target object in target image unitizes.
Binary segmentation module 303 for carrying out binary segmentation to pretreated target image, is obtained comprising target object
Region and the shade image of background area.
Image synthesis unit 304 for the shade image and target image progress to be synthesized, obtains the mesh
Mark the image information of object.
Face recognition module 305, for being carried out using the face machine learning model pre-established to described image information
Feature extraction, and similarity-rough set is carried out according to the identification feature and pre-stored human face data of extraction, obtain described image
The recognition result of information.
Optionally, in some embodiments of the present embodiment, the acquisition module 301 can be to obtain camera according to figure
As acquisition instructions gather the module of the target image sent after image;Wherein, image capture instruction is hot outer obstacle sensor
It detects when having obstacle in security protection region, the instruction sent to camera, gathering infrared obstacle to trigger camera senses
The target image in the corresponding security protection region of device;Infrared obstacle sensor is to be arranged on peace according to default safety protection standard
In full protection region.
In a kind of specific mode, described image synthesis module 304 specifically may include:
Synthesis unit, for shade image and target image to be synthesized, the big region of area is mesh in composograph
Mark object area;
Transparency process, for other regions of non-targeted object area to be carried out transparency process;
Black whitening processing for target object region to be carried out black whitening processing, obtains the image information of target object.
Optionally, the binary segmentation module 303 specifically may include:
Boundary demarcation unit, for carrying out boundary demarcation to target image using edge detection algorithm;
Judging unit, for judging target image whether comprising more than two regions;
Combining unit includes more than two regions for working as target image, area maximum is determined in multiple regions
Region, as target object region, other regions of non-targeted object area to be merged, using as background area;
Territory element is divided, more than two regions are included for working as target image, using the big region of area as target
Object area, the small region of area is as background area;
Shade image generation unit, for target object region and background area to be given different colors respectively, generation hides
Cover image.
Specifically, the binary segmentation module 303 for example may also include:
Second judgment unit, for judging target object region whether comprising multiple zonules;
Second combining unit is containing multiple zonules, by each zonule unification to object for working as target object region
In body region.
Preferably, the color processing module 302 may include:
Using processing unit, for being handled using sampling algorithm target image:
T (c_n)=s_T (c_m)=s_T (c_m*T);
Reduction unit, for being reduced using following formula to the size of processed image:
T (x)=s (x- (c_n-c_m*T));
In formula, s (x) is the pixel in target image, and t (x) is the pixel in processed target image,To adopt
Sample frequency, s_T (x) are the pixel in sampled images, and s (n*T) is the sample of s (x);N be target image in number of pixels, c_
N is the pixel center of target image, and m is number of pixels in processed target image, and c_m is the picture of processed target image
Plain center.
Optionally, in the other embodiment of the present embodiment, referring to Fig. 4, described device for example may also include:
Alarm module 306, for when the similarity of image information and pre-stored human face data is more than threshold value, carrying out
Alarm.
The function of each function module of safety device described in the embodiment of the present invention can be according in above method embodiment
Safety protecting method implements, and specific implementation process is referred to the associated description of above method embodiment, herein no longer
It repeats.
From the foregoing, it will be observed that the embodiment of the present invention carries out color unification by the marginal portion of the target image gathered to camera
Change, using binary segmentation by the region comprising target object and background environment region segmentation, by the image obtained after segmentation and original
The target image of beginning is synthesized, and extraction obtains the image information of target object, eliminates to the greatest extent in target image
Environmental impact factor, the environmental information included in image information is less, greatly reduces the data handled in later stage identification process
Amount, so as to improve the recognition efficiency of face machine learning model, the effective total time-consuming for reducing security protection process;It is in addition, logical
It crosses and environmental impact factor is removed from image information, effectively avoid interference of the external environment to recognition of face, effectively avoid
Over-fitting in identification process improves the accuracy rate of recognition of face, so as to promote the security performance of smart home security protection.
The embodiment of the present invention additionally provides a kind of safety protection equipment, specifically may include:
Memory, for storing the computer program of image recognition;
Processor, for performing computer program to realize the step of as above safety protecting method described in any one embodiment
Suddenly.
The function of each function module of safety protection equipment described in the embodiment of the present invention can be according in above method embodiment
Method specific implementation, specific implementation process is referred to the associated description of above method embodiment, and details are not described herein again.
From the foregoing, it will be observed that the embodiment of the present invention not only improves the recognition efficiency of face machine learning model, it is effective to reduce peace
The total time-consuming of full protection process also improves the accuracy rate of recognition of face, so as to promote the security of smart home security protection
Energy.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, is stored with security protection program, the peace
When full protection program is executed by processor as above described in any one embodiment the step of safety protecting method.
The function of each function module of computer readable storage medium described in the embodiment of the present invention can be real according to the above method
The method specific implementation in example is applied, specific implementation process is referred to the associated description of above method embodiment, herein no longer
It repeats.
From the foregoing, it will be observed that the embodiment of the present invention not only improves the recognition efficiency of face machine learning model, it is effective to reduce peace
The total time-consuming of full protection process also improves the accuracy rate of recognition of face, so as to promote the security of smart home security protection
Energy.
The embodiment of the present invention finally additionally provides a kind of security protection system, referring to Fig. 5, specifically may include camera
501 and processor 502, processor 502 receives the target image that camera is sent, and target image is identified.The place
As above security protection side described in any one embodiment is realized when reason device 502 is for performing the security protection program stored in memory
The step of method.
In a kind of specific embodiment, referring to Fig. 6, security protection system may also include infrared obstacle sensor
503, be connected with camera 501, for when detect have obstacle in security protection region when, to camera 501 send image adopt
Collection instruction.
Infrared obstacle sensor can set to be formed in security protection region according to default safety protection standard;It is one infrared
Obstacle sensor can only detect the region of infrared both sides, if the region of detection is rectangular area or the region of other shapes
When, infrared obstacle sensor number can be increased, specific infrared obstacle sensor using number by security protection region area,
Shape determines that those skilled in the art can be determined according to specific actual conditions, and the application does not do this any restriction.
From the foregoing, it will be observed that the embodiment of the present invention not only improves the recognition efficiency of face machine learning model, it is effective to reduce peace
The total time-consuming of full protection process also improves the accuracy rate of recognition of face, so as to promote the security of smart home security protection
Energy.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with it is other
The difference of embodiment, just to refer each other for same or similar part between each embodiment.For dress disclosed in embodiment
For putting, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related part is referring to method part
Explanation.
Professional further appreciates that, with reference to each exemplary unit of the embodiments described herein description
And algorithm steps, can be realized with the combination of electronic hardware, computer software or the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is performed actually with hardware or software mode, specific application and design constraint depending on technical solution.Specialty
Technical staff can realize described function to each specific application using distinct methods, but this realization should not
Think beyond the scope of this invention.
It can directly be held with reference to the step of method or algorithm that the embodiments described herein describes with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
A kind of safety protecting method provided by the present invention, apparatus and system are described in detail above.Herein
It applies specific case to be set forth the principle of the present invention and embodiment, the explanation of above example is only intended to help
Understand the method and its core concept of the present invention.It should be pointed out that it for those skilled in the art, is not taking off
On the premise of from the principle of the invention, can also to the present invention, some improvement and modification can also be carried out, these improvement and modification also fall into this
In invention scope of the claims.
Claims (10)
1. a kind of safety protecting method, which is characterized in that including:
Obtain the target image of camera acquisition;
The color of the target image is handled using preset algorithm, by the side of the target object in the target image
The color of edge point unitizes;
Binary segmentation is carried out to processed target image, obtains the shade image comprising target object region and background area;
The shade image and target image progress are being synthesized, obtaining the image information of the target object;
Feature extraction is carried out to described image information using the face machine learning model pre-established, and according to the identification of extraction
Feature carries out similarity-rough set with pre-stored human face data, obtains the recognition result of described image information.
2. safety protecting method according to claim 1, which is characterized in that the target image for obtaining camera acquisition
Including:
It obtains the camera and the target image sent after image is gathered according to image capture instruction;
Wherein, described image acquisition instructions for hot outer obstacle sensor detect have obstacle in security protection region when, to institute
The instruction of camera transmission is stated, the corresponding security protection region of the infrared obstacle sensor is gathered to trigger the camera
Target image;The infrared obstacle sensor sets to form security protection region according to default safety protection standard.
3. safety protecting method according to claim 1, which is characterized in that described that two are carried out to processed target image
Member segmentation, obtaining the shade image comprising target object region and background area includes:
Boundary demarcation is carried out to the target image using edge detection algorithm;
Judge the target image whether comprising more than two regions;
If so, determine the region of area maximum in multiple regions, using as the target object region, by the non-object
Other regions of body region merge, using as the background area;If it is not, then using the big region of area as the target
Object area, the small region of area is as the background area;
Different colors to the target object region and the background area respectively, generates the shade image.
4. safety protecting method according to claim 3, which is characterized in that determine area most in multiple regions described
Big region, as after target object region, to further include:
Judge the target object region whether comprising multiple zonules;
It is if so, each zonule is unified into the target object region.
5. safety protecting method according to claim 1, which is characterized in that described by the shade image and the target
Image progress is synthesizing, and obtaining the image information of the target object includes:
The shade image and target image progress are being synthesized, the big region of area is target object area in composograph
Domain;
Other regions in the non-target object region are subjected to transparency process;
The target object region is subjected to black whitening processing, obtains the image information of the target object.
6. according to the safety protecting method described in claim 1 to 5 any one, which is characterized in that described to utilize preset algorithm
Processing is carried out to the color of the target image to be included:
The target image is handled using sampling algorithm:
<mrow>
<mi>s</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>s</mi>
<mi>u</mi>
<mi>m</mi>
<mo>_</mo>
<mi>n</mi>
<mi> </mi>
<mi>s</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>*</mo>
<mi>T</mi>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mi>f</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>-</mo>
<mfrac>
<mi>x</mi>
<mi>T</mi>
</mfrac>
<mo>)</mo>
</mrow>
<mo>;</mo>
</mrow>
<mrow>
<mi>t</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>s</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>-</mo>
<mo>(</mo>
<mrow>
<mi>c</mi>
<mo>_</mo>
<mi>n</mi>
<mo>-</mo>
<mi>c</mi>
<mo>_</mo>
<mi>m</mi>
<mo>*</mo>
<mi>T</mi>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>s</mi>
<mo>_</mo>
<mi>T</mi>
<mrow>
<mo>(</mo>
<mfrac>
<mrow>
<mi>x</mi>
<mo>-</mo>
<mi>c</mi>
<mo>_</mo>
<mi>n</mi>
</mrow>
<mi>T</mi>
</mfrac>
<mo>-</mo>
<mi>c</mi>
<mo>_</mo>
<mi>m</mi>
<mo>)</mo>
</mrow>
<mo>;</mo>
<mi>c</mi>
<mo>_</mo>
<mi>m</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mi>m</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
<mn>2</mn>
</mfrac>
<mo>;</mo>
<mi>c</mi>
<mo>_</mo>
<mi>n</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mi>n</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
<mn>2</mn>
</mfrac>
<mo>;</mo>
</mrow>
T (c_n)=s_T (c_m)=s_T (c_m*T);
The size of processed image is reduced using following formula:
T (x)=s (x- (c_n-c_m*T));
<mrow>
<mi>s</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>s</mi>
<mi>u</mi>
<mi>m</mi>
<mo>_</mo>
<mi>n</mi>
<mi> </mi>
<mi>s</mi>
<mo>_</mo>
<mi>T</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mi>f</mi>
<mo>_</mo>
<mi>T</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>-</mo>
<mfrac>
<mi>x</mi>
<mi>T</mi>
</mfrac>
<mo>)</mo>
</mrow>
<mo>;</mo>
<mi>f</mi>
<mo>_</mo>
<mi>T</mi>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>-</mo>
<mfrac>
<mi>x</mi>
<mi>T</mi>
</mfrac>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mi>T</mi>
<mo>*</mo>
<mi>f</mi>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mo>*</mo>
<mi>n</mi>
<mo>-</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
<mo>;</mo>
</mrow>
In formula, s (x) is the pixel in the target image, and t (x) is the pixel in processed target image,To adopt
Sample frequency, s_T (x) are the pixel in sampled images, and s (n*T) is the sample of s (x);N is pixel in the target image
Number, c_n are the pixel center of the target image, and m is number of pixels in processed target image, and c_m is processed mesh
The pixel center of logo image.
7. safety protecting method according to claim 6, which is characterized in that further include:
When the similarity of described image information and pre-stored human face data is more than threshold value, alarm is carried out.
8. a kind of safety device, which is characterized in that including:
Acquisition module, for obtaining the target image of camera acquisition;
Color processing module, for being handled using preset algorithm the color of the target image, by the target figure
The color of the marginal portion of target object as in unitizes;
Binary segmentation module, for carrying out binary segmentation to pretreated target image, obtain comprising target object region and
The shade image of background area;
Image synthesis unit for the shade image and target image progress to be synthesized, obtains the target object
Image information;
Face recognition module carries for carrying out feature to described image information using the face machine learning model pre-established
It takes, and similarity-rough set is carried out according to the identification feature and pre-stored human face data of extraction, obtain described image information
Recognition result.
9. a kind of security protection system, which is characterized in that including camera and processor, the processor is used to perform memory
It is realized during the security protection program of middle storage as described in any one of claim 1 to 7 the step of safety protecting method.
10. security protection system according to claim 9, which is characterized in that further include:
Infrared obstacle sensor is connected with the camera, for when detect have obstacle in security protection region when, to described
Camera sends image capture instruction;
Wherein, the infrared obstacle sensor is to be arranged on according to default safety protection standard in security protection region;It is infrared
The number of obstacle sensor is determined by the area in security protection region, shape.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711407129.4A CN108108696B (en) | 2017-12-22 | 2017-12-22 | Safety protection method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711407129.4A CN108108696B (en) | 2017-12-22 | 2017-12-22 | Safety protection method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108108696A true CN108108696A (en) | 2018-06-01 |
CN108108696B CN108108696B (en) | 2020-11-20 |
Family
ID=62212359
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711407129.4A Active CN108108696B (en) | 2017-12-22 | 2017-12-22 | Safety protection method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108108696B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111918141A (en) * | 2020-08-07 | 2020-11-10 | 中国人民解放军空军军医大学 | AI voice video system |
CN112843697A (en) * | 2021-02-02 | 2021-05-28 | 网易(杭州)网络有限公司 | Image processing method and device, storage medium and computer equipment |
CN113096660A (en) * | 2021-04-28 | 2021-07-09 | 三一汽车制造有限公司 | Personnel safety protection method and device, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1932847A (en) * | 2006-10-12 | 2007-03-21 | 上海交通大学 | Method for detecting colour image human face under complex background |
CN102592295A (en) * | 2011-12-21 | 2012-07-18 | 深圳市万兴软件有限公司 | Image processing method and device |
KR20150037229A (en) * | 2013-09-30 | 2015-04-08 | 엘지전자 주식회사 | Image display device |
CN104992169A (en) * | 2015-07-31 | 2015-10-21 | 小米科技有限责任公司 | Character recognition method and device thereof |
CN105227865A (en) * | 2015-10-29 | 2016-01-06 | 努比亚技术有限公司 | A kind of image processing method and terminal |
CN105574477A (en) * | 2015-05-26 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | Secure anti-theft method, apparatus and system |
CN105590089A (en) * | 2015-10-22 | 2016-05-18 | 广州视源电子科技股份有限公司 | Face identification method and device |
CN105869159A (en) * | 2016-03-28 | 2016-08-17 | 联想(北京)有限公司 | Image segmentation method and apparatus |
CN106202086A (en) * | 2015-05-04 | 2016-12-07 | 阿里巴巴集团控股有限公司 | A kind of picture processing, acquisition methods, Apparatus and system |
-
2017
- 2017-12-22 CN CN201711407129.4A patent/CN108108696B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1932847A (en) * | 2006-10-12 | 2007-03-21 | 上海交通大学 | Method for detecting colour image human face under complex background |
CN102592295A (en) * | 2011-12-21 | 2012-07-18 | 深圳市万兴软件有限公司 | Image processing method and device |
KR20150037229A (en) * | 2013-09-30 | 2015-04-08 | 엘지전자 주식회사 | Image display device |
CN106202086A (en) * | 2015-05-04 | 2016-12-07 | 阿里巴巴集团控股有限公司 | A kind of picture processing, acquisition methods, Apparatus and system |
CN105574477A (en) * | 2015-05-26 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | Secure anti-theft method, apparatus and system |
CN104992169A (en) * | 2015-07-31 | 2015-10-21 | 小米科技有限责任公司 | Character recognition method and device thereof |
CN105590089A (en) * | 2015-10-22 | 2016-05-18 | 广州视源电子科技股份有限公司 | Face identification method and device |
CN105227865A (en) * | 2015-10-29 | 2016-01-06 | 努比亚技术有限公司 | A kind of image processing method and terminal |
CN105869159A (en) * | 2016-03-28 | 2016-08-17 | 联想(北京)有限公司 | Image segmentation method and apparatus |
Non-Patent Citations (1)
Title |
---|
张凡: "《After effects CS4中文版基础实用教程》", 31 May 2014 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111918141A (en) * | 2020-08-07 | 2020-11-10 | 中国人民解放军空军军医大学 | AI voice video system |
CN112843697A (en) * | 2021-02-02 | 2021-05-28 | 网易(杭州)网络有限公司 | Image processing method and device, storage medium and computer equipment |
CN112843697B (en) * | 2021-02-02 | 2024-03-12 | 网易(杭州)网络有限公司 | Image processing method, device, storage medium and computer equipment |
CN113096660A (en) * | 2021-04-28 | 2021-07-09 | 三一汽车制造有限公司 | Personnel safety protection method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108108696B (en) | 2020-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Gong et al. | A real-time fire detection method from video with multifeature fusion | |
CN109376667A (en) | Object detection method, device and electronic equipment | |
CN106919921B (en) | Gait recognition method and system combining subspace learning and tensor neural network | |
CN109670441A (en) | A kind of realization safety cap wearing knows method for distinguishing, system, terminal and computer readable storage medium | |
CN105844128A (en) | Method and device for identity identification | |
CN103093192B (en) | The recognition methods that high voltage transmission line is waved | |
CN103093180B (en) | A kind of method and system of pornographic image detecting | |
CN108108696A (en) | A kind of safety protecting method, apparatus and system | |
CN104850841B (en) | Combination RFID and video identification a kind of old man abnormal behaviour monitoring method | |
CN107609544A (en) | A kind of detection method and device | |
CN107844742A (en) | Facial image glasses minimizing technology, device and storage medium | |
CN113012383A (en) | Fire detection alarm method, related system, related equipment and storage medium | |
Tan et al. | Embedded human detection system based on thermal and infrared sensors for anti-poaching application | |
CN107316024B (en) | Perimeter alarm algorithm based on deep learning | |
CN104298988B (en) | A kind of property guard method matched based on video image local feature | |
Ma et al. | Macab: Model-agnostic clean-annotation backdoor to object detection with natural trigger in real-world | |
CN103049748A (en) | Behavior-monitoring method and behavior-monitoring system | |
CN108961287A (en) | Intelligent commodity shelf triggering method, intelligent commodity shelf system, storage medium and electronic equipment | |
JP2012212216A (en) | Image monitoring device | |
Samaila et al. | REAL-TIME DETECTION OF ABANDONED OBJECT USING CENTROID DIFFERENCE METHOD | |
CN115396591A (en) | Intelligent double-light camera image processing method and device, camera and medium | |
CN112668387B (en) | Illegal smoking identification method based on alpha Pose | |
KR20230051848A (en) | System for preventing safety accidents in dangerous areas and operation method thereof | |
Peker et al. | Real-time motion-sensitive image recognition system | |
CN111985331A (en) | Detection method and device for preventing secret of business from being stolen |
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 |