CN110503005A - Smoking detection method, system and its storage medium based on intelligence community - Google Patents

Smoking detection method, system and its storage medium based on intelligence community Download PDF

Info

Publication number
CN110503005A
CN110503005A CN201910690938.3A CN201910690938A CN110503005A CN 110503005 A CN110503005 A CN 110503005A CN 201910690938 A CN201910690938 A CN 201910690938A CN 110503005 A CN110503005 A CN 110503005A
Authority
CN
China
Prior art keywords
image
smoking
cigarette
source images
obtains
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
CN201910690938.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.)
Evergrande Intelligent Technology Co Ltd
Original Assignee
Evergrande Intelligent 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 Evergrande Intelligent Technology Co Ltd filed Critical Evergrande Intelligent Technology Co Ltd
Priority to CN201910690938.3A priority Critical patent/CN110503005A/en
Publication of CN110503005A publication Critical patent/CN110503005A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of smoking detection method based on intelligence community, comprising: described image data definition is that source images store by the image data that non-smoking area is obtained by Community Watch equipment;The outer visual intensity of collection room, carries out heat pattern image analysis or grayscale mode image analysis according to the visual intensity;Binding analysis result and then completion whether there is the detection of cigarette smoking to non-smoking area.Light strong noon using heat pattern analyze, and in the morning or the dusk time-division using grayscale mode analyze, it is high-precision detect non-smoking area cigarette smoking while save system operations resource.

Description

Smoking detection method, system and its storage medium based on intelligence community
Technical field
The present embodiments relate to intelligence community field more particularly to a kind of community smoking management-control methods, system and calculating Machine storage medium.
Background technique
With the development of the times, the emphasis quality of life of people more, intelligence community also start to develop therewith.Intelligence community It is a kind of new concept of community management, is a kind of new model of innovation in social management under the new situation.Intelligence community refers to abundant benefit With the integrated application of the generation information technologies such as Internet of Things, cloud computing, mobile Internet, for community resident provide a safety, Comfortably, the modernization of traversal, wisdom living environment, to be formed based on informationization, the one of social management and service can only be changed The new management form community of kind.
The considerations of in existing community for prevention fire, smoking seat and non-smoking area can be divided into.But often department resident Plot planning is not known or ignores cell regulation, carries out cigarette smoking, the issuable Mars of institute or cigarette ash in non-smoking area It is easy to light flowers and plants plant around, forms fire.
In the smoking monitoring step for carrying out non-smoking area, the judgement to cigarette smoking or feature of smoking certainly will be related to, and It is lower to the image-recognizing method accuracy of smoking feature in the prior art, it is easy to appear erroneous judgement phenomenon.
Summary of the invention
To solve the above problems, the embodiment of the invention provides a kind of smoking detection method based on intelligence community, including Following steps:
Described image data definition is source images progress by the image data that non-smoking area is obtained by Community Watch equipment Storage;
The outer visual intensity of collection room, carries out heat pattern image analysis or grayscale mode image according to the visual intensity Analysis;
Binding analysis result and then completion whether there is the detection of cigarette smoking to non-smoking area.
The present invention also provides a kind of smoking detection systems characterized by comprising
Memory module determines described image data for obtaining the image data of non-smoking area by Community Watch equipment Justice is that source images are stored;
Image analysis module carries out heat pattern image according to the visual intensity for the outer visual intensity of collection room Analysis or grayscale mode image analysis;
Detection module for binding analysis result and then completes the detection that whether there is cigarette smoking to non-smoking area.
The present invention also provides a kind of computer storage mediums, which is characterized in that the computer readable storage medium memory Containing computer is in need, and the computer program can be performed by least one processor, so that at least one described processing is held Row is such as the step of the smoking detection method described in any item of the claim 1 to 8 based on intelligence community.
Smoking detection method provided by the present invention based on intelligence community obtains non-smoking area by Community Watch equipment Image data, by described image data definition be source images store;The outer visual intensity of collection room, according to described visible Luminous intensity carries out heat pattern image analysis or grayscale mode image analysis;Binding analysis result so complete to non-smoking area whether There are the detection of cigarette smoking, analyzed at light strong noon using heat pattern, and in the morning or use gray scale the dusk time-division Pattern analysis saves system operations resource while the cigarette smoking of high-precision detection non-smoking area.
Detailed description of the invention
Fig. 1 is the step flow chart of the smoking detection method provided by the present invention based on intelligence community;
Fig. 2 is the flow diagram of step S200 in the smoking detection method provided by the invention based on intelligence community;
Fig. 3 is the flow diagram of step S210 in the smoking detection method provided by the invention based on intelligence community;
Fig. 4 is the flow diagram of step S212 in the smoking detection method provided by the invention based on intelligence community;
Fig. 5 is a kind of program module schematic diagram of detection system of smoking provided by the invention;
Fig. 6 is the hardware structural diagram of computer equipment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is to be only in for the purpose of describing particular embodiments, is not intended to be limiting The present invention.In the embodiment of the present invention and the "an" of singular used in the attached claims, " described " and "the" It is also intended to including most forms, unless the context clearly indicates other meaning.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It will be appreciated that though nominal key may be described using term first, second etc. in embodiments of the present invention, But nominal key should not necessarily be limited by these terms.These terms are only used to for nominal key being distinguished from each other out.For example, not taking off In the case where from range of embodiment of the invention, the first nominal key can also be referred to as the second nominal key, similarly, the Two nominal keys can also be referred to as the first nominal key.
Depending on context, word as used in this " if " can be explained and be known as " ... when " or " when ... When " or " corresponding to determining " or " in response to detection ".Similarly, depend on context, phrase " if it is determined that " or " if detection (condition of statement or the time) " can be construed as " when determining " or " in response to determination " or " when detection (condition of statement or Event) when " or " in response to detection (condition or event of statement) ".
Referring to FIG. 1, the embodiment of the present invention provides a kind of smoking detection method based on intelligence community, comprising:
Step S100 obtains the image data of non-smoking area by Community Watch equipment, is source by described image data definition Image is stored.
Existing intelligence community, it will usually which monitoring device is placed in each position of surrounding in garden, for example for multiple functions The functions such as security monitoring, corresponding, all monitoring device Dou Youyige control centre in intelligence community, each monitoring device are logical It crosses underfloor cabling and is connected to control centre, monitoring center is generally positioned at property center, master control room, or according to the building of communities Person carries out in addition individually placed for practical built environment, and the present invention makes restriction not to this
It is to establish connection with Community Watch equipment executing technical solution of the present invention preliminary step, to Community Watch equipment Network or each monitoring device send test of shaking hands, and feed back correct signal to other side and just complete and Community Watch device network or each prison The connection for controlling equipment is established.
Then begin to the image data that non-smoking area is obtained by the monitoring device of community.Comprising that can smoke in usual community The original intention of setting up of region and non-smoking area, non-smoking area is usually that garden some regions greening amount is big, and certain residents smoke herein It is easy to light the flowers and plants on periphery and trees, to cause the danger such as fire, therefore, existing community can be set up mostly can smoking areas And non-smoking area.
The image data of non-smoking area is obtained by the monitoring device in community, wherein include two ways, it can be in hereafter In be explained in detail, community smoke managing and control system obtain non-smoking area after, deliver it is further to image data in processing unit Parsing, in addition, non-non-smoking area image data can not have to transfer.
Wherein, the two ways of acquisition non-smoking area image data includes:
First, pulling the video flowing for the non-smoking area that Community Watch equipment is recorded, frame image data therein is extracted.
Specifically, Community Watch equipment, i.e. camera, monitoring generated data is usually video stream data, processing Unit is of use Community Watch equipment interface and then obtains its monitor video flow data, according to the preset method of sampling to video fluxion It being intercepted according to middle partial frame image, this method removes the image of shooting monitoring area without directly adapter tube community battery limits, and In the market part monitoring device can only monitoring of a recorded programme, single image can not be shot.
Illustratively, the method for sampling referred in above content is that technical staff is pre-set, strategy can for Ten seconds are basic unit, intercept the frame image in video flowing, frame image is delivered and carries out subsequent cigarette combustion in processing unit Feature analysis.
Second, transferring the monitoring device permission and intermittent utilization monitoring device shooting non-smoking area image.
Specifically, part high-performance grade camera on existing market can recorded video can also carry out single picture into Row shooting, in this regard, processing unit can directly transfer monitoring device permission, it is intermittent to shoot non-smoking area figure using monitoring device Picture, and deliver in processing unit, which may will affect monitoring device and generate shadow for the recording of video flowing itself It rings, but the step of processing unit intercepts frame image from video stream data can be reduced, the duration of parsing link can be reduced, And then more efficiently complete smoking monitoring overall plan.
The outer visual intensity of step 200 collection room, carries out heat pattern image analysis or gray scale according to the visual intensity Mode image analysis.
There are two types of the present invention settings image analysis mode, respectively heat pattern image analysis and grayscale mode image analysis, Wherein, heat pattern image analysis is to increase the advanced pretreatment be about to source images and be converted into thermal image, and grayscale mode image divides Analysis is to increase the advanced pretreatment be about to source images and be converted into gray level image.
Specifically, the calculating time is long since source images conversion thermal image is bigger than the calculation amount for being converted into gray level image, But using thermal image to smoking detection in the case that light is strong at noon precision it is higher, thus the present invention is in light is strong Noon is analyzed using heat pattern, and in the morning or analyzed the dusk time-division using grayscale mode, non-smoking area is detected high-precision System operations resource is saved while cigarette smoking.
Step 300 binding analysis result and then completion whether there is the detection of cigarette smoking to non-smoking area.
Smoking detection method provided by the present invention based on intelligence community obtains non-smoking area by Community Watch equipment Image data, by described image data definition be source images store;The outer visual intensity of collection room, according to described visible Luminous intensity carries out heat pattern image analysis or grayscale mode image analysis;Binding analysis result so complete to non-smoking area whether There are the detection of cigarette smoking, analyzed at light strong noon using heat pattern, and in the morning or use gray scale the dusk time-division Pattern analysis saves system operations resource while the cigarette smoking of high-precision detection non-smoking area.
Optionally, the outer visual intensity of step S200 collection room enters hot-die if the visible light is greater than preset threshold The step of formula image analysis includes:
The outer visual intensity of step S210 collection room enters heat pattern image if the visible light is greater than preset threshold Analysis;
If step S220 is less than preset threshold, enter grayscale mode image analysis.
At noon or in the partial period in afternoon, by sunlight impression, if resident wears metal jewelry or other objects Part can reflect sunlight, at this point, the brightness of jewellery is even higher than by image taken by monitoring device The brightness of cigarette butt hot spots, thus by binary conversion treatment image, gray level image is obtained, is matched and is clapped with cigarette butt Intensity model area The monitoring image taken the photograph, it is easy to so that computer accidentally knows jewellery for cigarette butt, so as to cause erroneous judgement, and in the morning or be close to Late, cloudy and rainy etc. the light not strong time-division is then not in such case, therefore, binary conversion treatment image can be used Pretreatment mode, it is therefore, big referring again to preset threshold value according to the intensity value for the outdoor visible light that light sensor is fed back It is small, and then judge whether light is greater than the value for causing to judge situation by accident, if the visible light is greater than preset threshold, enter heat pattern Image analysis;If being less than preset threshold, enter grayscale mode image analysis.
Optionally, the heat pattern image analysis in step S210 includes:
Step S211 carries out thermal image conversion to frame image each in the source images, obtains thermal image set, the source figure It is stored as not covered by the thermal image set.
The present invention first carries out the pretreatment that monitoring image is converted into thermal image, due in conversion process before judging It will increase the coefficient of object material, therefore, the other parameters such as the cigarette brightness value being converted to or color temperature value are not less than easily anti- Therefore the brightness value or color temperature value of the metal jewelry object of light improve the accurate of identification for the feature identification of cigarette combustion Degree, reduces False Rate.
Specifically, according to captured monitoring image and different thermal properties, using the figure in remote sensing image processing software Picture classification feature carries out material classification to monitoring image, and above-mentioned remote sensing image processing software is used to real using ENVI software Existing material classification.
Secondly, each pixel to every class material carries out emissivity simulation, the emissivity of each image source is obtained;
Again, according to the emissivity and the temperature of similar material, the radiation temperature of each pixel is generated;
The temperature of the similar material uses point thermometer, generates the radiation temperature of each pixel;
The temperature of the similar material carries out material electrolyte temperature measuring on the spot using point thermometer or passes through in VEGA simulation software Infrared simulation module obtain material temperature variation data.
Finally, the radiation temperature is converted into image grayscale according to the mapping relations of radiation temperature and gray scale, heat is obtained Infrared image.
The temperature of the material is also possible to material in temperature in different time periods, and this makes it possible to simulate different time The thermal infrared images of section.
Belong to the prior art since visible images are converted into thermal image, the present invention carries out necessary for thermal image conversion The prior art illustrates, can be substituted by any conversion method in the prior art, which is not limited by the present invention.
After converting, in addition the thermal image after conversion is stored, the monitoring image before retaining conversion, i.e. source figure Picture, the source images needs are utilized in subsequent secondary judgment step.
In addition, the quantitative relation of source images and thermal image is 1:1.
Step S212 carries out aspect ratio pair one by one to each image in the thermal image set using preset training sample, The first judging result is obtained, the training sample is the corresponding model comprising cigarette combustion feature;
After thermal image conversion, thermal image set is obtained, using preset training sample in the thermal image set Every image carries out Characteristic Contrast one by one, and then obtains the first judging result.
Specifically, training sample is the pre-stored corresponding model comprising cigarette combustion feature of technical staff, it includes The thermal image sample data of a variety of cigarette combustion features is converted into using thermal image sample data and then completion by monitoring image Thermal image set carries out Characteristic Contrast, and then obtains judging in monitoring image with the presence or absence of the first step of cigarette feature, that is, monitors There are correlated characteristic in image, the correlated characteristic meets under the mode of thermal image as the thermal image feature of cigarette combustion First judging result.
The cigarette ash impurity that step S213 carries out cigarette combustion position to source images carries out feature detection, obtains the second judgement knot Fruit;
After combustion due to cigarette, the residue (referred to herein as cigarette ash impurity) after part is burnt can still be trapped in cigarette butt combustion It burns at position, or is entrained in just in combustion zone, therefore, the present invention does a feature identification step for cigarette ash impurity, in heat Under image cigarette feature and the dual identification judgment step of cigarette ash impurity, the detection accuracy whether smoked to non-smoking area personnel It can increase substantially.
After the completion of identification step, the recognition result i.e. second of judging result is recorded.
In addition step S212 can be interchanged with step S213 sequence.
Step S214 obtains final detection result according to the first judging result and the second judging result.
After first time judging result and second of judging result obtain, by weight coefficient or other judgements can be added The factor carries out comprehensive descision, and then obtains final detection result, and wherein final detection result is divided into " there are personnel's cigarette smokings " Or " personnel's cigarette smoking is not present ".
Optionally, step S212 carries out each image in the thermal image set using preset training sample special one by one Sign compares, and obtains the first judging result, and the training sample is that the corresponding model comprising cigarette combustion feature includes:
Step S212A carries out pixel region time to sequence image first in the thermal image set using preset training sample It goes through, completes the quick lock in region to be verified;
Specifically, in thermal image set include multiple thermal images, the present invention preferably image in set is carried out in order by A processing carries out random unordered processing certainly and equally meets implementation steps of the invention.
Cigarette combustion feature described below in single image is identified, the area of multiple equal parts is divided the image into Training sample is traversed each Deng advanced row fuzzy diagnosis in subregions, and then determines whether there is similar area by domain.
Region to be verified is carried out detailed features with the training sample and compared by step S212B, obtains comparison result;
Similar area to be identified carries out further detailed features comparison as region to be verified, wherein individual figure Picture region to be verified similar with training sample can be for one or multiple, obtain sentencing for single image after comparing in detail Disconnected result.
Step S212C carries out same treatment to the remaining image in the thermal image set, obtains comparison result set.
According to above-mentioned method, same treatment is done to thermal image remaining image, obtains the set of a comparison result, the ratio Include that each thermal image and training sample are matched as a result, exemplary to results set, fits through as " 1 ", match obstructed It crosses and is denoted as " 0 ", comparison result is as follows;
Comparison result=[1,1,1,1,0,1,0]
Step S212D carries out Data Detection to the comparison result set, obtains the first judging result.
The content of examples detailed above is connected, comparison result=[1,1,1,1,0,1,0] judges to whether there is in comparison result 1, and if it exists, then think thermal image set there are correlated characteristic, which is table of the cigarette combustion under thermal image mode Existing feature, if nothing, judging thermal image, there is no correlated characteristics.
Optionally, step S212D carries out Data Detection to the comparison result set, and obtaining the first judging result includes:
The element numerical value of the comparison result set is traversed, is greater than the element numerical value of preset threshold if it exists, then judges institute It states and there is the image data comprising cigarette combustion feature in thermal image set.
Specifically, comparison result can not also be with 1 or 0, the forms of characterization of true or false is exported, can also directly by Carry out result output with degree, for example, comparison result=[45%, 50%, 60,15%], addition judge sentence if comparison result >= 60%, then judge that the thermal image has the image data comprising cigarette combustion feature in combining.
Optionally, the cigarette ash impurity that step S213 carries out cigarette combustion position to source images carries out feature detection, obtains the The step of two judging results includes:
Step S213A transfers the regional location to be verified in the thermal image processing, finds same position area in source images Domain is as cigarette combustion position;
Quick lock in carried out to the region to be verified in thermal image in link in thermal image processing, and thermal image Each location of pixels does not change compared to each location of pixels of source images, therefore, transfer locked in thermal image to school It tests zone position information and projects into source images the region to be identified for quickly obtaining source images, thus, the present invention is to improve identification Cigarette ash impurities identification step designed by precision not will increase too many overall plan due to reducing the link of identification region Complete duration and resource temporary.
Pixel value of the step S213B in the cigarette combustion position according to the source images carries out the inspection of cigarette ash impurity characteristics It surveys, and then obtains the second judging result.
Optionally, the inspection of cigarette ash impurity characteristics is carried out according to the pixel value in the cigarette combustion position described in step S213B It surveys, and then the step of obtaining the second judging result includes:
Step S213B-1 traverses each channel value in cigarette combustion position pixel described in the source images, will be red The pixel that channel value is 200~255 and red color channel value is 200~255 and green channel value is 200~255 is as burning picture Element, using triple channel value be 200~255 pixel as cigarette ash pixel.
Wherein, in cigarette combustion, the color presentation of the substance to burn is orange~red color section, and near Cigarette ash be gray~black interval, thus be converted to corresponding RGB coordinate and be, the material color section burnt is red Channel value 200~255 and, the pixel value section that red color channel value is 200~255 and green channel value is 200~255, and It is 200~255 that cigarette ash, which corresponds to the section RGB as triple channel value,.
In addition, above-mentioned interval value is the preferred value area of the invention by counting in numerous cigarette combustion collecting samples Between, it can slightly be adjusted according to actual scene.
Step S213B-2 counts the total number of the burning pixel and the cigarette ash pixel, judges the two number ratio Whether meet preset threshold, if meeting, determines that source images meet normal cigarette combustion feature.
Since in normal smoking process, the cigarette ash impurity after burning can be entrained in the periphery just in combustible substance, pass through It finds in a large amount of cigarette combustion sample that designer of the present invention is collected, during normal cigarette smoking, excludes not Bullet walks the behavior of cigarette ash, and the number of pixels of cigarette ash impurity is than being 1:10~1:30 with the combustible substance number of pixels ratio to burn Interval range content, answer this, identified in region to be identified that each pixel is statistics combustion after combustible substance pixel or cigarette ash pixel It burns the number of substance pixel and cigarette ash pixel and calculates the two number ratio, judge whether its calculated result meets 1:10~1: 30 sections, if so, cigarette ash feature identification step passes through, there are cigarette ash features in source images, meet normal cigarette combustion phenomenon.
In addition, cigarette combustion position, that is, region to be identified.
Optionally, the inspection of cigarette ash impurity characteristics is carried out according to the pixel value in the cigarette combustion position described in step S213B It surveys, and then the step of obtaining the second judging result further include:
Cigarette combustion position described in the source images is bonded using preset pixel square, calculates the fitting The variance yields of area pixel successively traverses all areas at the cigarette combustion position in the same way, obtains variance value set, Numerical check is carried out to the variance yields, if numerical check is greater than preset threshold by probability, determines that the source images meet Normal cigarette combustion feature.
Except the provided cigarette ash feature detection of step S213B-1 and step S213B-2, the present invention also provides another kinds to gather around There is the cigarette ash recognition methods of more pinpoint accuracy, that is, the calculating of variance yields is utilized, since cigarette ash is entrained in just in combustible substance area In domain, therefore, a block of pixels in the pixel region that can be 3*3 or 9*9 etc., is easy to appear the cigarette ash of a gray Therefore pixel and five combustible substance pixels to take on a red color can set a block of pixels calculation block, treat identification region pixel into Row traversal, calculation block is preferably a block of pixels of 9*9, sequentially can be since edge, can also be among region to be identified Equal positions start, and after the pixel that frame selects in region to be identified, variance yields in calculation block is traversed according to same manner wait know Variance value set after the completion of calculating is calculated the average value of its all variance yields by the pixel in other region, is judged described average Whether value meets preset threshold, if meeting, there are cigarette ash features in source images, meets normal cigarette combustion phenomenon.
In addition, designer analyzes to obtain threshold value by great amount of samples data through the invention.
According to the first judging result and the second judging result, the step of obtaining final detection result, is specially
If first judging result and second judging result are very, judging non-smoking area, there are personnel's suctions Cigarette behavior;
If it is not, then continuing follow-up monitoring.
Specifically, if the first judging result be true and the second judging result be it is true, what non-smoking area was collected Monitoring image meets cigarette combustion feature under thermal image mode, while also meeting cigarette ash feature, then judges that non-smoking area is deposited In resident's cigarette smoking.Area information corresponding to described image data can be transferred and to community's audio frequency apparatus network in the region Audio frequency apparatus send phonetic warning, utilize the audio frequency apparatus to play the phonetic warning and remind smoker.
Wherein, the mode of the playing request and broadcasting content, which can be, first sends the request and broadcasting content To control centre, community, smoking phenomenon generation area place is sent to using broadcast mechanism or paging way by control centre Audio frequency apparatus, by the device plays phonetic warning.
According to the first judging result and the second judging result, before the step of obtaining final detection result, further includes:
Weighted value is assigned to first judging result and second judging result according to preset weight coefficient;
Detecting cigarette combustion adjacent margins region whether there is the rectangular pixels block of gray, if comprising mentioning The high second judging result respective weights value;
According to the weighted value of first judging result and the weighted value of the second judging result, the non-smoking area is judged With the presence or absence of personnel's cigarette smoking.
In addition, the embodiment that above content refers to is the behavior phenomenon for eliminating resident and not flicking the ash off a cigarette, but reality scene In, still there is the behavior phenomenon not flicked the ash off a cigarette in smoker, therefore, to further increase the accurate of smoking detection overall plan Degree, addition detection cigarette combustion adjacent margins region whether there is the link of the rectangular pixels block of gray, not by smoker The behavior to flick the ash off a cigarette is also included in judgment criteria, more further confirms cigarette combustion feature, also, due to cigarette ash not bullet meeting Retain the original cylinder of its cigarette, is rectangle in the picture.
In addition, weight coefficient is arranged to judging result caused by each link, and then calculate judgement caused by each link As a result corresponding weighted value, calculates whether weighted value summation score meets preset threshold, if so, determining there is smoking row For.The utilization of weighted value belongs to the prior art, and the present invention does not repeat them here.
Optionally, if step S220 is less than preset threshold, enter the grayscale mode image in grayscale mode image analysis Analytical procedure includes:
Step S221 carries out binary conversion treatment to frame image each in the source images, obtains gray level image set, the source Image is not covered by the gray level image set and is stored;
Binary conversion treatment be image preprocessing a kind of prior art, the present invention to this without repeating, in source images Each frame image carry out binary conversion treatment after, the set comprising multiple gray level images is obtained, since source images are in subsequent judgement In also need to use, so the source images are stored separately with the gray level image set,
Step S222 carries out aspect ratio one by one to each image in the gray level image set using preset training sample It is right, the first judging result is obtained, the training sample is the corresponding model comprising cigarette combustion feature;
The cigarette ash impurity that step S223 carries out cigarette combustion position to source images carries out feature detection, obtains the second judgement knot Fruit;
Step S224 obtains final detection result according to the first judging result and the second judging result.
Specifically, step S222~S224 is identical as the elaboration content in above-mentioned heat pattern image.
Optionally, according to the first judging result and the second judging result, obtain final detection result includes: step S224
Step 224A carries out pixel region time to sequence image first in the gray level image set using preset training sample It goes through, completes the quick lock in region to be verified;
Region to be verified is carried out detailed features with the training sample and compared by step 224B, obtains comparison result;
Step 224C carries out same treatment to the remaining image in the gray level image set, obtains comparison result set;
Step 224D carries out Data Detection to the comparison result set, obtains the first judging result.
Specifically, the elaboration content more than step 224A and step 224C in above-mentioned heat pattern image is identical.
In addition, the present invention also provides a kind of smoking detection systems, comprising:
Memory module 100, for obtaining the image data of non-smoking area by Community Watch equipment, by described image data Source images are defined as to be stored.
Image analysis module 200 carries out heat pattern figure according to the visual intensity for the outer visual intensity of collection room As analysis or grayscale mode image analysis;
Detection module 300 for binding analysis result and then completes the detection that whether there is cigarette smoking to non-smoking area.
Optionally, image analysis module 200 is further used for:
The outer visual intensity of collection room enters heat pattern image analysis if the visible light is greater than preset threshold;
If being less than preset threshold, enter grayscale mode image analysis.
Optionally, image analysis module 200 is further used for:
Thermal image conversion is carried out to frame image each in the source images, obtains thermal image set, the source images are not by institute State the covering storage of thermal image set
Aspect ratio pair one by one is carried out to each image in the thermal image set using preset training sample, obtains first Judging result, the training sample are the corresponding model comprising cigarette combustion feature;
The cigarette ash impurity for carrying out cigarette combustion position to source images carries out feature detection, obtains the second judging result;
According to the first judging result and the second judging result, final detection result is obtained.
Optionally, image analysis module 200 is further used for:
Pixel region traversal is carried out to sequence image first in the thermal image set using preset training sample, is completed to school Test the quick lock in region;
Region to be verified is carried out detailed features with the training sample to compare, obtains comparison result;
Same treatment is carried out to the remaining image in the thermal image set, obtains comparison result set;
Data Detection is carried out to the comparison result set, obtains the first judging result.
Optionally, image analysis module 200 is further used for:
The regional location to be verified in the thermal image processing is transferred, co-located region is as cigarette in searching source images Hot spots;
The detection of cigarette ash impurity characteristics is carried out according to the pixel value in cigarette combustion position described in the source images, and then is obtained To the second judging result.
Optionally, image analysis module 200 is further used for:
Each channel value in cigarette combustion position pixel described in the source images is traversed, is 200 by red color channel value ~255 and red color channel value is 200~255 and green channel value is 200~255 pixel as burning pixel, by triple channel Value be 0~50 pixel as cigarette ash pixel;
It is default to judge whether the two number ratio meets for the total number for counting the burning pixel and the cigarette ash pixel Threshold value determines that source images meet normal cigarette combustion feature if meeting.
Or
Cigarette combustion position described in the source images is bonded using preset pixel square, calculates the fitting The variance yields of area pixel successively traverses all areas at the cigarette combustion position in the same way, obtains variance value set, Numerical check is carried out to the variance yields, if numerical check is greater than preset threshold by probability, determines that the source images meet Normal cigarette combustion feature.
Optionally, image analysis module 200 is further used for:
Binary conversion treatment is carried out to frame image each in the source images, obtains gray level image set, the source images not by The gray level image set covering storage;
Aspect ratio pair one by one is carried out to each image in the gray level image set using preset training sample, obtains the One judging result, the training sample are the corresponding model comprising cigarette combustion feature;
The cigarette ash impurity for carrying out cigarette combustion position to source images carries out feature detection, obtains the second judging result;
According to the first judging result and the second judging result, final detection result is obtained.
Optionally, image analysis module 200 is further used for:
Pixel region traversal is carried out to sequence image first in the gray level image set using preset training sample, complete to Verify the quick lock in region;
Region to be verified is carried out detailed features with the training sample to compare, obtains comparison result;
Same treatment is carried out to the remaining image in the gray level image set, obtains comparison result set;
Data Detection is carried out to the comparison result set, obtains the first judging result.
Also provide a kind of computer equipment 2 in the present embodiment, the computer equipment 2 is that one kind can be according to being previously set Or the instruction of storage, the automatic equipment for carrying out numerical value calculating and/or information processing.The computer equipment 2 can be personal meter Calculation machine, tablet computer, mobile phone and smart phone are stepped on, and rack-mount server, blade server, tower clothes are also possible to Business device or Cabinet-type server (including server cluster composed by independent server or multiple servers) etc. is for mentioning For the fortune equipment of virtual client.As shown, the computer equipment 2 includes at least, but it is not limited to, system bus can be passed through It is in communication with each other connection memory 21, processor 22, network interface 23 and smoking detection system 20, in which:
In the present embodiment, memory 21 includes at least a type of computer readable storage medium, the readable storage Medium includes mountain village, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access stores (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..In some embodiments, memory 21 can be the internal storage unit of computer equipment 2, such as the hard disk or memory of the computer equipment 2.In other implementations In example, memory 21 can also make the grafting being equipped on the External memory equipment of computer equipment 2, such as the computer equipment 20 Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital) SD card, flash card (Flash Card) etc., certainly, memory 21 can also both including computer equipment 2 internal storage unit and also including outside it Store equipment.In the present embodiment, 21 Yongchang of memory is for storing the operating system and types of applications for being installed on computer equipment 2 Software, such as the program code etc. of community's smoking managing and control system 20.In addition, memory 21 can be also used for temporarily storing Output or the Various types of data that will be exported.
Processor 22 can be in some embodiments central processing unit (Central Processing Unit, CPU), Controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in control computer equipment 2 Overall operation.In the present embodiment, program code or processing data of the processor 22 for being stored in run memory 21, example Smoking detection system 20 is such as run, a kind of method to realize smoking detection based on intelligence community.
The network interface 23 may include radio network interface or finite element network interface, which is commonly used in Communication connection is established between the computer equipment 2 and other electronic devices.For example, the network interface 23 is for passing through network The computer equipment 2 is connected with exterior terminal, establishes data transmission channel between computer equipment 2 and external interrupt With communication connection etc..The network can be intranet (Intranet), internet (Internet), global system for mobile telecommunications System (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), 4G network, 5G network, bluetooth (Bluetooth), Wi-Fi etc. is wireless or has Gauze network.
It should be pointed out that Fig. 6 is illustrated only with it should be pointed out that Fig. 6 illustrates only the meter with component 20-23 Machine equipment 2 is calculated, it should be understood that be not required for implementing all components shown, the implementation that can be substituted is more or more Few component.
In the present embodiment, the community smoking detection system 20 being stored in memory 21 can also be divided into one A or multiple program modules, one or more of program modules are stored in memory 21, and by one or more Processor (the present embodiment is processor 22) is performed, to complete the present invention.
In addition, the present embodiment also provides a kind of computer readable storage medium, as flash memory, hard disk, multimedia card, card-type are deposited Reservoir (for example, SD or DX memory etc.), static random-access memory (SRAM), read-only is deposited random access storage device (RAM) Reservoir (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, Disk, CD, server, App are stored thereon with computer program, realization when program is executed by processor using store etc. Corresponding function.The computer readable storage medium of the present embodiment is real when being executed by processor for storing smoking detection system 20 The existing smoking detection method of the invention based on intelligence community.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment, also, each step can carry out reasonability exchange in description.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair The equivalent structure or equivalent flow shift that bright specification and accompanying drawing content are done is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of smoking detection method based on intelligence community characterized by comprising
Described image data definition is that source images are deposited by the image data that non-smoking area is obtained by Community Watch equipment Storage;
The outer visual intensity of collection room carries out heat pattern image analysis or grayscale mode image point according to the visual intensity Analysis;
Binding analysis result and then completion whether there is the detection of cigarette smoking to non-smoking area.
2. the smoking detection method according to claim 1 based on intelligence community, which is characterized in that can outside the collection room Light-exposed intensity carries out heat pattern image analysis according to the visual intensity or the step of grayscale mode image analysis includes
The outer visual intensity of collection room enters heat pattern image analysis if the visible light is greater than preset threshold;
If being less than preset threshold, enter grayscale mode image analysis.
3. the smoking detection method according to claim 2 based on intelligence community, which is characterized in that the heat pattern image The step of analysis includes:
Thermal image conversion is carried out to frame image each in the source images, obtains thermal image set, the source images are not by the warm Image collection covering storage
Aspect ratio pair one by one is carried out to each image in the thermal image set using preset training sample, obtains the first judgement As a result, the training sample is the corresponding model comprising cigarette combustion feature;
The cigarette ash impurity for carrying out cigarette combustion position to source images carries out feature detection, obtains the second judging result;
According to the first judging result and the second judging result, final detection result is obtained.
4. the smoking detection method according to claim 3 based on intelligence community, which is characterized in that described using preset The step that training sample carries out aspect ratio pair one by one to each image in the thermal image set includes:
Pixel region traversal is carried out to sequence image first in the thermal image set using preset training sample, completes area to be verified The quick lock in domain;
Region to be verified is carried out detailed features with the training sample to compare, obtains comparison result;
Same treatment is carried out to the remaining image in the thermal image set, obtains comparison result set;
Data Detection is carried out to the comparison result set, obtains the first judging result.
5. the smoking detection method according to claim 2 based on intelligence community, which is characterized in that it is described to source images into The cigarette ash impurity of cigarette hot spots of holding or participate in a prayer service at a temple carries out feature detection, and the step of obtaining the second judging result includes:
The regional location to be verified in the thermal image processing is transferred, co-located region is as cigarette combustion in searching source images Position;
The detection of cigarette ash impurity characteristics is carried out according to the pixel value in cigarette combustion position described in the source images, and then obtains the Two judging results.
6. the smoking detection method according to claim 5 based on intelligence community, which is characterized in that the cigarette combustion portion Pixel value in position carries out the detection of cigarette ash impurity characteristics, and then the step of obtaining the second judging result includes:
Each channel value in cigarette combustion position pixel described in the source images is traversed, is 200~255 by red color channel value The pixel that with red color channel value be 200~255 and green channel value is 200~255 is used as burning pixel, is by triple channel value 0~50 pixel is as cigarette ash pixel;
The total number for counting the burning pixel and the cigarette ash pixel, judges whether the two number ratio meets default threshold Value, if meeting, determines that source images meet normal cigarette combustion feature.
Or
Cigarette combustion position described in the source images is bonded using preset pixel square, calculates the fit area The variance yields of pixel successively traverses all areas at the cigarette combustion position, obtains variance value set, in the same way to institute It states variance yields and carries out numerical check, if numerical check is greater than preset threshold by probability, determine that the source images meet normally Cigarette combustion feature.
7. the smoking detection method according to claim 2 based on intelligence community, which is characterized in that the grayscale mode figure As the step of analysis are as follows:
Binary conversion treatment is carried out to frame image each in the source images, obtains gray level image set, the source images are not described The covering storage of gray level image set;
Aspect ratio pair one by one is carried out to each image in the gray level image set using preset training sample, first is obtained and sentences Break as a result, the training sample is the corresponding model comprising cigarette combustion feature;
The cigarette ash impurity for carrying out cigarette combustion position to source images carries out feature detection, obtains the second judging result;
According to the first judging result and the second judging result, final detection result is obtained.
8. the smoking detection method according to claim 7 based on intelligence community, which is characterized in that described using preset Training sample carries out aspect ratio pair one by one to each image in the gray level image set, obtains the first judging result, the instruction Practicing sample is the step of including the corresponding model of cigarette combustion feature to include:
Pixel region traversal is carried out to sequence image first in the gray level image set using preset training sample, is completed to be verified The quick lock in region;
Region to be verified is carried out detailed features with the training sample to compare, obtains comparison result;
Same treatment is carried out to the remaining image in the gray level image set, obtains comparison result set;
Data Detection is carried out to the comparison result set, obtains the first judging result.
9. a kind of smoking detection system characterized by comprising
Memory module obtains the image data of non-smoking area for passing through Community Watch equipment, is by described image data definition Source images are stored;
Image analysis module carries out heat pattern image analysis according to the visual intensity for the outer visual intensity of collection room Or grayscale mode image analysis;
Detection module for binding analysis result and then completes the detection that whether there is cigarette smoking to non-smoking area.
10. a kind of computer storage medium, which is characterized in that be stored with computer journey in the computer readable storage medium Sequence, the computer program can be performed by least one processors, so that at least one described processing executes such as claim 1 The step of to smoking detection method described in any one of 8 based on intelligence community.
CN201910690938.3A 2019-07-29 2019-07-29 Smoking detection method, system and its storage medium based on intelligence community Pending CN110503005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910690938.3A CN110503005A (en) 2019-07-29 2019-07-29 Smoking detection method, system and its storage medium based on intelligence community

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910690938.3A CN110503005A (en) 2019-07-29 2019-07-29 Smoking detection method, system and its storage medium based on intelligence community

Publications (1)

Publication Number Publication Date
CN110503005A true CN110503005A (en) 2019-11-26

Family

ID=68587690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910690938.3A Pending CN110503005A (en) 2019-07-29 2019-07-29 Smoking detection method, system and its storage medium based on intelligence community

Country Status (1)

Country Link
CN (1) CN110503005A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611966A (en) * 2020-05-29 2020-09-01 北京每日优鲜电子商务有限公司 Target person detection method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510007A (en) * 2009-03-20 2009-08-19 北京科技大学 Real time shooting and self-adapting fusing device for infrared light image and visible light image
CN102519605A (en) * 2012-01-12 2012-06-27 安徽大学 Smoking detection system and device based on infrared thermal image
CN104978829A (en) * 2015-06-24 2015-10-14 国家电网公司 Indoor smoking monitoring control method and system
CN107358164A (en) * 2017-06-13 2017-11-17 深圳市易成自动驾驶技术有限公司 Detection method, device and the computer-readable recording medium of smoking
US20180292910A1 (en) * 2017-04-07 2018-10-11 University Of South Carolina Wearable Computing Device Featuring Machine-Learning-Based Smoking Detection
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
US10282914B1 (en) * 2015-07-17 2019-05-07 Bao Tran Systems and methods for computer assisted operation
CN109815881A (en) * 2019-01-18 2019-05-28 成都旷视金智科技有限公司 Training method, the Activity recognition method, device and equipment of Activity recognition model

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510007A (en) * 2009-03-20 2009-08-19 北京科技大学 Real time shooting and self-adapting fusing device for infrared light image and visible light image
CN102519605A (en) * 2012-01-12 2012-06-27 安徽大学 Smoking detection system and device based on infrared thermal image
CN104978829A (en) * 2015-06-24 2015-10-14 国家电网公司 Indoor smoking monitoring control method and system
US10282914B1 (en) * 2015-07-17 2019-05-07 Bao Tran Systems and methods for computer assisted operation
US20180292910A1 (en) * 2017-04-07 2018-10-11 University Of South Carolina Wearable Computing Device Featuring Machine-Learning-Based Smoking Detection
CN107358164A (en) * 2017-06-13 2017-11-17 深圳市易成自动驾驶技术有限公司 Detection method, device and the computer-readable recording medium of smoking
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
CN109815881A (en) * 2019-01-18 2019-05-28 成都旷视金智科技有限公司 Training method, the Activity recognition method, device and equipment of Activity recognition model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611966A (en) * 2020-05-29 2020-09-01 北京每日优鲜电子商务有限公司 Target person detection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110503006A (en) A kind of community smoking management-control method, system and its storage medium
CN104516497B (en) Method for controlling electronic device, handheld electronic device and monitoring system
CN106770313A (en) A kind of detecting system of automobile armrest
CN112560547A (en) Abnormal behavior judgment method and device, terminal and readable storage medium
CN101334924A (en) Fire hazard probe system and its fire hazard detection method
KR20070028813A (en) Method and system for monitoring forest fire
CN107067412A (en) A kind of video flame smog detection method of Multi-information acquisition
CN110633675A (en) System and method for identifying fire in video based on convolutional neural network
WO2023231443A1 (en) Commercial lighting system based on aiot and sensor network and lighting method
CN115063942B (en) Fire-fighting fire re-ignition monitoring and early warning method and device, electronic equipment and storage medium
CN110490090A (en) Smoking detection method, system and its storage medium based on intelligence community
CN114494944A (en) Method, device, equipment and storage medium for determining fire hazard level
Wahl et al. How much light do you get? Estimating daily light exposure using smartphones
CN110503005A (en) Smoking detection method, system and its storage medium based on intelligence community
CN110807117A (en) User relationship prediction method and device and computer readable storage medium
CN114155457A (en) Control method and control device based on flame dynamic identification
CN112861676B (en) Smoke and fire identification marking method, system, terminal and storage medium
CN110276310A (en) Smog of smoking determines method and device, storage medium, electronic device
CN113592269A (en) Gas quantity control and scheduling method, device, equipment and storage medium
CN112836608A (en) Forest fire source estimation model training method, estimation method and system
CN110490098A (en) Smoking behavior automatic testing method, equipment and the readable storage medium storing program for executing of community user
CN111127433B (en) Method and device for detecting flame
CN107172402A (en) The course of work of multiple-target system in a kind of video capture
CN115082817A (en) Flame identification and detection method based on improved convolutional neural network
Sudhakar et al. A Novel Lightweight CNN Model for Real-Time Video Fire Smoke Detection

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191126