Summary of the invention
Present invention aim to address the problems of the prior art, provide a kind of recognition accuracy height, the low phase of rate of false alarm
Like the object identification method of degree threshold value dynamic setting.
The technical scheme is that providing a kind of object identification method of similarity threshold dynamic setting, including following
Step: similarity threshold S1, is formulated according to the period in one day;Relationship between time T and similarity threshold Y are as follows: if 0 < T
≤ 5, then Y=0.5+0.04T;If 5 < T≤7, Y=0.5;If 7 < T≤17, Y=0.5+ | T-12 | * 0.1;If 17 < T
≤ 19, the Y=0.5 if;If 19 < T≤24, Y=0.5+0.04* (24-T);S2, the video frame frame for obtaining video;S3,
The corresponding time t of video frame frame is obtained, is passed through in step S1 between time T and similarity threshold Y according to the value of time t
Similarity threshold y at this time is calculated in relationship;S4, image recognition is carried out to video frame frame, obtains object category x and calculating
It identifies similarity w, identification similarity w is compared with similarity threshold y and obtains object identification conclusion.
As a kind of perferred technical scheme, the time t in step S3 is integral point timing, that is, takes video frame frame corresponding
Time t hourage.
As a kind of perferred technical scheme, in step S4, image recognition is carried out to video frame frame, calculates identification phase
Method like degree w can be SSIM method.
As a kind of further preferred technical solution, the method for calculating identification similarity w the following steps are included:
A, the base map that a frame contains comparison object is obtained;B, video frame frame and base map are calculated according to SSIM formula and is regarded
The structural similarity of frequency frame frame and base map, structural similarity are to identify similarity w.
As a kind of further preferred technical solution, in step a, the base map of acquisition is different according to the difference of time t.
As a kind of technical solution still more preferably, base map is divided into 5 kinds, 5 kinds of base maps and 5 of time T in step S1
A period is corresponding, according to the corresponding time t of video frame frame, chooses corresponding base map.
As a kind of perferred technical scheme, in step S4, if w is greater than y, judge there is detectable substance in video frame frame
Body saves object category x and similarity threshold y;If w≤y, with no treatment.
As a kind of further preferred technical solution, in step S4, if w is greater than y, judge there is inspection in video frame frame
After surveying object, carries out alarm and upload object category x and similarity threshold y information.
A kind of object identification method of similarity threshold dynamic setting of the invention is according to the change of light and scene in one day
Change feature sets object identification similarity threshold in different time periods, to reduce object identification in intelligence community alarm event
Monitor the rate of false alarm of application scenarios.The object identification method of a kind of similarity threshold dynamic setting of the invention, from actual product
The problem of encountering in is set out, and a kind of object identification Optimization Mechanism of similarity threshold dynamic setting is proposed, to reduce intelligence
Energyization identifies the rate of false alarm of application system, has preferable effect.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
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, " a variety of " generally comprise at least two, but not
It excludes to include at least one situation.
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".
Depending on context, word as used in this " if ", " if " can be construed to " ... when " or
" when ... " or " in response to determination " or " in response to detection ".Similarly, context is depended on, phrase " if it is determined that " or " such as
Fruit detection (condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when detection (statement
Condition or event) when " or " in response to detection (condition or event of statement) ".
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Include, so that commodity or system including a series of elements not only include those elements, but also including not clear
The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that in the commodity or system for including the element also
There are other identical elements.
As shown in Figure 1, a kind of object identification method of similarity threshold dynamic setting of the invention, comprising the following steps:
S1, similarity threshold is formulated according to the period in one day.According to identification wrong report time of origin section statistics, system in one day
Surely it identifies similarity threshold, is described in detail below described in table:
Namely the relationship between time T and similarity threshold Y are as follows: if 0 < T≤5, Y=0.5+0.04T;If 5 < T≤
7, then Y=0.5;If 7 < T≤17, Y=0.5+ | T-12 | * 0.1;If 17 T≤19 <, if Y=0.5;If 19 T≤24 <,
Then Y=0.5+0.04* (24-T).
S2, the video frame frame for obtaining video.
S3, the corresponding time t of video frame frame is obtained, time T and similarity in step S1 is passed through according to the value of time t
Similarity threshold y at this time is calculated in relationship between threshold value Y.By time T in the time t of video frame frame and step S1
Period is judged that the calculation formula of available similarity threshold Y corresponding with t is obtained at this time by calculation formula
Similarity threshold y.
S4, image recognition is carried out to video frame frame, obtain object category x and calculates identification similarity w, will identify phase
It is compared like degree w with similarity threshold y and obtains object identification conclusion.
A kind of object identification method of similarity threshold dynamic setting of the invention is according to the change of light and scene in one day
Change feature sets object identification similarity threshold in different time periods, to reduce object identification in intelligence community alarm event
Monitor the rate of false alarm of application scenarios.
As a kind of perferred technical scheme, in order to simplify calculation amount, in the present embodiment, the time t in step S3 is whole
Point timing, that is, take the hourage of the corresponding time t of video frame frame, such as 17:35 then t=17.
In the present embodiment, in step S4, image recognition is carried out to video frame frame, the method for calculating identification similarity w can
Think SSIM method.At this point, calculate identification similarity w method the following steps are included:
A, the base map that a frame contains comparison object is obtained;
B, video frame frame and base map are calculated to the structural similarity of video frame frame and base map, knot according to SSIM formula
Structure similarity is to identify similarity w.
Specifically, improved SSIM formula can be used: w=s (X, Y)=(δ xy+c3)/(δ x δ y+c3) calculates image
The structural similarity of X and image Y;Wherein s (X, Y) is the covariance of X and Y, and δ x, δ y are x respectively, and the standard deviation of y, c3 is normal
Number.In the present embodiment, image X is base map, and image Y is video frame frame.Conventional SSIM formula is w=[l (X, Y)]α[c
(X,Y)]β[s(X,Y)]θ, wherein α, β, θ > 0.Here l (x, y) is that brightness is compared, and c (x, y) is that contrast compares, s (x, y)
It is that structure compares.In order to adapt to the specific requirements of object identification, structure is only done here and is compared, is i.e. α=β=0, θ=1 is then transformed
SSIM formula afterwards is w=s (X, Y)=(δ xy+c3)/(δ x δ y+c3).Constant c3 is set to avoid denominator as 0 bring system
Mistake.W is the number between 0 to 1, and the structure gap of the bigger two field pictures for indicating comparison is smaller.
In order to avoid being influenced by the variation of different time sections light on base map, object identification accuracy rate, the present embodiment are improved
In step a, the base map of acquisition is different according to the difference of time t.Preferably, base map is divided into 5 kinds, 5 kinds of base maps and step
5 periods of time T are corresponding in rapid S1, according to the corresponding time t of video frame frame, choose corresponding base map.
In the present embodiment, in step S4 " identification similarity w is compared with similarity threshold y and obtains object identification knot
By " concrete scheme be, if w is greater than y, to judge there is detection object in video frame frame, it is synchronous to save object category x and phase
Like degree threshold value y;If w≤y, it is considered as unidentified arrive and corresponds to object, with no treatment.
If also, w is greater than y, judges after having detection object in video frame frame, carries out alarm and by object category x and phase
It is uploaded like degree threshold value y information.In practical applications, the detection and operation of subsequentization intelligent alarm event can be carried out.
A kind of object identification method of similarity threshold dynamic setting of the invention, can be applied to the object in one section of video
Body identification, also can be applied to the object identification of real time monitoring video, the object identification that can also be applied in single image.In
In practical application, circular treatment can be carried out to step S2 to S4, until the object identification of whole section of video finishes, or prison in real time
Object identification is controlled to terminate.
A kind of object identification method of similarity threshold dynamic setting of the invention is according to the change of light and scene in one day
Change feature sets object identification similarity threshold in different time periods, to reduce object identification in intelligence community alarm event
Monitor the rate of false alarm of application scenarios.The object identification method of a kind of similarity threshold dynamic setting of the invention, from actual product
The problem of encountering in is set out, and a kind of object identification Optimization Mechanism of similarity threshold dynamic setting is proposed, to reduce intelligence
Energyization identifies the rate of false alarm of application system, has preferable effect.
It is in summary only preferred embodiments of the present invention, practical range not for the purpose of limiting the invention.That is Fan Yiben
Equivalence changes made by the content of patent application the scope of the patents and modification all should belong to technology scope of the invention.