Summary of the invention:
The present invention is directed to the above-mentioned defective of existing fire monitoring technology, proposition utilizes colour TV camera shooting and monitoring environmental images, employing is carried out difference processing to colour image three-primary colors, and realize automatically the image coordinate and the corresponding conversion of coordinate on the spot realizing accurate judgement and sterically defined fire difference analysis technology to fire.
This method of utilizing the image three-primary colors difference to carry out detection and location comprises:
Absorb the signal of video signal of monitoring of environmental continuously by the CCD camera system;
Signal of video signal is deposited in computing machine or the image pick-up card by selected format;
Signal of video signal processed handle and make fire and judge unusually;
It is characterized in that: (1) described camera system adopts the colored CCD camera system; (2) describedly signal of video signal is processed to handle be that chromatic image is resolved into red (r), green (g), blue (b) three primary colours component image f
r, f
g, f
b, carry out following calculus of differences then:
The first step is made calculus of differences with red primary image and blue primary image, gets red blue colour-difference image, and compares judgement with preset threshold T, gets the colour-difference binary image:
Second step is with difference moment t
i, t
jThe colour-difference binary image carry out calculus of differences again after, obtain the area difference image:
(3) rate of growth of reference area difference image:
(4) judge whether to exist fire unusual:, to exist fire unusual as area rate of growth Δ S during greater than preset threshold G; (5) adopt direct linear transformation (DLT) technology to carry out fire coordinate setting.
Realize the method for image three-primary colors difference computing, it is characterized in that taking following steps: in the memory under program that (1) deposits the sequential instructions desiring to execute the task and control program in computing machine; (2) start computer system, CPU is by instruction that has deposited in and control program, sequentially the executable operations process; (3) open t
iReading command constantly reads red primary component image f respectively
rWith blue primary component image f
b, and carry out difference operation, get i red blue colour-difference image constantly
, deposit in calculator memory or the hard disk; (4) if redder blue primary component is f
r-f
bGreater than given threshold value " T ", output is then arranged, otherwise no-output; (5) open t
jReading command reads red primary component image f respectively constantly
rWith blue primary component image f
b, and carry out difference operation, get j red blue colour-difference image constantly
, deposit in calculator memory or the hard disk; (6) if redder blue primary component is f
r-f
bGreater than given threshold value " T ", output is then arranged, otherwise no-output; (7) compare f
r-f
bAfter red blue colour-difference image, and carry out the second difference computing, the area difference image:
(8) rate of growth of the rapid gained area difference of calculating previous step image
If Δ S then has output greater than setting threshold values G, judging has fire unusual; Otherwise circulation repeats above-mentioned (3)-(8) step.
The invention has the advantages that:
1. utilize of the difference reflection of colour image three-primary colors image first to early stage flame, the automatic differential technique realization of employing red primary image and blue primary image flame separates automatically with background images, the position of detection of fires in image, it need not to add optical filtering equipment, directly carry out the identification of fire, solved and adopted the gray scale image to add the problem that special filtering apparatus detection flame reliability is difficult to improve; The present invention adopts primary colours difference and second order difference, has embodied the intelligent characteristics of human identification large space incipient fire.It had both utilized the color character of flame, having utilized fire again is this thought of out of control burning, the employing of above-mentioned dual criterion has greatly improved the reliability of detection, has overcome other detector and has only utilized the local behavior of fire and physical features easily to produce wrong shortcoming.Because science and technology development, B is substituted by colour TV camera gradually, and this technology will more can adapt to the trend of development.Because the colourful CCD video camera price descends significantly, and need not to add filtering apparatus, adopt this method to increase under few situation in equipment cost, improved the reliability of utilizing the image detection of fires greatly; Adopt this method, can utilize existing closed-circuit television system equipment, by the automatic monitoring of computer realization fire.
2. the present invention combines direct linear transformation DLT (Direct Linear Transformation) technology first with detection, has solved to utilize the image detection of fires not have the space orientation problem that solves in the past.
3. the present invention combines the automatic detection and the space orientation of fire, except automatic warning, by control device, can also realize the early detection of fire and put out a fire to save life and property teamwork automatically, realizes the target that fire has been beaten long ago.
4. adopt the inventive method full and accurate scene of fire chromatic image of record automatically, provide the firsthand information for analyzing cause of fire.
Embodiment:
Below in conjunction with embodiment the inventive method is done further concrete description.
Utilize mini-computer, as 386,486 serial microcomputers, variegate the multi-media image card outward, as Video Blaster SE card, colour TV camera can adopt the ccd video camera of models such as HDCL9206, HDCL9208, the HDCL9216 of Huading company.
Absorb the signal of video signal of monitoring of environmental continuously by colourful CCD video camera, utilize Color Image Acquisition card (or multimedia card) to deposit body in or hard disc of computer on to frame image collection, store with standard formats such as TIFF or PCX, utilize computer program or existing Photostyler software that every frame true color image is resolved into three kinds of basic color images as Microsoft Windows, i.e. width of cloth redness (red) component image, one width of cloth green (green) component image, one width of cloth blueness (blue) component image, depositing computing machine frame interior or image card respectively in deposits in the body, then, red component image and blue component image are subtracted each other, remove background, obtain red blue colour-difference image, and compare judgement, get the colour-difference binary image with the threshold values T that sets:
Suggestion threshold value T value is
For example for the daylight illumination space, T can be taken as 80-100 (gray level).The above results is deposited in the computing machine.
Get two different t constantly respectively
1, t
2The colour-difference binary image, they are carried out difference operation again, obtain the area difference image:
The rate of growth of reference area difference image:
When Δ S when not having fixed threshold value G, can judge to have fire.
The G value can be determined according to the size and the focus of camera experiment in monitoring space.For example, if focal length of camera f=15mm, monitoring bulk is 20m * 30m * 4m, and fire goods are based on wooden product, and then G gets 3 times of area difference image flame edge girths divided by the mistiming; Desirable 3-5 of mistiming second.
If judge to have fire, then further carry out the fire location.Closest approach image coordinate that the flame of getting fire is liftoff
If there are many places to catch fire, then calculate many places image of flames coordinate x respectively
1, y
1, x
2, y
2... x
k, y
k, utilize DLT (direct linear transformation) formula
Calculate fire coordinate position X, Y on the spot, coefficient L in the formula
1-L
8Find the solution by the DLT general-purpose algorithm.
X, Y are imported the system that puts out the fire automatically, can realize the interlock of device of putting out the fire, thereby realize the automatic detection of incipient fire and the work of putting out a fire to save life and property.
Its workflow can be represented by Fig. 1.
Its element can be represented with Fig. 2.
Below be a kind of expression way example of difference software flow and functional language:
Realize that with software mode the difference function is divided into five steps: one, read the ti moment R, G, B three primary colours image to internal memory, red[] [], green[] [], blue[] []
for(i=0;i<height;i++){
for(j=0;j<width;j++){
fread(&red[i][j],sizeof(unsigned?char),1,fp1):
Read the red primary image
fread(&green[i][j],sizeof(unsigned?char),1,fp2);
Read the green primary image
fread(&blue[i][j],sizeof(unsigned?char),1,fp3);
Read the blue primary image
}
Two, form t
iColour-difference image D constantly
Frfb1
for(i=0;i<height;i++){
for(j=0;j<width;i++){
If red[i] [j]-blue[i] [j]>T
D then
Frfb1[i] [j]=1
Otherwise D
Frfb1[i] [j]=0
}
Suggestion T value T=(gray scale image mean value+be not equal to zero minimum gradation value)/2 three, repeat (one) (two) step, try to achieve t
jColour-difference image D constantly
Frfb2Four, according to difference moment t
i, t
jThe colour-difference image of red blueprint elephant constantly, the visual Δ D of the difference of quadraturing
Frfb
for(i=0;i<height;i++){
for(j=0;j<width;j++){
If D
Frfb1[i] [j] equals D
Frfb2[i] [j]
Δ D then
Frfb[i] [j]=1
Otherwise Δ D
Frf[i] [j]=0
}
Five, judge fire development, whether exists, the rate of rise by the calculating fire judges whether to exist out of control burning---fire.The rate of rise of fire adopts area difference image Δ D
FrfbThe independent fire region area removes (t
j-t
i) mistiming calculates, and utilizes the method that region contour extracts in " C language image processing program storehouse " book, with Δ D
FrfbEqual 1 zone and carry out the extraction and the numbering of profile, form the area difference image of each kindling point at last, their gray-scale value is become corresponding sequence number, for fire area, first place, Δ D
Frfb=1; Fire area, second place, Δ D
Frfb=2; Fire area, the 3rd place Δ D
Frfb=3; Fire area, n place Δ D
Frfb==n.
Calculate the area S (1) in n zone, S (2) ..., S (n) (is unit with the pixel)
for(i=0;i<height;i++){
for(j=0;j<width;j++){
If Δ D
Frfb=1, then belong to the 1st zone
S(1)=S(1)+1;
If Δ
Dfrfb=2, then belong to the 2nd zone
S(2)=S(2)+1
If Δ D
Frfb=3, then belong to the 3rd zone
S(3)=S(3)+1;
…………………
If Δ D
Frfb=n then belongs to the n zone
S(n)=S(n)+1
}
}
Zoning rate of rise V (i)
for(i=0;i<n;i++){
V(i)=S(i)/(t
j-t
i)
Judge the existence of fire
for(i=0;i<n;i++){
If V (i)>TV
Then there is fire
Otherwise there is not fire
Suggestion: t
j-t
i=3 seconds~5 seconds
S (i) equals three times of region contour girths
G=S(i)/(t
j-t
i)