Camera-based smoked airflow direction determination method and system, and program product
By acquiring smoke images with a camera, performing grayscale normalization and constructing normal vectors, the problem of reliance on expensive equipment and experience-based judgment is solved, achieving low-cost, efficient, and accurate determination of smoke airflow direction.
Patent Information
- Application Number
- CN202511818899.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-03
AI Technical Summary
Existing methods for determining the direction of smoke airflow rely on expensive equipment or purely empirical visual estimation, resulting in high deployment difficulty, high cost, high error rate, and insufficient efficiency and accuracy.
A camera-based method for determining the direction of smoke airflow is adopted. By acquiring smoke images of the target component, the smoke-receiving side and the smoke-avoiding side are delineated, grayscale normalization is performed, brightness difference and transition width are calculated, a normal vector is constructed, and the airflow direction is determined using a consistency coefficient.
It achieves low-cost, high-efficiency, and high-accuracy determination of smoke airflow direction, reduces the misjudgment rate, is suitable for large-area and time-sensitive on-site evidence collection, provides transparent judgment basis, and has a wide range of applications.
Smart Images

Figure CN121600084A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fire investigation technology, specifically relating to a camera-based method, system, and program product for determining the direction of smoke airflow. Background Technology
[0002] Smoke deposits at fire scenes are often used to determine airflow direction. However, existing methods for determining airflow direction based on smoke deposits mostly rely on subjective visual assessment based on personal experience or expensive equipment. Relying on expensive equipment is difficult and costly to deploy, while purely experience-based visual assessment has a high error rate, and its efficiency and accuracy need improvement. Therefore, there is an urgent need for a smoke airflow direction determination method that is efficient, accurate, low-cost, and repeatable. Summary of the Invention
[0003] The purpose of this invention is to provide a camera-based method, system, and program for determining the direction of smoke airflow, in order to solve the aforementioned problems existing in the prior art.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a camera-based method for determining the direction of smoke airflow is provided, including: Acquire a smoked image of the target component captured by a camera, wherein the smoked image of the target component includes a smoke-affected area, a smoke-repellent area, and a reference white paper area; In the smoked image of the target component, the boundary line between the smoke-receiving side region and the smoke-avoiding side region is delineated, and several measuring points are selected along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction. The smoke-receiving side strips are located within the smoke-receiving side region, and the smoke-avoiding side strips are located within the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length, and a fixed interval transition gap is reserved between the smoke-receiving side strips and the smoke-avoiding side strips. The average gray value of the reference white paper area is determined, and the gray value of the smoked image of the target component is linearly normalized based on the average gray value to obtain a gray-normalized image. Determine the mean gray value of the smoke-receiving side strip and the mean gray value of the smoke-avoiding side strip at each measurement point in the gray-level normalized image, and calculate the brightness difference of the corresponding measurement point using the mean gray values of the smoke-receiving side strip and the smoke-avoiding side strip. In the grayscale normalized image, the intensity profile line of each measuring point is marked. The intensity profile line is a brightness gradient line that passes through the back smoke side strip, the transition gap and the smoke-receiving side strip in sequence along the boundary normal direction. Based on the set grayscale range conditions, a transition segment is selected on the intensity profile line of each measuring point, and the width of the transition segment is taken as the transition width of the corresponding measuring point. The passing intensity index value of each measuring point is calculated using the brightness difference and transition width of each measuring point. Based on the passing intensity index value and the boundary normal direction of each measuring point, the normal vector of each measuring point is constructed. The direction of the normal vector is the boundary normal direction from the back smoke side strip to the smoke-receiving side strip, and the length is the passing intensity index value. The consistency coefficient of all measuring points is calculated using the normal vector of each measuring point. When the consistency coefficient meets the set threshold condition, the main direction sector of the smoke airflow is generated by superimposing the normal vectors of each measuring point.
[0005] In one possible design, after calculating the pass-through strength index values for each measuring point, the method further includes: Based on the established grading rules for the passability index values, the passability index values of each measuring point are graded to obtain the grading results of the passability index for each measuring point.
[0006] In one possible design, the method further includes: generating a test report using the smoked image of the target component after selecting each measuring point, the gray-scale normalized image after calibrating the strength profile of each measuring point, the through strength index value of each measuring point, the grading result of the through strength index of each measuring point, the consistency coefficient, and the main direction sector.
[0007] In one possible design, the calculation of the brightness difference at corresponding measuring points using the average grayscale values of the smoke-receiving side strip and the average grayscale values of the smoke-repelling side strip includes: The brightness difference at the corresponding measuring point is obtained by subtracting the average gray value of the strip on the smoke-receiving side from the average gray value of the strip on the smoke-receiving side.
[0008] In one possible design, the selection of a transition segment on the intensity profile line of each measuring point based on the set grayscale range conditions, and the use of the width of the transition segment as the transition width of the corresponding measuring point, includes: Calculate the 80% grayscale threshold t on the smoke-free side of the intensity profile at each measuring point. 80 and the 20% grayscale threshold t on the smoke-receiving side 20 , t 80 =S + 0.8 × (BS), t 20 =S+0.2×(BS), where S represents the mean gray value of the strip on the smoke-receiving side and B represents the mean gray value of the strip on the smoke-receiving side. The grayscale range selected on the intensity profile lines at each measuring point starts from the 80% grayscale threshold t on the smoke-free side. 80 20% grayscale threshold t on the smoke-receiving side 20 The transition segment is defined, and the pixel spacing of the transition segment is used as the transition width of the corresponding measurement point.
[0009] In one possible design, the calculation of the transmittance index value of each measuring point using the brightness difference and transition width at each measuring point includes: The brightness difference and transition width at each measuring point are substituted into a preset through-pass intensity index formula for calculation to obtain the through-pass intensity index value for each measuring point. The through-pass intensity index formula is as follows:
[0010] Among them, SGAI is characterized by intensity index value, Δg represents brightness difference, and w represents transition width.
[0011] In one possible design, the calculation of the consistency coefficient of all measuring points using the normal vector of each measuring point includes: The normal vector of each measuring point is substituted into a preset consistency coefficient formula for calculation to obtain the consistency coefficient of all measuring points. The consistency coefficient formula is as follows:
[0012] Where CI represents the consistency coefficient, and i is the measurement point number. The normal vector representing the measurement point i is ‖.‖, which represents the modulus of the vector.
[0013] Secondly, a camera-based smoke airflow direction determination system is provided, including an image acquisition unit, an image sampling unit, a grayscale normalization unit, a grayscale calculation unit, a profile calibration unit, a width determination unit, a vector construction unit, and a direction determination unit, wherein: An image acquisition unit is used to acquire a smoked image of a target component captured by a camera. The smoked image of the target component includes a smoke-affected area, a smoke-repellent area, and a reference white paper area. The image sampling unit is used to delineate the boundary line between the smoke-receiving side region and the smoke-avoiding side region in the smoke-smoked image of the target component, and select several measuring points along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction. The smoke-receiving side strips are located in the smoke-receiving side region, and the smoke-avoiding side strips are located in the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length, and a transition gap with a fixed interval is reserved between the smoke-receiving side strips and the smoke-avoiding side strips. The gray-level normalization unit is used to determine the average gray-level value of the reference white paper area, and to perform gray-level linear normalization processing on the smoked image of the target component based on the average gray-level value to obtain a gray-level normalized image. The grayscale calculation unit is used to determine the mean grayscale value of the smoke-receiving side strip and the mean grayscale value of the back-smoke side strip at each measurement point in the grayscale normalized image, and to calculate the brightness difference of the corresponding measurement point using the mean grayscale value of the smoke-receiving side strip and the mean grayscale value of the back-smoke side strip. The profile calibration unit is used to calibrate the intensity profile lines of each measuring point in the grayscale normalized image. The intensity profile lines are brightness gradient lines that pass through the back smoke side strip, the transition gap and the smoke-receiving side strip in sequence along the boundary normal direction. The width determination unit is used to select a transition segment on the intensity profile line of each measuring point based on the set grayscale range conditions, and to use the width of the transition segment as the transition width of the corresponding measuring point. The vector construction unit is used to calculate the passing intensity index value of each measuring point using the brightness difference and transition width of each measuring point, and to construct the normal vector of each measuring point based on the passing intensity index value and the boundary normal direction. The direction of the normal vector is the boundary normal direction from the back smoke side strip to the smoke receiving side strip, and the length is the passing intensity index value. The direction determination unit is used to calculate the consistency coefficient of all measuring points using the normal vector of each measuring point, and when the consistency coefficient meets the set threshold condition, it uses the superposition of the normal vectors of each measuring point to form the main direction sector of the smoke airflow for output.
[0014] Thirdly, a camera-based smoke airflow direction determination system is provided, including: Memory, used to store instructions; The processor is configured to read instructions stored in the memory and execute any of the camera-based smoke airflow direction determination methods described in the first aspect above, according to the instructions.
[0015] Fourthly, a computer-readable storage medium is provided, on which instructions are stored, which, when executed on a computer, cause the computer to perform any one of the camera-based smoke airflow direction determination methods described in the first aspect. Simultaneously, a computer program product is also provided, which, when executed on a computer, performs any one of the camera-based smoke airflow direction determination methods described in the first aspect.
[0016] Beneficial effects: This invention features low-threshold and low-cost equipment, enabling on-site smoke airflow direction determination without relying on expensive instruments, thus reducing costs and deployment difficulties. Compared to purely empirical visual judgment methods, it reduces the misjudgment rate and significantly improves efficiency and accuracy. Using the normal vector of each measuring point, the intensity index, and the consistency coefficient as the basis for judgment allows for quantitative output, avoiding subjective visual judgment and ensuring good repeatability. It is resistant to interference from lighting and material differences, reducing systematic errors caused by exposure and surface reflectivity differences. By vectorizing and superimposing the normal vectors from the smoke-receiving side to the smoke-receiving side of each measuring point, the main direction sector can be directly obtained, making direction determination intuitive. It can quickly produce conclusions, making it suitable for large-area, time-sensitive on-site evidence collection, and can provide transparent and verifiable expressions and evidence of uncertainty, facilitating judicial acceptance. It has a wide range of applications, strong scalability, and is compatible with existing image data, improving the utilization rate of existing case images. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the system configuration in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the system configuration in Embodiment 3 of the present invention. Detailed Implementation
[0019] It should be noted that the descriptions of these embodiments are intended to aid in understanding the invention and do not constitute a limitation thereof. The specific structural and functional details disclosed herein are merely for describing exemplary embodiments of the invention. However, the invention may be embodied in many alternative forms and should not be construed as being limited to the embodiments described herein.
[0020] It should be understood that, unless otherwise explicitly specified and limited, the corresponding terms should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments according to the specific circumstances.
[0021] Specific details are provided in the following description to provide a complete understanding of the exemplary embodiments. However, those skilled in the art will understand that the exemplary embodiments can be implemented without these specific details. For example, apparatus may be shown in block diagrams to avoid obscuring the examples with unnecessary details. In other embodiments, well-known processes, structures, and techniques may be omitted with non-essential details to avoid obscuring the embodiments.
[0022] Example 1: This embodiment provides a camera-based method for determining the direction of smoke airflow, which can be applied to corresponding image processing terminals, such as... Figure 1 As shown, the method includes the following steps: S1. Acquire a smoked image of the target component captured by a camera, wherein the smoked image of the target component includes a smoke-affected area, a smoke-repellent area, and a reference white paper area.
[0023] In practice, a reference white paper (or an 18% gray card) can be pasted next to the target component at the fire smoke scene, in a visible area coplanar with the component. This serves as a brightness reference for image analysis after shooting. Simultaneously, a ruler can be placed at the boundary between the smoke-receiving and smoke-avoiding sides of the target component. The relative position of the reference white paper to the boundary, as well as the distance and size of the selected sampling strip relative to the boundary, can be recorded using the ruler. This facilitates reproduction and subsequent pixel-to-physical-size conversion. Then, standardized shooting of the target component at the smoke scene can be performed: using a camera at a distance of 0.8-1.5m, with fixed exposure / focus (or "professional mode" locking ISO / shutter speed / focal length), at least two images should be taken from the same location, recording the shooting time, time zone, camera parameters, etc. After the camera captures the smoke-affected image of the target component, the image is transmitted to the processing terminal for subsequent image processing. The smoke-affected image includes the smoke-receiving and smoke-avoiding areas of the target component, as well as the reference white paper area.
[0024] S2. In the smoked image of the target component, delineate the boundary line between the smoke-receiving side region and the smoke-avoiding side region, and select several measuring points along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction. The smoke-receiving side strips are located within the smoke-receiving side region, and the smoke-avoiding side strips are located within the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length, and a fixed transition gap is reserved between the smoke-receiving side strips and the smoke-avoiding side strips.
[0025] In practice, the boundary line between the smoke-receiving side region and the smoke-avoiding side region can be delineated in the smoke-smoked image of the target component through the processing terminal. Then, several measuring points are selected along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction (i.e., perpendicular to the boundary line direction). The smoke-receiving side strips are located within the smoke-receiving side region, and the smoke-avoiding side strips are located within the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length (e.g., the strip width W can be 10-20 pixels, and the strip length L≥100 pixels). A fixed interval of transition gap is reserved between the smoke-receiving side strips and the smoke-avoiding side strips (the transition gap covers the smoke-smoked transition area that gradually changes from light to dark).
[0026] S3. Determine the average gray value of the reference white paper area, and perform gray-level linear normalization processing on the smoked image of the target component based on the average gray value to obtain a gray-level normalized image.
[0027] In practice, the processing terminal can calculate the average grayscale value Gref of the reference white paper area and use the average grayscale value Gref as the normalized grayscale. Then, the normalized grayscale is used to perform linear grayscale normalization on the smoked image of the target component to obtain a grayscale normalized image. That is, for the grayscale value g of each pixel in the image, g' = g / Gref can be calculated to obtain the normalized grayscale value g' of each pixel. The grayscale normalized image is constructed using the normalized grayscale values g' of each pixel. However, if no reference white paper is placed when initially acquiring the smoked image of the target component, the 95th percentile grayscale value of the entire smoked image of the target component excluding the reference white paper area can be used as the normalized grayscale (for example, if the grayscale value distribution of each pixel in the image ranges from 0 to 100, then the grayscale value 95 is taken as the normalized grayscale). Then, the normalized grayscale is used to perform linear grayscale normalization on the smoked image of the target component to obtain a grayscale normalized image, which is noted in the final inspection report.
[0028] S4. Determine the mean gray value of the smoke-receiving side strip and the mean gray value of the back-smoke side strip at each measurement point in the gray-level normalized image, and calculate the brightness difference of the corresponding measurement point using the mean gray value of the smoke-receiving side strip and the mean gray value of the back-smoke side strip.
[0029] In practice, after the processing terminal obtains the grayscale normalized image, it can determine the grayscale mean S of the smoke-receiving side strip and the grayscale mean B of the smoke-repelling side strip at each measurement point in the grayscale normalized image. Then, by subtracting the grayscale mean S of the smoke-receiving side strip from the grayscale mean B of the smoke-repelling side strip, the brightness difference Δg of the corresponding measurement point is obtained, i.e., Δg = BS.
[0030] S5. In the grayscale normalized image, mark the intensity profile line of each measuring point. The intensity profile line is a brightness gradient line that passes through the back smoke side strip, the transition gap and the smoke-receiving side strip in sequence along the boundary normal direction.
[0031] In specific implementation, the intensity profile line of each measuring point can be marked in the grayscale normalized image through the processing terminal. The intensity profile line is a brightness gradient line that runs along the boundary normal direction (i.e., perpendicular to the boundary line direction at the measuring point) and passes through the back smoke side strip, the transition gap and the smoke receiving side strip in sequence. That is, from the back smoke side strip → transition gap → smoke receiving side strip, it is a brightness gradient line from bright to dark, and the grayscale value of the pixel sequence in the intensity profile line is read.
[0032] S6. Based on the set grayscale range conditions, select a transition segment on the intensity profile line of each measuring point, and use the width of the transition segment as the transition width of the corresponding measuring point.
[0033] In practice, the processing terminal can select a transition segment with a set grayscale range on the intensity profile line of each measuring point. For example, it can first calculate the 80% grayscale threshold t on the smoke-back side of the intensity profile line of each measuring point. 80and the 20% grayscale threshold t on the smoke-receiving side 20 , t 80 =S + 0.8 × (BS), t 20 =S + 0.2 × (BS), where S represents the average gray value of the strip on the smoke-receiving side, and B represents the average gray value of the strip on the smoke-repelling side. Then, on the intensity profile line of each measuring point, a gray value range from 80% gray value threshold t on the smoke-repelling side is selected. 80 20% grayscale threshold t on the smoke-receiving side 20 The transition segment is defined, and the pixel spacing of the transition segment is used as the transition width w of the corresponding measurement point.
[0034] S7. Calculate the passing intensity index value of each measuring point using the brightness difference and transition width of each measuring point, and construct the normal vector of each measuring point based on the passing intensity index value and the boundary normal direction. The direction of the normal vector is the boundary normal direction from the back smoke side strip to the smoke receiving side strip, and the length is the passing intensity index value.
[0035] In practice, the processing terminal substitutes the brightness difference and transition width of each measuring point into a preset through-pass intensity index formula to calculate the through-pass intensity index value for each measuring point. The through-pass intensity index formula is as follows:
[0036] In this system, SGAI represents the pass intensity index value, Δg represents the brightness difference, and w represents the transition width. After calculating the pass intensity index value SGAI for each measuring point, the processing terminal can classify the pass intensity index value of each measuring point according to the set pass intensity index value classification rules to obtain the pass intensity index classification results for each measuring point. For example, the pass intensity index value classification rules are: L1 weak pass: 0.4≤SGAI<0.9; L2 moderate pass: 0.9≤SGAI<1.7; L3 strong pass: SGAI≥1.7. L1, L2, and L3 are the pass intensity index classification results.
[0037] Simultaneously, the processing terminal constructs the normal vector of each measuring point based on the through intensity index value and the boundary normal direction. i represents the measurement point number, and the normal vector The direction is from the boundary normal of the strip on the back side of the smoke to the strip on the receiving side of the smoke. The length is the strength index value SGAI. i That is, the normal vector of each measuring point It can be represented as .
[0038] S8. Calculate the consistency coefficient of all measuring points using the normal vector of each measuring point, and when the consistency coefficient meets the set threshold condition, use the superposition of the normal vectors of each measuring point to form the main direction sector of the smoke airflow for output.
[0039] In practice, the processing terminal can add the normal vectors of each measuring point:
[0040] The direction is the "composite principal direction" of the normal vectors of each measuring point, where N is the number of measuring points. The normal vectors of each measuring point are then substituted into a preset consistency coefficient formula to calculate the consistency coefficient for all measuring points. The consistency coefficient formula is:
[0041] Where CI represents the consistency coefficient, and i is the measurement point number. The normal vector representing the measurement point i is ‖.‖, which represents the modulus of the vector. It can characterize the magnitude of the synthetic "net effect".
[0042] The consistency coefficient (CI) measures the degree of consistency in the direction of the normal vectors of multiple measuring points. Each measuring point's normal vector corresponds to an arrow (direction = normal, i.e., smoke-back → smoke-in, length = SGAI of that point). When many arrows are superimposed on a planar sketch, if most point in similar directions, the CI is high; if the directions are dispersed or cancel each other out, the CI is low. Therefore, the threshold condition can be set to CI ≥ 0.7. Only when the consistency coefficient CI ≥ 0.7 is the direction of the normal vectors of each measuring point considered similar. At this point, the superposition of the normal vectors of each measuring point is used to construct the main direction sector of the smoke airflow for output. The synthesized main direction sector indicates the direction of the smoke airflow. Further, an "airflow path" can be constructed based on the main direction sector, i.e., using weighted lines to connect the local arrows of the main direction sector into a path. For example, using the adjacency connection method, the arrows of each measuring point are grouped (e.g., threshold 1-2m), and then within each group, the centers p of adjacent measuring points are connected sequentially according to the arrow direction. i →p j The length weight is min(SGAI). i SGAI j Finally, discard the lines that deviate more than 30° from the main direction sector, and obtain one or two continuous broken lines, which are the candidates for airflow paths.
[0043] Finally, the processing terminal can generate an inspection report using the smoked images of the target component after selecting each measuring point, the gray-scale normalized images after calibrating the strength profile lines of each measuring point, the pass strength index values of each measuring point, the pass strength index grading results of each measuring point, the consistency coefficient, and the main direction sector, etc., to facilitate data storage and subsequent traceability. Each measuring point can also be measured at least twice, that is, for the same measuring point, at least two complete measurements are performed independently while maintaining consistent parameters to verify repeatability. Each measurement yields a set of Δg, w, SGAI, and normal vectors, and the mean and range of SGAI are given in the inspection report.
[0044] This method has low equipment requirements and low cost, eliminating the need for expensive equipment and instruments to determine the direction of smoke flow on-site, thus reducing costs and deployment difficulties. Compared to purely empirical visual judgment methods, it reduces the error rate and significantly improves efficiency and accuracy. Using the normal vector of each measuring point, the intensity index, and the consistency coefficient as the basis for judgment, it can achieve quantitative output, avoiding subjective visual judgment and offering good repeatability. It is resistant to interference from lighting and material differences, reducing systematic errors caused by differences in exposure and surface reflectivity. By vectorizing and superimposing the normal vectors from the smoke-receiving side to the smoke-receiving side of each measuring point, the main direction sector can be directly obtained, making direction determination intuitive. It can quickly produce conclusions, making it suitable for large-area, time-sensitive on-site evidence collection, and can provide transparent and verifiable expressions and evidence of uncertainty, which is beneficial for judicial acceptance. It has a wide range of applications, strong scalability, and is compatible with existing image data, improving the utilization rate of existing case images.
[0045] Example 2: This embodiment provides a camera-based smoke airflow direction determination system, such as... Figure 2 As shown, it includes an image acquisition unit, an image sampling unit, a grayscale normalization unit, a grayscale calculation unit, a profile calibration unit, a width determination unit, a vector construction unit, and a direction determination unit, wherein: An image acquisition unit is used to acquire a smoked image of a target component captured by a camera. The smoked image of the target component includes a smoke-affected area, a smoke-repellent area, and a reference white paper area. The image sampling unit is used to delineate the boundary line between the smoke-receiving side region and the smoke-avoiding side region in the smoke-smoked image of the target component, and select several measuring points along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction. The smoke-receiving side strips are located in the smoke-receiving side region, and the smoke-avoiding side strips are located in the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length, and a transition gap with a fixed interval is reserved between the smoke-receiving side strips and the smoke-avoiding side strips. The gray-level normalization unit is used to determine the average gray-level value of the reference white paper area, and to perform gray-level linear normalization processing on the smoked image of the target component based on the average gray-level value to obtain a gray-level normalized image. The grayscale calculation unit is used to determine the mean grayscale value of the smoke-receiving side strip and the mean grayscale value of the back-smoke side strip at each measurement point in the grayscale normalized image, and to calculate the brightness difference of the corresponding measurement point using the mean grayscale value of the smoke-receiving side strip and the mean grayscale value of the back-smoke side strip. The profile calibration unit is used to calibrate the intensity profile lines of each measuring point in the grayscale normalized image. The intensity profile lines are brightness gradient lines that pass through the back smoke side strip, the transition gap and the smoke-receiving side strip in sequence along the boundary normal direction. The width determination unit is used to select a transition segment on the intensity profile line of each measuring point based on the set grayscale range conditions, and to use the width of the transition segment as the transition width of the corresponding measuring point. The vector construction unit is used to calculate the passing intensity index value of each measuring point using the brightness difference and transition width of each measuring point, and to construct the normal vector of each measuring point based on the passing intensity index value and the boundary normal direction. The direction of the normal vector is the boundary normal direction from the back smoke side strip to the smoke receiving side strip, and the length is the passing intensity index value. The direction determination unit is used to calculate the consistency coefficient of all measuring points using the normal vector of each measuring point, and when the consistency coefficient meets the set threshold condition, it uses the superposition of the normal vectors of each measuring point to form the main direction sector of the smoke airflow for output.
[0046] Example 3: This embodiment provides a camera-based smoke airflow direction determination system, such as... Figure 3 As shown, at the hardware level, it includes: The data interface is used to establish data communication between the processor and external data terminals; Memory, used to store instructions; The processor is used to read the instructions stored in the memory and execute the camera-based smoke airflow direction determination method in Embodiment 1 according to the instructions.
[0047] Optionally, the system also includes an internal bus, through which the processor, memory, and data interface can be interconnected. This internal bus can be a PCIe (Peripheral Component Interconnect Eexpress) bus, which can be divided into an address bus, a data bus, a control bus, etc. The memory can include, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Flash Memory, First Input First Output (FIFO), and / or First In Last Out (FILO). The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0048] Example 4: This embodiment provides a computer-readable storage medium storing instructions. When these instructions are executed on a computer, the computer performs the camera-based smoke airflow direction determination method described in Embodiment 1. The computer-readable storage medium refers to a data storage medium, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or Memory Sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0049] This embodiment also provides a computer program product that, when run on a computer, executes the camera-based smoke airflow direction determination method in Embodiment 1. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0050] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining the direction of smoke airflow based on a camera, characterized in that, include: Acquire a smoked image of the target component captured by a camera, wherein the smoked image of the target component includes a smoke-affected area, a smoke-repellent area, and a reference white paper area; In the smoked image of the target component, the boundary line between the smoke-receiving side region and the smoke-avoiding side region is delineated, and several measuring points are selected along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction. The smoke-receiving side strips are located within the smoke-receiving side region, and the smoke-avoiding side strips are located within the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length, and a fixed interval transition gap is reserved between the smoke-receiving side strips and the smoke-avoiding side strips. The average gray value of the reference white paper area is determined, and the gray value of the smoked image of the target component is linearly normalized based on the average gray value to obtain a gray-normalized image. Determine the mean gray value of the smoke-receiving side strip and the mean gray value of the smoke-avoiding side strip at each measurement point in the gray-level normalized image, and use the mean gray value of the smoke-receiving side strip and the mean gray value of the smoke-avoiding side strip to calculate the brightness difference of the corresponding measurement point. In the grayscale normalized image, the intensity profile line of each measuring point is marked. The intensity profile line is a brightness gradient line that passes through the back smoke side strip, the transition gap and the smoke-receiving side strip in sequence along the boundary normal direction. Based on the set grayscale range conditions, a transition segment is selected on the intensity profile line of each measuring point, and the width of the transition segment is taken as the transition width of the corresponding measuring point. The passing intensity index value of each measuring point is calculated using the brightness difference and transition width of each measuring point. Based on the passing intensity index value and the boundary normal direction of each measuring point, the normal vector of each measuring point is constructed. The direction of the normal vector is the boundary normal direction from the back smoke side strip to the smoke-receiving side strip, and the length is the passing intensity index value. The consistency coefficient of all measuring points is calculated using the normal vector of each measuring point. When the consistency coefficient meets the set threshold condition, the main direction sector of the smoke airflow is generated by superimposing the normal vectors of each measuring point.
2. The method for determining the direction of smoke airflow based on a camera according to claim 1, characterized in that, After calculating the passability index value for each measuring point, the method further includes: Based on the established grading rules for the passability index values, the passability index values of each measuring point are graded to obtain the grading results of the passability index for each measuring point.
3. The method for determining the direction of smoke airflow based on a camera according to claim 2, characterized in that, The method further includes generating a test report using the smoked image of the target component after selecting each measuring point, the gray-scale normalized image after calibrating the strength profile of each measuring point, the through strength index value of each measuring point, the grading result of the through strength index of each measuring point, the consistency coefficient, and the main direction sector.
4. The camera-based method for determining the direction of smoke airflow according to claim 1, characterized in that, The calculation of the brightness difference at corresponding measuring points using the average grayscale values of the smoke-receiving side strip and the smoke-repelling side strip includes: The brightness difference at the corresponding measuring point is obtained by subtracting the average gray value of the strip on the smoke-receiving side from the average gray value of the strip on the smoke-receiving side.
5. The method for determining the direction of smoke airflow based on a camera according to claim 1, characterized in that, The selection of transition segments on the intensity profile line of each measuring point based on the set grayscale range conditions, and the use of the width of the transition segment as the transition width of the corresponding measuring point, includes: Calculate the 80% grayscale threshold t on the smoke-free side of the intensity profile at each measuring point. 80 and the 20% grayscale threshold t on the smoke-receiving side 20 , t 80 =S + 0.8 × (BS), t 20 =S+0.2×(BS), where S represents the mean gray value of the strip on the smoke-receiving side and B represents the mean gray value of the strip on the smoke-receiving side. The grayscale range selected on the intensity profile lines at each measuring point starts from the 80% grayscale threshold t on the smoke-free side. 80 20% grayscale threshold t on the smoke-receiving side 20 The transition segment is defined, and the pixel spacing of the transition segment is used as the transition width of the corresponding measurement point.
6. The method for determining the direction of smoke airflow based on a camera according to claim 1, characterized in that, The calculation of the transmission intensity index value of each measuring point using the brightness difference and transition width of each measuring point includes: The brightness difference and transition width at each measuring point are substituted into a preset through-pass intensity index formula for calculation to obtain the through-pass intensity index value for each measuring point. The through-pass intensity index formula is as follows: Among them, SGAI is characterized by intensity index value, Δg represents brightness difference, and w represents transition width.
7. The method for determining the direction of smoke airflow based on a camera according to claim 1, characterized in that, The calculation of the consistency coefficient of all measuring points using the normal vector of each measuring point includes: The normal vector of each measuring point is substituted into a preset consistency coefficient formula for calculation to obtain the consistency coefficient of all measuring points. The consistency coefficient formula is as follows: Where CI represents the consistency coefficient, and i is the measurement point number. The normal vector representing the measurement point i is ‖.‖, which represents the modulus of the vector.
8. A camera-based smoke airflow direction determination system, characterized in that, It includes an image acquisition unit, an image sampling unit, a grayscale normalization unit, a grayscale calculation unit, a profile calibration unit, a width determination unit, a vector construction unit, and a direction determination unit, wherein: An image acquisition unit is used to acquire a smoked image of a target component captured by a camera. The smoked image of the target component includes a smoke-affected area, a smoke-repellent area, and a reference white paper area. The image sampling unit is used to delineate the boundary line between the smoke-receiving side region and the smoke-avoiding side region in the smoke-smoked image of the target component, and select several measuring points along the boundary line. The measuring points include smoke-receiving side strips and smoke-avoiding side strips arranged along the boundary normal direction. The smoke-receiving side strips are located in the smoke-receiving side region, and the smoke-avoiding side strips are located in the smoke-avoiding side region. The smoke-receiving side strips and the smoke-avoiding side strips are of equal width and length, and a transition gap with a fixed interval is reserved between the smoke-receiving side strips and the smoke-avoiding side strips. The gray-level normalization unit is used to determine the average gray-level value of the reference white paper area, and to perform gray-level linear normalization processing on the smoked image of the target component based on the average gray-level value to obtain a gray-level normalized image. The grayscale calculation unit is used to determine the mean grayscale value of the smoke-receiving side strip and the mean grayscale value of the back-smoke side strip at each measurement point in the grayscale normalized image, and to calculate the brightness difference of the corresponding measurement point using the mean grayscale value of the smoke-receiving side strip and the mean grayscale value of the back-smoke side strip. The profile calibration unit is used to calibrate the intensity profile lines of each measuring point in the grayscale normalized image. The intensity profile lines are brightness gradient lines that pass through the back smoke side strip, the transition gap and the smoke-receiving side strip in sequence along the boundary normal direction. The width determination unit is used to select a transition segment on the intensity profile line of each measuring point based on the set grayscale range conditions, and to use the width of the transition segment as the transition width of the corresponding measuring point. The vector construction unit is used to calculate the passing intensity index value of each measuring point using the brightness difference and transition width of each measuring point, and to construct the normal vector of each measuring point based on the passing intensity index value and the boundary normal direction. The direction of the normal vector is the boundary normal direction from the back smoke side strip to the smoke receiving side strip, and the length is the passing intensity index value. The direction determination unit is used to calculate the consistency coefficient of all measuring points using the normal vector of each measuring point, and when the consistency coefficient meets the set threshold condition, it uses the superposition of the normal vectors of each measuring point to form the main direction sector of the smoke airflow for output.
9. A camera-based smoke airflow direction determination system, characterized in that, include: Memory, used to store instructions; A processor is configured to read instructions stored in the memory and execute the camera-based smoke airflow direction determination method according to any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on a computer, it executes the camera-based smoke airflow direction determination method according to any one of claims 1-7.