Digital detection method and device for flame ignition area envelope of en50399 standard

By employing methods such as image reading and preprocessing, contour detection, and perspective transformation, the problems of image distortion and subjectivity in flame shape detection under the EN50399 standard have been solved, achieving high-precision flame tip positioning and contour fitting, which is suitable for combustion equipment production and testing scenarios.

CN121582252BActive Publication Date: 2026-04-10JIANGSU SUPERVISION & INSPECTION INST FOR PROD QUALITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

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. There is a lack of high-precision digital detection solutions for small-scale flames.

Method used

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 quantization of the flame tip position and boundary is achieved.

Benefits of technology

It achieves a flame tip positioning repeatability error of ≤0.2mm and a key contour point fitting repeatability error of ≤0.2mm, eliminating subjective errors. It is highly adaptable, low-cost, and easy to deploy, making it suitable for combustion equipment production and testing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582252B_ABST
    Figure CN121582252B_ABST
Patent Text Reader

Abstract

The application discloses a kind of flame scorching area envelope digital detection method and device for EN50399 standard, method includes: step 1, image reading and pre-processing;Step 2, contour detection and light-emitting plate rectangular screening;Step 3, quadrant division and target confirmation;Step 4, perspective transformation and image splicing;Step 5, low R channel square positioning establishes real coordinate system;Step 6, dark area contour fitting and feature extraction;Device includes three modules, respectively: core control module, image acquisition module and calibration reference module.The application replaces artificial naked-eye identification and manual marking by standardized hardware calibration and automated algorithm processing, solves the problem of determination threshold difference caused by personnel experience in traditional method, and the detection result has strong reproducibility;And without expensive equipment, good portability, applicable to the on-site detection scene of combustion equipment production enterprise, quality inspection organization and certification laboratory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a digital detection method and apparatus for the envelope of flame-burned areas according to the EN50399 standard, belonging to the fields of computer vision and special equipment safety inspection. Background Technology

[0002] In the field of combustion equipment safety testing, EN 50399 is the core technical specification of the European Union for the fire resistance performance assessment of combustion appliances. Among them, the flame shape test under the nominal heat output condition of 20.5kW is a key test item for assessing the heat radiation distribution, flame stability and safety boundary of combustion equipment. Its test results directly affect the design optimization, risk management and market access qualification of combustion equipment.

[0003] Currently, the industry mainly uses the traditional method of combining manual shooting with subjective interpretation for the detection of this project. Experimenters take vertical pictures of the charred areas from both sides of the charred plate and identify the boundaries of the charred areas and mark the position of the flame tip by visual inspection.

[0004] Traditional detection methods have many drawbacks: First, image distortion caused by the camera itself during shooting is unavoidable, and image distortion and angle deviation will cause geometric distortion of the flame shape; second, manual identification of charred boundaries with abrupt color gradient changes relies on experience, and different people have different judgment thresholds, resulting in strong data subjectivity; third, manual marking is inefficient and makes it difficult to achieve large-scale databases; fourth, the standard-recommended Plot Digitizer software is inconvenient to operate, has poor adaptability to complex edges, and requires manual marking of scale points for coordinate axis calibration.

[0005] Currently, the application of existing machine vision technology in the field of flame detection is mostly focused on large-scale scenarios such as forest fires. For example, using drones equipped with vision devices combined with deep learning to segment flame areas in fire scenes, but this method is not well adapted to the small-scale flame detection of combustion equipment. There are also computer vision classification systems built on Raspberry Pi, which only verify the low-cost advantage of Raspberry Pi and do not address the core issues of flame contour extraction and distortion correction. At present, there is no dedicated digital detection solution for the 20.5kW operating condition of the EN50399 standard. Summary of the Invention

[0006] The purpose of this invention is to provide a digital detection method and device for the envelope of flame charred areas according to the EN50399 standard, so as to achieve high-precision geometric correction of images and accurate segmentation of charred areas, complete the quantification of the flame tip position and the lower boundary maximum value at specified coordinates, and improve the repeatability and accuracy of detection.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] On one hand, the present invention provides a digital detection method for the envelope of flame charred areas according to the EN50399 standard, comprising the following steps:

[0009] 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;

[0010] 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;

[0011] 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;

[0012] 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;

[0013] 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 with X-axis (larger on the left and smaller on the right) and Y-axis (larger on top and smaller on the bottom).

[0014] 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.

[0015] Furthermore, 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. After morphological opening operation for noise reduction and closing operation for hole filling, the contrast between the target and the background is enhanced, and the high-brightness region is obtained.

[0016] Furthermore, 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.

[0017] Furthermore, in step 4, the image is divided into 9 regions: 4 corner rectangles, 4 edge rectangles, and 1 central rectangle. For each region, a 3×3 perspective matrix H is solved separately. The matrix parameters are obtained by solving a system of linear equations 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.

[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] Furthermore, in the curvature-weighted piecewise fitting, 10 pixels are used as the base segment length, and a curvature weighting factor is introduced to adjust the actual segment length. For a contour point with curvature k, the formula for calculating the actual segment length seg_len is:

[0028]

[0029] in, This is the minimum curvature threshold, used to avoid distorted fitting caused by excessively large seg_len when k is too small;

[0030] 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.

[0031] On the other hand, the present invention also provides a digital detection device for the envelope of flame charred areas according to the EN50399 standard, comprising:

[0032] 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.

[0033] 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;

[0034] 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.

[0035] The beneficial effects of this invention are as follows:

[0036] (1) High detection accuracy: The flame tip positioning repeat error of the present invention is ≤0.2mm, and the key contour point fitting repeat error is ≤0.2mm, which is far superior to traditional manual detection and meets the accuracy requirement of ≤0.5mm. Even in the scenario where the boundary of the charred area is blurred, the error can still be controlled within 0.2mm, which is highly adaptable.

[0037] (2) Eliminate subjective errors: By standardizing hardware calibration and automated algorithm processing, manual visual recognition and manual marking are replaced, which solves the problem of difference in judgment threshold caused by human experience in traditional methods, and the detection results are highly reproducible.

[0038] (3) Low cost and easy deployment: Based on Raspberry Pi open source hardware and lightweight algorithms, it does not require expensive equipment, is highly portable, and is suitable for on-site testing scenarios of combustion equipment manufacturers, quality inspection agencies and certification laboratories.

[0039] (4) Data can be quantified: It can accurately output the flame tip coordinates and the maximum and minimum values ​​of Y under the specified X coordinate, providing accurate data support for the digital design, simulation and safety assessment of combustion equipment, and making up for the shortcomings of traditional methods that can only describe qualitatively. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the digital detection method for the envelope of the flame-burned area.

[0041] Figure 2 This is a schematic diagram of the overall structure of the digital detection device for the envelope of the flame-burned area;

[0042] Figure 2 The components are labeled as follows: 1-Core control module, 2-Camera, 3-Sample burnt plate to be tested, 4-First light-emitting plate, 5-Second light-emitting plate, 6-Third light-emitting plate, 7-Fourth light-emitting plate.

[0043] Figure 3 This is the original image that was taken.

[0044] Figure 4 The diagram shows the perspective transformation correction of the key points divided into 9 regions; (a) is the diagram of the 9-region division, (b) is the location map of each vertex of the highlight rectangle in the original image, and (c) is the image after perspective set correction.

[0045] Figure 5 The diagram shows the establishment of the real coordinate system; (a) is the origin of the low R channel positioning coordinate system; and (b) is the established coordinate system diagram.

[0046] Figure 6 These are schematic diagrams of the envelope fitting of the flame-burned area; where (a) is a schematic diagram of the charred area and its fully fitted edge; (b) is a schematic diagram of the curve-fitted edge; and (c) is a schematic diagram of the curvature-weighted piecewise fitting. Detailed Implementation

[0047] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0048] This invention relates to a digital detection method and apparatus for the envelope of charred areas in flames according to the EN 50399 standard. The aim is to address the lack of a digital method for inspecting the flame shape of a 20.5 kW nominal heat output flame under the EN 50399 standard. The system aims to construct a low-cost, high-precision digital detection system for flame shape, enabling accurate extraction of the envelope of the charred area on the charred plate and quantitative characterization of flame parameters. This includes both hardware system architecture design and methodological process design.

[0049] Hardware system architecture design:

[0050] The hardware system uses a Raspberry Pi 4B as its processing core, integrating two main modules: image acquisition and calibration benchmark. The system adopts a modular design, with each module functioning independently yet collaboratively, meeting the portability and stability requirements of the EN 50399 standard experimental environment. The Raspberry Pi 4B development board is selected as the core, equipped with a Broadcom BCM2711 quad-core A72 processor (1.5GHz), 8 GB of LPDDR4 memory, and supports USB 3.0 and CSI-2 interfaces, enabling rapid high-definition image acquisition and real-time processing. The development board runs the Raspbian Buster operating system and uses the OpenCV 4.5.1 machine vision library built on a Python 3.8 environment to provide a runtime environment for image processing algorithms. A Raspberry Pi HQ camera is used as the image acquisition device. This camera features a 12.3-megapixel Sony IMX477 sensor, supports 1080P@60fps high-definition shooting, and has a dynamic range of 12.3 EV, clearly capturing the detailed features of the charred areas of the burnt plate. The camera connects to the Raspberry Pi via a CSI-2 interface and is mounted on a fixed bracket. The bracket height can be adjusted within the range of 50~80 cm to ensure that the shooting angle covers the entire charred plate area.

[0051] To address the complexity of traditional calibration methods, a fixed-light-plate calibration scheme was designed: a rectangular light-plate is placed at each of the four corners of the charred plate. These light-plates are encapsulated with high-brightness LED beads, with a uniform size of 50 mm × 55 mm, and emit pure green light (pure green was chosen because it is both prominent in the image and avoids strong haloing at the edges, which could affect positioning). The light-plates are fixed, with positional deviation controlled within ±0.1 mm. The four vertices of each light-plate constitute four feature points, resulting in a total of 16 rigid feature points. Since the dimensions and fixed positions of these four light-plates are known, they can serve as reference coordinates for correcting image distortion during shooting and can also establish a real-world coordinate system by relating the image size to actual dimensions. This provides a foundation for subsequent charred contour fitting and coordinate output. These serve as the reference coordinates for image correction, ensuring uniform brightness of the feature points and clear distinction from the background during shooting.

[0052] Method and process design:

[0053] A digital detection method for the envelope of flame-burned areas according to the EN50399 standard includes the following steps:

[0054] 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;

[0055] 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;

[0056] 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 key vertices;

[0057] 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;

[0058] Step 5: Locating a low-R channel square and establishing a real coordinate system: Within a specified area of ​​the corrected image, locate a low-R channel dark-toned square and mark its upper left corner vertex through R channel thresholding and contour analysis. Using this vertex as the origin, establish a real coordinate system with the X-axis larger on the left and smaller on the right, and the Y-axis larger on the top and smaller on the bottom.

[0059] 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.

[0060] In steps 1 to 3, firstly, a high-brightness region is selected using a threshold of [220,220,220] to [255,255,255] to generate a binary mask. Morphological opening operations are used for noise reduction, and closing operations are used to fill holes, enhancing the contrast between the target and the background to obtain the high-brightness region. Then, the contour is extracted. A quadrilateral is selected using polygon approximation (ε = 0.02 × perimeter, where ε is the approximation accuracy parameter in the polygon approximation algorithm, determining the degree of fit between the approximated polygon and the original contour). The interior angles (85°~95°) are calculated to select a right quadrilateral. Combining this with area consistency (±30% median), four luminous rectangular regions are selected, and the coordinates of the 16 vertices of each rectangular region are output. The vertices are named (A1, B1, C1, D1), (A2, B2, C2, D2), etc., in the order of top left, top right, bottom left, and bottom right. The specific positions of each vertex are as follows: Figure 4 (a) Figure 4 As shown in (b).

[0061] 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.

[0062] Perspective transformation is a key method for solving image tilt and perspective distortion problems. Its core is to solve for the 3×3 perspective matrix H, which is crucial for coordinate mapping. The mathematical principle and solution process are as follows:

[0063] (1) Coordinate mapping relationship: Any pixel point (x, y) in the image can be represented as (x, y, 1) in homogeneous coordinates. After transformation by perspective matrix H, the homogeneous coordinates (x', y', w') are obtained, where w' is the scaling factor. The actual pixel coordinates are (x' / w', y' / w'). The specific mapping formula is as follows:

[0064]

[0065] (2) Perspective matrix structure: The H matrix contains 8 independent parameters (the scaling factor does not affect it, and is usually set to h). 22 =1, the 8 independent parameters are h 00 h 01 h 02 h 10 h 11 h 12 h 20 h 21 The structure is as follows:

[0066]

[0067] (3) Matrix solution conditions: To solve the H matrix, four sets of non-collinear corresponding points (original point and target point) are required. Two linear equations can be established for each set of corresponding points. A total of eight equations can be established for the four sets of corresponding points. The eight parameter values ​​can be obtained by solving the linear equations using the least squares method.

[0068] The core of the least squares method solution is minimizing the mapping error. Let the original point be... (i=1,2,3,4), the target point is (i=1,2,3,4), substituting the parameters of the H matrix into the mapping formula and simplifying, we can obtain a system of linear equations:

[0069]

[0070] This system of equations can be expressed in the form Ax = b, where A is an 8×8 coefficient matrix, x is a vector consisting of 8 parameters, and b is a constant term vector. x can be solved by matrix inversion or QR decomposition to obtain the parameters of the H matrix.

[0071] Traditional single-region transformation methods use only one perspective matrix to transform the entire image. Due to the different degrees of perspective distortion between the edges and the center of the target region, excessive stretching of the edge regions easily occurs, leading to a decrease in the geometric accuracy of the corrected image. To solve this problem, this method innovatively designs a region-division strategy: based on 16 key vertices with known coordinates, the image is divided into 4 corner-illuminating highlight rectangles, 4 edge rectangles, and 1 central rectangle, for a total of 9 independent regions. Each region solves its perspective matrix independently based on its own perspective distortion characteristics, and then seamless stitching is achieved through mask fusion technology, fundamentally avoiding the edge distortion problem of single-region transformation. The specific process consists of three steps: ① Region division: using 16 vertices as boundaries, the original coordinate range of the 9 regions is determined; ② Target definition: a preset standard size (460 pixels wide, 450 pixels high) is used to determine the target coordinates of each region; ③ Transformation and stitching: perspective transformation is performed on each region individually, and then stitching artifacts are eliminated through mask fusion to obtain a complete corrected image.

[0072] The key basis for region division is the coordinate distribution of 16 target vertices, which constitute the boundary framework of 9 regions. The specific division rules are shown in Table 1:

[0073] Table 1. Rules for dividing 16 vertex regions

[0074]

[0075] In step 5, the effective area of ​​the burnt plate (region B1A2D3C4) is extracted as the region of interest. After separating the RGB channels, regions with R channels ≤ 30 are selected. The connectivity is enhanced by morphological operations. Then, an approximate square is selected by area (>100), number of sides (4), and aspect ratio (1~1.2). 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.

[0076] To ensure accurate positioning, the contours were filtered in multiple dimensions: an area threshold (>100) was used to remove small noise, a side count filter (4 sides) was used to determine quadrilaterals, and an aspect ratio filter (1~1.2) was used to determine approximate squares. Since the target square was located in the lower right sub-region, candidate contours were sorted in descending order of their center point coordinates, and the contour furthest to the right was selected as the target square. A custom coordinate system was established with the upper left vertex of the target square as the origin. This coordinate system had an X-axis that was larger on the left and smaller on the right, and a Y-axis that was larger at the top and smaller at the bottom, consistent with the coordinate requirements of the actual scene. By drawing the coordinate axes and scales, a foundation was laid for subsequent coordinate measurements of the dark area contours. The coordinate system is as follows: Figure 5 As shown in (b).

[0077] In step 6, the accurate detection of the charred area and the high-precision fitting of its envelope are the core steps in achieving the digital representation of the flame shape according to the EN 50399 standard. This step needs to address two key issues: first, the grayscale difference between the charred area and the background is easily affected by ambient light, leading to insufficient segmentation accuracy; second, the original contour points are distributed in an interlaced manner, and direct fitting easily results in jagged edges and shape distortion. To address these issues, a three-level processing flow of "dark area enhancement segmentation - contour resampling - curvature-weighted piecewise fitting" is proposed. Accurate extraction of the envelope of the charred area is achieved through mathematical modeling and algorithm optimization. The overall algorithm flow design is as follows:

[0078] Region of Interest (ROI) Extraction: Based on the previously established real-world coordinate system, focus on the effective area of ​​the burnt plate (range B1A2D3C4), excluding interfering areas such as the four corner light-emitting plates, to reduce the amount of subsequent calculations;

[0079] 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;

[0080] 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;

[0081] 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;

[0082] 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;

[0083] Feature quantization: Based on the fitted envelope, the coordinates of the flame tip and the maximum and minimum values ​​of Y under a specified X coordinate are located to achieve a digital representation 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, the red, green, and blue channels are highly correlated and easily affected by ambient light fluctuations, causing the grayscale difference between the burnt area and the background to be masked. The LAB color space, however, separates color and luminance information. The L channel represents only luminance characteristics, while the A and B channels represent color characteristics, effectively isolating ambient light from interfering with luminance judgment. Therefore, an RGB to LAB color space conversion is performed first, as shown in the following formula:

[0087]

[0088] Where X, Y, and Z are the tristimulus values ​​of the CIE 1931 standard colorimetric system, f(t) is a nonlinear transformation 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 transformation, the dark tonal characteristics of the charred area are concentrated in the L channel.

[0089] Because the charred area contains a gradual change in grayscale, direct segmentation can easily lead to undersegmentation. Therefore, the CLAHE (Contrast-Limited Adaptive Histogram Equalization) algorithm is used to enhance the contrast of the L channel. Its core principle is to divide the image into 16×16 sub-blocks, perform histogram equalization on the histogram of each sub-block, and simultaneously limit the contrast threshold (clipLimit=3.0) to prevent excessive amplification of noise. The mathematical expression of CLAHE is: for a pixel grayscale value r within a sub-block, the equalized grayscale value s is:

[0090]

[0091] in, Here, M is the grayscale histogram of the sub-block, and M is the total number of pixels within the sub-block. This processing enhances the grayscale details within the charred area, resulting in clearer edge contours.

[0092] (2) Adaptive threshold segmentation and region growing

[0093] Traditional fixed-threshold segmentation (such as the Otsu algorithm) is easily affected by the overall grayscale distribution of the image and cannot adapt to the grayscale differences in the charred area under different experimental scenarios. We adopt an adaptive threshold segmentation strategy based on pixel distribution: First, we statistically analyze the effective pixel grayscale distribution of the L-channel enhanced image and take the 15th percentile grayscale value as the dark area segmentation threshold (dark_threshold). The advantage of this threshold selection strategy is that when the proportion of the charred area is different, the 15th percentile value can be adaptively adjusted to ensure that the segmented dark area can completely cover the charred area, while filtering out most of the background noise. After segmentation, we obtain a preliminary dark area mask through binarization. There are a few isolated noise points in the preliminary segmented mask. We optimize the segmentation result through a region growing algorithm. Its core logic is: select the 20% of pixels with the lowest grayscale value in the dark area as seed points, and use 8-neighborhood 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. The growth process incorporates a "neighborhood validity judgment": growth is only performed when the number of pixels that meet the conditions in the neighborhood is ≥3, thus avoiding the inclusion of noise points.

[0094] Finally, the largest growth area is retained as the charred area, generating the final mask. This step effectively removes isolated noise with an area smaller than 50 pixels, ensuring the accuracy of the segmentation results. The final charred area dark area detection image mask is shown below. Figure 6 The red area in (a) is shown in the middle.

[0095] (3) Contour resampling and curvature calculation

[0096] The original contour points extracted from the final mask have issues such as uneven distribution, rough edges, and severe graininess. Direct fitting can easily lead to the uneven edges being misidentified as contour features of the target itself, resulting in overfitting problems with redundant convexities or depressions in the fitting results. Figure 6 As shown in the blue outline in (a). Using simple polygon fitting would produce a large number of gaps, failing to fit the mask outline and accurately reflect the outline features of the target area. Therefore, the algorithm achieves a uniform distribution of outline points through "equal arc length resampling" and then quantifies the curvature of the outline through curvature calculation, providing a basis for dynamic piecewise fitting.

[0097] a. Equal arc length resampling

[0098] The core objective of equal arc length resampling is to ensure that the resampled contour points are evenly distributed along the contour arc length, with a sampling step size of 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... Adjacent points and The Euclidean distance is :

[0100]

[0101] Cumulative arc length for:

[0102]

[0103] The total arc length is ; , Let i be the coordinates of the i-th original point; , Let be the coordinates of the (i+1)th original point.

[0104] Step 2: Generate an equidistant sampling point sequence. Generate a sampling arc length sequence D = [0, 1, 2, ..., C] with a sampling step size of 1 pixel. For each sampling arc length d ∈ D, determine its corresponding pixel coordinates through linear interpolation. When d falls within the cumulative arc length... and When the sampling point coordinates (x, y) are between, the sampling point coordinates are:

[0105]

[0106] In the formula: The cumulative arc length of the (i-1)th original point; , Let d be the coordinates of the (i-1)th original point, and d be the sampling arc length.

[0107] This resampling process transforms the original contour points into uniformly distributed resampled points, resolving the issue of uneven point distribution. When the number of resampled points is less than 5, the original contour is returned directly to avoid subsequent fitting failure due to an excessively short contour.

[0108] b. Contour point curvature calculation

[0109] Curvature is a core indicator describing the degree of contour bending. The algorithm calculates curvature using the cross product of vectors at three consecutive contour points. Its mathematical principle is based on the idea of ​​"three-point method for estimating curvature" in differential geometry, and the specific derivation is as follows:

[0110] Let the three consecutive points after resampling be... , , ,vector ,vector According to the geometric meaning of the cross product of vectors, the absolute value of the cross product... It is equal to the area of ​​the parallelogram with two vectors as adjacent sides. This area is proportional to the area of ​​the triangle formed by the three points and can reflect the curvature of the contour.

[0111] The formula for calculating curvature k is:

[0112]

[0113] Among them, the denominator For vectors The cube of the modulus length is used to normalize the curvature values, ensuring the comparability of curvature for contour segments of different lengths. For the beginning and end points of the contour, the curvature values ​​of adjacent points are used for assignment, avoiding curvature anomalies caused by boundary effects. , (m is the number of contour points).

[0114] The advantages of this curvature calculation method are: it does not require complex curve fitting of the contour, and the curvature can be quickly calculated using only three adjacent points, resulting in 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 curvature.

[0115] (4) Curvature-weighted piecewise fitting

[0116] While directly fitting fixed-length straight lines to the charred dark area can alleviate overfitting to some extent, the edge undulations remain too large, with obvious jagged edges and an overall uneven contour. Using curve segmentation (such as B-splines or NURBS) for fitting is less effective and computationally complex. Figure 6 As shown in (b). Therefore, a curvature-weighted piecewise fitting algorithm is proposed, which dynamically adjusts the segment length according to the curvature of the contour points to achieve adaptive fitting of "smaller segments for high curvature and coarser segments for low curvature". Its core principle and implementation steps are as follows:

[0117] a. Dynamic segment length calculation

[0118] Using 10 pixels as the base segment length, a curvature weighting factor is introduced to adjust the actual segment length. For contour points with curvature k, the formula for calculating the actual segment length seg_len is:

[0119]

[0120] in, The minimum curvature threshold is used to avoid distorted fitting due to excessively large seg_len when k is too small. The physical meaning of this formula is: when the contour is sharply curved, seg_len decreases, using finer segmentation for fitting; when the contour is gentle, seg_len increases, using coarser segmentation for fitting, balancing fitting accuracy and computational efficiency. The algorithm determines the segment endpoint by accumulating arc length: starting from the current starting point, it accumulates the arc length of adjacent resampled points. When the accumulated arc length reaches seg_len, the current point is taken as the segment endpoint, completing the segmentation of a contour segment.

[0121] b. Least squares method for line segment fitting

[0122] For each segment, the least squares method is used to fit a straight line to the contour points. The equation of the fitted line is: Let a be the slope and b be the intercept. Let there be t contour points within the segment. The goal of the least squares method is to minimize the sum of squares of the fitting errors:

[0123]

[0124] To find the optimal values ​​of a and b, we take the partial derivatives of E(a,b) with respect to a and b respectively and set them equal to 0, resulting in a system of linear equations:

[0125]

[0126] Solving this system of linear equations yields analytical solutions for a and b:

[0127]

[0128] Represents the coordinates of the sampling points, when the denominator When the x-coordinates of all points within a segment are the same (perpendicular to a straight line), a = 0 is set to avoid division by zero. After fitting, the endpoints of the segments are taken as fitting points to ensure that the fitted contour retains the key shape features of the original contour. The final fitted contour is as follows. Figure 6 As shown in (c).

[0129] from Figure 6 As clearly seen in (c), the curvature-weighted piecewise fitting algorithm achieves a balance between edge fitting smoothness and accuracy. This method dynamically adjusts the segment length based on the contour curvature, subdividing in highly curved areas to preserve details and coarsening in flat areas to improve efficiency. It effectively suppresses jagged edges while avoiding the loss of key features due to over-smoothing, significantly outperforming fixed-length fitting and curve interpolation methods. Based on an accurately fitted contour, calculating the flame tip coordinates and the maximum / minimum Y values ​​at a specified X coordinate and comparing them with standard values ​​is quite straightforward. Figure 6 As shown in (c).

[0130] Repeatability stability tests of the above methods and apparatus:

[0131] Samples were taken at different times and under different ambient light conditions, and the algorithm was executed three times to test the stability of the fitted contour and the stability of the maximum / minimum value of Y under a specific X specified in the standard. In addition, the results were compared with the results of manual fitting by a skilled inspector as a reference. The final data is shown in Table 2.

[0132] Table 2 Algorithm Stability Test

[0133]

[0134] The data shows that in the three repeated tests, the repeatability error range of the maximum value of Y under the specified X coordinate is 0.1~0.2 mm, and the repeatability error range of the minimum value of Y is 0.0~0.2 mm. The repeatability error of the maximum and minimum values ​​of Y under the specified X coordinate is ≤0.2 mm, which is far lower than the proposed accuracy requirement of ≤0.5 mm.

[0135] For the coordinates of the highest point of the fitted contour, the repeatability error of the X-coordinate is 0.12 mm, the repeatability error of the Y-coordinate is 0.12 mm, and the overall repeatability error is ≤0.2 mm, which also meets the requirement of ≤0.5 mm. This result shows that the detection scheme effectively ensures the repeatability stability of the detection results through the establishment of a standardized coordinate system, high-precision image preprocessing, and curvature-weighted piecewise fitting algorithm, avoiding the problem of low repeatability accuracy caused by subjective judgment differences in traditional manual detection. During the experiment, it was found that when the boundary of the charred area of ​​the charred plate is blurred (such as near the X=200 coordinate, where the transition between the charred and uncharred areas is smooth), the repeatability error of the algorithm increases slightly, but is still controlled within 0.2 mm, indicating that the scheme has strong adaptability to scenes with blurred boundaries. Further research can further optimize the seed point selection strategy of the region growing algorithm.

[0136] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the scope of protection of the present invention in any way, and all technical solutions obtained by equivalent substitution or other means fall within the scope of protection of the present invention. Parts not covered in this invention are the same as or can be implemented using existing technology.

Claims

1. A method for digital detection of the flame ignition zone envelope according to the EN 50399 standard, characterized in that, The method comprises the following steps: Step 1, image reading and preprocessing: reading the original image and converting the color space, screening the high-brightness target area through the RGB threshold, and removing noise interference through morphological operation; Step 2, contour detection and light-emitting plate rectangular screening: extracting the contour of the preprocessed image, screening out four target light-emitting rectangular regions through area, edge number and internal angle characteristics; 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 coordinates of 16 vertices; Step 4, perspective transformation and image splicing: dividing the image into 9 regions according to the 16 vertices, realizing geometric correction of each region through perspective transformation, and finally splicing into a standard size image; Step 5, low R channel square positioning and establishment of real coordinate system: in the specified area of the corrected image, the low R channel dark square is positioned and the top-left corner vertex is marked through channel threshold screening and contour analysis, and the real coordinate system of X axis and Y axis is established with the vertex as the origin; 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.

2. The EN50399 standard-oriented flame ignition zone envelope digital detection method according to claim 1, characterized in that, In step 1, the high-brightness region is screened by [220, 220, 220]~[255, 255, 255] threshold to generate a binary mask, and the noise is removed by morphological opening operation and hole filling by morphological closing operation, so as to enhance the contrast between the target and the background, and obtain the high-brightness region.

3. The EN50399 standard-oriented flame ignition zone envelope digital detection method according to claim 1, characterized in that, In step 2, four straight quadrilaterals are selected by polygon approximation, and four light-emitting rectangular regions are selected by calculating the internal angles and combining area consistency, and the light-emitting rectangular regions are output.

4. The EN50399 standard-oriented flame ignition zone envelope digital detection method according to claim 1, characterized in that, In step 4, the image is divided into 9 regions including 4 corner rectangles, 4 edge rectangles and 1 center rectangle, a 3*3 perspective matrix H is solved for each region, the matrix parameters are obtained by solving the linear equation set by the 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.

5. The EN50399 standard oriented flame ignition zone envelope digital detection method according to claim 1, characterized in that, In step 5, the effective area of the scorching plate is extracted as the region of interest, the R channel <=30 region is screened after separating the RGB channels, the connectivity is enhanced by morphological operation, and the approximate square is selected by area, edge number and width-height ratio; combined with the prior knowledge that the target is located at 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 vertex of the target as the origin.

6. The EN50399 standard oriented flame ignition zone envelope digital detection method according to claim 1, characterized in that, Step 6 specifically comprises: LAB color space dark area enhancement: 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; Adaptive threshold segmentation and region growing: based on the percentile threshold of the brightness channel pixel distribution, the dark area is preliminarily segmented, the segmentation result is optimized by combining the seed point region growing algorithm, and the isolated noise is eliminated; Contour extraction and resampling: extracting the contour of the dark area after segmentation, realizing the uniform distribution of the contour points through the equal arc length resampling algorithm, and laying a foundation for subsequent fitting; Curvature weighted piecewise 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 area, and complete the line segment fitting by least square method; Feature quantization: based on the fitted envelope line, locate the flame tip coordinates and the maximum and minimum values of Y under the specified X coordinate, realize the digital representation of the flame shape.

7. The EN50399 standard oriented flame ignition zone envelope digital detection method according to claim 6, characterized in that, In the adaptive threshold segmentation and region growing, the gray distribution of the brightness channel pixels is counted, the 15th percentile value is taken as the segmentation threshold, and the preliminary dark area mask is obtained by binarization; 20% of the pixels with the lowest gray value in the dark area are selected as seed points, an 8-neighborhood is selected as the growth criterion, when the neighborhood pixels are dark and have not been visited, they are included in the current region, until there is no new pixel to grow, and the neighborhood effectiveness is introduced in the growth process: only when the number of pixels meeting the conditions in the neighborhood is greater than or equal to 3, the growth is carried out, to avoid noise points being mistakenly included, finally, the isolated noise with an area less than 50 pixels is removed, and the largest growth region is retained as the scorching area.

8. The EN50399 standard-oriented flame ignition zone envelope digital detection method according to claim 6, characterized in that, In the contour extraction and resampling, the scorching area contour is extracted, and resampling is performed according to 1-pixel step equal arc length, so that the contour points are uniformly distributed; the curvature k is calculated by the cross product of the continuous three-point vector, and the adjacent point curvature is used to assign the first and last points to avoid boundary anomalies.

9. The EN50399 standard oriented flame ignition zone envelope digital detection method according to claim 6, characterized in that, In the curvature weighted piecewise fitting, 10 pixels are taken as the basic segment length, and a curvature weighting factor is introduced to adjust the actual segment length, for the contour point with curvature k, the calculation formula of the actual segment length seg_len is: wherein, is a minimum curvature threshold value for avoiding distortion in the fitting when seg len is too large for small k. For the contour points in each segment, the least square method is used to fit the straight line equation y=ax+b, and the optimal slope a and intercept b are solved, to complete the envelope line smoothing fitting.

10. A digital detection device for the flame ignition zone envelope according to the EN 50399 standard for implementing the method according to any one of claims 1 to 9, characterized in that, It includes: Core control module: including machine vision calculation module, for realizing image reading and preprocessing, contour detection and light-emitting plate rectangular screening, quadrant division and target confirmation, perspective transformation and image stitching, real coordinate system establishment, and dark area contour fitting and feature extraction; Image acquisition module: using a camera, and connected with the core control module through an interface, matched with an adjustable fixing support, to ensure covering the entire scorching plate area; Calibration reference module: including four 50mm×55mm pure green rectangular LED light-emitting plates arranged at the four corners of the scorching plate, the 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, for image distortion correction and real coordinate system establishment.

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