CN115937237A - Local feature extraction method based on edge transform domain - Google Patents

Local feature extraction method based on edge transform domain Download PDF

Info

Publication number
CN115937237A
CN115937237A CN202211696232.6A CN202211696232A CN115937237A CN 115937237 A CN115937237 A CN 115937237A CN 202211696232 A CN202211696232 A CN 202211696232A CN 115937237 A CN115937237 A CN 115937237A
Authority
CN
China
Prior art keywords
image
edge
local
pixel
smoke
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
CN202211696232.6A
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.)
Nanchang Normal University
Original Assignee
Nanchang Normal University
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 Nanchang Normal University filed Critical Nanchang Normal University
Priority to CN202211696232.6A priority Critical patent/CN115937237A/en
Publication of CN115937237A publication Critical patent/CN115937237A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a local feature extraction method based on an edge transform domain, which comprises the following steps: 1) Generating an edge feature map: generating an edge characteristic graph of the image by adopting a self-adaptive Canny operator, and capturing high-frequency information on the original image; 2) Generating a coding feature map: generating coding feature maps of different local regions by using 3 local feature patterns such as a Local Binary Pattern (LBP), a Local Boundary Summation Pattern (LBSP), a Local Region Summation Pattern (LRSP) and the like; 3) Calculating local features: mapping the code values in the code characteristic graph by using a mapping method, and calculating a histogram vector to generate local characteristics; 4) Optimizing characteristics: and optimizing the characteristics by utilizing the characteristic selection and the characteristic fusion operation to obtain the final characteristics. The method has good smoke identification capability, and the classification model obtained by training in the smoke identification process can well detect the smoke area in the smoke video, so that a good smoke early warning effect is obtained.

Description

Local feature extraction method based on edge transform domain
Technical Field
The invention belongs to the field of smoke detection, and particularly relates to a local feature extraction method based on an edge transform domain.
Background
Visual smoke detection has become a research hotspot and difficulty in the field of early fire detection, and the detection rate of the visual smoke detection directly influences the application of a visual fire detection technology. In recent years, with the development of technologies such as digital image processing, video analysis, pattern recognition, machine learning, and the like, visual fire detection has been required to have a higher smoke detection rate. The visual characteristics of smoke in a fire generally show the characteristics of changeable form, different colors, large transparency difference, irregular movement and the like, are easily influenced by the external environment, and have poor stability, so that the smoke characteristics with strong expression capability and good robustness extracted from videos and images become the technical problem of improving the smoke detection rate. In an actual monitoring system, different monitoring cameras are influenced by factors such as camera positions, illumination intensity and weather changes, so that smoke distribution in a video image is greatly different from smoke distribution in experimental data. Even if the smoke is present in the same place at the same time, there is a large difference in the characteristics such as color, shape, texture, and the like appearing in the video image. Therefore, the smoke detection method cannot obtain satisfactory performance in the practical application process, and the evaluation indexes such as the detection rate, the false alarm rate, the error rate and the like of the smoke detection method still need to be further improved, so that the smoke characteristics with strong extraction expression capability and good robustness are the precondition for improving the evaluation indexes.
Smoke is generally viewed as a fluid object with blurred edges and variable shape. When the smoke is just appeared, the scene in the video image is blurred, then the straight line edges on the background and other objects gradually disappear, and the curved edges and texture features generated by the smoke are gradually appeared. Smoke is distinctive in texture, edges, etc., with sharp curved, fuzzy edge features, whereas artifacts in a scene typically contain features such as a large number of straight edges, a small number of curved edges, etc. Therefore, it is important to perform edge detection on an image to generate an edge feature map, obtain specific high-frequency information in an original image, and extract features from the edge feature map to enhance the expression capability of smoke features, thereby improving the smoke detection rate.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a local feature extraction method based on an edge transform domain, which comprises the following steps:
1) Generating an edge feature map: generating an edge characteristic graph of the image by adopting a self-adaptive Canny operator, and capturing high-frequency information on the original image;
2) Generating a coding feature map: generating coding feature maps of different local regions by using 3 local feature patterns such as a Local Binary Pattern (LBP), a Local Boundary Summation Pattern (LBSP), a Local Region Summation Pattern (LRSP) and the like;
3) Calculating local features: mapping the code values in the code characteristic graph by using a mapping method, and calculating a histogram vector to generate local characteristics;
4) Optimizing characteristics: and optimizing the characteristics by utilizing the characteristic selection and the characteristic fusion operation to obtain the final characteristics.
Preferably, the Canny operator method in step 1) comprises the following steps:
1) Smoothing the original image by using a second-order Gaussian filter to remove burrs in the image and reduce noise:
let I (x, y) be the original image and S (x, y) be the output image of the smoothed original image. The smoothing operation is to generate a discrete second order gaussian filter g (x, y) by using a gaussian function, and then perform convolution operation on the original image by using the second order gaussian filter to realize the effect of smoothing the image. The expressions of the gaussian function G (x, y) and the calculation S (x, y) are shown in equations (1) and (2), respectively.
Figure BDA0004023550350000021
S(x,y)=I(x,y)*g(x,y) (2)
Wherein σ is a standard deviation of a gaussian function and σ is convolution operation;
2) And (3) calculating the smoothed image by using a finite difference method of a first-order partial derivative to obtain the gradient amplitude and the direction of pixels in the image:
and performing gradient operation on the smoothed image S (x, y) to obtain a gradient magnitude image M (x, y) and a gradient direction image A (x, y). Expressions for calculating M (x, y) and a (x, y) are shown in equations (3) and (4).
Figure BDA0004023550350000031
Figure BDA0004023550350000032
Wherein S is x (x, y) and S y (x, y) represent the partial derivatives in the x and y directions, respectively, and the partial derivatives are generally approximated by first order finite differences, which are expressed as shown in equation (5).
Figure BDA0004023550350000033
The gradient direction calculated by equation (5) is an analog quantity. In order to facilitate the non-maximum suppression of gradient amplitude in the next step, the gradient direction is quantized into 4 values, which represent 4 directions (horizontal, vertical, 45 DEG and-45 DEG), and the gradient direction image obtained after quantization is used as A * (x, y) represents;
3) Non-maximum suppression of gradient amplitudes: the main effect of the gradient magnitude non-maxima suppression is to refine the edge so that the output edge point is a single edge response. Let C (x, y) be the image obtained after the non-maximum suppression, and the specific process of the non-maximum suppression is as follows. For pixel point C (x) 0 ,y 0 ) In the direction image A * Finding out corresponding pixel point A in (x, y) and gradient amplitude M (x, y) * (x 0 ,y 0 ) And M (x) 0 ,y 0 ). In the image M (x, y), M (x) is compared 0 ,y 0 ) Amplitude of (A) * (x 0 ,y 0 ) Two neighborhood magnitudes in the direction indicated. If pixel point M (x) 0 ,y 0 ) Is less than any of the amplitudes of two adjacent pixel points, then pixel point C (x, y) in the C (x, y) image 0 ,y 0 ) Is 0 (i.e., is suppressed), otherwise pixel point C (x) is detected 0 ,y 0 ) Is equal to M (x) 0 ,y 0 );
4) Removing false edges and connecting weak edges by adopting a high threshold and a low threshold to obtain a final edge image:
after obtaining the image C (x, y) with non-maximum value suppression, the high-low threshold value (T) is set H And T L ) Respectively binarizing the images C (x, y) to obtain binary images C H (x, y) and C L (x, y). Image C H (x, y) is generated by using a high threshold, and only contains real edges (strong edges) and does not contain false edges and weak edges, but a phenomenon that a fracture exists on the contour is common. Image C L (x, y) is generated using a low threshold, containing strong and weak edges. From C H (x, y) and C L (x, y) can generate a strong edge image C P (x, y) and weak edge image C W (x, y), the calculation expressions are shown as formulas (6) and (7), respectively.
C P (x,y)=C H (x,y) (6)
C W (x,y)=C L (x,y)-C H (x,y) (7)
Due to strong edge image C P The edges in (x, y) are usually discontinuous, it is necessary to use weak edge images C W The weak edge information in (x, y) connects strong edges. 1) C is to be P Searching C for each unmarked strong edge pixel point P in (x, y) W And 8 neighborhood pixels corresponding to the pixel P in the (x, y). If weak edge pixel points exist in the neighborhood pixel points, marking C P Pixel point P in (x, y) (indicating that P has been searched for) while at C W Marking the weak edge pixel points (representing that the weak edge pixel points are adjacent to the strong edge and are edge points) in (x, y) until C P All strong edge pixels in (x, y) are marked. 2) Image C W Deleting all the unmarked weak edge pixel points in (x, y) to generate an image
Figure BDA0004023550350000041
And will be
Figure BDA0004023550350000042
And C P Adding (x, y) to obtain the final complete binary edge feature map I C (x, y). Image I C In (x, y), the background may be represented by "0" and the edge point may be represented by "1".
The Canny operator needs to use 3 parameters when detecting the edge: standard deviation sigma of Gaussian filter, high and low threshold T when connecting edges H And T L Wherein the high and low thresholds have a greater impact on the results of edge detection. If a fixed high-low threshold is set, on one hand, it is difficult to set a proper high-low threshold, and on the other hand, if a single threshold is used for all images, false edges or missing local edges are easy to detect. Therefore, to improve the adaptability of the high and low thresholds, the gradient magnitude image C (x, y) after non-extremum suppression is normalized to [0, 1%]Obtaining a new gradient amplitude image C * (x, y); then with image C * Calculating high and low thresholds by using an Otsu algorithm on the basis of (x, y); and finally, removing the false edge to obtain a complete edge.
To facilitate the computation of the high and low thresholds using the Otsu algorithm, a new gradient magnitude image C is generated * (x, y) into a grayscale image. Suppose there are two gray value thresholds k 1 And k 2 The gray values of the gradient amplitude gray image can be classified into 3 types: c1, C2 and C3. Where C1 represents a certain class of non-edge points, C3 represents a certain class of edge points, and C2 is between C1 and C3.
The zeroth order moment and the first order moment of the Cj (j =1,2, 3) class are calculated as shown in equations (8) and (9), respectively.
Figure BDA0004023550350000051
Figure BDA0004023550350000052
Where i (i =0, l, 255) is a gray value of the gray image, p i Is the probability of the gray value i appearing in the image, k 0 =-1,k 3 =255。
Let mu let r =ω 1 μ 12 μ 23 μ 3 And calculating the inter-class variance of 3 classes such as C1, C2, C3, etc., as shown in formula (10).
Figure BDA0004023550350000053
Make it
Figure BDA0004023550350000054
And &>
Figure BDA0004023550350000055
Can make the inter-class variance delta 2 (k 1 ,k 2 ) The maximum value is obtained as shown in equation (11).
Figure BDA0004023550350000056
At this time, a low threshold value T of the normalized gradient amplitude image can be obtained L And a high threshold value T H
Figure BDA0004023550350000057
Preferably, the local binary pattern in step 2) is a local descriptor that very effectively represents texture features, the texture distribution in the local region in the image is described by obtaining gradient direction information in the local region, the central pixel may be encoded according to the gradient direction information in the local region, and an encoding expression of the local binary pattern descriptor is shown in formula (13)
Figure BDA0004023550350000061
Wherein P is the number R of sampling points in the local area is the radius of the local area, g c Is the gray value of the central pixel of the local area, g i S (x) is a binarization function for the gray values of the P pixels adjacent to the center pixel.
Figure BDA0004023550350000062
Preferably, the local boundary summation mode method in step 2) is that, for a binary edge feature map, in a local region around a central pixel point and with a specific length as a radius, the gray values of the pixel points on the local region boundary are directly summed to obtain the coded value of the local boundary summation mode, and the expression of the coding is calculated as shown in formula (15)
Figure BDA0004023550350000063
Wherein, g i The gray value of the ith pixel point on the boundary, P the number of the pixel points on the boundary, and R the radius of the local area.
Preferably, the local area summation mode method in step 2) is: for a binary edge feature map, directly summing gray values of all pixel points in a local region around a central pixel point and taking a specific length as a radius to obtain a coded value of a local region summing mode, and calculating a coded expression as shown in formula (16)
Figure BDA0004023550350000064
Wherein, P is the number of pixels in the region, R is the radius of the local region, pixel (x, y) is the central pixel of the local region, B (x, y) represents the gray value of pixel (x, y) in the local region, i is the offset of the central pixel on the x axis, and j is the offset of the central pixel on the y axis.
Compared with the prior art, the local feature extraction method based on the edge transform domain has the following advantages:
(1) The invention introduces the edge feature map, and makes full use of the difference between the smoke and the artificial objects in the edge feature. The self-adaptive Canny operator is adopted for edge detection, so that the adaptability of the edge detection method is improved.
(2) The invention provides two new local feature patterns aiming at the binary edge feature map, which is beneficial to extracting the local features of the binary image, thereby improving the expression capability of the smoke features.
(3) The invention adopts LBP connection mode characteristics on the original image and the edge characteristic image, and improves the expression capability of local binary mode characteristics.
(4) The method has the advantages that the characteristics have good smoke identification capability, the classification model obtained by training in the smoke identification process can well detect the smoke area in the smoke video, and a good smoke early warning effect is obtained.
Drawings
FIG. 1 is a general block diagram of the process of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples.
The invention discloses a local feature extraction method based on an edge transform domain, which comprises the following steps:
1) Generating an edge feature map: generating an edge characteristic graph of the image by adopting a self-adaptive Canny operator, and capturing high-frequency information on the original image;
2) Generating a coding feature map: generating coding feature maps of different local regions by using 3 local feature patterns such as a Local Binary Pattern (LBP), a Local Boundary Summation Pattern (LBSP), a Local Region Summation Pattern (LRSP) and the like;
3) Calculating local features: mapping the coding values in the coding feature graph by using a mapping method, and calculating a histogram vector to generate local features;
4) Optimizing characteristics: and optimizing the characteristics by utilizing the characteristic selection and the characteristic fusion operation to obtain the final characteristics.
Step 1) the Canny operator method comprises the following steps:
1) Smoothing the original image by using a second-order Gaussian filter to remove burrs in the image and reduce noise:
let I (x, y) be the original image and S (x, y) be the output image of the smoothed original image. The smoothing operation is to generate a discrete second order gaussian filter g (x, y) by using a gaussian function, and then perform convolution operation on the original image by using the second order gaussian filter to realize the effect of smoothing the image. The expressions for the gaussian function G (x, y) and the calculation S (x, y) are shown in equations (1) and (2), respectively.
Figure BDA0004023550350000081
S(x,y)=I(x,y)*g(x,y) (2)
Wherein σ is a standard deviation of a gaussian function and σ is convolution operation;
2) And (3) calculating the smoothed image by using a finite difference method of a first-order partial derivative to obtain the gradient amplitude and the direction of pixels in the image:
and performing gradient operation on the smoothed image S (x, y) to obtain a gradient magnitude image M (x, y) and a gradient direction image A (x, y). Expressions for calculating M (x, y) and a (x, y) are shown in equations (3) and (4).
Figure BDA0004023550350000082
Figure BDA0004023550350000083
Wherein S is x (x, y) and S y (x, y) represents the partial derivatives in the x and y directions, respectively, which are generally approximated by a first finite difference, and the expression is shown in equation (5).
Figure BDA0004023550350000091
The gradient direction calculated by equation (5) is an analog quantity. To facilitate the next step of non-maxima suppression of gradient magnitudes, the gradient directions are quantized to 4 values, representing 4 directions (horizontal, vertical, 45 ° and-45 °), and the gradient direction image obtained after quantization is denoted by a * (x, y) represents;
3) Non-maximum suppression of gradient amplitudes: gradient amplitude non-polarThe main effect of large-value suppression is to refine the edge so that the output edge point is a single edge response. Let C (x, y) be the image obtained after the non-maximum suppression, and the specific process of the non-maximum suppression is as follows. For pixel point C (x) 0 ,y 0 ) In the direction image A * Finding out corresponding pixel point A in (x, y) and gradient amplitude M (x, y) * (x 0 ,y 0 ) And M (x) 0 ,y 0 ). In the image M (x, y), M (x) is compared 0 ,y 0 ) Amplitude of (A) * (x 0 ,y 0 ) Two neighborhood magnitudes in the direction indicated. If pixel point M (x) 0 ,y 0 ) Is less than any of the amplitudes of two adjacent pixel points, then pixel point C (x, y) in the C (x, y) image 0 ,y 0 ) Is 0 (i.e., is suppressed), otherwise pixel point C (x) is detected 0 ,y 0 ) Is equal to M (x) 0 ,y 0 );
4) Removing false edges and connecting weak edges by adopting a high threshold and a low threshold to obtain a final edge image:
after obtaining the image C (x, y) with non-maximum value suppressed, the image C is processed by setting a high-low threshold value (T) H And T L ) Respectively binarizing the images C (x, y) to obtain binary images C H (x, y) and C L (x, y). Image C H (x, y) is generated by using a high threshold, and only contains real edges (strong edges) and does not contain false edges and weak edges, but a phenomenon that a fracture exists on the contour is common. Image C L (x, y) is generated using a low threshold, containing strong edges and weak edges. From C H (x, y) and C L (x, y) can generate a strong edge image C P (x, y) and weak edge image C W (x, y), the calculation expressions are shown as formulas (6) and (7), respectively.
C P (x,y)=C H (x,y) (6)
C W (x,y)=C L (x,y)-C H (x,y) (7)
Due to strong edge image C P The edges in (x, y) are usually discontinuous, and it is necessary to use the weak edge image C W The weak edge information in (x, y) connects strong edges. 1) Will C P Searching C for each unmarked strong edge pixel point P in (x, y) W And 8 neighborhood pixels at the positions corresponding to the pixels P in the (x, y). If weak edge pixel points exist in the neighborhood pixel points, marking C P Pixel point P in (x, y) (indicating that P has been searched for) while at C W Marking the weak edge pixel points (representing that the weak edge pixel points are adjacent to the strong edge and are edge points) in (x, y) until C P All strong edge pixel points in (x, y) are marked. 2) Image C W Deleting all the unmarked weak edge pixel points in (x, y) to generate an image
Figure BDA0004023550350000101
And will be
Figure BDA0004023550350000102
And C P Adding (x, y) to obtain the final complete binary edge feature map I C (x, y). Image I C In (x, y), the background may be represented by "0" and the edge point may be represented by "1".
The Canny operator needs 3 parameters for detecting the edge: standard deviation sigma of Gaussian filter, high and low threshold T when connecting edges H And T L Wherein the high and low thresholds have a greater impact on the results of edge detection. If a fixed high-low threshold is set, on one hand, it is difficult to set a proper high-low threshold, and on the other hand, if a single threshold is used for all images, false edges or missing local edges are easy to detect. Therefore, to improve the adaptability of the high and low thresholds, the gradient magnitude image C (x, y) after non-extremum suppression is normalized to [0, 1%]Obtaining a new gradient amplitude image C * (x, y); then with image C * Calculating high and low thresholds by using an Otsu algorithm on the basis of (x, y); and finally, removing the false edge to obtain a complete edge.
To facilitate the computation of the high and low thresholds using the Otsu algorithm, a new gradient magnitude image C is generated * (x, y) into a grayscale image. Suppose there are two gray value thresholds k 1 And k 2 The gray values of the gradient amplitude gray image can be classified into 3 types: c1, C2 and C3. Where C1 represents a certain class of non-edge points, C3 represents a certain class of edge points, and C2 is between C1 and C3.
The zeroth order moment and the first order moment of class Cj (j =1,2,3) are calculated as shown in equations (8) and (9), respectively.
Figure BDA0004023550350000103
Figure BDA0004023550350000111
Where i (i =0, l, 255) is a gray value of the gray image, p i Is the probability of the gray value i appearing in the image, k 0 =-1,k 3 =255。
Let mu let r =ω 1 μ 12 μ 23 μ 3 And calculating the inter-class variance of 3 classes such as C1, C2, C3, etc., as shown in formula (10).
Figure BDA0004023550350000112
Make the grain stand
Figure BDA0004023550350000113
And &>
Figure BDA0004023550350000114
Can make the inter-class variance delta 2 (k 1 ,k 2 ) The maximum value is obtained as shown in equation (11).
Figure BDA0004023550350000115
At this time, a low threshold value T of the normalized gradient amplitude image can be obtained L And a high threshold value T H
Figure BDA0004023550350000116
The local binary pattern in the step 2) is a local descriptor which effectively represents texture features, the texture distribution in the local area in the image is described by obtaining the gradient direction information in the local area, the central pixel can be coded according to the gradient direction information in the local area, and the coding expression of the local binary pattern descriptor is shown as a formula (13)
Figure BDA0004023550350000117
Wherein P is the number R of sampling points in the local area is the radius of the local area, g c Is the gray value of the central pixel of the local area, g i S (x) is a binarization function for the gray values of the P pixels adjacent to the center pixel.
Figure BDA0004023550350000118
The local boundary summation mode method in the step 2) is that aiming at a binary edge characteristic graph, in a local area which surrounds a central pixel point and takes a specific length as a radius, the gray values of pixel points on the boundary of the local area are directly summed to obtain the coded value of the local boundary summation mode, and the expression of the calculated code is shown as a formula (15)
Figure BDA0004023550350000121
Wherein, g i The gray value of the ith pixel point on the boundary, P the number of the pixel points on the boundary, and R the radius of the local area.
The local area summation mode method in the step 2) comprises the following steps: for a binary edge feature map, directly summing gray values of all pixel points in a local region around a central pixel point and taking a specific length as a radius to obtain a coded value of a local region summing mode, and calculating a coded expression as shown in formula (16)
Figure BDA0004023550350000122
Wherein, P is the number of pixels in the region, R is the radius of the local region, pixel (x, y) is the center pixel of the local region, B (x, y) represents the gray value of pixel (x, y) in the local region, i is the offset of the center pixel on the x axis, and j is the offset of the center pixel on the y axis.
To test the performance of the present invention, video smoke detection experiments were conducted using the method of the present invention and conventional techniques related to visual smoke detection.
Example 1 visual smoke detection was performed after feature extraction using the method of the invention.
Comparative example 1 is a real-time fire and flame detection method based on computer vision.
Comparative example 2 is a video smoke detection method based on LBP and LBPV pyramid histogram sequences.
Comparative example 3 is a real-time image smoke detection method based on double-threshold AdaBoost and dynamic analysis of step search.
The smoke video database used in this example and comparative example contained 8 public videos from the network, the 8 videos had a frame rate of 25 frames/second and a resolution of 320x340, and other relevant information is shown in table 1.
Table 1 related information of 8 videos in video database
Figure BDA0004023550350000131
All video frames of 8 videos in the video library are labeled as follows: (1) Each frame of image in the two videos of video1 and video2 is a smoke frame; (2) video3 and video4 are both in the middle of the video, smoke appears until the end of the video, wherein video3 is a non-smoke frame from frame 1 to 189, and is a smoke frame from frame 190 until the end of the video, video4 is a non-smoke frame from frame 1 to frame 9, and is a smoke frame from frame 10 until the end of the video; (3) 4 videos such as video5, video6, video7 and video8 do not contain smoke and are non-smoke frames. Table 3.5 shows that 4 smoke videos contain different smoke such as black smoke, white smoke, dense smoke, light smoke, small area smoke, large area smoke, and the like, and 4 non-smoke videos include different situations such as day, night, small-amplitude motion, large-amplitude motion, and the like, which indicates that the selected video has better representativeness.
The video smoke detection results obtained in example 1 were compared with 3 other smoke detection methods. Table 2 lists the number of frames detected (i.e., the sum of smoke and non-smoke frames), smoke and non-smoke frames, and the number of smoke frames detected by 4 methods over 8 videos in the video smoke detection experiment. The data in table 2 show that example 1 can detect the most smoke frames on 4 smoke videos, no smoke frames on non-smoke videos video5 and video6, and only smoke frames on non-smoke videos video7 and video8, with a small number of false detections.
Table 2 video smoke detection results of 4 methods on 8 videos
Figure BDA0004023550350000141
In order to better evaluate the detection rate of smoke frames in the smoke video, the detection rates of 4 detection methods on 4 smoke videos are calculated, as shown in table 3, wherein the bold faces represent the optimal results on the corresponding smoke videos. As shown by the data in table 3, example 1 achieved the best detection rate over 4 smoke videos, indicating that the proposed feature of example 1 has better smoke recognition capability under the same frame. Further analyzing the detection rate of the embodiment 1 on 4 smoke videos, it is found that the detection rate of the video3 is much lower than that of the other 3 smoke videos, mainly because the smoke concentration in the video3 is low, the smoke edge features in the video frame cannot be extracted well, which indicates that the embodiment 1 has a better detection effect on the smoke with definite edges.
TABLE 3 detection rates of 4 detection methods on 4 smoke videos
Figure BDA0004023550350000142
To illustrate the detection efficiency of the present invention, table 4 lists the time consumption and average speed of smoke detection for 8 videos in example 1. The data in table 4 show that the detection speed of example 1 on 8 videos is greater than 25 frames/second, which indicates that the present invention can meet the speed requirement of real-time processing and has good real-time processing capability.
Table 4 example 1 time consumption and average speed for smoke detection of 8 videos
Figure BDA0004023550350000151
In video smoke detection, after a suspected smoke image block is distinguished by using a smoke identification method, the suspected smoke image block can be positioned, and smoke early warning is carried out. When the smoke early warning function is realized, generally, the alarm is given immediately when smoke appears in one frame of image, so that more false alarms can be caused due to false detection of smoke detection. The false alarm usually needs manual treatment, which greatly wastes human resources and reduces the intelligence of the smoke early warning system. Therefore, in order to realize the accurate and early smoke alarm and avoid false alarm as much as possible, the embodiment and the comparative example adopt a strategy of alarming after continuous multiple frames detect smoke (a continuous multiple frame alarm strategy for short). When setting the frame number threshold of consecutive frames, if the threshold is larger, the accuracy of alarm generation is higher, and the possibility of false alarm generation is lower, but the alarm generation time is also delayed.
Table 5 lists the frame numbers of the first alarm on 4 smoke videos, and example 1 adopts the alarm strategies of consecutive 1, 3, 5 and 7 frames respectively. The data in table 5 show that the frame number for the first smoke alarm is less than the other 3 methods in all 4 strategies in example 1. Data from a continuous 7 frame alarm strategy shows that example 1 is at least 81, 77, 106 and 49 frames earlier in alarm time on 4 smoke videos than the other 3 methods, respectively. Since the video4 generates smoke only from the 10 th frame, and when the continuous 1-frame alarm strategy is adopted in embodiment 1, the frame number of the first alarm on the video4 is 7 (7-10), the smoke alarm at this time is a false alarm. This shows that the accuracy of smoke alarm can be improved by using a continuous multi-frame alarm strategy.
TABLE 5 frame number for 4 methods first alarm on 4 smoke videos
Figure BDA0004023550350000161
Table 6 lists the number of false alarms for 4 non-smoke videos for which the detection method of the present invention employs 4 strategies. Table 6 shows: example 1 only video7 and video8 have false alarms when a continuous 1-frame alarm strategy is adopted; when a continuous 3-frame alarm strategy is adopted, only video8 has false alarm; when the continuous 5-frame and 7-frame alarm strategies are adopted, no false alarm occurs in 4 non-smoke videos. This also shows that the accuracy of smoke alarms can be improved by using a continuous multi-frame alarm strategy.
TABLE 6 number of false alarms on 4 non-smoke videos by the detection method of the present invention
Figure BDA0004023550350000162
The embodiments of the present invention have been described in detail, but the present invention is not limited to the embodiments, and various changes can be made without departing from the gist of the present invention within the knowledge of those skilled in the art. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with each other without conflict.

Claims (5)

1. A local feature extraction method based on an edge transform domain is characterized by comprising the following steps:
1) Generating an edge feature map: generating an edge characteristic graph of the image by adopting a self-adaptive Canny operator, and capturing high-frequency information on the original image;
2) Generating a coding feature map: generating coding feature maps of different local regions by using 3 local feature patterns such as a Local Binary Pattern (LBP), a Local Boundary Summation Pattern (LBSP), a Local Region Summation Pattern (LRSP) and the like;
3) Calculating local features: mapping the code values in the code characteristic graph by using a mapping method, and calculating a histogram vector to generate local characteristics;
4) Optimizing characteristics: and optimizing the characteristics by utilizing the characteristic selection and the characteristic fusion operation to obtain the final characteristics.
2. The method for extracting local features based on the edge transform domain according to claim 1, wherein the Canny operator method in step 1) comprises the following steps:
1) Smoothing the original image by using a second-order Gaussian filter to remove burrs in the image and reduce noise:
let I (x, y) be the original image and S (x, y) be the output image of the smoothed original image. The smoothing operation is to generate a discrete second order gaussian filter g (x, y) by using a gaussian function, and then perform convolution operation on the original image by using the second order gaussian filter to realize the effect of smoothing the image. The expressions for the gaussian function G (x, y) and the calculation S (x, y) are shown in equations (1) and (2), respectively.
Figure FDA0004023550340000011
S(x,y)=I(x,y)*g(x,y) (2)
Wherein σ is a standard deviation of a gaussian function and σ is convolution operation;
2) And (3) calculating the smoothed image by using a finite difference method of a first-order partial derivative to obtain the gradient amplitude and the direction of pixels in the image:
and performing gradient operation on the smoothed image S (x, y) to obtain a gradient magnitude image M (x, y) and a gradient direction image A (x, y). Expressions for calculating M (x, y) and a (x, y) are shown in equations (3) and (4).
Figure FDA0004023550340000021
Figure FDA0004023550340000022
Wherein S is x (x, y) and S y (x, y) represents the partial derivatives in the x and y directions, respectively, which are generally approximated by a first finite difference, and the expression is shown in equation (5).
Figure FDA0004023550340000023
The gradient direction calculated by equation (5) is an analog quantity. In order to facilitate the non-maximum suppression of gradient amplitude in the next step, the gradient direction is quantized into 4 values, which represent 4 directions (horizontal, vertical, 45 DEG and-45 DEG), and the gradient direction image obtained after quantization is used as A * (x, y) represents;
3) Non-maximum suppression of gradient amplitudes: the main effect of the gradient magnitude non-maxima suppression is to refine the edge so that the output edge point is a single edge response. Let C (x, y) be the image obtained after the non-maximum suppression, and the specific process of the non-maximum suppression is as follows. For pixel point C (x) 0 ,y 0 ) In the direction image A * Finding out corresponding pixel point A in (x, y) and gradient amplitude M (x, y) * (x 0 ,y 0 ) And M (x) 0 ,y 0 ). In the image M (x, y), M (x) is compared 0 ,y 0 ) Amplitude of (A) * (x 0 ,y 0 ) Two neighborhood magnitudes in the direction indicated. If pixel point M (x) 0 ,y 0 ) Is less than any of the amplitudes of two adjacent pixel points, then pixel point C (x, y) in the C (x, y) image 0 ,y 0 ) Is 0 (i.e., is suppressed), otherwise pixel point C (x) is detected 0 ,y 0 ) Is equal to M (x) 0 ,y 0 );
4) Removing false edges and connecting weak edges by adopting a high threshold and a low threshold to obtain a final edge image:
after obtaining the image C (x, y) with non-maximum value suppression, the high-low threshold value (T) is set H And T L ) Respectively binarizing the images C (x, y) to obtain binary images C H (x, y) and C L (x, y). Image C H (x, y) is generated by using a high threshold, and only contains real edges (strong edges) and does not contain false edges and weak edges, but a phenomenon that a fracture exists on the contour is common. Image C L (x, y) is generated using a low threshold, containing strong and weak edges. From C H (x, y) and C L (x, y) can generate a strong edge image C P (x, y) and weak edge image C W (x, y), the calculation expressions are shown as formulas (6) and (7), respectively.
C P (x,y)=C H (x,y) (6)
C W (x,y)=C L (x,y)-C H (x,y) (7)
Due to strong edge image C P The edges in (x, y) are usually discontinuous, and it is necessary to use the weak edge image C W The weak edge information in (x, y) connects strong edges. 1) C is to be P Searching C for each unmarked strong edge pixel point P in (x, y) W And 8 neighborhood pixels corresponding to the pixel P in the (x, y). If weak edge pixel points exist in the neighborhood pixel points, marking C P Pixel point P in (x, y) (indicating that P has been searched for) while at C W Marking the weak edge pixel points (representing that the weak edge pixel points are adjacent to the strong edge and are edge points) in (x, y) until C P All strong edge pixels in (x, y) are marked. 2) Image C W Deleting all the unmarked weak edge pixel points in (x, y) to generate an image
Figure FDA0004023550340000031
And will->
Figure FDA0004023550340000032
And C P (x, y) are added to obtain the final productIntegral binary edge feature map I C (x, y). Image I C In (x, y), the background may be represented by "0" and the edge point may be represented by "1".
The Canny operator needs 3 parameters for detecting the edge: standard deviation sigma of Gaussian filter, high and low threshold T when connecting edges H And T L Wherein the high and low thresholds have a greater impact on the results of edge detection. If a fixed high-low threshold is set, on one hand, it is difficult to set a proper high-low threshold, and on the other hand, if a single threshold is used for all images, false edges or missing local edges are easy to detect. Therefore, to improve the adaptability of the high and low thresholds, the gradient magnitude image C (x, y) after non-extremum suppression is normalized to [0, 1%]Obtaining a new gradient amplitude image C * (x, y); then with image C * Calculating high and low thresholds by using an Otsu algorithm on the basis of (x, y); and finally, removing the false edge to obtain a complete edge.
To facilitate the computation of the high and low thresholds using the Otsu algorithm, a new gradient magnitude image C is generated * (x, y) into a grayscale image. Suppose there are two gray value thresholds k 1 And k 2 The gray values of the gradient amplitude gray image can be classified into 3 types: c1, C2 and C3. Where C1 represents a certain class of non-edge points, C3 represents a certain class of edge points, and C2 is between C1 and C3.
The zeroth order moment and the first order moment of the Cj (j =1,2, 3) class are calculated as shown in equations (8) and (9), respectively.
Figure FDA0004023550340000041
Figure FDA0004023550340000042
Where i (i =0, l, 255) is the grayscale value of the grayscale image, p i Is the probability of the gray value i appearing in the image, k 0 =-1,k 3 =255。
Let mu let r =ω 1 μ 12 μ 23 μ 3 And calculating the inter-class variance of 3 classes such as C1, C2, C3, etc., as shown in formula (10).
Figure FDA0004023550340000043
Make it
Figure FDA0004023550340000044
And &>
Figure FDA0004023550340000045
Can make the inter-class variance delta 2 (k 1 ,k 2 ) The maximum value is obtained as shown in equation (11). />
Figure FDA0004023550340000046
At this time, a low threshold value T of the normalized gradient amplitude image can be obtained L And a high threshold value T H
Figure FDA0004023550340000047
3. The method as claimed in claim 1, wherein the local binary pattern in step 2) is a local descriptor that effectively represents texture features, the texture distribution in the local region of the image is described by obtaining gradient direction information in the local region, the center pixel can be encoded according to the gradient direction information in the local region, and the encoding expression of the local binary pattern descriptor is shown in formula (13)
Figure FDA0004023550340000051
Wherein, P is the number of sampling points in the local area, R is the radius of the local area, g c Is the gray value of the central pixel of the local area, g i S (x) is a binarization function for the gray values of the P pixels adjacent to the center pixel.
Figure FDA0004023550340000052
4. The method according to claim 1, wherein the local boundary summation pattern in step 2) is that, for a binary edge feature map, in a local region around a central pixel point and with a specific length as a radius, the gray values of pixel points on the local region boundary are directly summed to obtain the coded value of the local boundary summation pattern, and the expression of calculating the coding is shown in formula (15)
Figure FDA0004023550340000053
Wherein, g i The gray value of the ith pixel point on the boundary, P the number of the pixel points on the boundary, and R the radius of the local area.
5. The method for extracting local features based on the edge transform domain according to claim 1, wherein the local region summation mode method in step 2) is: for a binary edge feature map, directly summing gray values of all pixel points in a local region around a central pixel point and taking a specific length as a radius to obtain a coded value of a local region summing mode, and calculating a coded expression as shown in formula (16)
Figure FDA0004023550340000054
Wherein, P is the number of pixels in the region, R is the radius of the local region, pixel (x, y) is the center pixel of the local region, B (x, y) represents the gray value of pixel (x, y) in the local region, i is the offset of the center pixel on the x axis, and j is the offset of the center pixel on the y axis.
CN202211696232.6A 2022-12-28 2022-12-28 Local feature extraction method based on edge transform domain Pending CN115937237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211696232.6A CN115937237A (en) 2022-12-28 2022-12-28 Local feature extraction method based on edge transform domain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211696232.6A CN115937237A (en) 2022-12-28 2022-12-28 Local feature extraction method based on edge transform domain

Publications (1)

Publication Number Publication Date
CN115937237A true CN115937237A (en) 2023-04-07

Family

ID=86649080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211696232.6A Pending CN115937237A (en) 2022-12-28 2022-12-28 Local feature extraction method based on edge transform domain

Country Status (1)

Country Link
CN (1) CN115937237A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116758077A (en) * 2023-08-18 2023-09-15 山东航宇游艇发展有限公司 Online detection method and system for surface flatness of surfboard
CN116824166A (en) * 2023-08-29 2023-09-29 南方电网数字电网研究院有限公司 Transmission line smoke identification method, device, computer equipment and storage medium
CN116977327A (en) * 2023-09-14 2023-10-31 山东拓新电气有限公司 Smoke detection method and system for roller-driven belt conveyor

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116758077A (en) * 2023-08-18 2023-09-15 山东航宇游艇发展有限公司 Online detection method and system for surface flatness of surfboard
CN116758077B (en) * 2023-08-18 2023-10-20 山东航宇游艇发展有限公司 Online detection method and system for surface flatness of surfboard
CN116824166A (en) * 2023-08-29 2023-09-29 南方电网数字电网研究院有限公司 Transmission line smoke identification method, device, computer equipment and storage medium
CN116824166B (en) * 2023-08-29 2024-03-08 南方电网数字电网研究院股份有限公司 Transmission line smoke identification method, device, computer equipment and storage medium
CN116977327A (en) * 2023-09-14 2023-10-31 山东拓新电气有限公司 Smoke detection method and system for roller-driven belt conveyor
CN116977327B (en) * 2023-09-14 2023-12-15 山东拓新电气有限公司 Smoke detection method and system for roller-driven belt conveyor

Similar Documents

Publication Publication Date Title
CN115937237A (en) Local feature extraction method based on edge transform domain
WO2022099598A1 (en) Video dynamic target detection method based on relative statistical features of image pixels
CN108052917B (en) Method for automatically identifying illegal buildings based on new and old time phase change discovery
CN110298297B (en) Flame identification method and device
CN109918971B (en) Method and device for detecting number of people in monitoring video
CN109840483B (en) Landslide crack detection and identification method and device
CN111723644A (en) Method and system for detecting occlusion of surveillance video
Bedruz et al. Real-time vehicle detection and tracking using a mean-shift based blob analysis and tracking approach
CN110428450B (en) Scale-adaptive target tracking method applied to mine tunnel mobile inspection image
CN110782442B (en) Image artificial fuzzy detection method based on multi-domain coupling
CN113177467A (en) Flame identification method, system, device and medium
CN113780110A (en) Method and device for detecting weak and small targets in image sequence in real time
CN113297926A (en) Behavior detection and identification method and system
CN112233111A (en) Tunnel gap detection method based on digital image processing
CN115861359A (en) Self-adaptive segmentation and extraction method for water surface floating garbage image
CN111882525A (en) Image reproduction detection method based on LBP watermark characteristics and fine-grained identification
CN115731257A (en) Leaf form information extraction method based on image
CN112084957B (en) Mobile target retention detection method and system
KR101600617B1 (en) Method for detecting human in image frame
CN106951831B (en) Pedestrian detection tracking method based on depth camera
Lin et al. Locating license plate based on edge features of intensity and saturation subimages
CN108171168B (en) Intelligent image detection method and device for small and weak target change
Enze et al. Inter-frame differencing in training data for artificial intelligence: contour processing for inter-frame differencing method
CN108737814B (en) Video shot detection method based on dynamic mode decomposition
CN111627047A (en) Underwater fish dynamic visual sequence moving target detection method

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