CN113343859A - Smoking behavior detection method and device, storage medium and electronic device - Google Patents

Smoking behavior detection method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113343859A
CN113343859A CN202110650197.3A CN202110650197A CN113343859A CN 113343859 A CN113343859 A CN 113343859A CN 202110650197 A CN202110650197 A CN 202110650197A CN 113343859 A CN113343859 A CN 113343859A
Authority
CN
China
Prior art keywords
information
target
environment
shooting mode
heat source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110650197.3A
Other languages
Chinese (zh)
Inventor
刘威
周春游
徐狄权
潘武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110650197.3A priority Critical patent/CN113343859A/en
Publication of CN113343859A publication Critical patent/CN113343859A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a smoking behavior detection method, a smoking behavior detection device, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring target environment information of a target area; determining a target shooting mode corresponding to the target environment information based on a corresponding relation between the preset environment information and the shooting mode; adjusting a shooting mode of target shooting equipment to a target shooting mode, and shooting a target area in the target shooting mode to obtain a target image, wherein the target shooting equipment supports multiple shooting modes, and the multiple shooting modes comprise the target shooting mode; the target image is analyzed to determine whether smoking behavior is present in the target area. According to the invention, the problem of low accuracy rate of smoking behavior detection in the related technology is solved, and the effect of improving the accuracy rate of smoking behavior detection is achieved.

Description

Smoking behavior detection method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of camera shooting, in particular to a smoking behavior detection method and device, a storage medium and an electronic device.
Background
Fire safety is always a big matter of stable and economic development of the relation society, fire disasters frequently give lives and properties of people to bring great harm, no matter open fire or heat sources easily cause the fire disasters, fire hidden dangers are increased, for example, smoking in public places can cause hidden dangers to public safety, and the physical health of surrounding people can be affected.
At present, the smoke inhibition monitoring of some public places mainly adopts a thermal imaging technology, because infrared energy radiated outwards by fire points of smoke can be received by a thermal imaging lens, the smoke absorption conditions such as gas stations, sentries and smoke absorption control of public spaces can be detected by a thermal imaging camera, but in the prior art, when the ambient temperature is higher and close to the temperature of a human body in summer, the difference between the human face and the ambient temperature in a thermal imaging picture is very small, and the identification of the human face by a simple thermal imaging image is difficult to realize, so that the detection omission phenomenon is caused; in addition, when the weather is hot, the environment often has interfering heat sources, such as mosquito-repellent incense, hot water cup, etc., which can cause the false alarm phenomenon to the smoking detection, and the prior art has larger defects to cause the detection accuracy not to be high.
Aiming at the problem of low accuracy rate of smoking behavior detection in the related technology, no effective solution is provided at present.
Disclosure of Invention
The embodiment of the invention provides a smoking behavior detection method and device, a storage medium and an electronic device, which are used for at least solving the problem of low accuracy rate of smoking behavior detection in the related art.
According to an embodiment of the present invention, there is provided a smoking behavior detection method including: acquiring target environment information of a target area; determining a target shooting mode corresponding to the target environment information based on a corresponding relation between pre-configured environment information and shooting modes; adjusting a shooting mode of target shooting equipment to the target shooting mode, and shooting the target area in the target shooting mode to obtain a target image, wherein the target shooting equipment supports multiple shooting modes, and the multiple shooting modes comprise the target shooting mode; analyzing the target image to determine whether smoking behavior is present in the target region.
In one exemplary embodiment, before determining a target photographing mode corresponding to the target environment information based on a pre-configured correspondence of environment information to photographing modes, the method further includes: configuring the corresponding relation between the environment information and the shooting mode, wherein the corresponding relation comprises at least one of the following relations: when the environment information is environment light information, configuring a shooting mode corresponding to the environment light information based on the illumination intensity of an area indicated by the environment light information; when the environment information is environment time information, a shooting mode corresponding to the environment time information is configured based on a time period in which the time of the area indicated by the environment time information is located.
In one exemplary embodiment, in a case where the environment information is environment light information, configuring a photographing mode corresponding to the environment light information based on illumination intensity of an area indicated by the environment light information includes: configuring a corresponding shooting mode as a visible light channel shooting mode under the condition that the environment information is first environment light information, wherein the first environment light information is used for indicating that the illumination intensity of a corresponding area is greater than or equal to a first threshold value; and under the condition that the environment information is second environment light information, configuring a corresponding shooting mode as a thermal imaging channel shooting mode, wherein the second environment light information is used for indicating that the illumination intensity of the corresponding area is less than a first threshold value.
In one exemplary embodiment, in a case where the environment information is environment time information, configuring the photographing mode corresponding to the environment time information based on a period in which a time of an area indicated by the environment time information is located includes: configuring a corresponding shooting mode as a visible light channel shooting mode under the condition that the environment information is first environment time information, wherein the first environment time information is used for indicating that the time of a corresponding area is in a first time period; and under the condition that the environment information is second environment time information, configuring a corresponding shooting mode as a thermal imaging channel shooting mode, wherein the second environment time information is used for indicating that the time of the corresponding area is out of the first time period.
In one exemplary embodiment, analyzing the target image to determine whether smoking behavior is present in the target region comprises: under the condition that the target image is analyzed to contain a human face and a heat source, determining first position information and first size information of the human face; determining second position information and second size information of the heat source; determining a type of the heat source based on the first location information, the first size information, the second location information, and the second size information; determining that the smoking behavior is present in the target area if the type of the heat source is determined to be a target type; determining that the smoking behavior is not present in the target area if the type of the heat source is determined to be other than the target type.
In one exemplary embodiment, determining the type of the heat source based on the first location information, the first size information, the second location information, and the second size information includes: determining whether the heat source is a moving heat source based on the second position information of the heat source included in at least two of the plurality of frame images in a case where it is determined that the target image is the plurality of frame images and in a case where it is determined that the heat source is included in at least two of the plurality of frame images; and under the condition that the heat source is judged to be a mobile heat source, determining the type of the heat source based on the first position information and the first size information of the face included in a first frame image and the second position information and the second size information of the heat source included in the first frame image, wherein the first frame image is a frame image which includes the face and the heat source in the multi-frame image.
In one exemplary embodiment, determining the type of the heat source based on the first position information, the first size information, and the second position information, the second size information of the heat source included in a first frame image includes: determining a relative position relationship between the first position information and the second position information; determining a ratio of the first size information and the second size information; determining the type of the heat source as the target type under the condition that the relative position relation is determined to meet the target position relation and the ratio is determined to meet the target ratio; (ii) a Determining the type of the heat source to be a type other than the target type in a case where it is determined that the relative positional relationship does not satisfy the target positional relationship and/or in a case where it is determined that the ratio does not satisfy the target ratio.
According to another embodiment of the present invention, there is also provided a smoking behavior detection apparatus including: the acquisition module is used for acquiring target environment information of a target area; the determining module is used for determining a target shooting mode corresponding to the target environment information based on a corresponding relation between the preset environment information and the shooting mode; the shooting module is used for adjusting a shooting mode of target shooting equipment to the target shooting mode and shooting the target area in the target shooting mode to obtain a target image, wherein the target shooting equipment supports multiple shooting modes, and the multiple shooting modes comprise the target shooting mode; and the analysis module is used for analyzing the target image to determine whether smoking behaviors exist in the target area.
According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, based on the acquired target environment information, the camera equipment can be adjusted to the shooting mode corresponding to the target environment information, so that a target image can be more accurately acquired and smoking behavior detection can be carried out, the problem of low smoking behavior detection accuracy in the related art is solved, and the effect of improving the smoking behavior detection accuracy is further achieved.
Drawings
Fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a smoking behavior detection method according to an embodiment of the present invention;
figure 2 is a flow chart of a smoking behaviour detection method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a preferred smoking behaviour detection method according to an embodiment of the present invention;
fig. 4 is a block diagram of the smoking behavior detection apparatus according to the embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of the smoking behavior detection method according to the embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the smoking behavior detection method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the present embodiment, a smoking behavior detection method is provided, and fig. 2 is a flowchart of a smoking behavior detection method according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, acquiring target environment information of a target area;
step S204, determining a target shooting mode corresponding to the target environment information based on a corresponding relation between the preset environment information and the shooting mode;
step S206, adjusting a shooting mode of a target camera to the target shooting mode, and shooting the target area in the target shooting mode to obtain a target image, wherein the target camera supports multiple shooting modes, and the multiple shooting modes include the target shooting mode;
step S208, analyzing the target image to determine whether smoking behavior exists in the target area.
Through the steps, the camera shooting equipment can be adjusted to the shooting mode corresponding to the target environment information based on the acquired target environment information, so that a target image can be accurately obtained and smoking behavior detection can be carried out, the problem that the smoking behavior detection accuracy rate is low in the related technology is solved, and the effect of improving the smoking behavior detection accuracy rate is achieved.
The main body of the above steps may be a monitoring platform (or called monitoring device) in a monitoring system, where the monitoring system may include an intelligent building video monitoring system, a vehicle-mounted video monitoring system, or a monitoring system applied in other scenes, or a device with photographing and image processing capabilities, or a device or system integrating a photographing technology and an image recognition technology, or a processor with human-computer interaction capability configured on a storage device, or a processing device or processing unit with similar processing capabilities, but is not limited thereto. The following description is given by taking the monitoring platform as an example (which is only an exemplary illustration, and in actual operation, other devices or modules may also be used to perform the above operations):
in the above embodiment, the monitoring platform first obtains target environment information of a target area, where the target environment information may include environment information of an area monitored by the monitoring platform, and the shooting device included in the monitoring platform may be adjusted to a corresponding target shooting mode according to the obtained target environment information. In the embodiment, the monitoring platform can adjust the shooting mode of the shooting equipment according to different environment information, so that a target image can be obtained more accurately and smoking behavior detection can be performed.
In an optional embodiment, before determining the target shooting mode corresponding to the target environment information based on the pre-configured correspondence between the environment information and the shooting mode, the method further includes: configuring the corresponding relation between the environment information and the shooting mode, wherein the corresponding relation comprises at least one of the following relations: when the environment information is environment light information, configuring a shooting mode corresponding to the environment light information based on the illumination intensity of an area indicated by the environment light information; when the environment information is environment time information, a shooting mode corresponding to the environment time information is configured based on a time period in which the time of the area indicated by the environment time information is located. In this embodiment, before determining a target shooting mode corresponding to the target environment information based on a pre-configured correspondence relationship between the environment information and the shooting mode, the correspondence relationship between the environment information and the shooting mode is configured (i.e. a matching shooting mode is selected for different environment information), and the correspondence relationship includes at least one of: in the case that the environment information is environment light information, configuring a shooting mode corresponding to the environment light information based on the illumination intensity of the area indicated by the environment light information, for example, configuring a corresponding shooting mode (e.g., a photosensitive mode) for a shooting device included in the monitoring platform when the obtained environment information is environment light information (e.g., daytime, nighttime light information, or environment illumination information); in the case that the environment information is environment time information (such as YY minutes at XX time of beijing, or any time period or other time information, etc.), a corresponding shooting mode (such as a time mode) is configured for the shooting device included in the monitoring platform.
In an optional embodiment, in a case that the environment information is environment light information, configuring a shooting mode corresponding to the environment light information based on the illumination intensity of the area indicated by the environment light information includes: configuring a corresponding shooting mode as a visible light channel shooting mode under the condition that the environment information is first environment light information, wherein the first environment light information is used for indicating that the illumination intensity of a corresponding area is greater than or equal to a first threshold value; and under the condition that the environment information is second environment light information, configuring a corresponding shooting mode as a thermal imaging channel shooting mode, wherein the second environment light information is used for indicating that the illumination intensity of the corresponding area is less than a first threshold value. In this embodiment, when the environment information is the environment light information and the environment information is the first environment light information, the corresponding shooting mode is configured as the visible light channel shooting mode, for example, when the environment information is the first environment light information (e.g., the environment illuminance is greater than or equal to a first threshold), that is, the environment illuminance is greater than or equal to n lx, where n is the illuminance value, lx is the illuminance value unit lux, at this time, the corresponding shooting mode can be adjusted to be the visible light channel shooting mode; when the ambient information is the second ambient light information (e.g., the ambient light illuminance is less than the first threshold), that is, the ambient light illuminance is < nlx, at this time, the corresponding shooting mode may be adjusted to be the thermal imaging channel shooting mode; by adopting the technical scheme of the embodiment, the proper shooting mode can be flexibly adjusted according to different ambient light illumination values so as to improve the accuracy of smoking behavior detection. Optionally, in practical applications, a shooting mode corresponding to the ambient temperature information may also be configured according to the ambient temperature information, for example, in a smoke-forbidden monitoring system in a public place, when the ambient temperature is high (e.g., in summer), a human face in an image acquired by using the thermal imaging shooting mode is relatively blurred with the surrounding environment and is not easily recognized, and at this time, the corresponding shooting mode may be adjusted to be a visible light channel shooting mode, so that the accuracy of detection may be effectively improved.
In an optional embodiment, in the case that the environment information is environment time information, configuring the shooting mode corresponding to the environment time information based on a time period in which a time of the area indicated by the environment time information is located includes: configuring a corresponding shooting mode as a visible light channel shooting mode under the condition that the environment information is first environment time information, wherein the first environment time information is used for indicating that the time of a corresponding area is in a first time period; and under the condition that the environment information is second environment time information, configuring a corresponding shooting mode as a thermal imaging channel shooting mode, wherein the second environment time information is used for indicating that the time of the corresponding area is out of the first time period. In this embodiment, when the environment information is the environment time information and the environment information is the first environment time information, the corresponding shooting mode is configured to be the visible light channel shooting mode, for example, when the environment information is the first environment time information (as mentioned above, the first time period is the beijing time 7:00-19:00, and other time periods can be flexibly set according to different regions, different environments, different seasons, and the like), the corresponding shooting mode can be adjusted to be the visible light channel shooting mode; when the environment information is the second environment time information (for example, a time period other than the beijing time 7:00-19:00, and other time periods may also be flexibly set according to different regions, different environments, different seasons, and the like), at this time, the corresponding shooting mode may be adjusted to the thermal imaging channel shooting mode.
In an optional embodiment, analyzing the target image to determine whether smoking behavior is present in the target region comprises: under the condition that the target image is analyzed to contain a human face and a heat source, determining first position information and first size information of the human face; determining second position information and second size information of the heat source; determining a type of the heat source based on the first location information, the first size information, the second location information, and the second size information; determining that the smoking behavior is present in the target area if the type of the heat source is determined to be a target type; determining that the smoking behavior is not present in the target area if the type of the heat source is determined to be other than the target type. In this embodiment, analyzing the target image to determine whether smoking behavior exists in the target region comprises: in the case that it is analyzed that a human face and a heat source are included in the target image (an image of the target area captured by the capturing device included in the monitoring platform), determining first position information and first size information of the human face, and simultaneously determining second position information and second size information of the heat source, for example, in a smoke-forbidden monitoring system in a public place, determining position information of a human face (i.e., a possible smoker) in the target area and size information of the human face, and simultaneously determining position information of a heat source (i.e., a possible smoke spot or other heat source) in the target area (i.e., the public place or an area within the public place) and size information of the heat source; determining the type of the heat source based on the position information of the human face, the size information of the human face, the position information of the heat source and the size information of the heat source, for example, the type of the heat source may be a smoke point or other heat sources, and determining that the smoking behavior exists in the target area when the type of the heat source is determined to be a target type, for example, the target type is a smoke point; in the case where the type of the heat source is determined to be other than the target type, it may be determined that the smoking behavior is not present in the target area; optionally, in practical applications, whether the type of the heat source a is a target type (equivalent to a smoke and fire point detected in the smoke-forbidden monitoring system in the public place) may be determined by analyzing whether a certain heat source a is located within a predetermined size range of a face position, and determining whether the type of the heat source a is a target type in combination with whether a size ratio of the heat source a to the face meets a predetermined threshold, and the like, so as to determine whether a smoking behavior exists in the target area according to the type of the heat source.
In an optional embodiment, determining the type of the heat source based on the first location information, the first size information, the second location information, and the second size information comprises: determining whether the heat source is a moving heat source based on the second position information of the heat source included in at least two of the plurality of frame images in a case where it is determined that the target image is the plurality of frame images and in a case where it is determined that the heat source is included in at least two of the plurality of frame images; and under the condition that the heat source is judged to be a mobile heat source, determining the type of the heat source based on the first position information and the first size information of the face included in a first frame image and the second position information and the second size information of the heat source included in the first frame image, wherein the first frame image is a frame image which includes the face and the heat source in the multi-frame image. In this embodiment, in the case that it is determined that the target image is a multi-frame image and it is determined that the heat source (e.g., the heat source B) is included in at least two frames of images of the multi-frame image, it is determined whether the heat source is a moving heat source based on the second position information of the heat source B included in the at least two frames of images, for example, it may be determined whether the heat source B is a moving heat source based on the second position information of the heat source B in the two frames of images (e.g., the position L1 of the heat source B in the target region in the first frame of image and the position L2 of the heat source B in the second frame of image, in practical applications, the first frame and the second frame of image are separated by a longer time, and the detection accuracy may be affected if the time is too short), i.e., when the position L1 and the position L2 are the same, it may be determined that the heat source B is a fixed heat source, when the position L1 is different from the position L2, the heat source B can be judged to be a movable heat source; when the heat source (such as the heat source B) is determined to be a moving heat source, the type of the heat source is determined based on the first position information of the face (i.e., the position information of the face in the target area) and the first size information (i.e., the size information of the face) included in the first frame image, and the second position information and the second size information of the heat source (such as the heat source B) included in the first frame image. By adopting the technical scheme of the embodiment, the static heat source can be directly filtered, and the interference of other fixed heat sources on the detection of the target type heat source (such as smoke and fire points) is prevented, so that the accuracy of smoking behavior detection is improved.
In an optional embodiment, determining the type of the heat source based on the first position information, the first size information, and the second position information, the second size information of the heat source included in the first frame image includes: determining a relative position relationship between the first position information and the second position information; determining a ratio of the first size information and the second size information; determining the type of the heat source as the target type under the condition that the relative position relation is determined to meet the target position relation and the ratio is determined to meet the target ratio; determining the type of the heat source to be a type other than the target type in a case where it is determined that the relative positional relationship does not satisfy the target positional relationship and/or in a case where it is determined that the ratio does not satisfy the target ratio. In this embodiment, determining the type of the heat source based on the first position information, the first size information, and the second position information, the second size information of the heat source included in the first frame image includes: determining a relative position relationship between the first position information and the second position information, for example, in a smoke-forbidden monitoring system in a public place, determining a relationship between position information of a human face and position information of a heat source C (a possible smoke point or other type of heat source), namely determining whether the heat source C is located within a predetermined size range of the position of the human face; determining a ratio of the first size information to the second size information, for example, determining whether a ratio of the size of the heat source C to the size of the face meets a predetermined threshold, if it is determined that the relationship between the position information meets a predetermined size range; in the case where it is determined that the relative positional relationship satisfies a target positional relationship (i.e., the relationship between the above-described positional information satisfies a predetermined dimensional range) and it is determined that the ratio satisfies a target ratio (i.e., the above-described ratio satisfies the above-described predetermined threshold), it is possible to determine the type of the heat source as the target type (e.g., a pyrotechnic point), and in the case where it is determined that the relative positional relationship does not satisfy the target positional relationship and/or it is determined that the ratio does not satisfy the target ratio, it is possible to determine the type of the heat source as a type other than the target type, i.e., a non-pyrotechnic point heat source. By adopting the technical scheme of the embodiment, the heat source of the target type can be accurately detected.
It is to be understood that the above-described embodiments are only a few, but not all, embodiments of the present invention.
The present invention will be described in detail with reference to the following examples:
fig. 3 is a flow chart of a preferred smoking behaviour detection method according to an embodiment of the present invention, as shown in fig. 3, the flow chart comprising the steps of:
s302, initializing equipment;
s304, selecting a shooting mode, such as a photosensitive mode (corresponding to the shooting mode corresponding to the ambient light information) and a time mode (corresponding to the shooting mode corresponding to the ambient time information);
s306, under the condition that the photosensitive mode is selected, a first judgment is carried out to judge whether the illumination is sufficient (corresponding to the illumination intensity is larger than or equal to a first threshold value);
s308, in case of selecting the time mode, executing a second judgment to judge whether the time is in a predetermined time period (corresponding to the aforementioned first environment time information, such as 7:00-19: 00);
s310, in the case that the illumination is determined to be sufficient in the step S306, or in the case that the time is determined to be within the predetermined time period in the step S308, starting a visible light channel shooting mode to perform face recognition;
s312, in the case that the illumination is determined to be insufficient in the step S306, or in the case that the time is determined not to be within the predetermined time period in the step S308, starting a thermal imaging channel shooting mode to perform face recognition;
s314, calculating a face position and size (first position information and first size information corresponding to the aforementioned face);
s316, acquiring the position and size of the thermal imaging channel smoke point (second position information and second size information corresponding to the aforementioned heat source);
s318, executing a third judgment to judge whether the smoke point (corresponding to the heat source) moves;
s320, if the result of the third determination is yes (i.e. the heat source is moving), performing a fourth determination to determine whether the smoke point is within the face position (corresponding to the determination of the relative position relationship between the first position information and the second position information);
s322, if the result of the fourth determination is yes, performing a fifth determination to determine whether the ratio of the size of the smoke point to the size of the human face meets a threshold (corresponding to the determination of the ratio of the first size information to the second size information);
s324, if the result of the fifth determination is yes, a smoking alarm may be output;
s326, after the alarm is executed, executing a sixth judgment to judge whether to end the heat source detection process;
if the determination result in any of the above steps S318, S320, S322, and S326 is negative, the process may return to step S304 to detect a new heat source again. The following description will be made by taking an example in which a multispectral camera performs the above operations:
the multispectral camera can be provided with a photosensitive sensor and can judge ambient light in real time, when the current environment is judged to be daytime, the human face is identified through the visible light channel camera, when the current environment is judged to be night, the human face is identified by switching to the thermal imaging channel, and the self-adaptive switching method is mainly characterized in that in daytime, the visible light channel image is clearer, the human face can be identified more accurately, and secondly, when the ambient temperature is higher, the thermal imaging image human face is fuzzy with the surrounding environment and is not easy to identify, the problem of visible light cannot occur, and meanwhile, the visible light and the thermal imaging image can be automatically switched to identify the human face according to the system time; the method for judging whether smoke and fire points are located in the face position is adopted, the interference misinformation of large heat sources such as hot water is filtered by combining the size ratio of the smoke and fire points and the face, the deflection angle between the face and a lens can be calculated when the face is identified, the estimated value of the front face size when the side face smokes is calculated in a self-adaptive mode, and missing detection when the side face smokes is prevented; judging whether the fire point is static for a long time or not and eliminating false alarm interference caused by a static heat source.
It should be noted that, in this embodiment, when the device is turned on, the photosensitive mode and the time mode may be selected for adaptive switching to identify the camera channel of the face, the photosensitive mode automatically identifies the illumination condition through the photosensitive sensor to determine whether the current environment is day or night, thereby automatically switching to identify the camera channel of the face, the time mode automatically switches to the face identification channel according to the specifically set day time period and night time period, and after the identification channel can be automatically switched, the method may well work in a high temperature environment to avoid the phenomenon of missed detection. Judging whether the smoke point is a moving point or not after the position of the smoke point is obtained, and directly filtering out if the smoke point is a static heat source so as to prevent other fixed heat sources from interfering smoking detection; and then, after the position of the smoking point meets the condition of being in the position of the human face, the ratio of the size of the smoking point to the size of the human face is further judged, and the smoking is finally confirmed only if the position meets the specific ratio.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, there is further provided a smoking behavior detection apparatus, and fig. 4 is a block diagram of a smoking behavior detection apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes:
an obtaining module 402, configured to obtain target environment information of a target area;
a determining module 404, configured to determine a target shooting mode corresponding to the target environment information based on a pre-configured correspondence between the environment information and the shooting mode;
a shooting module 406, configured to adjust a shooting mode of a target image capturing apparatus to the target shooting mode, and capture the target area in the target shooting mode to obtain a target image, where the target image capturing apparatus supports multiple shooting modes, and the multiple shooting modes include the target shooting mode;
an analysis module 408, configured to analyze the target image to determine whether smoking behavior exists in the target area.
In an optional embodiment, the apparatus further comprises: the configuration module is used for configuring the corresponding relation between the environment information and the shooting mode before determining the target shooting mode corresponding to the target environment information based on the preset corresponding relation between the environment information and the shooting mode, wherein the corresponding relation comprises at least one of the following: when the environment information is environment light information, configuring a shooting mode corresponding to the environment light information based on the illumination intensity of an area indicated by the environment light information; when the environment information is environment time information, a shooting mode corresponding to the environment time information is configured based on a time period in which the time of the area indicated by the environment time information is located.
In an optional embodiment, the configuration module includes: the device comprises a first configuration unit, a second configuration unit and a third configuration unit, wherein the first configuration unit is used for configuring a corresponding shooting mode to be a visible light channel shooting mode under the condition that the environment information is environment light information and under the condition that the environment information is first environment light information, and the first environment light information is used for indicating that the illumination intensity of a corresponding area is larger than or equal to a first threshold value; and a second configuration unit, configured to configure the corresponding shooting mode as a thermal imaging channel shooting mode when the environment information is second environment light information, where the second environment light information is used to indicate that the illumination intensity of the corresponding area is less than a first threshold.
In an optional embodiment, the configuration module further includes: a third configuration unit, configured to configure a corresponding shooting mode as a visible light channel shooting mode when the environment information is environment time information and when the environment information is first environment time information, where the first environment time information is used to indicate that a time of a corresponding area is within a first time period; and a fourth configuration unit, configured to configure the corresponding shooting mode as a thermal imaging channel shooting mode when the environment information is second environment time information, where the second environment time information is used to indicate that the time of the corresponding area is outside the first time period.
In an alternative embodiment, the analyzing module 408 comprises: the first determining submodule is used for determining first position information and first size information of the face under the condition that the target image is analyzed to contain the face and the heat source; a second determination submodule for determining second position information and second size information of the heat source; a third determination submodule for determining a type of the heat source based on the first position information, the first size information, the second position information, and the second size information; a fourth determination sub-module for determining that the smoking behavior is present in the target area if the type of the heat source is determined to be a target type; a fifth determination sub-module to determine that the smoking behavior is not present in the target area if the type of the heat source is determined to be other than the target type.
In an optional embodiment, the third determining sub-module includes: a determination unit configured to determine, when it is determined that the target image is a multi-frame image and when it is determined that the heat source is included in at least two of the multi-frame images, whether the heat source is a moving heat source based on the second position information of the heat source included in the at least two frame images; a determining unit, configured to determine a type of the heat source based on the first position information and the first size information of the face included in a first frame image and the second position information and the second size information of the heat source included in the first frame image when the heat source is determined to be a moving heat source, where the first frame image is a frame image that includes the face and the heat source in the multiple frame images.
In an optional embodiment, the determining unit includes: a first determining subunit, configured to determine a relative positional relationship between the first positional information and the second positional information; a second determining subunit, configured to determine a ratio of the first size information and the second size information; a third determining subunit, configured to determine, when it is determined that the relative positional relationship satisfies a target positional relationship and when it is determined that the ratio satisfies a target ratio, the type of the heat source as the target type; a fourth determination subunit, configured to determine, in a case where it is determined that the relative positional relationship does not satisfy the target positional relationship and/or it is determined that the ratio does not satisfy the target ratio, that the type of the heat source is a type other than the target type.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A smoking behaviour detection method, comprising:
acquiring target environment information of a target area;
determining a target shooting mode corresponding to the target environment information based on a corresponding relation between pre-configured environment information and shooting modes;
adjusting a shooting mode of target shooting equipment to the target shooting mode, and shooting the target area in the target shooting mode to obtain a target image, wherein the target shooting equipment supports multiple shooting modes, and the multiple shooting modes comprise the target shooting mode;
analyzing the target image to determine whether smoking behavior is present in the target region.
2. The method according to claim 1, wherein before determining a target photographing mode corresponding to the target environment information based on a pre-configured correspondence of environment information to photographing modes, the method further comprises:
configuring the corresponding relation between the environment information and the shooting mode, wherein the corresponding relation comprises at least one of the following relations:
when the environment information is environment light information, configuring a shooting mode corresponding to the environment light information based on the illumination intensity of an area indicated by the environment light information;
when the environment information is environment time information, a shooting mode corresponding to the environment time information is configured based on a time period in which the time of the area indicated by the environment time information is located.
3. The method according to claim 2, wherein in a case where the environment information is environment light information, configuring the shooting mode corresponding to the environment light information based on the illumination intensity of the area indicated by the environment light information comprises:
configuring a corresponding shooting mode as a visible light channel shooting mode under the condition that the environment information is first environment light information, wherein the first environment light information is used for indicating that the illumination intensity of a corresponding area is greater than or equal to a first threshold value;
and under the condition that the environment information is second environment light information, configuring a corresponding shooting mode as a thermal imaging channel shooting mode, wherein the second environment light information is used for indicating that the illumination intensity of the corresponding area is less than a first threshold value.
4. The method according to claim 2, wherein, in a case where the environment information is environment time information, configuring the photographing mode corresponding to the environment time information based on a period in which a time of the area indicated by the environment time information is located includes:
configuring a corresponding shooting mode as a visible light channel shooting mode under the condition that the environment information is first environment time information, wherein the first environment time information is used for indicating that the time of a corresponding area is in a first time period;
and under the condition that the environment information is second environment time information, configuring a corresponding shooting mode as a thermal imaging channel shooting mode, wherein the second environment time information is used for indicating that the time of the corresponding area is out of the first time period.
5. The method of claim 1, wherein analyzing the target image to determine whether smoking behavior is present in the target region comprises:
under the condition that the target image is analyzed to contain a human face and a heat source, determining first position information and first size information of the human face;
determining second position information and second size information of the heat source;
determining a type of the heat source based on the first location information, the first size information, the second location information, and the second size information;
determining that the smoking behavior is present in the target area if the type of the heat source is determined to be a target type;
determining that the smoking behavior is not present in the target area if the type of the heat source is determined to be other than the target type.
6. The method of claim 5, wherein determining the type of the heat source based on the first location information, the first size information, the second location information, and the second size information comprises:
determining whether the heat source is a moving heat source based on the second position information of the heat source included in at least two of the plurality of frame images in a case where it is determined that the target image is the plurality of frame images and in a case where it is determined that the heat source is included in at least two of the plurality of frame images;
and under the condition that the heat source is judged to be a mobile heat source, determining the type of the heat source based on the first position information and the first size information of the face included in a first frame image and the second position information and the second size information of the heat source included in the first frame image, wherein the first frame image is a frame image which includes the face and the heat source in the multi-frame image.
7. The method according to claim 6, wherein determining the type of the heat source based on the first position information, the first size information, and the second position information, the second size information, of the heat source included in a first frame image includes:
determining a relative position relationship between the first position information and the second position information;
determining a ratio of the first size information and the second size information;
determining the type of the heat source as the target type under the condition that the relative position relation is determined to meet the target position relation and the ratio is determined to meet the target ratio;
determining the type of the heat source to be a type other than the target type in a case where it is determined that the relative positional relationship does not satisfy the target positional relationship and/or in a case where it is determined that the ratio does not satisfy the target ratio.
8. A smoking behaviour detection device, comprising:
the acquisition module is used for acquiring target environment information of a target area;
the determining module is used for determining a target shooting mode corresponding to the target environment information based on a corresponding relation between the preset environment information and the shooting mode;
the shooting module is used for adjusting a shooting mode of target shooting equipment to the target shooting mode and shooting the target area in the target shooting mode to obtain a target image, wherein the target shooting equipment supports multiple shooting modes, and the multiple shooting modes comprise the target shooting mode;
and the analysis module is used for analyzing the target image to determine whether smoking behaviors exist in the target area.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in any of claims 1 to 7 are implemented when the computer program is executed by the processor.
CN202110650197.3A 2021-06-10 2021-06-10 Smoking behavior detection method and device, storage medium and electronic device Pending CN113343859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110650197.3A CN113343859A (en) 2021-06-10 2021-06-10 Smoking behavior detection method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110650197.3A CN113343859A (en) 2021-06-10 2021-06-10 Smoking behavior detection method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN113343859A true CN113343859A (en) 2021-09-03

Family

ID=77476572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110650197.3A Pending CN113343859A (en) 2021-06-10 2021-06-10 Smoking behavior detection method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113343859A (en)

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008036352A (en) * 2006-08-10 2008-02-21 Omron Corp Cigarette smoke separation apparatus, method and program
CN102519605A (en) * 2012-01-12 2012-06-27 安徽大学 Smoking detection system and device based on infrared thermal image
CN103826062A (en) * 2014-02-27 2014-05-28 北京百纳威尔科技有限公司 Shooting mode switching processing method and device
CN103841324A (en) * 2014-02-20 2014-06-04 小米科技有限责任公司 Shooting processing method and device and terminal device
CN104853111A (en) * 2015-04-30 2015-08-19 广东欧珀移动通信有限公司 Shooting method and terminal
CN104978829A (en) * 2015-06-24 2015-10-14 国家电网公司 Indoor smoking monitoring control method and system
CN106303211A (en) * 2015-10-27 2017-01-04 小米科技有限责任公司 Control the method for shooting, Apparatus and system
CN108200354A (en) * 2018-03-06 2018-06-22 广东欧珀移动通信有限公司 Control method and device, imaging device, computer equipment and readable storage medium storing program for executing
CN108289169A (en) * 2018-01-09 2018-07-17 北京小米移动软件有限公司 Image pickup method, device, electronic equipment and storage medium
CN108307120A (en) * 2018-05-11 2018-07-20 优视科技有限公司 Image capturing method, device and electric terminal
CN108683859A (en) * 2018-08-16 2018-10-19 Oppo广东移动通信有限公司 It takes pictures optimization method, device, storage medium and terminal device
CN108734125A (en) * 2018-05-21 2018-11-02 杭州杰视科技有限公司 A kind of cigarette smoking recognition methods of open space
CN109711307A (en) * 2018-12-19 2019-05-03 中科天网(广东)科技有限公司 A kind of smoking evidence collecting method based on recognition of face
US20200045219A1 (en) * 2018-08-06 2020-02-06 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Control method, control apparatus, imaging device, and electronic device
CN110956118A (en) * 2019-11-26 2020-04-03 浙江大华技术股份有限公司 Target object detection method and device, storage medium and electronic device
CN111031254A (en) * 2020-01-15 2020-04-17 浙江大华技术股份有限公司 Camera mode switching method and device, computer device and readable storage medium
CN111202504A (en) * 2020-02-12 2020-05-29 上海云从汇临人工智能科技有限公司 Abnormal object management method, system, machine readable medium and equipment
CN111310542A (en) * 2019-12-02 2020-06-19 湖南中烟工业有限责任公司 Smoking behavior detection method and system, terminal and storage medium
CN111339997A (en) * 2020-03-20 2020-06-26 浙江大华技术股份有限公司 Method and apparatus for determining ignition region, storage medium, and electronic apparatus
CN111553275A (en) * 2020-04-28 2020-08-18 厦门博海中天信息科技有限公司 Smoking monitoring method, module, device and medium based on AI and thermal imaging
CN112200092A (en) * 2020-10-13 2021-01-08 深圳龙岗智能视听研究院 Intelligent smoking detection method based on variable-focus movement of dome camera
CN112699750A (en) * 2020-12-22 2021-04-23 南方电网深圳数字电网研究院有限公司 Safety monitoring method and system for intelligent gas station based on edge calculation and AI (Artificial Intelligence)
US20210142059A1 (en) * 2019-11-11 2021-05-13 Lg Electronics Inc. Xr device for providing ar mode and vr mode and method for controlling the same

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008036352A (en) * 2006-08-10 2008-02-21 Omron Corp Cigarette smoke separation apparatus, method and program
CN102519605A (en) * 2012-01-12 2012-06-27 安徽大学 Smoking detection system and device based on infrared thermal image
CN103841324A (en) * 2014-02-20 2014-06-04 小米科技有限责任公司 Shooting processing method and device and terminal device
CN103826062A (en) * 2014-02-27 2014-05-28 北京百纳威尔科技有限公司 Shooting mode switching processing method and device
CN104853111A (en) * 2015-04-30 2015-08-19 广东欧珀移动通信有限公司 Shooting method and terminal
CN104978829A (en) * 2015-06-24 2015-10-14 国家电网公司 Indoor smoking monitoring control method and system
CN106303211A (en) * 2015-10-27 2017-01-04 小米科技有限责任公司 Control the method for shooting, Apparatus and system
CN108289169A (en) * 2018-01-09 2018-07-17 北京小米移动软件有限公司 Image pickup method, device, electronic equipment and storage medium
CN108200354A (en) * 2018-03-06 2018-06-22 广东欧珀移动通信有限公司 Control method and device, imaging device, computer equipment and readable storage medium storing program for executing
CN108307120A (en) * 2018-05-11 2018-07-20 优视科技有限公司 Image capturing method, device and electric terminal
CN108734125A (en) * 2018-05-21 2018-11-02 杭州杰视科技有限公司 A kind of cigarette smoking recognition methods of open space
US20200045219A1 (en) * 2018-08-06 2020-02-06 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Control method, control apparatus, imaging device, and electronic device
CN108683859A (en) * 2018-08-16 2018-10-19 Oppo广东移动通信有限公司 It takes pictures optimization method, device, storage medium and terminal device
CN109711307A (en) * 2018-12-19 2019-05-03 中科天网(广东)科技有限公司 A kind of smoking evidence collecting method based on recognition of face
US20210142059A1 (en) * 2019-11-11 2021-05-13 Lg Electronics Inc. Xr device for providing ar mode and vr mode and method for controlling the same
CN110956118A (en) * 2019-11-26 2020-04-03 浙江大华技术股份有限公司 Target object detection method and device, storage medium and electronic device
CN111310542A (en) * 2019-12-02 2020-06-19 湖南中烟工业有限责任公司 Smoking behavior detection method and system, terminal and storage medium
CN111031254A (en) * 2020-01-15 2020-04-17 浙江大华技术股份有限公司 Camera mode switching method and device, computer device and readable storage medium
CN111202504A (en) * 2020-02-12 2020-05-29 上海云从汇临人工智能科技有限公司 Abnormal object management method, system, machine readable medium and equipment
CN111339997A (en) * 2020-03-20 2020-06-26 浙江大华技术股份有限公司 Method and apparatus for determining ignition region, storage medium, and electronic apparatus
CN111553275A (en) * 2020-04-28 2020-08-18 厦门博海中天信息科技有限公司 Smoking monitoring method, module, device and medium based on AI and thermal imaging
CN112200092A (en) * 2020-10-13 2021-01-08 深圳龙岗智能视听研究院 Intelligent smoking detection method based on variable-focus movement of dome camera
CN112699750A (en) * 2020-12-22 2021-04-23 南方电网深圳数字电网研究院有限公司 Safety monitoring method and system for intelligent gas station based on edge calculation and AI (Artificial Intelligence)

Similar Documents

Publication Publication Date Title
CN111355864B (en) Image flicker elimination method and device
CN109299703B (en) Method and device for carrying out statistics on mouse conditions and image acquisition equipment
CN111294526B (en) Processing method and device for preventing camera from being burnt by sun
CN108566516B (en) Image processing method, device, storage medium and mobile terminal
CN108288044B (en) Electronic device, face recognition method and related product
CN111339997B (en) Fire point area determination method and device, storage medium and electronic device
CN104966375A (en) Security monitoring system and monitoring method
CN111489342B (en) Video-based flame detection method, system and readable storage medium
CN111010547A (en) Target object tracking method and device, storage medium and electronic device
CN109327691B (en) Image shooting method and device, storage medium and mobile terminal
US8411947B2 (en) Video processing to detect movement of an object in the scene
CN104486542A (en) Triggering picture taking method and device
CN113473010B (en) Snapshot method and device, storage medium and electronic device
CN104052911A (en) Information processing method and electronic device
CN111354024A (en) Behavior prediction method for key target, AI server and storage medium
CN110191324B (en) Image processing method, image processing apparatus, server, and storage medium
CN109948479B (en) Factory monitoring method, device and equipment
KR20160061614A (en) Fire detection system
CN113343859A (en) Smoking behavior detection method and device, storage medium and electronic device
CN108847191B (en) Backlight adjusting system, backlight adjusting method and device thereof, and intelligent interaction equipment
CN109447927B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN115620179A (en) Fire detection method and device based on unmanned aerial vehicle, electronic equipment and medium
CN112616049B (en) Monitoring equipment water mist frost treatment method, device, equipment and medium
CN115061380A (en) Device control method and device, electronic device and readable storage medium
KR101546917B1 (en) System and method for controlling night image correction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210903

RJ01 Rejection of invention patent application after publication