Adaptive fire trace spectral image segmentation method and system

Through the adaptive fire trace spectral image segmentation method, multispectral image acquisition and adaptive threshold adjustment are used to solve the problem of insufficient fire trace data information in complex lighting environments, achieve accurate segmentation of fine-grained fire traces, and avoid the shortcomings of traditional methods.

CN116563306BActive Publication Date: 2025-09-12TIANJIN JINHANG INST OF TECH PHYSICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310404595.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2025-09-12
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

Existing technologies have little data information on fire traces in complex lighting environments, traditional methods have poor segmentation effects, and segmentation parameters cannot be adaptively adjusted, making it difficult to achieve accurate segmentation of fine-grained traces of the same category with different textures.

Method used

An adaptive fire trace spectral image segmentation method is adopted. Through multispectral image acquisition, dimension conversion, image enhancement, filtering, adaptive edge detection, erosion and expansion, and contour search, image segmentation is performed using adaptive threshold adjustment, and the detection is cyclically detected until the specified segmentation effect is achieved.

Benefits of technology

It achieves accurate segmentation of salient target areas in complex lighting environments, avoids the influence of dark light noise, completes the segmentation of a specified number of salient target areas, solves the problems of insufficient information and poor segmentation effect, and avoids the large amount of data calibration required for deep learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563306B_ABST
    Figure CN116563306B_ABST
Patent Text Reader

Abstract

The present invention provides an adaptive fire trace spectral image segmentation method and system, including: collecting a multispectral image; performing dimensional conversion on the image; performing dimensional decomposition on the image to obtain multiple grayscale images, selecting the grayscale image of the first dimension as the grayscale image to be segmented; performing image enhancement, filtering, adaptive edge detection and erosion dilation on the grayscale image; performing contour search and position positioning on the grayscale image; testing the segmentation result of the grayscale image, if the test result fails, selecting the grayscale image of the next dimension as the grayscale image to be segmented, repeating the above steps to determine whether the grayscale image is successfully segmented; when the segmentation cycle reaches the last dimensional grayscale image and the segmentation is still not successful, adjusting the adaptive edge detection value, and repeating the above steps until the image segmentation test result passes. The technical solution of the present invention is applied to solve the technical problems in the prior art of poor image segmentation effect and the inability of traditional method segmentation parameters to be adaptively adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image segmentation, and in particular to an adaptive fire trace spectral image segmentation method and system. Background Art

[0002] Image segmentation is the first step in image analysis and image understanding, and is one of the most basic problems in computer vision and image processing (Yulong Cai, Siheng Mi, Jiahao Yan, Hong Peng, Xiaohui Luo, Qian Yang, Jun Wang. An unsupervised segmentation method based on dynamic threshold neural P systems for color images. Information Sciences. 2022.).In recent years, image segmentation has made significant progress in both effectiveness and performance (Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected CRFs. In Proc. International Conference on Learning Representations (ICLR), 2015.) (Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2017.) (Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proc. IEEE International Conference on Computer Vision (ICCV), 2019.) (Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015.). However, since the task is designed to process only predefined sets of categories (e.g., "cars," "people"), segmentation models have difficulty processing undefined categories or targets of the same category with different textures (e.g., "fire marks of different degrees of burning in low-light environments," "people and shadows in the same picture under dim light"). Therefore, there is an urgent need for a method that can accurately segment fine-grained scenes.

[0003] Different types of objects or materials have different reflectance spectra, forming distinct feature vectors in the multidimensional spectral space. This provides more data support for image processing and segmentation. However, as the complexity of the shooting environment increases, the high-resolution multispectral image data and computational complexity also increase. The effects of image noise and spectral aliasing become more prominent. Therefore, in complex environments, using traditional segmentation methods for image analysis and image segmentation based solely on the RGB three-channel color information of visible light is less than ideal.

[0004] Traditional image segmentation methods (Peng Huang, Qi Zheng, Chao Liang. Overview of image segmentation methods. Journal of Wuhan University (SCIENCE EDITION), 2020. (in Chinese) Huang Peng, Zheng Qi, Liang Chao. Overview of image segmentation methods. Journal of Wuhan University (Science Edition). 2020.) (Eliza Yingzi Du, Chein-I Hang. Unsupervised approach to color video thresholding. International Conference on Acoustics, Speech, and Signal Processing. 2003.) (N. Senthilkumaran, R. Rajesh. Edge detection techniques for image segmentation–a survey of soft computing approaches. International Journal of RecentTrendsinEngineering.2009.)(PedroF.Felzenszwalb,DanielP.Huttenlocher.Efficientgraph-basedimagesegmentation.Int.J.Comput.Vision.2004.)(TaoLei,XiaohongJia,YanningZhang,LifengHe,HongyingMeng,Asoke K.Nandi.Significantlyfastandrobustfuzzyc-meansclusteringalgorithmbasedon morphologicalreconstructionandmembershipfiltering.IEEETrans.FuzzySyst.2018.)(YiningDeng,BSManjunath.Unsupervisedsegmentationofcolor-texture regionsinimagesandvideo.IEEETrans.PatternAnal.Mach.Intell.2001.)(Haifeng Sima,PingGuo,YoufengZou,ZhihengWang,MingliangXu.Bottom-upmerging segmentation for color images with complex areas (IEEE Trans. Syst. Man Cybern. Syst. 2018). Image segmentation is achieved using artificially defined rules. Multiple segmentation results for the same image are usually consistent. Determining these rules typically involves two steps: first, theoretically demonstrating the rationality of the rule, and then further verifying its effectiveness through segmentation results.

[0005] With the development of deep learning, researchers in the field of computer vision have gradually adopted convolutional neural networks as the main method for image processing. Convolutional neural network (CNN) models can fully learn and understand the semantic information of images and can effectively achieve semantic-level image segmentation (Hyeonwoo Noh, Seunghoon Hong, and Bohyung Han. Learning deconvolution network for semantic segmentation. In Proc. IEEE International Conference on Computer Vision (ICCV), 2015.)(Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.)(H. Zhao, J. Shi, X. Qi, X. Wang, and J. Jia. Pyramid scene parsing network. In Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.).

[0006] However, traditional image segmentation methods mostly utilize only surface information. Since common RGB images have fewer channels, they often perform poorly in challenging shooting environments. Furthermore, the parameters of traditional segmentation methods are often not adaptive to the image, resulting in poor robustness. Consequently, traditional methods struggle to segment complex scenes, such as RGB images in low light.

[0007] Existing deep learning-based image segmentation methods are mainly categorized as semantic segmentation, instance segmentation, and panoptic segmentation. These methods primarily process predefined sets of classes and are ineffective at handling fine-grained images of the same class with varying textures. Therefore, when the segmentation task differs from traditional semantic, instance, and panoptic segmentation methods, using deep learning methods to segment fire scar data of varying shapes within the same class requires targeted re-annotation of the massive dataset, and the quality of the standard data can also affect the final results. Consequently, segmenting fine-grained images of the same class with varying textures is challenging. Summary of the Invention

[0008] The present invention provides an adaptive fire trace spectral image segmentation method and system, which can solve the technical problems in the prior art of fire trace data having little information in RGB images, poor image segmentation effect under complex lighting conditions, and the inability of traditional method segmentation parameters to be adaptively adjusted.

[0009] According to one aspect of the present invention, an adaptive fire trace spectral image segmentation method under a complex lighting environment is provided, and the adaptive fire trace spectral image segmentation method under a complex lighting environment includes: step one, collecting a multispectral image of a fire trace sample; step two, performing dimension conversion on the collected multispectral image of the fire trace sample; step three, performing dimension decomposition on the multispectral image after dimension conversion to obtain multiple grayscale images, and selecting the grayscale image of the first dimension from the multiple grayscale images as the grayscale image to be segmented; step four, performing image enhancement on the grayscale image to be segmented; step five, filtering the grayscale image after image enhancement; step six, performing adaptive edge detection on the filtered grayscale image; step seven, performing corrosion and expansion on the grayscale image after edge detection to complete the basic segmentation of the grayscale image; step eight, performing contour search and position positioning on the grayscale image after segmentation ; Step nine, test the segmentation result of the grayscale image. If the segmentation test result of the grayscale image is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed; if the segmentation test result of the grayscale image is unqualified, return to step three, select the grayscale image of the next dimension as the grayscale image to be segmented, repeat steps three to nine, and judge whether the grayscale image segmentation is successful; Step ten, when the grayscale image segmentation is successful, the adaptive fire trace spectral image segmentation under complex lighting environment is completed; when the segmentation cycle reaches the last dimension grayscale image and the segmentation is still not successful, return to step three, adjust the adaptive edge detection value, and perform the next round of grayscale image segmentation of the first dimension, repeat steps three to ten, until the segmentation test result of the grayscale image of a certain dimension is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed.

[0010] Furthermore, in step six, the threshold edge detection module in OpenCV is called to perform adaptive edge detection on the filtered grayscale image. The threshold thresh can be calculated according to thresh = mean(img_i) / det_th, where mean(img_i) is the mean of the grayscale image and det_th is the adaptive edge detection value.

[0011] Furthermore, in step nine, the segmentation result of the grayscale image is tested. If the number of segmented areas of the grayscale image to be segmented is greater than or equal to the preset segmentation number, the segmentation test result of the grayscale image is considered qualified; if the number of segmented areas of the grayscale image to be segmented is less than the preset segmentation number, the segmentation test result of the grayscale image is considered unqualified.

[0012] Furthermore, in step 10, when the segmentation cycle reaches the last dimension and there is still no successfully segmented grayscale image, return to step 3 and adjust the adaptive edge detection value according to det_th'=det_th*1.1, where det_th' is the adjusted adaptive edge detection value and det_th is the adaptive edge detection value in the previous round of image segmentation.

[0013] Furthermore, in step 2, the multispectral image in Bayer format is converted into an image format of (h / 5)*(w / 5)*25 according to the spectrum segment, where h is the length of the multispectral image and w is the width of the multispectral image.

[0014] Furthermore, in step 4, the sobel edge detection algorithm is used to perform edge detection enhancement on the grayscale image after image segmentation.

[0015] Furthermore, in step five, the grayscale image after image enhancement is filtered using a mean filtering method.

[0016] Furthermore, in step eight, the contour search and position positioning module in OpenCV is called to perform contour search and position positioning on the grayscale image after segmentation.

[0017] Furthermore, in step one, a ximea multispectral image collector is used to collect multispectral images of the fire trace samples.

[0018] According to another aspect of the present invention, an adaptive fire trace spectral image segmentation system in a complex lighting environment is provided. The adaptive fire trace spectral image segmentation system in a complex lighting environment uses the adaptive fire trace spectral image segmentation method in a complex lighting environment as described above to perform adaptive fire trace spectral image segmentation.

[0019] The technical solution of the present invention is applied to provide a method for adaptive fire trace spectral image segmentation in complex lighting environments, which uses a multispectral image as test data and an adaptive image segmentation method to quickly and efficiently perform adaptive fire trace spectral image segmentation in complex lighting environments. The method can fully utilize the information of different dimensions of the multispectral image through cyclic detection and segmentation, and better perform target salient area segmentation in extremely dark or low-resolution scenes; by using adaptive edge detection thresholds det_th and thresh, adaptive adjustment can be made according to different images or dimensions; and according to the characteristics of the adaptive thresholds and high-dimensional images, the method can complete the task of segmenting salient target areas of different specified numbers. Compared with the existing technology, the adaptive fire trace spectral image segmentation method provided by the present invention does not require the use of deep learning and other methods for large-scale data calibration and training. It can accurately and step-by-step segmentation and selection of significant targets, can avoid the influence of factors such as dark light noise on the segmentation effect, can adaptively adjust the segmentation threshold for precise segmentation, and can complete the segmentation of a specified number of significant target areas. Therefore, the adaptive fire trace spectral image segmentation method provided by the present invention can effectively solve the problem in the existing technology that fire trace data has little information and poor segmentation effect under RGB images, solve the problem of poor image segmentation effect under complex lighting conditions, and solve the problem that the segmentation parameters of traditional methods cannot be adaptively adjusted. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are included to provide a further understanding of the embodiments of the present invention, constitute a part of the specification, illustrate the embodiments of the present invention, and together with the description, explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0021] Figure 1 A flow chart of a method for adaptive fire trace spectral image segmentation in a complex lighting environment provided by a specific embodiment of the present invention is shown. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present invention and its application or use. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0023] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0024] Unless otherwise specifically stated, the relative arrangement of the parts and steps, the numerical expressions and the numerical values ​​set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The techniques, methods and equipment known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods and equipment should be considered as part of the authorization specification. In all examples shown and discussed here, any specific values ​​should be interpreted as being merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that similar numbers and letters represent similar items in the following figures, and therefore, once an item is defined in one figure, it does not need to be further discussed in subsequent figures.

[0025] like Figure 1According to a specific embodiment of the present invention, an adaptive fire trace spectral image segmentation method under a complex lighting environment is provided, and the adaptive fire trace spectral image segmentation method under a complex lighting environment includes: step one, collecting a multispectral image of a fire trace sample; step two, performing dimension conversion on the collected multispectral image of the fire trace sample; step three, performing dimension decomposition on the multispectral image after dimension conversion to obtain multiple grayscale images, and selecting the grayscale image of the first dimension from the multiple grayscale images as the grayscale image to be segmented; step four, performing image enhancement on the grayscale image to be segmented; step five, filtering the grayscale image after image enhancement; step six, performing adaptive edge detection on the filtered grayscale image; step seven, performing corrosion and expansion on the grayscale image after edge detection to complete the basic segmentation of the grayscale image; step eight, performing contour search and position on the grayscale image after segmentation Positioning; Step nine, test the segmentation result of the grayscale image. If the segmentation test result of the grayscale image is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed; if the segmentation test result of the grayscale image is unqualified, return to Step three, select the grayscale image of the next dimension as the grayscale image to be segmented, repeat Step three to Step nine, and judge whether the grayscale image segmentation is successful; Step ten, when the grayscale image segmentation is successful, the adaptive fire trace spectral image segmentation under complex lighting environment is completed; when the segmentation cycle reaches the last dimension of the grayscale image and the segmentation is still not successful, return to Step three, adjust the adaptive edge detection value, and perform the next round of grayscale image segmentation of the first dimension, repeat Step three to Step nine, until the segmentation test result of the grayscale image of a certain dimension is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed.

[0026] By applying this configuration, in order to address the problem that the fine-grained fire trace image segmentation effect is poor under complex lighting conditions, an adaptive fire trace spectral image segmentation method is proposed, which uses multispectral images as test data and uses an adaptive image segmentation method to quickly and efficiently perform adaptive fire trace spectral image segmentation under complex lighting environments. Through cyclic detection and segmentation, this method can fully utilize the information of different dimensions of multispectral images and better perform target salient area segmentation in extremely dark or low-resolution scenes; by using adaptive edge detection thresholds det_th and thresh, it can be adaptively adjusted according to different images or dimensions; according to the characteristics of the adaptive threshold and high-dimensional images, it can complete the task of segmenting salient target regions of different specified numbers. Compared with the existing technology, the adaptive fire trace spectral image segmentation method provided by the present invention does not require the use of deep learning and other methods for large-scale data calibration and training. It can accurately and step-by-step segmentation and selection of significant targets, can avoid the influence of factors such as dark light noise on the segmentation effect, can adaptively adjust the segmentation threshold for precise segmentation, and can complete the segmentation of a specified number of significant target areas. Therefore, the adaptive fire trace spectral image segmentation method provided by the present invention can effectively solve the problem in the existing technology that fire trace data has little information and poor segmentation effect under RGB images, solve the problem of poor image segmentation effect under complex lighting conditions, and solve the problem that the segmentation parameters of traditional methods cannot be adaptively adjusted.

[0027] Specifically, in order to achieve adaptive fire scar spectral image segmentation in complex lighting environments, the present invention first requires the acquisition of multispectral images of fire scar samples. In this application, a Ximea multispectral image acquisition device is used to acquire multispectral images of fire scar samples. As a specific embodiment of the present invention, the Ximea multispectral image acquisition device is used to acquire data from a burned steel plate. This device can capture spectral information in 25 spectral bands, which are collected and stored in Bayer format.

[0028] Furthermore, after obtaining the multispectral image of the fire trace sample, the collected multispectral image of the fire trace sample can be dimensionalized. In the present invention, the multispectral image in Bayer format is converted into an image format of (h / 5)*(w / 5)*25 according to the spectral band, where h is the length of the multispectral image and w is the width of the multispectral image.

[0029] As a specific embodiment of the present invention, the multispectral image data collected in step 1 is preprocessed to split the spectral dimension of the planar multispectral image in Bayer format (e.g., splitting a 250*250 Byer spectral image into a 50*50*25 three-dimensional image, where 25 is the longitudinal spectral dimension).

[0030] Furthermore, after completing the dimensionality conversion of the multispectral image, the multispectral image after the dimensionality conversion can be dimensionally split to obtain multiple grayscale images, and the grayscale image of the first dimension is selected from the multiple grayscale images as the grayscale image to be segmented.

[0031] As a specific embodiment of the present invention, the spectral image obtained in step 2 is dimensionally split, and the grayscale image of the first dimension is extracted for segmentation. For example, the three-dimensional image of 50*50*25 is dimensionally split to obtain 25 grayscale images, and the grayscale image of the first dimension of 50*50*1 is selected from the 25 grayscale images as the grayscale image to be segmented.

[0032] Furthermore, after selecting the grayscale image to be segmented, the grayscale image to be segmented img_i can be enhanced. In the present invention, in order to improve the ease of subsequent segmentation, the sobel edge detection algorithm is used to perform edge detection enhancement on the grayscale image to be segmented img_i in step three.

[0033] After completing the image enhancement of the grayscale image, the enhanced grayscale image can be filtered. In the present invention, due to the influence of environmental factors, the noise in the image can affect the segmentation effect, so it is necessary to filter the image enhanced in step 4. The present invention uses a mean filtering method to filter the image after image enhancement to remove the noise caused by environmental factors such as low light.

[0034] Furthermore, after filtering the grayscale image, the filtered grayscale image can be adaptively edge detected. In step six of the present invention, the threshold edge detection module in OpenCV is called to perform adaptive edge detection on the filtered grayscale image. The threshold thresh can be calculated according to thresh = mean (img_i) / det_th, where mean (img_i) is the mean of the grayscale image and det_th is the adaptive edge detection value. The threshold thresh will be adaptively adjusted according to different images or dimensions. Det_th is a predefined value set according to different segmentation tasks and images. The initial definition of this experiment is 0.85.

[0035] After adaptive edge detection is performed on the filtered grayscale image, the grayscale image after edge detection can be eroded and expanded to complete the basic segmentation of the grayscale image. In the present invention, the erosion and expansion operations are used to remove and connect the detected small noisy edges and the segmented areas, thereby retaining the more accurate edges of the area to be segmented.

[0036] Furthermore, after the grayscale image after edge detection is corroded and expanded, the contour search and position positioning of the grayscale image after segmentation can be performed. In step eight of the present invention, the contour search and position positioning module findcontours in OpenCV is called to perform contour search and position positioning on the grayscale image after segmentation.

[0037] After completing the contour search and position positioning of the grayscale image, the segmentation result of the grayscale image can be tested. If the segmentation test result of the grayscale image is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed; if the segmentation test result of the grayscale image is unqualified, return to step three, select the grayscale image of the next dimension as the grayscale image to be segmented, repeat steps three to nine to determine whether the grayscale image is segmented successfully.

[0038] In step nine of the present invention, the segmentation result of the grayscale image is tested. If the number of segmented areas of the grayscale image to be segmented is greater than or equal to the preset segmentation number, the segmentation test result of the grayscale image is considered qualified; if the number of segmented areas of the grayscale image to be segmented is less than the preset segmentation number, the segmentation test result of the grayscale image is considered unqualified.

[0039] As a specific embodiment of the present invention, the segmentation result of the grayscale image is tested. Assuming that the preset segmentation number is n, the number of contours segmented in step eight is detected to determine whether the number of segmented areas of the grayscale image to be segmented is greater than or equal to the preset segmentation number n. In the case where the number of segmented areas does not reach the specified number n due to reasons such as dark light or low image resolution (such as requiring to find the three largest areas to be segmented), the area segmentation of the next dimension will be repeated starting from step three.

[0040] Furthermore, in the process of cyclic segmentation, when the grayscale image of a certain dimension is successfully segmented, the adaptive fire trace spectral image segmentation under complex lighting environment is completed; when the segmentation cycle reaches the last dimension grayscale image and the segmentation is still not successful, return to step three, adjust the adaptive edge detection value, and perform the next round of grayscale image segmentation of the first dimension, repeat steps three to ten until the segmentation test result of the grayscale image of a certain dimension is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed.

[0041] In step 10 of the present invention, when the segmentation cycle reaches the last dimension and there is still no successfully segmented grayscale image, return to step 3 and adjust the adaptive edge detection value according to det_th'=det_th*1.1, where det_th' is the adjusted adaptive edge detection value and det_th is the adaptive edge detection value in the previous round of image segmentation.

[0042] As a specific embodiment of the present invention, when the segmentation cycle reaches the last dimension and still cannot reach the predetermined number of segmentations n, step three is re-entered to perform the second round of segmentation of the first dimension. At the same time, det_th' in step six of the second round of segmentation is set to det_th*1.1, further reducing the difficulty of region detection until the image segmentation can be completed.

[0043] According to another aspect of the present invention, an adaptive fire trace spectral image segmentation system in a complex lighting environment is provided. The adaptive fire trace spectral image segmentation system in a complex lighting environment uses the adaptive fire trace spectral image segmentation method in a complex lighting environment as described above to perform adaptive fire trace spectral image segmentation.

[0044] By applying this configuration, in order to address the problem that the fine-grained fire trace image segmentation effect is poor under complex lighting conditions, an adaptive fire trace spectral image segmentation system is proposed, which uses multispectral images as test data and an adaptive image segmentation method to quickly and efficiently perform segmentation of target salient areas under complex lighting environments. Through cyclic detection and segmentation, the system can fully utilize the information of different dimensions of multispectral images and better segment target salient areas in extremely dark or low-resolution scenes; by using adaptive edge detection thresholds det_th and thresh, it can be adaptively adjusted according to different images or dimensions; according to the characteristics of the adaptive threshold and high-dimensional images, it can complete the segmentation task of salient target areas of different specified numbers. Compared with the existing technology, the adaptive fire trace spectral image segmentation system provided by the present invention does not require the use of deep learning and other methods for large-scale data calibration and training. It can accurately and step-by-step segmentation and selection of significant targets, can avoid the influence of factors such as dark light noise on the segmentation effect, can adaptively adjust the segmentation threshold for precise segmentation, and can complete the segmentation of a specified number of significant target areas. Therefore, the adaptive fire trace spectral image segmentation system provided by the present invention can effectively solve the problem in the existing technology that fire trace data has little information and poor segmentation effect under RGB images, solve the problem of poor image segmentation effect under complex lighting conditions, and solve the problem that the segmentation parameters of traditional methods cannot be adaptively adjusted.

[0045] In order to have a further understanding of the present invention, the following Figure 1 The adaptive fire trace spectral image segmentation method under complex lighting environment provided by the present invention is described in detail.

[0046] like Figure 1 As shown, according to a specific embodiment of the present invention, a method for adaptive fire trace spectral image segmentation in a complex lighting environment is provided, and the method specifically includes the following steps.

[0047] Step 1: Collect a multispectral image of the fire trace sample. In this example, a Ximea multispectral image acquisition device was used to collect data from the burned steel plate. This device can collect spectral information in 25 spectral bands and store it in Bayer format.

[0048] Step 2: Dimension conversion of the collected multispectral image of the fire trace sample. In this embodiment, data preprocessing is performed on the multispectral image data collected in step 1 to separate the spectral dimensions of the Bayer format planar multispectral image (e.g., splitting a 250*250 Byer spectral image into a 50*50*25 three-dimensional image, where 25 is the vertical spectral dimension).

[0049] Step 3: Decompose the converted multispectral image into multiple grayscale images. Select the grayscale image of the first dimension from the multiple grayscale images as the grayscale image to be segmented. In this embodiment, decompose the 50*50*25 three-dimensional image into 25 grayscale images. Select the grayscale image of the first dimension (50*50*1) from the 25 grayscale images as the grayscale image to be segmented.

[0050] Step 4: Perform image enhancement on the grayscale image to be segmented. In this embodiment, the sobel edge detection algorithm is used to perform edge detection enhancement on the grayscale image to be segmented img_i in step 3.

[0051] Step 5: Filter the grayscale image after image enhancement. In this embodiment, the image after image enhancement is filtered using a mean filtering method to remove noise caused by environmental factors such as dimming.

[0052] Step 6: Perform adaptive edge detection on the filtered grayscale image. In this embodiment, the threshold edge detection module in OpenCV is called to perform adaptive edge detection on the filtered grayscale image. The threshold thresh can be calculated according to thresh = mean(img_i) / det_th, where mean(img_i) is the mean value of the grayscale image and det_th is the adaptive edge detection value.

[0053] Step 7: Erosion and dilation are performed on the grayscale image after edge detection to complete the basic segmentation of the grayscale image. In this embodiment, erosion and dilation operations are used to remove and connect the detected small noisy edges and segmented areas, thereby retaining relatively accurate edges of the area to be segmented.

[0054] Step 8: Perform contour search and position location on the grayscale image after segmentation. In this embodiment, the contour search and position location module findcontours in OpenCV is called to perform contour search and position location on the grayscale image after segmentation.

[0055] In step nine, the segmentation result of the grayscale image is tested. If the segmentation test result of the grayscale image is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed; if the segmentation test result of the grayscale image is unqualified, return to step three, select the grayscale image of the next dimension as the grayscale image to be segmented, repeat steps three to nine, and determine whether the grayscale image is segmented successfully. In this embodiment, the segmentation result of the grayscale image is tested. Assuming that the preset segmentation number is n, the number of contours segmented in step eight is detected to determine whether the number of segmented areas of the grayscale image to be segmented is greater than or equal to the preset segmentation number n. In the case where the number of segmented areas does not reach the specified number n due to reasons such as too dark light or low image resolution (such as requiring to find the three largest areas to be segmented), the area segmentation of the next dimension will be repeated starting from step three.

[0056] Step 10: When the grayscale image of a certain dimension is successfully segmented, the adaptive fire trace spectral image segmentation in a complex lighting environment is completed. If the segmentation cycle reaches the last dimension grayscale image and still fails to segment, return to step 3, adjust the adaptive edge detection value, and perform the next round of grayscale image segmentation in the first dimension. Repeat steps 3 to 10 until the segmentation test result of the grayscale image of a certain dimension passes. The image segmentation is considered successful, and the adaptive fire trace spectral image segmentation in a complex lighting environment is completed. In this embodiment, if the segmentation cycle reaches the last dimension and still fails to reach the predetermined number of segmentations n, step 3 is re-entered to perform a second round of segmentation in the first dimension. At the same time, det_th' in step 6 of this second round of segmentation is set to det_th*1.1, further reducing the difficulty of region detection until image segmentation can be completed.

[0057] In summary, in view of the poor segmentation effect of fine-grained fire trace images under complex lighting conditions, the present invention proposes a method for quickly and efficiently performing adaptive fire trace spectral image segmentation under complex lighting environments using multispectral images as test data and an adaptive image segmentation method. This method can make full use of the information of different dimensions of multispectral images through cyclic detection and segmentation, and better perform target salient area segmentation in extremely dark or low-resolution scenes; by using adaptive edge detection thresholds det_th and thresh, it can be adaptively adjusted according to different images or dimensions; according to the characteristics of the adaptive thresholds and high-dimensional images, it can complete the segmentation tasks of salient target areas of different specified numbers. Compared with the existing technology, the adaptive fire trace spectral image segmentation method provided by the present invention does not require the use of deep learning and other methods for large-scale data calibration and training. It can accurately and step-by-step segmentation and selection of significant targets, can avoid the influence of factors such as dark light noise on the segmentation effect, can adaptively adjust the segmentation threshold for precise segmentation, and can complete the segmentation of a specified number of significant target areas. Therefore, the adaptive fire trace spectral image segmentation method provided by the present invention can effectively solve the problem in the existing technology that fire trace data has little information and poor segmentation effect under RGB images, solve the problem of poor image segmentation effect under complex lighting conditions, and solve the problem that the segmentation parameters of traditional methods cannot be adaptively adjusted.

[0058] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used herein to describe the spatial positional relationship of a device or feature to other devices or features as shown in the figures. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figures. For example, if the device in the drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used here are interpreted accordingly.

[0059] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of the present invention.

[0060] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An adaptive fire trace spectral image segmentation method under complex lighting environment, characterized by: The adaptive fire trace spectral image segmentation method under complex lighting environment includes: Step 1: collecting multispectral images of fire trace samples; Step 2: performing dimensionality conversion on the collected multispectral image of the fire trace sample; Step 3: Dimensionally split the multispectral image after dimension conversion to obtain multiple grayscale images, and select the grayscale image of the first dimension from the multiple grayscale images as the grayscale image to be segmented; Step 4: performing image enhancement on the grayscale image to be segmented; Step 5: Filter the grayscale image after image enhancement; Step 6: Perform adaptive edge detection on the filtered grayscale image; Step 7: perform corrosion and expansion on the grayscale image after edge detection to complete the basic segmentation of the grayscale image; Step 8: perform contour search and position positioning on the grayscale image after segmentation; Step nine, testing the segmentation result of the grayscale image. If the segmentation test result of the grayscale image is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed; if the segmentation test result of the grayscale image is unqualified, return to step three, select the grayscale image of the next dimension as the grayscale image to be segmented, repeat steps three to nine, and determine whether the grayscale image segmentation is successful; Step 10: When the grayscale image segmentation is successful, the adaptive fire trace spectral image segmentation under complex lighting environment is completed; when the segmentation cycle reaches the last dimension grayscale image and the segmentation is still not successful, return to step 3, adjust the adaptive edge detection value, and perform the next round of grayscale image segmentation of the first dimension, repeat steps 3 to 10 until the segmentation test result of the grayscale image of a certain dimension is qualified, the image segmentation is considered successful, and the adaptive fire trace spectral image segmentation under complex lighting environment is completed.

2. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 1 is characterized in that: In step six, the threshold edge detection module in OpenCV is called to perform adaptive edge detection on the filtered grayscale image. The threshold thresh can be calculated according to thresh=mean(img_i) / det_th, where mean(img_i) is the mean of the grayscale image and det_th is the adaptive edge detection value.

3. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 2 is characterized in that: In step nine, the segmentation result of the grayscale image is tested. If the number of segmented areas of the grayscale image to be segmented is greater than or equal to the preset segmentation number, the segmentation test result of the grayscale image is considered qualified; if the number of segmented areas of the grayscale image to be segmented is less than the preset segmentation number, the segmentation test result of the grayscale image is considered unqualified.

4. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 3 is characterized in that: In step 10, when the segmentation cycle reaches the last dimension and there is still no successfully segmented grayscale image, return to step 3 and adjust the adaptive edge detection value according to det_th'=det_th*1.1, where det_th' is the adjusted adaptive edge detection value and det_th is the adaptive edge detection value in the previous round of image segmentation.

5. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 4 is characterized in that: In the step 2, the multispectral image in the Bayer format is converted into an image format of (h / 5)*(w / 5)*25 according to the spectrum segment, where h is the length of the multispectral image and w is the width of the multispectral image.

6. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 5 is characterized in that: In the step 4, the Sobel edge detection algorithm is used to perform edge detection enhancement on the grayscale image after image segmentation.

7. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 6 is characterized in that: In the step five, the grayscale image after image enhancement is filtered using a mean filtering method.

8. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 7 is characterized in that: In the step eight, the contour search and position positioning module in OpenCV is called to perform contour search and position positioning on the grayscale image after segmentation.

9. The adaptive fire trace spectral image segmentation method under complex lighting environment according to claim 8 is characterized in that: In the step 1, a ximea multispectral image collector is used to collect multispectral images of fire trace samples.

Citation Information

Patent Citations

  • Multi-spectral remote sensing image-based ship detection method

    CN105551029A

  • Convolutional neural network multispectral image segmentation method based on spectral dimension conversion network

    CN110378344A