WO2019056245A1 - Home security method and terminal - Google Patents
Home security method and terminal Download PDFInfo
- Publication number
- WO2019056245A1 WO2019056245A1 PCT/CN2017/102596 CN2017102596W WO2019056245A1 WO 2019056245 A1 WO2019056245 A1 WO 2019056245A1 CN 2017102596 W CN2017102596 W CN 2017102596W WO 2019056245 A1 WO2019056245 A1 WO 2019056245A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- object distance
- terminal
- face image
- preset
- Prior art date
Links
Images
Classifications
-
- 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
Definitions
- the present application relates to signal processing technologies, and in particular, to a home security method and terminal.
- the low-cost family security system has been applied to people's daily life. in life.
- the existing home security system has a wide range of application requirements in night security and remote monitoring.
- the existing home security system is mainly a security component such as an access control system, a pressure detection system, a pyroelectric infrared sensing system, a damage detected in the access control system, a pressure abnormality detected by the pressure detection system, or a pyroelectric infrared sensing system detection.
- a security component such as an access control system, a pressure detection system, a pyroelectric infrared sensing system, a damage detected in the access control system, a pressure abnormality detected by the pressure detection system, or a pyroelectric infrared sensing system detection.
- the home security system will make a false alarm, resulting in low reliability of the home security system.
- the invention provides a home security method and terminal to improve the reliability of home security.
- a home security method is provided, which is applied to a terminal, and the terminal is provided with a photoelectric proximity sensor and a camera.
- the method includes:
- the method further includes:
- the monitoring video stored locally is sent to the alarm server.
- the performing an intrusion alarm includes: playing a preset alarm audio;
- the obtaining the first object distance from the photoelectric proximity sensor comprises:
- determining that an object is close to the terminal according to the first object distance comprises:
- the method before determining whether the first object distance is smaller than the second object distance, the method further includes:
- determining whether the first object distance is smaller than the second object distance comprises:
- the method before the obtaining the first object distance from the photoelectric proximity sensor, the method further includes:
- the transmit power of the photoelectric proximity sensor to a preset security power, wherein when the photoelectric proximity sensor is set to the preset security power, the photoelectric proximity sensor
- the maximum sensing distance is greater than or equal to 2 meters.
- the method further includes:
- Determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as the captured face image, Performing the determination of whether the captured face image matches the preset face image.
- a terminal comprising:
- a distance obtaining module for obtaining a first object distance from the photoelectric proximity sensor
- An image recognition module to be identified configured to obtain, from the camera, an image to be recognized corresponding to the object when an object is determined to be close to the terminal according to the first object distance, the image to be recognized is approaching the photoelectric An image taken in the direction of sensing of the sensor;
- the alarm module is configured to determine whether the captured face image matches the preset face image when the captured face image is obtained according to the to-be-identified image, and if not, perform an intrusion alarm.
- the alarm module is further configured to:
- the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
- the alarm module is also used to:
- the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
- the object distance obtaining module is used to:
- the object distance obtained from the photoelectric proximity sensor at the initialization time is determined as the second object distance; the object distance obtained from the photoelectric proximity sensor after the initialization time is determined as the first object distance.
- the image recognition module to be identified is configured to: determine whether the first object distance is smaller than the second object distance; if yes, determine that an object is close to the terminal.
- the image obtaining module to be identified is specifically configured to: determine whether a plurality of the first object distances obtained in a preset time period are consistent; if not, from the plurality of the first object distances Obtaining a minimum first object distance; determining whether the minimum first object distance is smaller than the second object distance.
- a mode setting module is further included for obtaining the photo proximity sensor from the Before the first object distance is obtained, the transmit power of the photoelectric proximity sensor is adjusted to a preset security power according to the security mode setting information input by the user, wherein when the photoelectric proximity sensor is set to the preset security power
- the maximum proximity distance of the photoelectric proximity sensor is greater than or equal to 2 meters.
- the alarm module is further configured to: after obtaining the image to be recognized corresponding to the object from the camera, acquire the image from the camera when the captured face image is not obtained according to the image to be identified a short video to be processed; determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as the The face image is photographed, and it is determined whether the photographed face image matches the preset face image.
- a terminal comprising: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, the processor running the computer program to execute the first aspect and the first The home security method described in various possible aspects.
- a storage medium comprising: a readable storage medium and a computer program for implementing the first aspect and the first aspect of the various aspects of the home security method.
- the invention first obtains a first object distance from the photoelectric proximity sensor; and when an object is determined to be close to the terminal according to the first object distance, obtaining an image to be recognized corresponding to the object from the camera, the to-be-identified image
- the recognition image is an image taken toward the sensing direction of the photoelectric proximity sensor; when it is determined that an object approaches the terminal, the camera detects the object detected in front, and obtains the image to be recognized, which can further analyze the object causing the movement. And reducing the false alarm rate; then, when obtaining the captured face image according to the image to be identified, determining whether the captured face image matches the preset face image, and if not, indicating that the stranger is entering, invading Alarms improve the reliability of home security.
- FIG. 1 is a schematic diagram of a home security application scenario according to an embodiment of the present invention
- FIG. 2 is a schematic flow chart of a home security method according to an embodiment of the present invention.
- FIG. 3 is a schematic flow chart of another home security method according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of hardware of a terminal provided by the present invention.
- the matching between A and B in the present application is that the similarity between A and B is greater than or equal to a preset threshold.
- FIG. 1 is a schematic diagram of a home security application scenario according to an embodiment of the present invention.
- the terminal is the mobile phone 11 and the application is applied in the bedroom.
- the guardian needs to go out and the old man or the young child sleeps in the bedroom himself
- the guardian turns on the security function of the mobile phone 11
- the mobile phone 11 is placed on the bracket close to the door 13 so that the camera of the mobile phone 11 faces the door.
- the sensing area 12 of the sensor is in the direction of the door entry.
- the photoelectric proximity sensor's sensing direction of the mobile phone is consistent with the shooting direction of the camera.
- the guardian makes a call and turns on the video recording function of the camera.
- the guardian uses the mobile phone to implement the security function, and can adjust the placement position of the mobile phone 11 according to the needs of the environment.
- the terminal provided by the present invention can also implement temporary security during hotel accommodation. Put the mobile phone on the furniture such as the seat near the door, and adjust the camera's camera function to the door position, you can simply realize the safety protection, and promptly warn when there is an invasion. Due to the portability of the mobile phone and the features of widespread use, the method and terminal provided by the present invention can provide an easy-to-use security solution for the user. The following is a detailed description of the embodiments.
- FIG. 2 is a schematic flow chart of a home security method according to an embodiment of the present invention.
- the method shown in FIG. 2 is applied to a terminal provided with a photoelectric proximity sensor and a camera.
- the terminal can be a mobile terminal.
- Mobile terminals include, but are not limited to, mobile devices, personal digital assistants (PDAs), tablets, portable devices (eg, portable computers, pocket computers, or handheld computers) with mobile devices having image capture capabilities.
- PDAs personal digital assistants
- portable devices eg, portable computers, pocket computers, or handheld computers
- the embodiment of the present invention does not limit the form of the terminal.
- the method shown in Figure 2 includes:
- the terminal may be pre-configured with a normal mode and a security mode.
- the security mode setting information is input to the terminal to enable the security function to be turned on, or to be set after being turned on.
- the manner of inputting the security mode setting information is, for example, the user turns on the preset security function button, or the user activates the security function by making a preset gesture action, or the user shakes the terminal at a preset frequency, wherein the preset The gesture action can be to slide on the screen with a predetermined trajectory.
- the terminal adjusts the transmit power of the photoelectric proximity sensor to a preset security power according to the security mode setting information input by the user, wherein when the photoelectric proximity sensor is set to the preset security power, the maximum sensing distance of the photoelectric proximity sensor is greater than or equal to 2 Meter. Obviously, the transmit power of the photo proximity sensor in the security mode is higher compared to the normal mode.
- the photoelectric proximity sensor obtains the first object distance between the detected object and the terminal according to the time difference of the transmission and reception of the electrical signal.
- the photoelectric proximity sensor comprises a light emitter, a light receiver and a detection circuit, and the detection circuit is connected to the light receiver.
- the light emitter can be a Light Emitting Diode (LED) or a semiconductor laser tube.
- the light receiver may be a phototransistor, and the receiving band of the light receiver overlaps with the emission band of the light emitter.
- the photoelectric proximity sensor in this embodiment will be described by taking an optical transmitter as an LED and a photoreceiver as a phototransistor as an example.
- the beam axis of the LED and the axis of the phototransistor are in a plane at a certain angle, and the two axes intersect at a point in front of the photoelectric proximity sensor.
- the object reaches the intersection position or approaches the photoelectric proximity sensor through the intersection point, the light emitted by the LED is reflected by the surface of the object, the reflected light is received by the phototransistor, and the detection circuit connected to the phototransistor generates an electrical signal.
- the reflection area is not within the angle of view of the phototransistor, and the detection circuit has no output.
- the driving current of the light emitting diode may be an alternating current of a certain frequency, so that the receiving circuit obtains an alternating signal of the same frequency. If the received signal is filtered, only signals of the same frequency are allowed to pass, which can effectively prevent interference of other stray light.
- the light emitted by the photoelectric proximity sensor may be infrared light, and the receiver is correspondingly an infrared receiver, which can reduce light interference in the surrounding environment.
- the image to be recognized is an image taken toward the sensing direction of the photoelectric proximity sensor.
- the camera detects the object detected in front, and obtains the image to be recognized, so that the object causing the movement can be further analyzed to reduce the false alarm rate.
- an implementation manner of the object approaching the terminal is determined, and the first object distance obtained in real time may be compared with a fixed setting threshold value, and less than the threshold value indicates that an object is close to the object; An object distance is compared with each other, and if the first object distance obtained later is smaller than the first object distance obtained first, it also indicates that an object is close.
- the terminal first determines whether the recognized image includes a face, and if the image to be recognized includes a face, performing image processing to obtain a captured face image; if the image to be recognized does not include a face, according to When the image to be recognized cannot obtain the captured face image, one of the following two implementation manners may be performed: In an implementation manner, if it is considered that no one has entered, the process returns to S120 to continue monitoring whether an object is approaching. In another implementation manner, it is considered that an image of a human face or a similar human face may not be captured, and the short video to be processed is acquired from the camera.
- the short video to be processed may be a short-lived video that is quickly captured, such as a short video to be processed of 10 seconds. Then, it is determined whether the short video to be processed includes a video face image, whether the short video to be processed includes the retrieval and recognition of the face, and if the short video to be processed includes the video face image, indicating that at least one frame image of the short video to be processed is captured. When the face image is reached, the video face image is obtained from the short video to be processed, and the video face image is determined as the captured face image.
- the video face image is a frame image containing a face image in a short video to be processed. Further, the video face image may be a frame image containing the most complete face image in the short video to be processed.
- the video face image is determined as the captured face image, and it is determined whether the captured face image matches the preset face image. If the face image cannot be retrieved in the short video to be processed, it indicates If there is no entry, return to S120 and continue to monitor if there is an object approaching.
- the user can pre-store the face image in the terminal, and usually can store the facial image of the family member who is often resident, and can also add the face image of the relatives and friends during the stay of the relatives and friends.
- the image of the face is obtained, it indicates that someone enters, and by further determining whether the captured face image matches the preset face image, it can be determined whether the incoming person is a preset relative or friend.
- the photographed face image matches the preset face image, the entered relatives and friends are entered, and it cannot be considered that the intrusion occurs and no processing is performed.
- the manner of performing the intrusion alarm may specifically be one or a combination of the following.
- One way to invade an alarm is to play a preset alarm tone.
- the user pre-records voice or music as alarm audio, and plays pre-recorded voice or music when performing an intrusion alarm.
- the alarm audio in the early stage of the invasion, it can serve the purpose of scaring off criminals and improving the security effect.
- the preset alarm call can be the phone number of other family members, guardians, or the phone number of the alarm center, for example, 110. If the elderly or children in the family are alone at home, it is safer to notify the guardian or the alarm center in time than to notify the user at home to defend against the intruder.
- a first object distance is first obtained from the photoelectric proximity sensor; and when an object is determined to be close to the terminal according to the first object distance, an image to be recognized corresponding to the object is obtained from the camera,
- the image to be recognized is an image taken toward the sensing direction of the photoelectric proximity sensor; when it is determined that an object approaches the terminal, the camera detects the object detected in front, and obtains the image to be recognized, which can further perform the moving object. Analysis, reducing the false positive rate; then, when obtaining the captured face image according to the image to be identified, determining whether the captured face image matches the preset face image, and if not, indicating that the stranger is entering, proceeding Intrusion alarms improve the reliability of home security.
- FIG. 2 in addition to performing an intrusion warning, there may be a method step of providing a surveillance video to the police when the captured face image does not match the preset face image.
- a method of providing a monitoring video to the police when the photographing face image does not match the preset face image will be described below with reference to FIG.
- FIG. 3 is a schematic flow chart of another home security method according to an embodiment of the present invention.
- the method shown in Figure 3 includes:
- S210 continuously obtain monitoring video from the camera, and store the continuously acquired monitoring video locally.
- the terminal when the photographing face image does not match the preset face image, it indicates that a stranger enters, and the terminal immediately obtains the monitoring video from the camera.
- the start time of the surveillance video is the moment when it is determined that the captured face image does not match the preset face image.
- the terminal may also not make any prompts on the screen or the signal light to prevent the invading criminals from discovering that the surveillance video is being recorded through the special display of the terminal.
- the continuous acquisition operation of the monitoring video may be ended when the user inputs the stop information, or may be forced until the terminal is powered off automatically.
- the user input stop information may be the gesture operation information of the user, or the user may input the preset voice information to the terminal, or the user may shake the terminal by using the preset comment.
- the alarm server may be a server of the police or a server of the security service provider. This embodiment is described by taking the alarm server as a police server as an example.
- the terminal sends the image to be identified to the alarm server, which can be used as judicial evidence for subsequent intrusion alarms. On the other hand, it can be used as a preliminary judgment basis for the police to identify whether the terminal actually invades the behavior, and reduce the false alarm rate.
- the alarm server After receiving the access key and the image to be identified, the alarm server manually determines the image to be recognized. If it is initially determined that the intrusion is possible, the terminal sends a video acquisition request including the access key to the terminal, so that the terminal will The continuously acquired surveillance video is transmitted to the alarm server.
- S240 Send the monitoring video stored locally to the alarm server.
- the access key in the video acquisition request is an access key sent by the terminal, indicating that the requesting party is legal
- the locally stored monitoring video is sent to the alarm server.
- the terminal still obtains the monitoring video continuously, so after the local stored monitoring video is transmitted, the terminal will continue to transmit the new monitoring video obtained from the camera to the alarm server until the alarm server sends an instruction to terminate the transmission. signal.
- the terminal provides surveillance video to the police.
- the police can see and hear the alarm around the terminal in the surveillance video. If you see or hear the obvious burglary or burglary information. , you can immediately get out of the police, if you do not see or hear the obvious burglary or burglary information, you can also call the terminal to ask about the situation, to avoid the waste of police force caused by false alarms.
- the surveillance video can also be used as a judicial evidence for subsequent intrusion alarms and contains more information than the picture.
- the access key is incorrect, or the access key is not included in the video acquisition request, it indicates that the requesting party is illegal. It may be that other users who are not police want to obtain surveillance video in the terminal, and the terminal rejects the request. Specifically, the manner of rejecting the request may be to feed back the rejection information to the alarm server, or may not feedback any information.
- the monitoring video is obtained from the camera, and the image to be recognized and the monitoring video are sent to the alarm server.
- This embodiment provides images and videos for the police to initially determine whether an intrusion has occurred and reduce the false alarm rate.
- the object distance obtained from the photoelectric proximity sensor at the initialization time is determined as the second object distance
- the object distance obtained from the photoelectric proximity sensor after the initialization time is determined as the first object distance.
- the initialization time may be that the user turns on the security mode, and the image acquired from the camera is still after. For example, the user places the terminal on the bracket, and the terminal starts timing after the door is closed, and the pictures captured within 10 minutes are all still pictures, then the initialization time is reached at the 11th minute to obtain the second object distance. After the 11th minute, the first object distance is acquired.
- the first object distance and the second object distance can be compared, and based on the comparison result, it is determined whether an object is close to the terminal.
- the method for determining that an object is close to the terminal is determined according to the current environment, and the second object distance and the first object distance obtained in different environments are different. This embodiment improves the flexibility of the terminal for security defense, and is applicable. A variety of application scenarios.
- a method of calculating the period may be introduced before the determination that the first object distance is smaller than the second object distance.
- a preset time period as a calculation period, first determining whether a plurality of first object distances obtained in the preset time period are consistent; if not, acquiring a minimum first object distance from the plurality of first object distances.
- determining whether the first object distance is smaller than the second object distance can be simplified as: determining whether the minimum first object distance is smaller than the second object distance.
- the first object distance obtained each time is smaller than the second object distance, but after the preset time period ends, select the smallest of all the first object distances obtained in the preset time period.
- the first object distance is compared with the second object distance, so the real-time calculation is converted into a period calculation with a preset time period as a cycle, which reduces the computational burden.
- FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
- the terminal shown in Figure 4 includes:
- a distance obtaining module 31 configured to obtain a first object distance from the photoelectric proximity sensor
- the image recognition module 32 is configured to determine, when the object is close to the terminal according to the first object distance, Obtaining, from the camera, an image to be recognized corresponding to the object, the image to be recognized being an image taken toward an sensing direction of the photoelectric proximity sensor;
- the alarm module 33 is configured to determine whether the captured face image matches the preset face image when the captured face image is obtained according to the to-be-identified image, and if not, perform an intrusion alarm.
- the terminal of the embodiment shown in FIG. 4 is correspondingly used to perform the steps performed by the terminal in the method embodiment shown in FIG. 2, and the implementation principle and technical effects are similar, and details are not described herein again.
- the alarm module 33 is further configured to:
- the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
- the object distance obtaining module is used to:
- the object distance obtained from the photoelectric proximity sensor at the initialization time is determined as the second object distance; the object distance obtained from the photoelectric proximity sensor after the initialization time is determined as the first object distance.
- the image recognition module to be identified is configured to: determine whether the first object distance is smaller than the second object distance; if yes, determine that an object is close to the terminal.
- the to-be-identified image obtaining module is specifically configured to: determine whether a plurality of the first object distances obtained in a preset time period are consistent; if not, from the plurality of the first Obtaining a minimum first object distance in the object distance; determining whether the minimum first object distance is smaller than the second object distance.
- a mode setting module is further included, configured to: before the obtaining the first object distance from the photoelectric proximity sensor, the transmitting power of the photoelectric proximity sensor according to the security mode setting information input by the user. Adjusted to a preset security power, wherein when the photoelectric proximity sensor is set to the preset security power, the photoelectric proximity sensor has a maximum sensing distance greater than or equal to 2 meters.
- the alarm module is further configured to: after obtaining the image to be recognized corresponding to the object from the camera, when the captured face image is not obtained according to the image to be recognized, Obtaining a short video to be processed by the camera; determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as The photographing a face image is performed to determine whether the photographed face image matches a preset face image.
- FIG. 5 is a schematic structural diagram of hardware of a terminal provided by the present invention. As shown in FIG. 5, the terminal includes: a processor 511 and a memory 512;
- the memory 512 is configured to store a computer program, and the memory may also be a flash memory.
- the processor 511 is configured to execute execution instructions of the memory storage to implement various steps performed by the terminal in the home security method. For details, refer to the related description in the foregoing method embodiments.
- the memory 512 can be either stand-alone or integrated with the processor 511.
- the terminal may further include:
- a bus 513 is provided for connecting the memory 512 and the processor 511.
- the terminal of FIG. 5 may further include a transmitter (not shown) for transmitting the access key and the image to be processed generated by the processor 511 to the alarm server.
- the present invention further provides a readable storage medium having stored therein an execution instruction, and when the at least one processor of the terminal executes the execution instruction, the terminal executes the home security method provided by the various embodiments described above.
- the present invention also provides a program product comprising an execution instruction stored in a readable storage medium.
- At least one processor of the terminal can read the execution instructions from a readable storage medium, and the at least one processor executes the execution instructions such that the terminal implements the home security method provided by the various embodiments described above.
- the processor may be a central processing unit (English: Central Processing Unit, CPU for short), or may be other general-purpose processors, digital signal processors (English: Digital Signal Processor) , referred to as: DSP), ASIC (English: Application Specific Integrated Circuit, referred to as: ASIC).
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like. The steps of the method disclosed in connection with the present application may be directly embodied by hardware processor execution or by a combination of hardware and software modules in a processor.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Alarm Systems (AREA)
Abstract
Provided in the present invention are a home security method and a terminal. The home security method applies to the terminal. The terminal is provided with a photoelectric proximity sensor and a camera. The method comprises: acquiring a first object distance from the photoelectric proximity sensor; when an object is determined, on the basis of the first object distance, to be in proximity to the terminal, acquiring an image to be recognized corresponding to the object from the camera, the image to be recognized being an image photographed in the sensing direction of the photoelectric proximity sensor; when a photographed facial image is acquired on the basis of the image to be recognized, determining whether the photographed facial image matches a preset facial image; and if not, then raising an intrusion alarm. The present invention is such that when an object is determined to be in proximity to the terminal, the detected object in the front is immediately photographed with the camera to acquire an image to be recognized, thus allowing further analysis of the object causing a movement, and reducing false alarm rate.
Description
本申请涉及信号处理技术,尤其涉及一种家庭安防方法和终端。The present application relates to signal processing technologies, and in particular, to a home security method and terminal.
随着居民经济收入的提高、生活条件和质量的改善,安防报警系统的需求已经不再局限于国家重要部门和金融、文博等重要保护单位,更加低价的家庭安防系统已然应用到人们的日常生活中。现有的家庭安防系统在夜间防盗、远程监控等方面都具有广大的应用需求。With the improvement of residents' economic income, living conditions and quality, the demand for security alarm system is no longer limited to important national departments and important protection units such as finance and cultural resources. The low-cost family security system has been applied to people's daily life. in life. The existing home security system has a wide range of application requirements in night security and remote monitoring.
现有的家庭安防系统,主要是门禁系统、压力检测系统、热释电红外传感系统等安防组件,在门禁系统检测到破坏、压力检测系统检测到压力异常或者热释电红外传感系统检测到夜间有人进入,则立即报警。The existing home security system is mainly a security component such as an access control system, a pressure detection system, a pyroelectric infrared sensing system, a damage detected in the access control system, a pressure abnormality detected by the pressure detection system, or a pyroelectric infrared sensing system detection. When someone enters at night, they will immediately report to the police.
然而,在实际使用中,当家庭成员误触发家庭安防系统时,家庭安防系统会进行误报警,导致家庭安防系统可靠性不高。However, in actual use, when the family members mistakenly trigger the home security system, the home security system will make a false alarm, resulting in low reliability of the home security system.
发明内容Summary of the invention
本发明提供一种家庭安防方法和终端,以提高家庭安防的可靠性。The invention provides a home security method and terminal to improve the reliability of home security.
根据本发明的第一方面,提供一种家庭安防方法,应用于终端,所述终端设置有光电接近传感器、摄像头,所述方法包括:According to a first aspect of the present invention, a home security method is provided, which is applied to a terminal, and the terminal is provided with a photoelectric proximity sensor and a camera. The method includes:
从所述光电接近传感器获得第一物距;Obtaining a first object distance from the photoelectric proximity sensor;
在根据所述第一物距确定有物体接近所述终端时,从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;Obtaining an image to be recognized corresponding to the object from the camera when the object is determined to be close to the terminal according to the first object distance, and the image to be recognized is an image taken toward an sensing direction of the photoelectric proximity sensor;
在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,When obtaining a captured face image according to the image to be identified, determining whether the captured face image matches a preset face image,
若否,则进行入侵报警。If not, an intrusion alarm is issued.
作为本发明第一方面的一种实现方式,若所述拍摄人脸图像与预设人脸图像不匹配,所述方法还包括:As an implementation manner of the first aspect of the present invention, if the photographing face image does not match the preset face image, the method further includes:
从所述摄像头持续获取监控视频,并将持续获取的所述监控视频存储在本地;
Obtaining a monitoring video from the camera continuously, and storing the continuously acquired monitoring video locally;
向预设的报警服务器发送所述终端的接入密钥和所述待识别图像;Sending an access key of the terminal and the image to be identified to a preset alarm server;
在接收到所述报警服务器发送的视频获取请求时,判断所述视频获取请求是否包含所述接入密钥,When receiving the video acquisition request sent by the alarm server, determining whether the video acquisition request includes the access key,
若是,则将存储在本地的所述监控视频发送给所述报警服务器。If so, the monitoring video stored locally is sent to the alarm server.
作为一种实现方式,所述进行入侵报警包括:播放预设的报警音频;As an implementation manner, the performing an intrusion alarm includes: playing a preset alarm audio;
和/或,以预设的报警号码拨打电话。And/or, make a call with a preset alarm number.
作为一种实现方式,所述从所述光电接近传感器获得第一物距,包括:As an implementation manner, the obtaining the first object distance from the photoelectric proximity sensor comprises:
将在初始化时刻从所述光电接近传感器获得的物距,确定为第二物距;Determining an object distance obtained from the photoelectric proximity sensor at an initialization time as a second object distance;
将在所述初始化时刻之后从所述光电接近传感器获得的物距,确定为所述第一物距;Determining an object distance obtained from the photoelectric proximity sensor after the initialization time as the first object distance;
相应地,所述根据所述第一物距确定有物体接近所述终端,包括:Correspondingly, determining that an object is close to the terminal according to the first object distance comprises:
判断所述第一物距是否小于所述第二物距;Determining whether the first object distance is smaller than the second object distance;
若是,则确定有物体接近所述终端。If so, it is determined that an object is in proximity to the terminal.
作为一种实现方式,所述在判断所述第一物距是否小于所述第二物距之前,还包括:As an implementation manner, before determining whether the first object distance is smaller than the second object distance, the method further includes:
判断在预设时间段内获得的多个所述第一物距是否一致;Determining whether the plurality of the first object distances obtained in the preset time period are consistent;
若否,则从所述多个所述第一物距中获取最小第一物距;If not, obtaining a minimum first object distance from the plurality of the first object distances;
相应地,所述判断所述第一物距是否小于所述第二物距,包括:Correspondingly, determining whether the first object distance is smaller than the second object distance comprises:
判断所述最小第一物距是否小于所述第二物距。Determining whether the minimum first object distance is less than the second object distance.
作为一种实现方式,在所述从所述光电接近传感器获得第一物距之前,还包括:As an implementation manner, before the obtaining the first object distance from the photoelectric proximity sensor, the method further includes:
根据用户输入的安防模式设置信息,将所述光电接近传感器的发射功率调整为预设的安防功率,其中,所述光电接近传感器设置为所述预设的安防功率时,所述光电接近传感器的最大感应距离大于或等于2米。Adjusting, according to the security mode setting information input by the user, the transmit power of the photoelectric proximity sensor to a preset security power, wherein when the photoelectric proximity sensor is set to the preset security power, the photoelectric proximity sensor The maximum sensing distance is greater than or equal to 2 meters.
作为一种实现方式,所述从所述摄像头获得所述物体对应的待识别图像之后,还包括:As an implementation manner, after the obtaining, by the camera, the image to be identified corresponding to the object, the method further includes:
在根据所述待识别图像没有获得所述拍摄人脸图像时,从所述摄像头获取待处理短视频;Obtaining a short video to be processed from the camera when the captured face image is not obtained according to the image to be identified;
判断所述待处理短视频是否包含视频人脸图像,若是,则从所述待处理短视频中获取所述视频人脸图像,并将所述视频人脸图像确定为所述拍摄人脸图像,执行所述判断所述拍摄人脸图像是否与预设人脸图像匹配。
Determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as the captured face image, Performing the determination of whether the captured face image matches the preset face image.
根据本发明的第二方面,提供了一种终端,包括:According to a second aspect of the present invention, a terminal is provided, comprising:
物距获得模块,用于从光电接近传感器获得第一物距;a distance obtaining module for obtaining a first object distance from the photoelectric proximity sensor;
待识别图像获得模块,用于在根据所述第一物距确定有物体接近所述终端时,从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;An image recognition module to be identified, configured to obtain, from the camera, an image to be recognized corresponding to the object when an object is determined to be close to the terminal according to the first object distance, the image to be recognized is approaching the photoelectric An image taken in the direction of sensing of the sensor;
报警模块,用于在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,若否,则进行入侵报警。The alarm module is configured to determine whether the captured face image matches the preset face image when the captured face image is obtained according to the to-be-identified image, and if not, perform an intrusion alarm.
作为一种实现方式,所述报警模块还用于:As an implementation manner, the alarm module is further configured to:
从所述摄像头持续获取监控视频,并将持续获取的所述监控视频存储在本地;向预设的报警服务器发送所述终端的接入密钥和所述待识别图像;在接收到所述报警服务器发送的视频获取请求时,判断所述视频获取请求是否包含所述接入密钥,若是,则将存储在本地的所述监控视频发送给所述报警服务器。Obtaining a monitoring video from the camera, and storing the continuously acquired monitoring video locally; transmitting an access key of the terminal and the image to be recognized to a preset alarm server; receiving the alarm When the video acquisition request sent by the server determines whether the video acquisition request includes the access key, if yes, the monitoring video stored locally is sent to the alarm server.
作为一种实现方式,所述报警模块用于:播放预设的报警音频;和/或,以预设的报警号码拨打电话。As an implementation manner, the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
作为一种实现方式,报警模块还用于:As an implementation, the alarm module is also used to:
从所述摄像头持续获取监控视频,并将持续获取的所述监控视频存储在本地;向预设的报警服务器发送所述终端的接入密钥和所述待识别图像;在接收到所述报警服务器发送的视频获取请求时,判断所述视频获取请求是否包含所述接入密钥,若是,则将存储在本地的所述监控视频发送给所述报警服务器。Obtaining a monitoring video from the camera, and storing the continuously acquired monitoring video locally; transmitting an access key of the terminal and the image to be recognized to a preset alarm server; receiving the alarm When the video acquisition request sent by the server determines whether the video acquisition request includes the access key, if yes, the monitoring video stored locally is sent to the alarm server.
作为一种实现方式,报警模块用于:播放预设的报警音频;和/或,以预设的报警号码拨打电话。As an implementation manner, the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
作为一种实现方式,物距获得模块用于:As an implementation, the object distance obtaining module is used to:
将在初始化时刻从所述光电接近传感器获得的物距,确定为第二物距;将在所述初始化时刻之后从所述光电接近传感器获得的物距,确定为所述第一物距。The object distance obtained from the photoelectric proximity sensor at the initialization time is determined as the second object distance; the object distance obtained from the photoelectric proximity sensor after the initialization time is determined as the first object distance.
相应地,待识别图像获得模块用于:判断所述第一物距是否小于所述第二物距;若是,则确定有物体接近所述终端。Correspondingly, the image recognition module to be identified is configured to: determine whether the first object distance is smaller than the second object distance; if yes, determine that an object is close to the terminal.
作为一种实现方式,待识别图像获得模块具体用于:判断在预设时间段内获得的多个所述第一物距是否一致;若否,则从所述多个所述第一物距中获取最小第一物距;判断所述最小第一物距是否小于所述第二物距。As an implementation manner, the image obtaining module to be identified is specifically configured to: determine whether a plurality of the first object distances obtained in a preset time period are consistent; if not, from the plurality of the first object distances Obtaining a minimum first object distance; determining whether the minimum first object distance is smaller than the second object distance.
作为一种实现方式,还包括模式设置模块,用于在所述从所述光电接近传感器获
得第一物距之前,根据用户输入的安防模式设置信息,将所述光电接近传感器的发射功率调整为预设的安防功率,其中,所述光电接近传感器设置为所述预设的安防功率时,所述光电接近传感器的最大感应距离大于或等于2米。As an implementation manner, a mode setting module is further included for obtaining the photo proximity sensor from the
Before the first object distance is obtained, the transmit power of the photoelectric proximity sensor is adjusted to a preset security power according to the security mode setting information input by the user, wherein when the photoelectric proximity sensor is set to the preset security power The maximum proximity distance of the photoelectric proximity sensor is greater than or equal to 2 meters.
作为一种实现方式,报警模块还用于,在从所述摄像头获得所述物体对应的待识别图像之后,在根据所述待识别图像没有获得所述拍摄人脸图像时,从所述摄像头获取待处理短视频;判断所述待处理短视频是否包含视频人脸图像,若是,则从所述待处理短视频中获取所述视频人脸图像,并将所述视频人脸图像确定为所述拍摄人脸图像,执行所述判断所述拍摄人脸图像是否与预设人脸图像匹配。As an implementation manner, the alarm module is further configured to: after obtaining the image to be recognized corresponding to the object from the camera, acquire the image from the camera when the captured face image is not obtained according to the image to be identified a short video to be processed; determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as the The face image is photographed, and it is determined whether the photographed face image matches the preset face image.
根据本发明的第三方面,提供一种终端,包括:存储器、处理器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行第一方面及第一方面各种可能的设计的所述家庭安防方法。According to a third aspect of the present invention, a terminal is provided, comprising: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, the processor running the computer program to execute the first aspect and the first The home security method described in various possible aspects.
根据本发明的第四方面,提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现第一方面及第一方面各种可能的设计所述家庭安防方法。According to a fourth aspect of the present invention, there is provided a storage medium comprising: a readable storage medium and a computer program for implementing the first aspect and the first aspect of the various aspects of the home security method.
本发明首先从所述光电接近传感器获得第一物距;并且在根据所述第一物距确定有物体接近所述终端时,从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;在确定有物体接近终端时立即以摄像头对前方被检测到的物体进行拍摄,获得待识别图像,可以对造成移动的物体进一步进行分析,降低误报率;然后在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,若否,表明进入的是陌生人,则进行入侵报警,提高了家庭安防的可靠性。The invention first obtains a first object distance from the photoelectric proximity sensor; and when an object is determined to be close to the terminal according to the first object distance, obtaining an image to be recognized corresponding to the object from the camera, the to-be-identified image The recognition image is an image taken toward the sensing direction of the photoelectric proximity sensor; when it is determined that an object approaches the terminal, the camera detects the object detected in front, and obtains the image to be recognized, which can further analyze the object causing the movement. And reducing the false alarm rate; then, when obtaining the captured face image according to the image to be identified, determining whether the captured face image matches the preset face image, and if not, indicating that the stranger is entering, invading Alarms improve the reliability of home security.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are Some embodiments of the present invention may also be used to obtain other drawings based on these drawings without departing from the art.
图1是本发明实施例提供一种家庭安防应用场景示意图;FIG. 1 is a schematic diagram of a home security application scenario according to an embodiment of the present invention; FIG.
图2是本发明实施例的一种家庭安防方法流程示意图;2 is a schematic flow chart of a home security method according to an embodiment of the present invention;
图3是本发明实施例的另一种家庭安防方法流程示意图;3 is a schematic flow chart of another home security method according to an embodiment of the present invention;
图4是本发明实施例的一种终端结构示意图;
4 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
图5为本发明提供的一种终端的硬件结构示意图。FIG. 5 is a schematic structural diagram of hardware of a terminal provided by the present invention.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is only a part of the embodiments of the invention, not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。The terms "first" and "second" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or order. It is to be understood that the data so used may be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in a sequence other than those illustrated or described herein.
应当理解,本文中使用的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It is to be understood that the terms "comprises" and "comprises" and "the" and "the" Those steps or units that are clearly listed may include other steps or units that are not explicitly listed or inherent to such processes, methods, products, or devices.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。It should be understood that the term "and/or" as used herein is merely an association describing the associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, while A and B, there are three cases of B alone.
取决于语境,如在此所使用的“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。Depending on the context, "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting."
应当理解,本申请中A与B的匹配,是A与B的相似度大于或等于预设的阈值。It should be understood that the matching between A and B in the present application is that the similarity between A and B is greater than or equal to a preset threshold.
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present invention will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in some embodiments.
图1是本发明实施例提供一种家庭安防应用场景示意图。如图1所示的应用场景中,本实施例中以终端为手机11,并且应用在卧室进行示例。在监护人员需要出门,老人或者幼童自己在卧室睡觉的情况下,监护人员开启手机11的安防功能后,将手机11放在靠近门13的支架上,以使得手机11的摄像头朝向进门方向,传感器的感应区域12在进门的方向。手机的光电接近传感器的感应方向与摄像头的拍摄方向一致。若手机11检测到有人进入卧室,且进入的人无法与手机中预存储的家人图像匹配,则向
监护人员拨打电话并开启摄像头的录像功能。监护人员使用手机实现安防功能,可以根据环境需要调整手机11的安置位置。FIG. 1 is a schematic diagram of a home security application scenario according to an embodiment of the present invention. In the application scenario shown in FIG. 1 , in this embodiment, the terminal is the mobile phone 11 and the application is applied in the bedroom. In the case that the guardian needs to go out and the old man or the young child sleeps in the bedroom himself, after the guardian turns on the security function of the mobile phone 11, the mobile phone 11 is placed on the bracket close to the door 13 so that the camera of the mobile phone 11 faces the door. The sensing area 12 of the sensor is in the direction of the door entry. The photoelectric proximity sensor's sensing direction of the mobile phone is consistent with the shooting direction of the camera. If the mobile phone 11 detects that someone has entered the bedroom and the entering person cannot match the pre-stored family image in the mobile phone, then
The guardian makes a call and turns on the video recording function of the camera. The guardian uses the mobile phone to implement the security function, and can adjust the placement position of the mobile phone 11 according to the needs of the environment.
除了图1所示的应用场景以外,本发明提供的终端也可以实现旅馆住宿时的临时安防。将手机放在靠近门的座椅等家具上,以摄像头的照相功能调节朝向进门位置,就可以简单地实现安全防护,在出现入侵时及时预警。由于手机的便携性以及广泛使用的特点,本发明提供的方法和终端能够为用户提供一种易于使用的安防方案。下面采用详细的实施例进行说明。In addition to the application scenario shown in FIG. 1, the terminal provided by the present invention can also implement temporary security during hotel accommodation. Put the mobile phone on the furniture such as the seat near the door, and adjust the camera's camera function to the door position, you can simply realize the safety protection, and promptly warn when there is an invasion. Due to the portability of the mobile phone and the features of widespread use, the method and terminal provided by the present invention can provide an easy-to-use security solution for the user. The following is a detailed description of the embodiments.
图2是本发明实施例的一种家庭安防方法流程示意图。图2所示的方法应用于终端,所述终端设置有光电接近传感器、摄像头。该终端可以是移动终端。移动终端包括但不限于手机、个人数字助理(Personal Digital Assistant,PDA)、平板电脑、便携设备(例如,便携式计算机、袖珍式计算机或手持式计算机)等具有图像采集功能的移动设备。本发明实施例对终端的形式并不限定。图2所示方法包括:2 is a schematic flow chart of a home security method according to an embodiment of the present invention. The method shown in FIG. 2 is applied to a terminal provided with a photoelectric proximity sensor and a camera. The terminal can be a mobile terminal. Mobile terminals include, but are not limited to, mobile devices, personal digital assistants (PDAs), tablets, portable devices (eg, portable computers, pocket computers, or handheld computers) with mobile devices having image capture capabilities. The embodiment of the present invention does not limit the form of the terminal. The method shown in Figure 2 includes:
S110,从光电接近传感器获得第一物距。S110, obtaining a first object distance from the photoelectric proximity sensor.
具体地,终端可以是预设有普通模式和安防模式。用户在需要使用终端的安防功能时,向终端输入安防模式设置信息以使得安防功能开启,或者开启后进行设置。输入安防模式设置信息的方式例如,用户将预设的安防功能按钮开启,或者是用户通过做出预设的手势动作开启安防功能,又或者是用户以预设频率晃动终端,其中,预设的手势动作可以是在屏幕上以预订轨迹滑动。终端根据用户输入的安防模式设置信息,将光电接近传感器的发射功率调整为预设的安防功率,其中,光电接近传感器设置为预设的安防功率时,光电接近传感器的最大感应距离大于或等于2米。明显地,与处于普通模式相比较,光电接近传感器处于安防模式下的发射功率更高。Specifically, the terminal may be pre-configured with a normal mode and a security mode. When the user needs to use the security function of the terminal, the security mode setting information is input to the terminal to enable the security function to be turned on, or to be set after being turned on. The manner of inputting the security mode setting information is, for example, the user turns on the preset security function button, or the user activates the security function by making a preset gesture action, or the user shakes the terminal at a preset frequency, wherein the preset The gesture action can be to slide on the screen with a predetermined trajectory. The terminal adjusts the transmit power of the photoelectric proximity sensor to a preset security power according to the security mode setting information input by the user, wherein when the photoelectric proximity sensor is set to the preset security power, the maximum sensing distance of the photoelectric proximity sensor is greater than or equal to 2 Meter. Obviously, the transmit power of the photo proximity sensor in the security mode is higher compared to the normal mode.
其中,光电接近传感器根据电信号的收发时间差,获得被检测的物体与终端之间的第一物距。本实施例中光电接近传感器包括光发射器、光接收器和检测电路,检测电路与光接收器连接。光发射器可以是发光二极管(Light Emitting Diode,简称LED),也可以是半导体激光管。光接收器可以是光电三极管,且光接收器的接收波段与光发射器的发射波段相重叠。以光发射器为LED、光接收器为光电三极管为例对本实施例中的光电接近传感器进行说明。光电接近传感器中,LED的光束轴线和光电三极管的轴线在一个平面上,并成一定的夹角,两轴线在光电接近传感器的前方交于一点。当物体到达交点位置或者经过交点接近光电接近传感器时,发光二极管发出的光被物体表面反射,反射光被光电三极管接收,与光电三极管连接的检测电路产生电信号。当
物体远离交点时,反射区不在光电三极管的视角内,检测电路没有输出。进一步地,发光二极管的驱动电流可以是一定频率的交变电流,以使得接收电路得到的也是同频率的交变信号。如果对接收来的信号进行滤波,只允许同频率的信号通过,可以有效地防止其他杂光的干扰。本实施例中光电接近传感器发出的光可以是红外光,接收器相应地为红外接收器,可以降低周围环境中光干扰。Wherein, the photoelectric proximity sensor obtains the first object distance between the detected object and the terminal according to the time difference of the transmission and reception of the electrical signal. In this embodiment, the photoelectric proximity sensor comprises a light emitter, a light receiver and a detection circuit, and the detection circuit is connected to the light receiver. The light emitter can be a Light Emitting Diode (LED) or a semiconductor laser tube. The light receiver may be a phototransistor, and the receiving band of the light receiver overlaps with the emission band of the light emitter. The photoelectric proximity sensor in this embodiment will be described by taking an optical transmitter as an LED and a photoreceiver as a phototransistor as an example. In the photoelectric proximity sensor, the beam axis of the LED and the axis of the phototransistor are in a plane at a certain angle, and the two axes intersect at a point in front of the photoelectric proximity sensor. When the object reaches the intersection position or approaches the photoelectric proximity sensor through the intersection point, the light emitted by the LED is reflected by the surface of the object, the reflected light is received by the phototransistor, and the detection circuit connected to the phototransistor generates an electrical signal. when
When the object is far away from the intersection, the reflection area is not within the angle of view of the phototransistor, and the detection circuit has no output. Further, the driving current of the light emitting diode may be an alternating current of a certain frequency, so that the receiving circuit obtains an alternating signal of the same frequency. If the received signal is filtered, only signals of the same frequency are allowed to pass, which can effectively prevent interference of other stray light. In this embodiment, the light emitted by the photoelectric proximity sensor may be infrared light, and the receiver is correspondingly an infrared receiver, which can reduce light interference in the surrounding environment.
S120,在根据第一物距确定有物体接近终端时,从摄像头获得物体对应的待识别图像。S120. When it is determined that an object approaches the terminal according to the first object distance, obtain an image to be recognized corresponding to the object from the camera.
其中,待识别图像为朝向光电接近传感器的感应方向拍摄的图像。Wherein, the image to be recognized is an image taken toward the sensing direction of the photoelectric proximity sensor.
具体地,在确定有物体接近终端时,可能是有人靠近,也可能是门被风吹开、纸张飘落等产生的动作,此时如果直接确定为入侵,则将造成误报,对用户造成干扰。本实施例在确定有物体接近终端时立即以摄像头对前方被检测到的物体进行拍摄,获得待识别图像,可以对造成移动的物体进一步进行分析,降低误报率。其中,根据第一物距确定有物体接近终端的实现方式,可以是以实时获得的第一物距与固定设置的阈值进行比较,小于阈值则表明有物体接近;也可以是将先后获得的第一物距进行相互比较,若后获得的第一物距比先获得的第一物距更小,也表明有物体接近。Specifically, when it is determined that an object is close to the terminal, it may be that someone is approaching, or the door may be blown by the wind, the paper is falling, etc., and if it is directly determined to be an intrusion, it will cause a false alarm and cause interference to the user. . In this embodiment, when an object is determined to be close to the terminal, the camera detects the object detected in front, and obtains the image to be recognized, so that the object causing the movement can be further analyzed to reduce the false alarm rate. Wherein, according to the first object distance, an implementation manner of the object approaching the terminal is determined, and the first object distance obtained in real time may be compared with a fixed setting threshold value, and less than the threshold value indicates that an object is close to the object; An object distance is compared with each other, and if the first object distance obtained later is smaller than the first object distance obtained first, it also indicates that an object is close.
S130,在根据待识别图像获得拍摄人脸图像时,判断拍摄人脸图像是否与预设人脸图像匹配,若是,则执行S140,若否,则执行S150。S130. Determine whether the captured face image matches the preset face image when the captured face image is obtained according to the image to be recognized. If yes, execute S140, if no, execute S150.
具体地,终端获得待识别图像后,先对待识别图像进行是否包含人脸的识别,若待识别图像包含人脸,则进行图像处理获得拍摄人脸图像;若待识别图像不包含人脸,根据待识别图像无法获得拍摄人脸图像时,则可以进行下面两种实现方式之一:一种实现方式中,认为不是有人进入的情况,则返回S120,继续监测是否有物体接近。另一种实现方式中,认为可能没有拍摄到人脸或者类似人脸的图像,则从摄像头获取待处理短视频。待处理短视频可以是快速抓取的一段时间较短的视频,例如10秒时长的待处理短视频。然后判断待处理短视频是否包含视频人脸图像,对待处理短视频进行是否包含人脸的检索和识别,若待处理短视频包含视频人脸图像,表明待处理短视频的至少一个帧图像中拍摄到了人脸图像,则从待处理短视频中获取视频人脸图像,并将视频人脸图像确定为拍摄人脸图像。视频人脸图像是待处理短视频中包含有人脸图像的帧图像。进一步地,视频人脸图像可以是待处理短视频中包含最完整人脸图像的帧图像。获得视频人脸图像之后,将视频人脸图像确定为拍摄人脸图像,判断拍摄人脸图像是否与预设人脸图像匹配。若果在待处理短视频中无法检索到人脸图像,表明
不是有人进入的情况,则返回S120,继续监测是否有物体接近。Specifically, after obtaining the image to be identified, the terminal first determines whether the recognized image includes a face, and if the image to be recognized includes a face, performing image processing to obtain a captured face image; if the image to be recognized does not include a face, according to When the image to be recognized cannot obtain the captured face image, one of the following two implementation manners may be performed: In an implementation manner, if it is considered that no one has entered, the process returns to S120 to continue monitoring whether an object is approaching. In another implementation manner, it is considered that an image of a human face or a similar human face may not be captured, and the short video to be processed is acquired from the camera. The short video to be processed may be a short-lived video that is quickly captured, such as a short video to be processed of 10 seconds. Then, it is determined whether the short video to be processed includes a video face image, whether the short video to be processed includes the retrieval and recognition of the face, and if the short video to be processed includes the video face image, indicating that at least one frame image of the short video to be processed is captured. When the face image is reached, the video face image is obtained from the short video to be processed, and the video face image is determined as the captured face image. The video face image is a frame image containing a face image in a short video to be processed. Further, the video face image may be a frame image containing the most complete face image in the short video to be processed. After obtaining the video face image, the video face image is determined as the captured face image, and it is determined whether the captured face image matches the preset face image. If the face image cannot be retrieved in the short video to be processed, it indicates
If there is no entry, return to S120 and continue to monitor if there is an object approaching.
用户可以在终端中预先存储有人脸图像,通常可以是存储常住的家人脸部图像,在亲友借宿期间还可以加上亲友的脸部图像。在获得到拍摄人脸图像时,表明有人进入,通过进一步判断拍摄人脸图像是否与预设人脸图像匹配,可以确定进来的人是不是预设的亲友。The user can pre-store the face image in the terminal, and usually can store the facial image of the family member who is often resident, and can also add the face image of the relatives and friends during the stay of the relatives and friends. When the image of the face is obtained, it indicates that someone enters, and by further determining whether the captured face image matches the preset face image, it can be determined whether the incoming person is a preset relative or friend.
S140,不处理并继续执行S110。S140, does not process and continues to execute S110.
若拍摄人脸图像与预设人脸图像匹配,则进入的是预设的亲友,不能认为是发生入侵,不进行处理。If the photographed face image matches the preset face image, the entered relatives and friends are entered, and it cannot be considered that the intrusion occurs and no processing is performed.
S150,进行入侵报警。S150, an intrusion alarm is performed.
若拍摄人脸图像与预设人脸图像不匹配,则进入的不是预设的亲友,而是陌生人入侵,终端立即进行入侵报警。进行入侵报警的方式具体可以是以下的一种或者两种的结合。If the captured face image does not match the preset face image, then the entry is not the preset relatives and friends, but the stranger invades, and the terminal immediately performs an intrusion alarm. The manner of performing the intrusion alarm may specifically be one or a combination of the following.
一种入侵报警的方式是播放预设的报警音频。例如用户预先录制语音或者音乐作为报警音频,在进行入侵报警时播放预先录制的语音或者音乐。在夜间入侵的情况中,在入侵初期通过播放报警音频可以起到吓退犯罪分子的目的,提高安防效果。One way to invade an alarm is to play a preset alarm tone. For example, the user pre-records voice or music as alarm audio, and plays pre-recorded voice or music when performing an intrusion alarm. In the case of nighttime intrusion, by playing the alarm audio in the early stage of the invasion, it can serve the purpose of scaring off criminals and improving the security effect.
另一种入侵报警的方式是以预设的报警号码拨打电话。预设的报警电话可以是其他家人、监护人的电话号码,也可以是报警中心的电话号码,例如110。若家中老人或孩童单独在家,与通知在家的用户抵御入侵者相比,及时通知监护人或者报警中心会更加安全。Another way to invade an alarm is to make a call with a preset alarm number. The preset alarm call can be the phone number of other family members, guardians, or the phone number of the alarm center, for example, 110. If the elderly or children in the family are alone at home, it is safer to notify the guardian or the alarm center in time than to notify the user at home to defend against the intruder.
本实施例首先从所述光电接近传感器获得第一物距;并且在根据所述第一物距确定有物体接近所述终端时,从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;在确定有物体接近终端时立即以摄像头对前方被检测到的物体进行拍摄,获得待识别图像,可以对造成移动的物体进一步进行分析,降低误报率;然后在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,若否,表明进入的是陌生人,则进行入侵报警,提高了家庭安防的可靠性。In this embodiment, a first object distance is first obtained from the photoelectric proximity sensor; and when an object is determined to be close to the terminal according to the first object distance, an image to be recognized corresponding to the object is obtained from the camera, The image to be recognized is an image taken toward the sensing direction of the photoelectric proximity sensor; when it is determined that an object approaches the terminal, the camera detects the object detected in front, and obtains the image to be recognized, which can further perform the moving object. Analysis, reducing the false positive rate; then, when obtaining the captured face image according to the image to be identified, determining whether the captured face image matches the preset face image, and if not, indicating that the stranger is entering, proceeding Intrusion alarms improve the reliability of home security.
在图2所示的实施例中,在拍摄人脸图像与预设人脸图像不匹配时,除了进行入侵预警以外,还可以有向警方提供监控视频的方法步骤。下面结合图3对拍摄人脸图像与预设人脸图像不匹配时,向警方提供监控视频的方法进行说明。In the embodiment shown in FIG. 2, in addition to performing an intrusion warning, there may be a method step of providing a surveillance video to the police when the captured face image does not match the preset face image. A method of providing a monitoring video to the police when the photographing face image does not match the preset face image will be described below with reference to FIG.
图3是本发明实施例的另一种家庭安防方法流程示意图。图3所示方法包括:
FIG. 3 is a schematic flow chart of another home security method according to an embodiment of the present invention. The method shown in Figure 3 includes:
S210,从摄像头持续获取监控视频,并将持续获取的监控视频存储在本地。S210: continuously obtain monitoring video from the camera, and store the continuously acquired monitoring video locally.
具体地,在拍摄人脸图像与预设人脸图像不匹配时,表明有陌生人进入,终端立即从摄像头开始持续获取监控视频。监控视频的开始时刻是在确定拍摄人脸图像与预设人脸图像不匹配的时刻。在拍摄监控视频过程,终端还可以不在屏幕或信号灯进行任何提示,以避免入侵的犯罪分子通过终端的特殊显示发现正在录制监控视频。监控视频的连续获取操作,可以是在用户输入停止信息时才结束,也可以是强制执行直到终端没电自动关机为止。用户输入停止信息可以是用户的手势操作信息,也可以是用户向终端输入预设的语音信息,还可以是用户以预设评论晃动终端。Specifically, when the photographing face image does not match the preset face image, it indicates that a stranger enters, and the terminal immediately obtains the monitoring video from the camera. The start time of the surveillance video is the moment when it is determined that the captured face image does not match the preset face image. During the process of shooting the surveillance video, the terminal may also not make any prompts on the screen or the signal light to prevent the invading criminals from discovering that the surveillance video is being recorded through the special display of the terminal. The continuous acquisition operation of the monitoring video may be ended when the user inputs the stop information, or may be forced until the terminal is powered off automatically. The user input stop information may be the gesture operation information of the user, or the user may input the preset voice information to the terminal, or the user may shake the terminal by using the preset comment.
S220,向预设的报警服务器发送终端的接入密钥和待识别图像。S220. Send the access key of the terminal and the image to be recognized to the preset alarm server.
其中,报警服务器可以是警方的服务器,也可以是安防服务供应商的服务器。本实施例以报警服务器是警方的服务器为例进行说明。终端将待识别图像发送给报警服务器,一方面可以作为后续入侵报警的司法证据,另一方面可以作为警方对终端是否识别到真正的入侵行为的初步判断依据,降低误报率。The alarm server may be a server of the police or a server of the security service provider. This embodiment is described by taking the alarm server as a police server as an example. The terminal sends the image to be identified to the alarm server, which can be used as judicial evidence for subsequent intrusion alarms. On the other hand, it can be used as a preliminary judgment basis for the police to identify whether the terminal actually invades the behavior, and reduce the false alarm rate.
S230,在接收到报警服务器发送的视频获取请求时,判断视频获取请求是否包含接入密钥,若是,则执行S240,若否,则执行S250。S230: When receiving the video acquisition request sent by the alarm server, determine whether the video acquisition request includes the access key, and if yes, execute S240; if no, execute S250.
报警服务器在收到接入密钥和待识别图像之后,人工对待识别图像进行初步判断,若初步判断为可能是入侵行为,则向终端发送包含接入密钥的视频获取请求,以使得终端将持续获得的监控视频传输给报警服务器。After receiving the access key and the image to be identified, the alarm server manually determines the image to be recognized. If it is initially determined that the intrusion is possible, the terminal sends a video acquisition request including the access key to the terminal, so that the terminal will The continuously acquired surveillance video is transmitted to the alarm server.
S240,将存储在本地的监控视频发送给报警服务器。S240: Send the monitoring video stored locally to the alarm server.
具体地,在视频获取请求中的接入密钥是终端发出的接入密钥时,表明请求方合法,则将本地存储的监控视频发送给报警服务器。其中,终端仍旧还在持续获取监控视频,所以在本地原本存储的监控视频传输完毕之后,终端还会将从摄像头获得的新的监控视频继续向报警服务器传输,直到报警服务器发来终止传输的指示信号。Specifically, when the access key in the video acquisition request is an access key sent by the terminal, indicating that the requesting party is legal, the locally stored monitoring video is sent to the alarm server. The terminal still obtains the monitoring video continuously, so after the local stored monitoring video is transmitted, the terminal will continue to transmit the new monitoring video obtained from the camera to the alarm server until the alarm server sends an instruction to terminate the transmission. signal.
为了降低误报警的可能,避免警方错误出警,终端向警方提供监控视频,警方在监控视频中可以看到和听到报警的终端周围画面,若看到或者听到明显入室盗窃或入室抢劫的信息,则可以立即出警,如果没有看到或者听到明显入室盗窃或入室抢劫的信息,还可以向终端打电话询问情况,避免误报警导致的警力浪费。监控视频同样也可以作为后续入侵报警的司法证据,并且比图片包含更多的信息。In order to reduce the possibility of false alarms and avoid police errors, the terminal provides surveillance video to the police. The police can see and hear the alarm around the terminal in the surveillance video. If you see or hear the obvious burglary or burglary information. , you can immediately get out of the police, if you do not see or hear the obvious burglary or burglary information, you can also call the terminal to ask about the situation, to avoid the waste of police force caused by false alarms. The surveillance video can also be used as a judicial evidence for subsequent intrusion alarms and contains more information than the picture.
S250,拒绝请求。S250, reject the request.
在接入密钥错误,或者视频获取请求中没有包含接入密钥时,表明请求方非法,
可能是非警方的其他用户想要获得终端中的监控视频,终端拒绝请求。具体地,拒绝请求的方式可以是向报警服务器反馈拒绝信息,也可以是不反馈任何信息。If the access key is incorrect, or the access key is not included in the video acquisition request, it indicates that the requesting party is illegal.
It may be that other users who are not police want to obtain surveillance video in the terminal, and the terminal rejects the request. Specifically, the manner of rejecting the request may be to feed back the rejection information to the alarm server, or may not feedback any information.
本实施例在拍摄人脸图像与预设人脸图像不匹配时,从摄像头获得监控视频,并且将待识别图像和监控视频发送给报警服务器。本实施例为警方提供图像和视频,以便初步判定是否有入侵行为发生,降低误报警率。In this embodiment, when the photographing face image does not match the preset face image, the monitoring video is obtained from the camera, and the image to be recognized and the monitoring video are sent to the alarm server. This embodiment provides images and videos for the police to initially determine whether an intrusion has occurred and reduce the false alarm rate.
在上述图2和图3实施例的基础上,下面对从光电接近传感器获得第一物距实现方式进行详细说明。Based on the above-described embodiments of Figs. 2 and 3, the implementation of the first object distance from the photoelectric proximity sensor will be described in detail below.
在具体实现过程中,将在初始化时刻从光电接近传感器获得的物距,确定为第二物距,以及将在初始化时刻之后从光电接近传感器获得的物距,确定为第一物距。其中,初始化时刻可以是用户开启安防模式,并且从摄像头获取的图像静止之后。例如,用户将终端安置在支架上,终端在门关上后开始计时,在10分钟内拍摄到的画面都是静止画面,则在第11分钟到达初始化时刻,获取第二物距。在经过第11分钟后,开始获取第一物距。In a specific implementation process, the object distance obtained from the photoelectric proximity sensor at the initialization time is determined as the second object distance, and the object distance obtained from the photoelectric proximity sensor after the initialization time is determined as the first object distance. The initialization time may be that the user turns on the security mode, and the image acquired from the camera is still after. For example, the user places the terminal on the bracket, and the terminal starts timing after the door is closed, and the pictures captured within 10 minutes are all still pictures, then the initialization time is reached at the 11th minute to obtain the second object distance. After the 11th minute, the first object distance is acquired.
相应地,在确定是否有物体接近终端时,可以对第一物距和第二物距进行对比,根据对比结果,以确定是否有物体接近终端。Correspondingly, when determining whether an object is close to the terminal, the first object distance and the second object distance can be compared, and based on the comparison result, it is determined whether an object is close to the terminal.
具体地,在获得第一物距后,首先判断第一物距是否小于第二物距;若是,则确定有物体接近终端,若否,则确定没有物体接近终端。本实施例中确定有物体接近终端的方法是根据当前环境来确定的,不同环境下得到的第二物距和第一物距都不同,本实施例提高了终端进行安全防卫的灵活性,适用多种应用场景。Specifically, after obtaining the first object distance, it is first determined whether the first object distance is smaller than the second object distance; if so, it is determined that an object is close to the terminal, and if not, it is determined that no object is close to the terminal. In this embodiment, the method for determining that an object is close to the terminal is determined according to the current environment, and the second object distance and the first object distance obtained in different environments are different. This embodiment improves the flexibility of the terminal for security defense, and is applicable. A variety of application scenarios.
在上述实施例的基础上,为了降低计算的复杂程度,减少终端的计算量,在进行第一物距是否小于第二物距的判断之前,还可以引入周期计算的方式。以预设时间段为一个计算周期,首先判断在预设时间段内获得的多个第一物距是否一致;若否,则从多个第一物距中获取最小第一物距。相应地,判断第一物距是否小于第二物距,就可以简化为:判断最小第一物距是否小于第二物距。本实施例中无需对每一次获得的第一物距进行是否小于第二物距的判断,而是在预设时间段结束后,在预设时间段内获得的所有第一物距中选取最小的第一物距,再与第二物距进行比较,因此将实时计算转变为了以预设时间段为周期的周期计算,降低了计算负担。On the basis of the foregoing embodiment, in order to reduce the complexity of the calculation and reduce the calculation amount of the terminal, a method of calculating the period may be introduced before the determination that the first object distance is smaller than the second object distance. Taking a preset time period as a calculation period, first determining whether a plurality of first object distances obtained in the preset time period are consistent; if not, acquiring a minimum first object distance from the plurality of first object distances. Correspondingly, determining whether the first object distance is smaller than the second object distance can be simplified as: determining whether the minimum first object distance is smaller than the second object distance. In this embodiment, it is not necessary to determine whether the first object distance obtained each time is smaller than the second object distance, but after the preset time period ends, select the smallest of all the first object distances obtained in the preset time period. The first object distance is compared with the second object distance, so the real-time calculation is converted into a period calculation with a preset time period as a cycle, which reduces the computational burden.
图4是本发明实施例的一种终端结构示意图。如图4所示的终端,包括:4 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal shown in Figure 4 includes:
物距获得模块31,用于从光电接近传感器获得第一物距;a distance obtaining module 31, configured to obtain a first object distance from the photoelectric proximity sensor;
待识别图像获得模块32,用于在根据所述第一物距确定有物体接近所述终端时,
从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;The image recognition module 32 is configured to determine, when the object is close to the terminal according to the first object distance,
Obtaining, from the camera, an image to be recognized corresponding to the object, the image to be recognized being an image taken toward an sensing direction of the photoelectric proximity sensor;
报警模块33,用于在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,若否,则进行入侵报警。The alarm module 33 is configured to determine whether the captured face image matches the preset face image when the captured face image is obtained according to the to-be-identified image, and if not, perform an intrusion alarm.
图4所示实施例的终端对应地可用于执行图2所示方法实施例中终端执行的步骤,其实现原理和技术效果类似,此处不再赘述。The terminal of the embodiment shown in FIG. 4 is correspondingly used to perform the steps performed by the terminal in the method embodiment shown in FIG. 2, and the implementation principle and technical effects are similar, and details are not described herein again.
在图4所示实施例的基础上,报警模块33还用于:Based on the embodiment shown in FIG. 4, the alarm module 33 is further configured to:
从所述摄像头持续获取监控视频,并将持续获取的所述监控视频存储在本地;向预设的报警服务器发送所述终端的接入密钥和所述待识别图像;在接收到所述报警服务器发送的视频获取请求时,判断所述视频获取请求是否包含所述接入密钥,若是,则将存储在本地的所述监控视频发送给所述报警服务器。Obtaining a monitoring video from the camera, and storing the continuously acquired monitoring video locally; transmitting an access key of the terminal and the image to be recognized to a preset alarm server; receiving the alarm When the video acquisition request sent by the server determines whether the video acquisition request includes the access key, if yes, the monitoring video stored locally is sent to the alarm server.
在上述实施例的基础上,报警模块用于:播放预设的报警音频;和/或,以预设的报警号码拨打电话。Based on the above embodiment, the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
在上述实施例的基础上,物距获得模块用于:Based on the above embodiment, the object distance obtaining module is used to:
将在初始化时刻从所述光电接近传感器获得的物距,确定为第二物距;将在所述初始化时刻之后从所述光电接近传感器获得的物距,确定为所述第一物距。The object distance obtained from the photoelectric proximity sensor at the initialization time is determined as the second object distance; the object distance obtained from the photoelectric proximity sensor after the initialization time is determined as the first object distance.
相应地,待识别图像获得模块用于:判断所述第一物距是否小于所述第二物距;若是,则确定有物体接近所述终端。Correspondingly, the image recognition module to be identified is configured to: determine whether the first object distance is smaller than the second object distance; if yes, determine that an object is close to the terminal.
在上述实施例的基础上,待识别图像获得模块具体用于:判断在预设时间段内获得的多个所述第一物距是否一致;若否,则从所述多个所述第一物距中获取最小第一物距;判断所述最小第一物距是否小于所述第二物距。On the basis of the foregoing embodiment, the to-be-identified image obtaining module is specifically configured to: determine whether a plurality of the first object distances obtained in a preset time period are consistent; if not, from the plurality of the first Obtaining a minimum first object distance in the object distance; determining whether the minimum first object distance is smaller than the second object distance.
在上述实施例的基础上,还包括模式设置模块,用于在所述从所述光电接近传感器获得第一物距之前,根据用户输入的安防模式设置信息,将所述光电接近传感器的发射功率调整为预设的安防功率,其中,所述光电接近传感器设置为所述预设的安防功率时,所述光电接近传感器的最大感应距离大于或等于2米。On the basis of the above embodiment, a mode setting module is further included, configured to: before the obtaining the first object distance from the photoelectric proximity sensor, the transmitting power of the photoelectric proximity sensor according to the security mode setting information input by the user. Adjusted to a preset security power, wherein when the photoelectric proximity sensor is set to the preset security power, the photoelectric proximity sensor has a maximum sensing distance greater than or equal to 2 meters.
在上述实施例的基础上,报警模块还用于,在从所述摄像头获得所述物体对应的待识别图像之后,在根据所述待识别图像没有获得所述拍摄人脸图像时,从所述摄像头获取待处理短视频;判断所述待处理短视频是否包含视频人脸图像,若是,则从所述待处理短视频中获取所述视频人脸图像,并将所述视频人脸图像确定为所述拍摄人脸图像,执行所述判断所述拍摄人脸图像是否与预设人脸图像匹配。
On the basis of the foregoing embodiment, the alarm module is further configured to: after obtaining the image to be recognized corresponding to the object from the camera, when the captured face image is not obtained according to the image to be recognized, Obtaining a short video to be processed by the camera; determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as The photographing a face image is performed to determine whether the photographed face image matches a preset face image.
图5为本发明提供的一种终端的硬件结构示意图。如图5所示,该终端包括:处理器511以及存储器512;其中FIG. 5 is a schematic structural diagram of hardware of a terminal provided by the present invention. As shown in FIG. 5, the terminal includes: a processor 511 and a memory 512;
存储器512,用于存储计算机程序,该存储器还可以是闪存(flash)。The memory 512 is configured to store a computer program, and the memory may also be a flash memory.
处理器511,用于执行存储器存储的执行指令,以实现上述家庭安防方法中终端执行的各个步骤。具体可以参见前面方法实施例中的相关描述。The processor 511 is configured to execute execution instructions of the memory storage to implement various steps performed by the terminal in the home security method. For details, refer to the related description in the foregoing method embodiments.
可选地,存储器512既可以是独立的,也可以跟处理器511集成在一起。Alternatively, the memory 512 can be either stand-alone or integrated with the processor 511.
当所述存储器512是独立于处理器511之外的器件时,所述终端还可以包括:When the memory 512 is a device other than the processor 511, the terminal may further include:
总线513,用于连接所述存储器512和处理器511。图5的终端还可以进一步包括发送器(图中未画出),用于向报警服务器发送处理器511生成的接入密钥和待处理图像。A bus 513 is provided for connecting the memory 512 and the processor 511. The terminal of FIG. 5 may further include a transmitter (not shown) for transmitting the access key and the image to be processed generated by the processor 511 to the alarm server.
本发明还提供一种可读存储介质,可读存储介质中存储有执行指令,当终端的至少一个处理器执行该执行指令时,终端执行上述的各种实施方式提供的家庭安防方法。The present invention further provides a readable storage medium having stored therein an execution instruction, and when the at least one processor of the terminal executes the execution instruction, the terminal executes the home security method provided by the various embodiments described above.
本发明还提供一种程序产品,该程序产品包括执行指令,该执行指令存储在可读存储介质中。终端的至少一个处理器可以从可读存储介质读取该执行指令,至少一个处理器执行该执行指令使得终端实施上述的各种实施方式提供的家庭安防方法。The present invention also provides a program product comprising an execution instruction stored in a readable storage medium. At least one processor of the terminal can read the execution instructions from a readable storage medium, and the at least one processor executes the execution instructions such that the terminal implements the home security method provided by the various embodiments described above.
在上述终端或者服务器的实施例中,应理解,处理器可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the above embodiment of the terminal or the server, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, CPU for short), or may be other general-purpose processors, digital signal processors (English: Digital Signal Processor) , referred to as: DSP), ASIC (English: Application Specific Integrated Circuit, referred to as: ASIC). The general purpose processor may be a microprocessor or the processor or any conventional processor or the like. The steps of the method disclosed in connection with the present application may be directly embodied by hardware processor execution or by a combination of hardware and software modules in a processor.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.
Claims (10)
- 一种家庭安防方法,其特征在于,应用于终端,所述终端设置有光电接近传感器、摄像头,所述方法包括:A home security method is characterized in that it is applied to a terminal, and the terminal is provided with a photoelectric proximity sensor and a camera. The method includes:从所述光电接近传感器获得第一物距;Obtaining a first object distance from the photoelectric proximity sensor;在根据所述第一物距确定有物体接近所述终端时,从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;Obtaining an image to be recognized corresponding to the object from the camera when the object is determined to be close to the terminal according to the first object distance, and the image to be recognized is an image taken toward an sensing direction of the photoelectric proximity sensor;在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,When obtaining a captured face image according to the image to be identified, determining whether the captured face image matches a preset face image,若否,则进行入侵报警。If not, an intrusion alarm is issued.
- 根据权利要求1所述的方法,其特征在于,若所述拍摄人脸图像与预设人脸图像不匹配,所述方法还包括:The method according to claim 1, wherein if the photographing face image does not match the preset face image, the method further comprises:从所述摄像头持续获取监控视频,并将持续获取的所述监控视频存储在本地;Obtaining a monitoring video from the camera continuously, and storing the continuously acquired monitoring video locally;向预设的报警服务器发送所述终端的接入密钥和所述待识别图像;Sending an access key of the terminal and the image to be identified to a preset alarm server;在接收到所述报警服务器发送的视频获取请求时,判断所述视频获取请求是否包含所述接入密钥,When receiving the video acquisition request sent by the alarm server, determining whether the video acquisition request includes the access key,若是,则将存储在本地的所述监控视频发送给所述报警服务器。If so, the monitoring video stored locally is sent to the alarm server.
- 根据权利要求1或2所述的方法,其特征在于,所述进行入侵报警包括:播放预设的报警音频;The method according to claim 1 or 2, wherein the performing the intrusion alarm comprises: playing a preset alarm audio;和/或,以预设的报警号码拨打电话。And/or, make a call with a preset alarm number.
- 根据权利要求1所述的方法,其特征在于,所述从所述光电接近传感器获得第一物距,包括:The method of claim 1 wherein said obtaining a first object distance from said photo proximity sensor comprises:将在初始化时刻从所述光电接近传感器获得的物距,确定为第二物距;Determining an object distance obtained from the photoelectric proximity sensor at an initialization time as a second object distance;将在所述初始化时刻之后从所述光电接近传感器获得的物距,确定为所述第一物距;Determining an object distance obtained from the photoelectric proximity sensor after the initialization time as the first object distance;相应地,所述根据所述第一物距确定有物体接近所述终端,包括:Correspondingly, determining that an object is close to the terminal according to the first object distance comprises:判断所述第一物距是否小于所述第二物距;Determining whether the first object distance is smaller than the second object distance;若是,则确定有物体接近所述终端。If so, it is determined that an object is in proximity to the terminal.
- 根据权利要求4所述的方法,其特征在于,所述在判断所述第一物距是否小于所述第二物距之前,还包括:The method according to claim 4, wherein the determining, before determining whether the first object distance is smaller than the second object distance, further comprises:判断在预设时间段内获得的多个所述第一物距是否一致; Determining whether the plurality of the first object distances obtained in the preset time period are consistent;若否,则从所述多个所述第一物距中获取最小第一物距;If not, obtaining a minimum first object distance from the plurality of the first object distances;相应地,所述判断所述第一物距是否小于所述第二物距,包括:Correspondingly, determining whether the first object distance is smaller than the second object distance comprises:判断所述最小第一物距是否小于所述第二物距。Determining whether the minimum first object distance is less than the second object distance.
- 根据权利要求1所述的方法,其特征在于,在所述从所述光电接近传感器获得第一物距之前,还包括:The method of claim 1 further comprising: before said obtaining the first object distance from said photo proximity sensor, further comprising:根据用户输入的安防模式设置信息,将所述光电接近传感器的发射功率调整为预设的安防功率,其中,所述光电接近传感器设置为所述预设的安防功率时,所述光电接近传感器的最大感应距离大于或等于2米。Adjusting, according to the security mode setting information input by the user, the transmit power of the photoelectric proximity sensor to a preset security power, wherein when the photoelectric proximity sensor is set to the preset security power, the photoelectric proximity sensor The maximum sensing distance is greater than or equal to 2 meters.
- 根据权利要求1所述的方法,其特征在于,所述从所述摄像头获得所述物体对应的待识别图像之后,还包括:The method according to claim 1, wherein after obtaining the image to be identified corresponding to the object from the camera, the method further comprises:在根据所述待识别图像没有获得所述拍摄人脸图像时,从所述摄像头获取待处理短视频;Obtaining a short video to be processed from the camera when the captured face image is not obtained according to the image to be identified;判断所述待处理短视频是否包含视频人脸图像,若是,则从所述待处理短视频中获取所述视频人脸图像,并将所述视频人脸图像确定为所述拍摄人脸图像,执行所述判断所述拍摄人脸图像是否与预设人脸图像匹配。Determining whether the short video to be processed includes a video face image, and if yes, acquiring the video face image from the short video to be processed, and determining the video face image as the captured face image, Performing the determination of whether the captured face image matches the preset face image.
- 一种终端,其特征在于,包括:A terminal, comprising:物距获得模块,用于从光电接近传感器获得第一物距;a distance obtaining module for obtaining a first object distance from the photoelectric proximity sensor;待识别图像获得模块,用于在根据所述第一物距确定有物体接近所述终端时,从所述摄像头获得所述物体对应的待识别图像,所述待识别图像为朝向所述光电接近传感器的感应方向拍摄的图像;An image recognition module to be identified, configured to obtain, from the camera, an image to be recognized corresponding to the object when an object is determined to be close to the terminal according to the first object distance, the image to be recognized is approaching the photoelectric An image taken in the direction of sensing of the sensor;报警模块,用于在根据所述待识别图像获得拍摄人脸图像时,判断所述拍摄人脸图像是否与预设人脸图像匹配,若否,则进行入侵报警。The alarm module is configured to determine whether the captured face image matches the preset face image when the captured face image is obtained according to the to-be-identified image, and if not, perform an intrusion alarm.
- 根据权利要求8所述的终端,其特征在于,所述报警模块还用于:The terminal according to claim 8, wherein the alarm module is further configured to:从所述摄像头持续获取监控视频,并将持续获取的所述监控视频存储在本地;向预设的报警服务器发送所述终端的接入密钥和所述待识别图像;在接收到所述报警服务器发送的视频获取请求时,判断所述视频获取请求是否包含所述接入密钥,若是,则将存储在本地的所述监控视频发送给所述报警服务器。Obtaining a monitoring video from the camera, and storing the continuously acquired monitoring video locally; transmitting an access key of the terminal and the image to be recognized to a preset alarm server; receiving the alarm When the video acquisition request sent by the server determines whether the video acquisition request includes the access key, if yes, the monitoring video stored locally is sent to the alarm server.
- 根据权利要求8或9所述的终端,其特征在于,所述报警模块用于:播放预设的报警音频;和/或,以预设的报警号码拨打电话。 The terminal according to claim 8 or 9, wherein the alarm module is configured to: play a preset alarm audio; and/or, make a call with a preset alarm number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/102596 WO2019056245A1 (en) | 2017-09-21 | 2017-09-21 | Home security method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/102596 WO2019056245A1 (en) | 2017-09-21 | 2017-09-21 | Home security method and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019056245A1 true WO2019056245A1 (en) | 2019-03-28 |
Family
ID=65810021
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/102596 WO2019056245A1 (en) | 2017-09-21 | 2017-09-21 | Home security method and terminal |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2019056245A1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587630A (en) * | 2008-05-21 | 2009-11-25 | 上海新联纬讯科技发展有限公司 | But the intelligent video monitoring system of filtering false alarm |
CN101976489A (en) * | 2010-10-15 | 2011-02-16 | 李原 | Laser-vision linked night invasion detection device |
US20110158623A1 (en) * | 2009-12-30 | 2011-06-30 | Chi Mei Communication Systems, Inc. | Camera device and method for taking photos |
CN102467800A (en) * | 2010-11-05 | 2012-05-23 | 无锡市美网网络信息技术有限公司 | Invasion detection and alarm system |
CN103268686A (en) * | 2013-05-14 | 2013-08-28 | 苏州福丰科技有限公司 | Anti-theft system based on face recognition |
CN106157505A (en) * | 2015-03-25 | 2016-11-23 | 中兴通讯股份有限公司 | One is illegally entered the room alarm method and device |
-
2017
- 2017-09-21 WO PCT/CN2017/102596 patent/WO2019056245A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587630A (en) * | 2008-05-21 | 2009-11-25 | 上海新联纬讯科技发展有限公司 | But the intelligent video monitoring system of filtering false alarm |
US20110158623A1 (en) * | 2009-12-30 | 2011-06-30 | Chi Mei Communication Systems, Inc. | Camera device and method for taking photos |
CN101976489A (en) * | 2010-10-15 | 2011-02-16 | 李原 | Laser-vision linked night invasion detection device |
CN102467800A (en) * | 2010-11-05 | 2012-05-23 | 无锡市美网网络信息技术有限公司 | Invasion detection and alarm system |
CN103268686A (en) * | 2013-05-14 | 2013-08-28 | 苏州福丰科技有限公司 | Anti-theft system based on face recognition |
CN106157505A (en) * | 2015-03-25 | 2016-11-23 | 中兴通讯股份有限公司 | One is illegally entered the room alarm method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020125406A1 (en) | Safety guardianship method, apparatus, terminal and computer readable storage medium | |
US10979636B2 (en) | Triggering actions based on shared video footage from audio/video recording and communication devices | |
WO2016150045A1 (en) | Housebreaking alarm method and device | |
WO2020073505A1 (en) | Image processing method, apparatus and device based on image recognition, and storage medium | |
JP7162412B2 (en) | detection recognition system | |
WO2017166469A1 (en) | Security protection method and apparatus based on smart television set | |
US9053621B2 (en) | Image surveillance system and image surveillance method | |
JP5047361B2 (en) | Monitoring system | |
WO2019153378A1 (en) | Security protection method and device of floor cleaning robot | |
KR101894399B1 (en) | Monitoring system having personal information protection function and method thereof | |
CN106327813A (en) | Intelligent voice recognition and alarm method and system thereof | |
KR102233679B1 (en) | Apparatus and method for detecting invader and fire for energy storage system | |
CN114584733A (en) | Image acquisition device of visual doorbell, information processing method and visual doorbell system | |
US8665330B2 (en) | Event-triggered security surveillance and control system, event-triggered security surveillance and control method, and non-transitory computer readable medium | |
WO2019056245A1 (en) | Home security method and terminal | |
KR20110137469A (en) | Intelligent entrance managing apparatus using face detection and entrance managing method thereof | |
CN111757039B (en) | Video call method of wearable device and wearable device | |
JP4540456B2 (en) | Suspicious person detection device | |
CN112580390B (en) | Security monitoring method and device based on intelligent sound box, sound box and medium | |
CN113538827A (en) | Intelligent home monitoring system and method | |
TWM582666U (en) | Smart home protection system | |
US9613509B2 (en) | Mobile electronic device and method for crime prevention | |
US12052530B2 (en) | Electronic monitoring system using video notification | |
US11936981B1 (en) | Autonomous camera sensitivity adjustment based on threat level | |
US20220382383A1 (en) | Monitoring System and Method Having Gesture Detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17926043 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17926043 Country of ref document: EP Kind code of ref document: A1 |