Flame burning area envelope line digital detection method and device facing EN50399 standard
By combining image preprocessing and perspective transformation techniques with Raspberry Pi hardware, high-precision digital detection of flame shapes under the EN50399 standard was achieved, solving the problems of image distortion and subjective error in traditional detection methods and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202610103040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2046-01-26
AI Technical Summary
Existing technologies for flame shape detection under the EN50399 standard suffer from problems such as image distortion, strong subjectivity of manual interpretation, low efficiency, and complex equipment operation, and lack a digital detection solution for small-scale flames.
By employing image reading and preprocessing, contour detection, perspective transformation, establishment of a real coordinate system, and contour fitting of dark areas, combined with Raspberry Pi hardware and lightweight algorithms, high-precision geometric correction and accurate segmentation of charred areas are achieved.
It achieves high-precision positioning of the flame tip with a repeatability error of ≤0.2mm, eliminates subjective errors, reduces detection costs, and facilitates large-scale application.
Smart Images

Figure CN121582252A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a flame scorching area envelope digitization detection method and device for the EN50399 standard, belonging to the field of computer vision and special equipment safety detection. BACKGROUND
[0002] In the field of safety detection of combustion equipment, the EN 50399 standard is the core technical specification of the European Union for the evaluation of the fire performance of combustion appliances. The flame shape inspection under the 20.5kW nominal heat output condition is a key experimental project for evaluating the thermal radiation distribution, flame stability and safety boundary of combustion equipment, and its detection results directly affect the design optimization, risk control and market access qualification of combustion equipment.
[0003] Currently, the detection of this project in the industry mainly adopts the traditional method of manual shooting combined with subjective interpretation. The experimental personnel vertically shoot the scorching image on both sides of the scorching plate, and identify and mark the flame tip position by naked eye.
[0004] The traditional detection method has many defects: first, the image distortion caused by the camera itself is inevitable during shooting, and the image distortion and angle deviation will cause geometric distortion of the flame shape; second, the manual identification of the scorching boundary with color gradient mutation depends on experience, and different personnel have different threshold values, so the data is subjective; third, manual marking is low in efficiency and difficult to realize large-scale database; fourth, the Plot Digitizer software recommended by the standard is inconvenient to operate, has weak adaptability to complex edges, and the coordinate axis calibration needs to be manually marked with scale points.
[0005] Currently, the application of existing machine vision technology in the field of flame detection is mainly focused on large-scale scenes such as forest fires. For example, a computer vision equipment carried by a drone is combined with deep learning to realize flame area segmentation, but this method is not suitable for small-scale flame detection of combustion equipment. There is also a computer vision classification system based on Raspberry Pi, which only verifies the low-cost advantage of Raspberry Pi and does not involve the core problems of flame contour extraction and distortion correction. There is no special digitization detection scheme for the 20.5kW condition of the EN50399 standard. SUMMARY
[0006] The purpose of the present application is to provide a flame scorching area envelope digitization detection method and device for the EN50399 standard, to realize high-precision geometric correction of images and accurate segmentation of scorching areas, and to complete the quantization of the flame tip position and the boundary maximum value under the specified coordinates, thereby improving the repeatability and accuracy of detection.
[0007] To achieve the above purpose, the technical solutions adopted by the present application are as follows:
[0008] In one aspect, the present application provides a flame burning area envelope digital detection method for EN50399 standard, comprising the following steps:
[0009] Step 1, image reading and preprocessing: reading the original image and converting the color space, screening the high brightness target area through RGB threshold, and removing noise interference by combining morphological operation;
[0010] Step 2, contour detection and light-emitting plate rectangular screening: extracting the contour of the preprocessed image, and screening out four target light-emitting rectangular regions through area, side number and internal angle characteristics;
[0011] Step 3, quadrant division and target confirmation: dividing four quadrants according to the image center, screening out the target rectangle meeting the requirements from each quadrant, and determining the 16 vertex coordinates;
[0012] Step 4, perspective transformation and image splicing: dividing the image into 9 regions according to the 16 vertexes, realizing the geometric correction of each region through perspective transformation, and finally splicing into a standard size image;
[0013] Step 5, low R channel square positioning to establish a real coordinate system: in the specified area of the corrected image, positioning the low R channel dark square and marking the left upper corner vertex through channel threshold screening and contour analysis, taking the vertex as the origin to establish the real coordinate system with X axis (left large and right small) and Y axis (up large and down small);
[0014] Step 6, dark area contour fitting and feature extraction: extracting the dark area contour, positioning the highest point of the contour and calculating the maximum and minimum values of Y under the specified X coordinate, to realize the digital representation of flame shape.
[0015] Further, in step 1, the high brightness area is screened to generate a binary mask with [220, 220, 220]~[255, 255, 255] threshold value, and the target and background contrast is enhanced by morphological opening operation denoising and closing operation hole filling to obtain the high brightness area.
[0016] Further, in step 2, four edges are selected by polygon approximation, right-angled quadrilaterals are selected by calculating internal angles, and four light-emitting rectangular regions are selected by combining area consistency, and the light-emitting rectangular regions are output.
[0017] Further, in step 4, the image is divided into 4 corner rectangles, 4 edge rectangles and 1 center rectangle, a total of 9 regions, and a 3x3 perspective matrix H is solved for each region. The matrix parameters are obtained by solving the linear equation system by least square method, the geometric correction of each region is completed, the mask fusion is carried out to eliminate the splicing traces, and the non-distortion standard image is obtained.
[0018] Furthermore, in step 5, the effective area of the charred plate is extracted as the region of interest. After separating the RGB channels, the region with R channel ≤ 30 is selected. The connectivity is enhanced by morphological operations. Then, an approximate square is selected by area, number of sides, and aspect ratio. Combining the prior knowledge that the target is located in the lower right corner of the ROI, the target is selected by sorting in descending order of the center point coordinates. A coordinate system consistent with the actual physical size is established with its upper left vertex as the origin.
[0019] Furthermore, step 6 specifically includes:
[0020] LAB color space dark area enhancement: Convert the image to LAB color space, separate the brightness channel, enhance the contrast through the CLAHE algorithm, highlight the grayscale difference between the burnt area and the background, and improve the segmentation accuracy;
[0021] Adaptive threshold segmentation and region growing: Initial segmentation of dark areas is achieved based on percentile thresholds of pixel distribution in the luminance channel, and the segmentation results are optimized by combining seed point region growing algorithm to eliminate isolated noise;
[0022] Contour extraction and resampling: Extract the circumscribed contour of the segmented dark area, and achieve uniform distribution of contour points through an equal arc length resampling algorithm, laying the foundation for subsequent fitting;
[0023] Curvature-weighted piecewise fitting: Calculate the curvature value of the contour points after resampling, dynamically adjust the segment length according to the curvature, use finer segments for high curvature regions, and complete the line segment fitting by the least squares method;
[0024] Feature quantization: Based on the fitted envelope, the flame tip coordinates and the maximum and minimum values of Y under the specified X coordinate are located to achieve a digital representation of the flame shape.
[0025] Furthermore, in the adaptive threshold segmentation and region growth, the grayscale distribution of pixels in the brightness channel is statistically analyzed, and the 15th percentile is taken as the segmentation threshold. The initial dark area mask is obtained by binarization. The 20% of pixels with the lowest grayscale value in the dark area are selected as seed points. The 8-neighborhood is used as the growth criterion. When a neighboring pixel is a dark area and has not been visited, it is included in the current region until no new pixels can be grown. During the growth process, a neighborhood validity judgment is introduced: growth is only performed when the number of pixels that meet the condition in the neighborhood is ≥3, so as to avoid noise points being mistakenly included. Finally, isolated noise with an area <50 pixels is removed, and the largest growth area is retained as the scorched area.
[0026] Furthermore, in the contour extraction and resampling, the outer contour of the charred area is extracted and resampled with an arc length of 1 pixel step to make the contour points evenly distributed; the curvature k is calculated by the cross product of three consecutive point vectors, and the curvature of the first and last points is assigned by the adjacent point curvature to avoid boundary anomalies.
[0027] Further, in the curvature weighted piecewise fitting, 10 pixels are taken as the basic segment length, a curvature weighting factor is introduced to adjust the actual segment length, and for a contour point with a curvature k, the calculation formula of the actual segment length seg_len is as follows:
[0028]
[0029] wherein, is a minimum curvature threshold, which is used to avoid distortion of fitting caused by too large seg_len when k is too small;
[0030] For the contour points in each segment, a least square method is used to fit a straight line equation y=ax+b, and the optimal slope a and intercept b are solved to complete the envelope line smoothing fitting.
[0031] On the other hand, the application also provides a flame scorching area envelope line digital detection device for the EN50399 standard, comprising:
[0032] The core control module comprises a machine vision calculation module, which is used for realizing image reading and preprocessing, contour detection and light-emitting plate rectangular screening, quadrant division and target confirmation, perspective transformation and image splicing, real coordinate system establishment, and dark area contour fitting and feature extraction.
[0033] The image acquisition module adopts a camera and is connected with the core control module through an interface, and is matched with an adjustable fixing support to ensure covering the entire scorching plate area.
[0034] The calibration reference module comprises four 50mm*55mm pure green rectangular LED light-emitting plates arranged at four corners of the scorching plate, four vertices of each light-emitting plate form a feature point, and the four light-emitting plates form a total of 16 rigid feature points, which are used for image distortion correction and real coordinate system establishment.
[0035] The application has the following beneficial effects:
[0036] (1) High detection precision: the flame tip positioning repeatability error of the application is less than or equal to 0.2mm, the key contour point fitting repeatability error is less than or equal to 0.2mm, which is much better than the traditional manual detection, and meets the precision requirement of less than or equal to 0.5mm, even in the scene where the boundary of the scorching area is blurred, the error can still be controlled within 0.2mm, and the adaptability is strong.
[0037] (2) Eliminate subjective error: through standardized hardware calibration and automatic algorithm processing, manual naked eye identification and manual marking are replaced, the difference in judgment threshold caused by personnel experience in the traditional method is solved, and the detection result has strong reproducibility.
[0038] (3) Low cost and easy to deploy: based on Raspberry Pi open source hardware and lightweight algorithm, no need for expensive equipment, good portability, suitable for on-site detection scenarios of combustion equipment production enterprises, quality inspection institutions and certification laboratories.
[0039] (4) Quantifiable data: can accurately output flame tip coordinates and Y maximum value under specified X coordinate, providing accurate data support for digital design, simulation and safety evaluation of combustion equipment, making up for the shortcomings of traditional methods which can only describe qualitatively. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is a flowchart of the flame scorching area envelope digitization detection method.
[0041] Figure 2 is a schematic diagram of the overall structure of the flame scorching area envelope digitization detection device.
[0042] Figure 2 The marked 1 is the core control module, 2 is the camera, 3 is the sample of the scorching plate to be tested, 4 is the first light-emitting plate, 5 is the second light-emitting plate, 6 is the third light-emitting plate, and 7 is the fourth light-emitting plate.
[0043] Figure 3 is the original image taken.
[0044] Figure 4 is a perspective transformation correction diagram of the key points divided into 9 regions; (a) is a 9-region division diagram, (b) is a high-light rectangular vertex positioning diagram, and (c) is a corrected image after perspective correction.
[0045] Figure 5 is a real coordinate system establishment diagram; (a) is a low R channel positioning coordinate system origin diagram; (b) is a coordinate system establishment diagram.
[0046] Figure 6 is a flame scorching area envelope fitting diagram; (a) is a scorching area and its full-fitting edge diagram; (b) is a curve fitting edge diagram; (c) is a curvature weighted segmented fitting diagram. DETAILED DESCRIPTION
[0047] The present application will be described in detail below in conjunction with the drawings and specific embodiments.
[0048] A flame scorching area envelope digitization detection method and device for EN50399 standard, aiming at the problem of lack of digital method for EN 50399 standard 20.5 kW nominal heat output flame shape inspection, a set of low-cost, high-precision flame shape digitization detection system is constructed to realize the accurate extraction of the scorching area envelope of the scorching plate and the quantitative characterization of the flame parameters. Specifically, it includes hardware system architecture design and method flow design.
[0049] Hardware system architecture design:
[0050] The hardware system takes Raspberry Pi 4B as the processing core, integrates image acquisition and calibration reference two modules. The system adopts modular design, each module functions independently and works cooperatively, meeting the portability and stability requirements of EN 50399 standard experimental site. Raspberry Pi 4B development board is selected as the core, which is equipped with Broadcom BCM2711 quad-core A72 processor (clock frequency 1.5 GHz), 8 GB LPDDR4 memory, USB 3.0 and CSI-2 interface, can realize high-definition image fast acquisition and real-time processing. The development board runs Raspbian Buster operating system, based on Python 3.8 environment to build OpenCV 4.5.1 machine vision library, providing a running environment for image processing algorithms. Raspberry Pi HQ camera is used as the image acquisition device, which is equipped with 1230 million pixel Sony IMX477 sensor, supports 1080P@60fps high-definition shooting, dynamic range reaches 12.3 EV, can clearly capture the detail features of the scorching area of the scorching plate. The camera is connected with Raspberry Pi through CSI-2 interface, installed with a fixed bracket, the height of the bracket can be adjusted within 50~80 cm range, ensuring that the shooting angle covers the entire scorching plate area.
[0051] Aiming at the problem of complex operation of traditional calibration method, a fixed light-emitting plate calibration scheme is designed: four rectangular light-emitting plates are arranged at the four corners of the scorching plate, the light-emitting plates are packaged with high-brightness LED beads, the size is uniform 50 mm×55 mm, and the light-emitting color is pure green (the reason for choosing pure green is that green light is both prominent and not prone to strong halo at the edge, affecting positioning). The light-emitting plate is fixed, the position deviation is controlled within ±0.1 mm, four feature points are formed at the four corners of each light-emitting plate, and 16 rigid feature points are formed in total. The four light-emitting plates are known in size and fixed in position, which can be used as reference coordinates for shooting distortion correction of the original image, and can also link the image size with the real size to establish the real coordinate system, laying the foundation for later scorching contour fitting and coordinate output. As the reference coordinates for image correction, it ensures that the feature points have uniform brightness and are clearly distinguished from the background.
[0052] Method flow design:
[0053] A flame scorching area envelope digitization detection method for EN50399 standard, comprising the following steps:
[0054] Step 1, image reading and preprocessing: reading the original image and converting the color space, screening the high-brightness target area through RGB threshold, and removing noise interference by morphological operation;
[0055] Step 2, contour detection and light-emitting plate rectangular screening: extracting the contour of the preprocessed image, and screening out four target light-emitting rectangular regions through area, side number and internal angle characteristics;
[0056] Step 3, quadrant division and target confirmation: dividing four quadrants according to the image center, screening out the target rectangle meeting the requirements from each quadrant, and determining 16 key vertex coordinates;
[0057] Step 4, perspective transformation and image splicing: dividing the image into 9 regions according to the 16 vertexes, realizing geometric correction of each region through perspective transformation, and finally splicing into a standard size image;
[0058] Step 5, low R channel square positioning to establish a real coordinate system: in the specified area of the corrected image, positioning the low R channel dark square and marking the top left corner vertex through R channel threshold screening and contour analysis, and taking the vertex as the origin to establish a real coordinate system with X axis left large and right small, and Y axis up large and down small;
[0059] Step 6, dark area contour fitting and feature extraction: extracting the dark area contour, positioning the highest point of the contour and calculating the maximum and minimum values of Y under the specified X coordinate, and realizing digital representation of the flame shape.
[0060] In steps 1 to 3, first, a binary mask is generated by screening the high-brightness area with a threshold value of [220, 220, 220]~[255, 255, 255], and then denoising by morphological opening operation and hole filling by morphological closing operation, enhancing the contrast between the target and the background, obtaining the high-brightness area, and then extracting the contour, selecting a 4-sided polygon through polygon approximation (ε=0.02×perimeter, ε is the approximation accuracy parameter in the polygon approximation algorithm, which determines the fitting degree of the approximated polygon and the original contour), calculating the internal angle (85°~95°) to select a right-angled quadrilateral, and screening out four light-emitting rectangular regions according to the area consistency (±30% median), and outputting the coordinates of the 16 vertexes of the rectangular regions, and naming the rectangular vertexes in the order of top left, top right, bottom left and bottom right as (A1, B1, C1, D1), (A2, B2, C2, D2), etc. The specific positions of the vertexes are shown in Figure 4 Fig. (a), Figure 4 Fig. (b).
[0061] In step 4, the image is divided into 9 regions including 4 corner rectangles, 4 edge rectangles and 1 center rectangle, and a 3*3 perspective matrix H is solved for each region, the matrix parameters are obtained by solving the linear equations by least square method, the geometric correction of each region is completed, mask fusion is performed to eliminate the stitching marks, and a standard image without distortion is obtained.
[0062] The perspective transformation is a key method for solving image tilt and perspective deformation, and the core is to solve a 3*3 perspective matrix H, which is the key to realize coordinate mapping, and the mathematical principle and solving process are as follows:
[0063] (1) Coordinate mapping relationship: any pixel point (x, y) in the image can be expressed as (x, y, 1) in homogeneous coordinates, and the homogeneous coordinates (x', y', w') are obtained after the perspective matrix H transformation, wherein w' is a scaling factor, and the actual pixel coordinates are (x' / w', y' / w'), and the specific mapping formula is:
[0064]
[0065] (2) Perspective matrix structure: the H matrix contains 8 independent parameters (the scaling factor does not affect, usually h 22 =1, and the 8 independent parameters are h 00 , h 01 , h 02 , h 10 , h 11 , h 12 , h 20 , and h 21 ), and the structure is as follows:
[0066]
[0067] (3) Matrix solving condition: 4 groups of non-collinear corresponding points (original points and target points) are needed to solve the H matrix, each group of corresponding points can establish 2 linear equations, and 4 groups of corresponding points can establish 8 equations, and the 8 parameter values can be obtained by solving the linear equations by least square method.
[0068] The core of the least square method solving process is to minimize the mapping error. Let the original point be (i=1,2,3,4), and the target point be (i=1,2,3,4), substitute the H matrix parameters into the mapping formula and arrange, and the linear equations can be obtained:
[0069]
[0070] The equation set can be expressed in the form of Ax = b, where A is an 8x8 coefficient matrix, x is a vector of 8 parameters, and b is a constant term vector. By matrix inversion or QR decomposition, x can be solved to obtain the H matrix parameters.
[0071] The traditional single-region scheme only uses one set of perspective matrix to transform the entire image. Due to the different degrees of perspective deformation between the edge and the center of the target region, the edge region is easily stretched too much, resulting in a decrease in the geometric accuracy of the corrected image. To solve this problem, the method innovatively designs a regional division strategy: according to the 16 key vertices of the known coordinates, the image is divided into 4 corner light highlight rectangles, 4 edge rectangles, and 1 center rectangle, a total of 9 independent regions. Each region is individually solved according to its own perspective deformation characteristics, and then seamlessly spliced through mask fusion technology, fundamentally avoiding the edge distortion problem of single-region transformation. The specific process is divided into three steps: ① Region division: determine the original coordinate range of the 9 regions based on the 16 vertices; ② Target definition: determine the target coordinates of each region by presetting the standard size (460 pixels wide and 450 pixels high); ③ Transformation and splicing: perform perspective transformation on each region individually, and then eliminate the splicing traces through mask fusion to obtain the complete corrected image.
[0072] The key basis for regional division is the coordinate distribution of the 16 target vertices, which form the boundary framework of the 9 regions. The specific division rules are shown in Table 1:
[0073] Table 1 16 Vertex Region Division Rules
[0074]
[0075] In step 5, the effective area of the burning plate (B1A2D3C4 region) is extracted as the region of interest, the R channel is selected after separating the RGB channels, the connectedness is enhanced through morphological operation, and then the approximate square is selected by area (>100), edge number (4), and width-height ratio (1~1.2); combined with the prior knowledge that the target is located in the lower right corner of the ROI, the target is selected in descending order of center point coordinates, and the coordinate system consistent with the real physical size is established with the top-left corner of the target as the origin.
[0076] To ensure the accuracy of positioning, the contour is screened in multiple dimensions: area threshold (>100) to remove small noise, edge number screening (4 edges) to determine quadrilaterals, width-height ratio screening (1~1.2) to determine approximate squares. Since the target square is located in the lower right corner sub-region, the candidate contours are sorted in descending order of center point coordinates, and the lower rightmost contour is selected as the target square. The top left corner of the target square is used as the origin to establish a custom coordinate system, which is consistent with the actual scene coordinate requirements. By drawing the coordinate axes and scales, a foundation is established for subsequent coordinate measurement of the dark area contour. Figure 5 As shown in (b) of FIG. 6.
[0077] In step 6, the accurate detection of the flame scorching area and the high-precision fitting of the envelope are the core links to realize the digital characterization of the flame shape according to the EN 50399 standard. This link needs to solve two key problems: first, the gray difference between the scorching area and the background is easily disturbed by environmental light, resulting in insufficient segmentation accuracy; second, the original contour points are distributed in a staggered manner, and direct fitting may result in jagged edges and shape distortion. To solve the above problems, a three-level processing flow of "dark area enhancement segmentation-contour resampling-curvature weighted segmented fitting" is proposed, and the accurate extraction of the envelope of the scorching area is realized through mathematical modeling and algorithm optimization. The overall flow design of the algorithm is as follows:
[0078] Region of interest (ROI) extraction: based on the real coordinate system established in the previous step, focus on the effective area of the scorching plate (B1A2D3C4 range), exclude the interference area of the four-corner light-emitting plate, and reduce the subsequent calculation amount;
[0079] Dark area enhancement in LAB color space: convert the image to LAB color space, separate the brightness channel, enhance the contrast through CLAHE algorithm, highlight the gray difference between the scorching area and the background, and improve the segmentation accuracy;
[0080] Adaptive threshold segmentation and region growing: based on the percentile threshold of the brightness channel pixel distribution, the dark area is preliminarily segmented, and the segmentation result is optimized by combining the seed point region growing algorithm to eliminate isolated noise;
[0081] Contour extraction and resampling: extract the circumscribed contour of the dark area after segmentation, and realize the uniform distribution of the contour points through the equal-arc-length resampling algorithm, laying a foundation for subsequent fitting;
[0082] Curvature weighted segmented fitting: calculate the curvature value of the resampled contour points, dynamically adjust the segment length according to the curvature size, use finer segmentation for high-curvature areas, and complete the line segment fitting through the least squares method;
[0083] Feature quantization: based on the fitted envelope, locate the flame tip coordinates and the Y maximum value at a specified X coordinate, and realize the digital characterization of the flame shape.
[0084] The technical details and mathematical principles of each step are as follows.
[0085] (1) LAB color space conversion and L channel enhancement
[0086] In the traditional RGB color space, there is strong correlation among the red, green, and blue channels, which is easily affected by environmental light fluctuations, resulting in the gray difference between the burned area and the background being masked. The LAB color space separates color information from brightness information, where the L channel only represents brightness characteristics, and the A and B channels represent color characteristics, which can effectively isolate the interference of environmental light on brightness judgment. Therefore, first, perform RGB to LAB color space conversion, as follows:
[0087]
[0088] where X, Y, and Z are the three stimulus values of the CIE 1931 standard colorimetric system, f(t) is a nonlinear conversion function, and the independent variable t represents X, Y, and Z in the formula. When t > 0.008856, ; when t ≤ 0.008856, f(t) = 7.787t + 16 / 116. Through this conversion, the dark tone characteristics of the burned area are concentrated in the L channel.
[0089] Since there is a gradual change in gray scale within the burned area, direct segmentation can easily result in "under-segmentation" problems. Here, the CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm is used to enhance the contrast of the L channel. The core principle is to divide the image into 16x16 sub-blocks, and perform histogram equalization on each sub-block while limiting the contrast threshold (clipLimit = 3.0) to avoid excessive amplification of noise. The mathematical expression of CLAHE is as follows: for the pixel gray value r within a sub-block, the equalized gray value s is:
[0090]
[0091] where is the gray histogram of the sub-block, and M is the total number of pixels within the sub-block. Through this processing, the gray scale details within the burned area are enhanced, and the edge outline is clearer.
[0092] (2) Adaptive threshold segmentation and region growing
[0093] Traditional fixed threshold segmentation (such as Otsu algorithm) is easily affected by the overall gray distribution of the image, and cannot adapt to the gray difference of the burned area under different experimental scenarios. We use an adaptive threshold segmentation strategy based on pixel distribution: first, count the effective pixel gray distribution of the enhanced L channel image, and take the 15th percentile gray value as the dark threshold (dark_threshold). The advantage of this threshold selection strategy is that when the area ratio of the burned area is different, the 15th percentile value can be adjusted adaptively to ensure that the dark area after segmentation can completely cover the burned area, while filtering most of the background noise. After segmentation, a preliminary mask of the dark area is obtained through binary processing. There are a small number of isolated noise points in the preliminary segmented mask, and the region growing algorithm is used to optimize the segmentation result. The core logic is: select the lowest 20% of the gray value of the dark area as the seed point, and take the 8-neighborhood as the growth criterion. When the neighborhood pixel is dark and has not been visited, it will be included in the current region, until there is no new pixel to grow. During the growth process, "neighborhood effectiveness judgment" is introduced: only when the number of pixels in the neighborhood that meet the conditions is ≥3, the growth is performed, avoiding the misinclusion of noise points.
[0094] Finally, the largest growth area is retained as the burned area, and the final mask is generated. This step can effectively eliminate isolated noise with an area less than 50 pixels, ensuring the accuracy of the segmentation result. The final burned area dark area detection image mask is shown in Figure 6 (a) of FIG. 13.
[0095] (3) Contour resampling and curvature calculation
[0096] The original contour points extracted from the final mask have problems such as staggered distribution, uneven edges, and serious graininess. Direct fitting can easily lead to the misjudgment of uneven edges as contour features of the target itself, resulting in overfitting problems such as multiple protrusions or depressions in the fitting result, as shown in Figure 6 (a) of FIG. 14. If a simple polygon fitting is used, it will produce a large number of gaps, which do not fit the mask contour and cannot accurately reflect the contour features of the target area. Therefore, the algorithm realizes the uniform distribution of contour points through "equal arc length resampling", and then quantifies the curvature of the contour through curvature calculation, providing a basis for dynamic segmentation fitting.
[0097] a. Equal arc length resampling
[0098] The core goal of equal arc length resampling is to make the resampled contour points evenly distributed along the contour arc length, and the sampling step is set to 1 pixel. The implementation steps are as follows:
[0099] Step 1: Calculate the adjacent distance matrix and cumulative arc length of the original contour points. Let the original contour points be , the Euclidean distance between adjacent points and is :
[0100]
[0101] cumulative arc length is:
[0102]
[0103] total arc length is ; , is the coordinate of the i-th original point; , is the coordinate of the i+1-th original point.
[0104] Step 2: Generate equidistant sampling point sequence. Generate sampling arc length sequence D = [0, 1, 2,..., C] with sampling step 1 pixel, for each sampling arc length d e D, determine its corresponding pixel coordinates by linear interpolation. When d falls between cumulative arc length and , the sampling point coordinates (x, y) are:
[0105]
[0106] wherein: is the cumulative arc length of the i-1-th original point; , is the coordinate of the i-1-th original point, and d is the sampling arc length.
[0107] Through this resampling process, the original contour points are converted into uniformly distributed resampled points, solving the problem of uneven point distribution. Setting when the number of resampled points is less than 5, directly return the original contour, avoiding the subsequent fitting failure caused by too short contour.
[0108] b. Contour point curvature calculation
[0109] Curvature is a core indicator to describe the bending degree of the contour. The algorithm calculates the curvature by the vector cross product of the continuous three contour points, and its mathematical principle is based on the idea of "three-point method to estimate curvature" in differential geometry, and the specific derivation is as follows:
[0110] Let the continuous three points after resampling be , , , vector , vector . According to the geometric meaning of vector cross product, the absolute value of cross product is equal to the area of parallelogram with two vectors as adjacent sides, which is proportional to the area of triangle formed by three points, and can reflect the bending degree of the contour.
[0111] The formula for calculating the curvature k is:
[0112]
[0113] where the denominator is the third power of the length of the vector , used to normalize the curvature value to ensure that the curvature of profile segments of different lengths is comparable. For the first and last points of the profile, the curvature values of the adjacent points are assigned to avoid abnormal curvature caused by boundary effects, i.e. , (m is the number of profile points).
[0114] The advantages of this curvature calculation method are: no complex curve fitting is required for the profile, and the curvature can be quickly calculated by only three adjacent points, with low computational complexity; at the same time, the absolute value of the cross product ensures that the curvature value is non-negative, which can accurately reflect the degree of bending.
[0115] (4) Curvature-weighted segmented fitting
[0116] Direct segmented fitting of straight lines with fixed length in the charred dark area can alleviate the overfitting problem to some extent, but the edge fluctuation is still too large, with obvious sawtooth shape, and the overall profile is not smooth enough. However, using curve segmentation (such as B-spline, NURBS) fitting has poor effect and complex calculation, as shown in (b) of Figure 6 . Therefore, a curvature-weighted segmented fitting algorithm is proposed, which dynamically adjusts the segment length according to the curvature of the profile points, achieving adaptive fitting of "fine segments for high curvature and coarse segments for low curvature". The core principle and implementation steps are as follows:
[0117] a. Dynamic segment length calculation
[0118] Take 10 pixels as the basic segment length, and introduce a curvature weighting factor to adjust the actual segment length. For a profile point with curvature k, the calculation formula of the actual segment length seg len is:
[0119]
[0120] where is the minimum curvature threshold, used to avoid distortion caused by seg len being too large when k is too small. The physical meaning of this formula is: when the profile is sharply curved, seg len decreases, and finer segmentation fitting is used; when the profile is flat, seg len increases, and coarser segmentation fitting is used, balancing fitting accuracy and computational efficiency. The algorithm determines the segment endpoint by accumulating the arc length: starting from the current starting point, the arc length of the adjacent resampled points is accumulated, and when the accumulated arc length reaches seg len, the current point is taken as the segment endpoint, completing the segmentation of a segment of the profile.
[0121] b. Least square line fitting
[0122] A least square line fitting is performed on the contour points within each segment to fit a line equation as where a is the slope and b is the intercept. Let there be t contour points within the segment The objective of the least square method is to minimize the sum of square of fitting errors:
[0123]
[0124] To solve the optimal values of a and b, the partial derivatives of E(a, b) with respect to a and b are taken and set to zero to obtain a linear equation system:
[0125]
[0126] The analytical solutions of a and b are obtained by solving the linear equation system:
[0127]
[0128] The coordinates of the sampling points are denoted as when the denominator is zero, it means that all the x coordinates of the points within the segment are the same (a vertical line), in which case a = 0 is set to avoid division by zero error. After the fitting, the end point of the segment is taken as the fitting point to ensure that the fitted contour can preserve the key shape features of the original contour. The final fitted contour is shown in Figure 6 (c).
[0129] As can be seen from Figure 6 (c), the curvature-weighted segment fitting algorithm realizes the unification of edge fitting smoothness and accuracy. The method dynamically adjusts the segment length according to the contour curvature, subdivides in high curvature areas to preserve details, and coarsely divides in flat areas to improve efficiency, effectively suppressing the sawtooth while avoiding the loss of key features caused by excessive smoothing, which is significantly better than the fixed length fitting and curve interpolation methods. On the basis of the accurate fitting contour, it is very easy to calculate the coordinates of the flame tip and the maximum / minimum Y value under the specified X coordinate and compare it with the standard value, as shown in Figure 6 (c).
[0130] The repeatability stability test of the above method and device:
[0131] The sample is taken under different time and different external light conditions, and the algorithm is repeated for 3 times, the stability of the fitted contour and the stability of the maximum / minimum value of Y under the specified X under the standard regulation are detected, and the results of the artificial fitting of the skilled inspectors are compared as a reference, and the finally formed data is shown in Table 2.
[0132] Table 2 Algorithm stability test
[0133]
[0134] From the data, in 3 repeated detections, the repeated error range of the maximum Y value at the specified X coordinate is 0.1-0.2 mm, the repeated error range of the minimum Y value is 0.0-0.2 mm, and the repeated error of the maximum Y value at all specified X coordinates is ≤0.2 mm, which is much lower than the accuracy requirement of ≤0.5 mm.
[0135] For the highest point coordinates of the fitted contour, the X coordinate repeated error is 0.12 mm, the Y coordinate repeated error is 0.12 mm, and the overall repeated error is ≤0.2 mm, which also meets the index requirement of ≤0.5 mm. This result shows that the detection scheme effectively guarantees the repeated stability of the detection result through the establishment of a standardized coordinate system, high-precision image preprocessing and curvature weighted segmented fitting algorithm, and avoids the problem of low repeated accuracy caused by subjective judgment differences in traditional manual detection. It is found in the experiment process that when the boundary of the burned area of the burned plate is fuzzy (such as near the X=200 coordinate, the transition between the burned area and the unburned area is gentle), the repeated error of the algorithm increases slightly, but is still controlled within 0.2 mm, indicating that the scheme has strong adaptability to the fuzzy boundary scene. The seed point selection strategy of the region growing algorithm can be further optimized in subsequent research.
[0136] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the above examples do not limit the protection scope of the present application in any form, and any technical solutions obtained by equivalent replacement or the like fall within the protection scope of the present application. The parts not involved in the present application are the same as or can be realized by the prior art.
Claims
1. A digital detection method for the envelope of flame-burned areas according to the EN50399 standard, characterized in that, Includes the following steps: Step 1, Image Reading and Preprocessing: Read the original image and convert the color space, filter high-brightness target areas by RGB thresholding, and remove noise interference by combining morphological operations; Step 2, Contour Detection and Rectangular Selection of Illuminating Plate: Extract the contour of the preprocessed image and select four target luminous rectangular regions by area, number of sides, and interior angle features; Step 3, Quadrant Division and Target Confirmation: Divide the image into four quadrants based on the center, select target rectangles that meet the requirements from each quadrant, and determine the coordinates of 16 vertices; Step 4, Perspective Transformation and Image Stitching: Divide the image into 9 regions based on the 16 vertices, perform geometric correction of each region through perspective transformation, and finally stitch them together into a standard-sized image; Step 5: Locating the low-R channel square and establishing a real coordinate system: Within a specified area of the corrected image, locate the dark-toned square of the low-R channel through channel thresholding and contour analysis, and mark its upper left vertex. Using this vertex as the origin, establish a real coordinate system for the X and Y axes. Step 6, Dark Area Contour Fitting and Feature Extraction: Extract the dark area contour, locate the highest point of the contour, and calculate the maximum and minimum values of Y under the specified X coordinate to achieve digital representation of the flame shape.
2. The digital detection method for the envelope of flame-burned areas according to claim 1, oriented towards EN50399 standard, is characterized in that, In step 1, a high-brightness region is selected using the threshold values [220,220,220] to [255,255,255] to generate a binary mask. The mask is then denoised by morphological opening operations and hole filling by closing operations to enhance the contrast between the target and the background, thus obtaining the high-brightness region.
3. The digital detection method for the envelope of flame-burned areas according to claim 1, oriented towards EN50399 standard, is characterized in that... In step 2, quadrilaterals are selected by polygon approximation, right quadrilaterals are selected by calculating interior angles, and four luminous rectangular regions are selected by combining area consistency, and the luminous rectangular regions are output.
4. The digital detection method for the envelope of flame-burned areas according to claim 1, oriented towards EN50399 standard, is characterized in that... In step 4, the image is divided into 9 regions: 4 corner rectangles, 4 edge rectangles, and 1 central rectangle. The 3×3 perspective matrix H is solved for each region individually. The matrix parameters are obtained by solving the linear equation system using the least squares method. After completing the geometric correction of each region, mask fusion is performed to eliminate stitching marks and obtain a distortion-free standard image.
5. The digital detection method for the envelope of flame-burned areas according to claim 1, oriented towards EN50399 standard, is characterized in that, In step 5, the effective area of the charred plate is extracted as the region of interest. After separating the RGB channels, the region with R channel ≤ 30 is selected. The connectivity is enhanced by morphological operations. Then, an approximate square is selected by area, number of sides, and aspect ratio. Combining the prior knowledge that the target is located in the lower right corner of the ROI, the target is selected by sorting in descending order of the center point coordinates. A coordinate system consistent with the actual physical size is established with its upper left vertex as the origin.
6. The digital detection method for the envelope of flame-burned areas according to claim 1, oriented towards EN50399 standard, is characterized in that... Step 6 specifically includes: LAB color space dark area enhancement: Convert the image to LAB color space, separate the brightness channel, enhance the contrast through the CLAHE algorithm, highlight the grayscale difference between the burnt area and the background, and improve the segmentation accuracy; Adaptive threshold segmentation and region growing: Initial segmentation of dark areas is achieved based on percentile thresholds of pixel distribution in the luminance channel, and the segmentation results are optimized by combining seed point region growing algorithm to eliminate isolated noise; Contour extraction and resampling: Extract the circumscribed contour of the segmented dark area, and achieve uniform distribution of contour points through an equal arc length resampling algorithm, laying the foundation for subsequent fitting; Curvature-weighted piecewise fitting: Calculate the curvature value of the contour points after resampling, dynamically adjust the segment length according to the curvature, use finer segments for high curvature regions, and complete the line segment fitting by the least squares method; Feature quantization: Based on the fitted envelope, the flame tip coordinates and the maximum and minimum values of Y under the specified X coordinate are located to achieve a digital representation of the flame shape.
7. The digital detection method for the envelope of flame-burned areas according to claim 6, oriented towards EN50399 standard, is characterized in that... In the adaptive threshold segmentation and region growth process, the grayscale distribution of pixels in the brightness channel is statistically analyzed, and the 15th percentile is taken as the segmentation threshold. The initial dark area mask is obtained by binarization. The 20% of pixels with the lowest grayscale value in the dark area are selected as seed points. The 8-neighborhood is used as the growth criterion. When a neighboring pixel is a dark area and has not been visited, it is included in the current region until no new pixels can be grown. During the growth process, a neighborhood validity judgment is introduced: growth is only performed when the number of pixels that meet the condition in the neighborhood is ≥3, so as to avoid noise points being mistakenly included. Finally, isolated noise with an area <50 pixels is removed, and the largest growth area is retained as the scorched area.
8. The digital detection method for the envelope of flame-burned areas according to claim 6, oriented towards EN50399 standard, is characterized in that... In the contour extraction and resampling process, the outer contour of the charred area is extracted and resampled with an arc length of 1 pixel step to make the contour points evenly distributed. The curvature k is calculated by the cross product of three consecutive point vectors, and the curvature of the first and last points is assigned by the adjacent point curvature to avoid boundary anomalies.
9. The digital detection method for the envelope of flame-burned areas according to claim 6, oriented towards EN50399 standard, is characterized in that... In the curvature-weighted piecewise fitting, 10 pixels are used as the basic piecewise length. A curvature weighting factor is introduced to adjust the actual piecewise length. For a contour point with curvature k, the formula for calculating the actual piecewise length seg_len is: , in, This is the minimum curvature threshold, used to avoid distorted fitting caused by excessively large seg_len when k is too small; For each segment of contour points, the least squares method is used to fit the linear equation y=ax+b, and the optimal slope a and intercept b are solved to complete the smooth fitting of the envelope.
10. A digital detection device for the envelope of flame charred areas according to EN50399 standard, characterized in that, include: The core control module includes a machine vision computing module, which is used to realize image reading and preprocessing, contour detection and light-emitting plate rectangle selection, quadrant division and target confirmation, perspective transformation and image stitching, establishment of real coordinate system, and dark area contour fitting and feature extraction. Image acquisition module: It uses a camera and connects to the core control module through an interface, and is equipped with an adjustable fixed bracket to ensure coverage of the entire charred plate area; The calibration reference module includes 50mm×55mm pure green rectangular LED light-emitting boards arranged at the four corners of the burnt plate. The four vertices of each light-emitting board constitute feature points, and the four light-emitting boards form a total of 16 rigid feature points, which are used for image distortion correction and establishment of the real coordinate system.
Citation Information
Patent Citations
Digital imaging method for three-dimensional temperature field of coal field fire and gangue dump fire
CN111563957A
Light cultural relic three-dimensional digital modeling method based on automatic rotary table rotation structure
CN119888088A
Metal surface defect identification method, device and equipment based on artificial intelligence and medium
CN120931622A
Backlight effect image edge enhancement method based on intelligent identification
CN120953153A
Image processing device and control method thereof, distance detection device, imaging device, program
JP2020021126A