CN117173580A - Water quality parameter acquisition method and device, image processing method and medium - Google Patents

Water quality parameter acquisition method and device, image processing method and medium Download PDF

Info

Publication number
CN117173580A
CN117173580A CN202311451968.1A CN202311451968A CN117173580A CN 117173580 A CN117173580 A CN 117173580A CN 202311451968 A CN202311451968 A CN 202311451968A CN 117173580 A CN117173580 A CN 117173580A
Authority
CN
China
Prior art keywords
image
strip
quantum dot
processed
water quality
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311451968.1A
Other languages
Chinese (zh)
Other versions
CN117173580B (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Quantaeye Beijing Technology Co ltd
Original Assignee
Quantaeye Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Quantaeye Beijing Technology Co ltd filed Critical Quantaeye Beijing Technology Co ltd
Priority to CN202311451968.1A priority Critical patent/CN117173580B/en
Publication of CN117173580A publication Critical patent/CN117173580A/en
Application granted granted Critical
Publication of CN117173580B publication Critical patent/CN117173580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the technical field of water quality monitoring, in particular to a method and a device for acquiring water quality parameters, an image processing method and a medium, wherein the acquisition method comprises the steps of carrying out hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system to obtain a plurality of first images; determining a first spectrum image based on the plurality of first images and the actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water; and inputting the first spectral image and the first sampling time into an inversion model for calculation to obtain a first water quality parameter. According to the acquisition method and device, the image processing method and the medium, the water quality parameters of the target water area can be quickly and accurately inverted, and the water quality condition of the target water area can be comprehensively and accurately monitored.

Description

Water quality parameter acquisition method and device, image processing method and medium
Technical Field
The disclosure relates to the technical field of water quality monitoring, and in particular relates to a method and a device for acquiring water quality parameters, an image processing method and a medium.
Background
With the rapid development of social economy, some surface water bodies (lakes, reservoirs and rivers) are severely polluted, and comprehensive and accurate water quality monitoring is a precondition for water pollution control and water environment protection.
The traditional water quality monitoring method mainly collects water samples on site and then measures various water quality parameters in a laboratory, which is difficult to reflect the spatial distribution characteristics of pollutants and the dynamic change of the water quality parameter concentration in a large area. In recent years, more and more related technologies begin to utilize spectral imaging technologies to realize water quality monitoring, but the traditional spectral imaging technologies still cannot well meet the actual application requirements. For example, the conventional spectroscopic imaging technology mainly includes a prism, a grating, and an optical filter for spectroscopic, where the prism and the grating have complex spectroscopic elements, which is bulky and expensive. In addition, the spectral imaging device of the filter array type or the linear gradient filter type has limited spectral range and spectral resolution due to the characteristics of a film coating process or a filter, and cannot meet the application requirements of hyperspectral imaging.
Disclosure of Invention
In view of this, the disclosure provides a method for acquiring water quality parameters, an image processing method, an apparatus and a medium, which can quickly and accurately invert the water quality parameters of a target water area, and is helpful for comprehensively and accurately monitoring the water quality condition of the target water area.
According to an aspect of the present disclosure, there is provided a method for acquiring a water quality parameter, including:
performing hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system to obtain a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in the target water area;
determining a first spectrum image based on the plurality of first images and actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water, the actual position information of each quantum dot strip is determined by carrying out strip segmentation on an image to be processed, and the image to be processed and the first image are obtained based on the same remote sensing imaging system;
and inputting the first spectrum image and the first sampling time into an inversion model for calculation to obtain a first water quality parameter, wherein the first sampling time is the sampling time included in the first spectrum image, and the first water quality parameter characterizes the water quality condition of the target water area.
In this way, the hyperspectral remote sensing imaging can be carried out on different areas of the target water area based on the same remote sensing imaging system, a plurality of first images can be obtained, each first image can reflect spectrum information of different areas of the target water area, all first images can cover spectrum information of all areas of the target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectral imaging can be carried out by utilizing the quantum dots, the characteristics of high energy utilization rate, small size, easiness in modulation and low cost can be achieved while the spectral resolution is ensured, then the corresponding first spectrum images can be determined based on the first images and the actual position information of each quantum dot strip determined by carrying out strip division on the image to be processed based on the same remote sensing imaging system, the spectrum information of all areas of the target water area can be reflected, the first spectrum images and the corresponding sampling time are input into the inversion model, and corresponding parameters can be obtained, so that the water quality of the target can be quickly inverted, the water quality condition can be accurately monitored, and the water quality condition of the target water quality can be monitored comprehensively.
In one possible implementation manner, the determining the first spectral image based on the plurality of first images and the actual position information of each quantum dot strip includes: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip; extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images; taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
In this way, a plurality of first panoramic images are obtained by stitching the plurality of first images, and registration is carried out on the basis of the plurality of first panoramic images, so that the first spectral images with all required spectral information can be obtained, and the accurate inversion of water quality parameters based on the first spectral images can be facilitated.
In one possible implementation manner, the determining a first homography transformation set according to the first feature points of the first center panorama and the first feature points of the rest of the first panorama includes: determining a plurality of undetermined homography transformation sets by means of a direct method, an analog method combined with track tracking, a direct method combined with template matching, an analog method combined with track tracking and template matching and a direct method combined with interpolation; and determining the first homography transformation set from the plurality of homography transformation sets to be determined according to preset index evaluation.
In this way, homography transformation sets under different modes are determined through combinations among a direct method, an analog method, track tracking, template matching and an interpolation method, and evaluation is carried out according to various indexes, so that an optimal first homography transformation set is determined, the problem of matching errors caused by factors such as integral color difference, unobvious characteristics and the like among images of odd and even frames in the actual use process and other problems affecting the precision of the homography transformation set can be avoided, the optimal first homography transformation set is determined, and further, a corresponding first spectrum image is determined, and the accurate inversion of water quality parameters based on the first spectrum image is facilitated.
In one possible implementation, striping an image to be processed includes: performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip.
In this way, the actual position information of each quantum dot strip is obtained by carrying out cluster analysis, initial rough position determination and initial accurate position determination on the image to be processed, so that the subsequent accurate and rapid determination of the first spectrum image is facilitated.
In one possible implementation manner, the performing cluster analysis on the image to be processed, determining the first position of each quantum dot strip according to the result of the cluster analysis, includes: acquiring the image to be processed, and preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of image format conversion, image size adjustment and image pixel value adjustment; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range, wherein the first position indicates the initial rough position of the strip; and/or, determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, including: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal, wherein the second position indicates an initial accurate position of the strip; judging whether the strip width needs to be expanded according to the second position; adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
Therefore, the series of operations including preprocessing, cluster analysis, strip filling, straight line detection, boundary constraint, noise removal and strip distribution condition adjustment are performed on the image to be processed, strip segmentation can be accurately realized, and the actual position information of each quantum dot strip is determined, so that the follow-up accurate and rapid determination of the first spectrum image is facilitated.
In one possible implementation, the method further includes a training step of the inversion model, the training step including: constructing a sample set, wherein the sample set comprises a plurality of sample pairs, each sample pair comprises spectrum image data and corresponding water quality parameter data, and the spectrum image data has spectrum information of a plurality of wave bands; according to the correlation between each wave band and the water quality parameter data, screening out partial wave bands from all wave bands to form a characteristic wave band set, wherein the correlation between the characteristic wave band set and the water quality parameter data is in a preset threshold range; and training an initial inversion model based on the characteristic band set and the sample set to obtain a trained inversion model.
Therefore, by selecting a proper characteristic wave band set, namely screening sensitive wave bands from the whole wave bands, the method is beneficial to training and can obtain an inversion model capable of inverting water quality parameters with higher precision.
In one possible implementation manner, the filtering a part of the bands from all the bands to form a characteristic band set according to the correlation between each of the bands and the water quality parameter data includes: calculating the correlation between each wave band and the water quality parameter data, and sequencing from big to small according to the correlation to obtain a wave band sequence; and constructing a target wave band set with an initial state of an empty set, adding the wave bands to the target wave band set one by one according to the wave band sequence until the correlation between the target wave band set after adding the new wave band and the water quality parameter data is reduced or the adding amplitude is smaller than a preset threshold value, and taking the target wave band set before adding the new wave band as the characteristic wave band set.
Therefore, a proper characteristic band set is determined based on the correlation between each band and the water quality parameters, so that the sensitive bands can be screened out from the whole bands, and the water quality parameters with higher precision can be inverted by the inversion model obtained by training based on the sensitive bands.
In a possible implementation manner, the spectral image data includes a second sampling time and a second spectral image, the water quality parameter data includes a third sampling time and a second water quality parameter, wherein the second sampling time is the sampling time of the second spectral image, the third sampling time is the sampling time of the second water quality parameter, and the second sampling time and the third sampling time are the same sampling time or satisfy a preset interval time condition; the second spectral image comprises spectral information of all areas in the preset water area, and the second water quality parameter characterizes the water quality condition of the preset water area, wherein the preset water area is the target water area and/or the target water area.
Therefore, the inversion model obtained through training has strong generalization capability, and the water quality parameters of the target water area for reverse performance are more accurate.
According to another aspect of the present disclosure, there is provided an image processing method including:
carrying out hyperspectral remote sensing imaging based on the same remote sensing imaging system to obtain an image to be processed and a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in a target water area;
performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, thereby determining actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip;
and determining a first spectrum image based on the plurality of first images and the actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water area.
In this way, the hyperspectral remote sensing imaging is carried out based on the same remote sensing imaging system, the to-be-processed image and a plurality of first images can be obtained, all the first images can cover spectral information of all areas in a target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectral imaging is carried out by utilizing quantum dots, the characteristics of high spectral resolution and wide spectral range, high energy utilization rate, small size, easiness in modulation and low cost are realized, then the clustering analysis is carried out on the to-be-processed image, the first position and the second position of each quantum dot strip are determined according to the result of the clustering analysis, the actual position information of each quantum dot strip is determined according to the second position, and then the first spectral image can be rapidly and accurately determined based on the actual position information of all the areas in the target water area, and the first spectral image can reflect the spectral information of all the areas in the target water area, so that the water quality parameters of the target water area can be rapidly and accurately inverted based on the first spectral image, and the overall water quality monitoring condition is realized.
In one possible implementation manner, the performing cluster analysis on the image to be processed, determining the first position of each quantum dot strip according to the result of the cluster analysis, includes: preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of converting an image format, adjusting an image size and adjusting an image pixel value; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range; and/or, determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, including: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal; judging whether the strip width needs to be expanded according to the second position; adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
Therefore, the series of operations including preprocessing, cluster analysis, strip filling, straight line detection, boundary constraint, noise removal and strip distribution condition adjustment are performed on the image to be processed, strip segmentation can be accurately realized, and the actual position information of each quantum dot strip is determined, so that the follow-up accurate and rapid determination of the first spectrum image is facilitated.
In one possible implementation manner, the determining the first spectral image based on the plurality of first images and the actual position information of each quantum dot strip includes: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip; extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images; taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
In this way, a plurality of first panoramic images are obtained by stitching the plurality of first images, and registration is carried out on the basis of the plurality of first panoramic images, so that the first spectral images with all required spectral information can be obtained, and the accurate inversion of water quality parameters based on the first spectral images can be facilitated.
According to another aspect of the present disclosure, there is provided an acquisition apparatus for water quality parameters, including:
the hyperspectral remote sensing imaging module is used for carrying out hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system to obtain a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in the target water area;
the image processing module is used for determining a first spectrum image based on the plurality of first images and actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water, the actual position information of each quantum dot strip is determined by carrying out strip segmentation on an image to be processed, and the image to be processed and the first image are obtained based on the same remote sensing imaging system;
The parameter inversion module is used for inputting the first spectrum image and the first sampling time into an inversion model for calculation to obtain a first water quality parameter, wherein the first sampling time is the sampling time included in the first spectrum image, and the first water quality parameter characterizes the water quality condition of the target water area.
In this way, the hyperspectral remote sensing imaging module performs hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system, a plurality of first images can be obtained, each first image can reflect spectrum information of different areas of the target water area, all the first images can cover spectrum information of all areas in the target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectrum imaging by utilizing quantum dots can be performed while ensuring high spectrum resolution and wide spectrum range, and the hyperspectral remote sensing imaging system has the characteristics of high energy utilization rate, small volume, easy modulation and low cost, then the image processing module can determine corresponding first spectrum images based on the first images and the actual position information of each quantum dot strip determined by carrying out strip segmentation on the images to be processed acquired based on the same remote sensing imaging system, the first spectrum images can reflect spectrum information of all areas of the target water area, the first spectrum images and corresponding sampling time are input into an inversion model through the parameter inversion module, and accordingly, water quality parameters of the target water area can be monitored accurately and comprehensively.
In one possible implementation manner, the determining the first spectral image based on the plurality of first images and the actual position information of each quantum dot strip includes: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip; extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images; taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
In one possible implementation manner, the determining a first homography transformation set according to the first feature points of the first center panorama and the first feature points of the rest of the first panorama includes: determining a plurality of undetermined homography transformation sets by means of a direct method, an analog method combined with track tracking, a direct method combined with template matching, an analog method combined with track tracking and template matching and a direct method combined with interpolation; and determining the first homography transformation set from the plurality of homography transformation sets to be determined according to preset index evaluation.
In one possible implementation, striping an image to be processed includes: performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip.
In one possible implementation manner, the performing cluster analysis on the image to be processed, determining the first position of each quantum dot strip according to the result of the cluster analysis, includes: acquiring the image to be processed, and preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of image format conversion, image size adjustment and image pixel value adjustment; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range, wherein the first position indicates the initial rough position of the strip; and/or, determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, including: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal, wherein the second position indicates an initial accurate position of the strip; judging whether the strip width needs to be expanded according to the second position; adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
In one possible implementation, the apparatus further includes a training module for the inversion model, the training module to: constructing a sample set, wherein the sample set comprises a plurality of sample pairs, each sample pair comprises spectrum image data and corresponding water quality parameter data, and the spectrum image data has spectrum information of a plurality of wave bands; according to the correlation between each wave band and the water quality parameter data, screening out partial wave bands from all wave bands to form a characteristic wave band set, wherein the correlation between the characteristic wave band set and the water quality parameter data is in a preset threshold range; and training an initial inversion model based on the characteristic band set and the sample set to obtain a trained inversion model.
In one possible implementation manner, the filtering a part of the bands from all the bands to form a characteristic band set according to the correlation between each of the bands and the water quality parameter data includes: calculating the correlation between each wave band and the water quality parameter data, and sequencing from big to small according to the correlation to obtain a wave band sequence; and constructing a target wave band set with an initial state of an empty set, adding the wave bands to the target wave band set one by one according to the wave band sequence until the correlation between the target wave band set after adding the new wave band and the water quality parameter data is reduced or the adding amplitude is smaller than a preset threshold value, and taking the target wave band set before adding the new wave band as the characteristic wave band set.
In a possible implementation manner, the spectral image data includes a second sampling time and a second spectral image, the water quality parameter data includes a third sampling time and a second water quality parameter, wherein the second sampling time is the sampling time of the second spectral image, the third sampling time is the sampling time of the second water quality parameter, and the second sampling time and the third sampling time are the same sampling time or satisfy a preset interval time condition; the second spectral image comprises spectral information of all areas in the preset water area, and the second water quality parameter characterizes the water quality condition of the preset water area, wherein the preset water area is the target water area and/or the target water area.
According to another aspect of the present disclosure, there is provided an acquisition apparatus for water quality parameters, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing the instructions stored by the memory.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the above-described method.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features and aspects of the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of a method for acquiring a water quality parameter according to an embodiment of the present disclosure.
Fig. 2 shows a schematic diagram of a quantum dot array sheet provided according to an embodiment of the present disclosure.
FIG. 3 illustrates a schematic diagram of a target water area provided in accordance with an embodiment of the present disclosure
Fig. 4 shows a schematic view of a first image provided according to an embodiment of the present disclosure.
Fig. 5 shows a schematic diagram of a stripe segmentation result provided according to an embodiment of the present disclosure.
Fig. 6 shows a schematic diagram of the results of prediction using a single point linear model provided in accordance with an embodiment of the present disclosure.
Fig. 7 shows a schematic diagram of the results of predictions using a single point random forest model provided in accordance with an embodiment of the present disclosure.
Fig. 8 shows a schematic diagram of the results of predictions using a single point guided aggregation algorithm provided in accordance with an embodiment of the present disclosure.
Fig. 9 shows a schematic diagram of the results of predictions using K nearest neighbor classification algorithm provided in accordance with an embodiment of the present disclosure.
Fig. 10 shows a flowchart of an image processing method provided according to an embodiment of the present disclosure.
Fig. 11 shows a block diagram of an acquisition device of water quality parameters provided according to an embodiment of the present disclosure.
Fig. 12 shows a block diagram of an apparatus for performing an acquisition method of water quality parameters provided in accordance with an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present disclosure by those skilled in the art, a technical environment in which the technical solutions are implemented is described below.
With the rapid development of socioeconomic performance, some surface water bodies (lakes, reservoirs and rivers) are severely polluted, and in order to better carry out water pollution treatment and water environment protection, the water quality condition of the water bodies needs to be comprehensively and accurately monitored. Specifically, the water quality condition can be reflected by water quality parameters such as chemical oxygen demand (Chemical Oxygen Demand, COD), pH value (Pondus Hydrogenii, pH), conductivity, dissolved oxygen, turbidity and the like. Taking COD as an example, COD refers to the amount of oxidant consumed when a water sample is treated by adopting a certain strong oxidant under a certain condition, and the COD is an important index for evaluating the pollution degree of the water body by organic matters, and the higher the COD value is, the more serious the organic pollution of the water body is, so that the concentration distribution of the water quality parameters of the water body can be accurately evaluated and mastered, and the important effect on pollution control and environmental protection is realized.
The traditional water quality monitoring method mainly comprises the steps of collecting water samples on site, and then measuring various water quality parameters of the water samples in a laboratory, wherein the water quantity of the collected water samples is small, so that the space distribution characteristics of pollutants and the dynamic change condition of the water quality parameters under a large area range are difficult to reflect.
Along with the continuous development of the remote sensing technology, the remote sensing technology is increasingly widely applied in the aspect of water quality monitoring by virtue of the advantages of real time, large area, low cost and repeatability. In particular, the hyperspectral remote sensing technology can reflect the biophysical attribute of the wading ground object on the spectrum dimension with high resolution by means of the narrow-band imaging technology, has the advantages of high spectrum resolution, strong ground object information detection capability, abundant obtained spectrum information and the like, can capture the spectrum change caused by water quality parameters with different concentrations in inland water bodies, and shows great potential in the field of water quality monitoring. The minimum wavelength interval that hyperspectral remote sensing imaging can distinguish is less than 10nm (spectral resolution is higher than 10 nm), and the number of spectral bands is up to tens or even hundreds. The multi-dimensional information acquisition technology combining imaging and spectrum is capable of acquiring two-dimensional space information and ground feature spectrum information of a detected target to form a three-dimensional data cube so as to realize comprehensive detection sensing and recognition of target characteristics. In recent years, both on-board and on-board remote sensing platforms have been required to reduce the payload as much as possible. Therefore, developing a compact light-weight spectrum imaging instrument has become an important point for the development of spectrum remote sensing technology. However, the conventional spectral imaging technology still cannot well meet the practical application requirements. For example, the traditional spectral imaging technology mainly comprises a prism, a grating, an optical filter and the like, but the prism and the grating are provided with complex light-splitting elements, and meanwhile, the prism and the grating have huge volume and high cost, so that the prism and the grating cannot be widely applied; for another example, the spectral range and the spectral resolution of the optical filter array type or the linear gradient filter type spectral imager are limited due to the characteristics of a film coating process or an optical filter, and the application requirements of hyperspectral imaging cannot be met.
In addition, the water quality parameters inverted by remote sensing data are currently concentrated on chlorophyll a, suspended substances, colored soluble organic substances (Colored Dissolved Organic Matter, CDOM) and the like. With the deep research of the spectral characteristics of water quality, the introduction of machine learning algorithms and the continuous innovation of remote sensing technology, the variety of water quality parameters inverted by using remote sensing means is continuously increased. The most widely used method for inverting the water quality parameters is an empirical analysis method, namely, a functional relation is established between a remote sensing image 'face' value and an actual water sample acquisition 'point position' value, but the empirical analysis method has some defects, for example, because the empirical method selects modeling wave bands by taking the size of a pearson correlation coefficient as a measurement index, for multispectral remote sensing data, the spectral wave band range is wider, the combination quantity of the wave bands is limited, and the variable with high correlation coefficient is difficult to find as an independent variable; for another example, because of the difference in spatial scale between the "face" of the remote sensing image and the "point" of the measured data and the influence of factors such as geometric correction and atmospheric correction in the remote sensing image processing, the establishment of the inversion model and the migration application of the model are greatly influenced.
According to the method for acquiring the water quality parameters, high-spectrum remote sensing imaging can be performed on different areas of a target water area based on the same remote sensing imaging system, a plurality of first images can be obtained, each first image can reflect spectrum information of different areas of the target water area, all the first images can cover spectrum information of all areas of the target water area, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that spectrum imaging can be performed by utilizing quantum dots, the characteristics of high spectrum resolution and wide spectrum range can be ensured, the method is high in energy utilization rate, small in volume and easy to modulate and low in cost can be achieved, then the corresponding first spectrum images can be determined based on the first images and actual position information of each quantum dot strip determined by carrying out strip segmentation on the images to be processed based on the same remote sensing imaging system, the first spectrum images can reflect spectrum information of all the areas of the target water area, the corresponding water quality parameters can be obtained by inputting the first spectrum images and corresponding sampling time into an inversion model, and accordingly the water quality parameters of the target water area can be rapidly and accurately monitored.
The embodiment of the disclosure provides a method for acquiring water quality parameters. Fig. 1 shows a flowchart of a method for acquiring a water quality parameter according to an embodiment of the present disclosure. As shown in fig. 1, the acquisition method may include:
s101, performing hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system to obtain a plurality of first images.
S102, determining a first spectrum image based on a plurality of first images and actual position information of each quantum dot strip.
S103, inputting the first spectrum image and the first sampling time into an inversion model for calculation to obtain a first water quality parameter.
In one possible implementation, the spectral imaging in step S101 may be implemented by means of a cone-pendulum push broom. Therefore, the spectrum data of hundreds of wave bands can be obtained through the cone pendulum type push broom mode, the imaging result is rich, and the water quality condition of the target water area can be monitored comprehensively and accurately.
In step S101, hyperspectral imaging may be performed based on the same remote sensing imaging system, where the remote sensing imaging system may include a plurality of remote sensing channels, each remote sensing channel may be correspondingly provided with a different quantum dot strip, and each quantum dot strip may have different optical characteristics. Quantum Dots (QDs) are a nano-scale semiconductor crystalline material with a radius close to or less than Yu Jizi bohr radius. Quantum dots can be used as light absorbing materials in image sensors, and depending on the quantum dot material, the quantum dot strips can have different spectral response characteristics. The quantum dot array sheet which is in a strip shape and provided with a plurality of quantum dot strips is placed in front of the focal plane of the front mirror, and the absorption characteristic of the spectrum of the quantum dot material is utilized to modulate the incident spectrum of the detection target, so that the corresponding spectrum information and the space information can be obtained. Therefore, the quantum dot strip is utilized to perform hyperspectral imaging, so that the method has the advantages of high spectral resolution, high energy utilization rate, small volume, wide spectral range and low cost, and reduces the research and development cost of the water quality monitoring system, and the method is easy to integrate and realize intellectualization on application platforms such as satellite-borne platforms and airborne platforms which particularly require load miniaturization, so that the method has wider application prospect.
In step S101, hyperspectral imaging is performed based on the remote sensing imaging system (or a plurality of quantum dot strips), so as to obtain a plurality of first images. Each first image may include spectral information of different regions in the target water area, that is, the spectral information included in each first image is determined by hyperspectral imaging of each quantum dot strip on a certain region in the target water area, and the sum of the regions corresponding to all the first images may cover all the regions of the target water area, that is, the water area to be monitored, that is, all the first images cover the spectral information of all the regions in the target water area.
Fig. 2 shows a schematic diagram of a quantum dot array sheet provided according to an embodiment of the present disclosure. The number of the quantum dot strips in the quantum dot array sheet can be set according to the need, as shown in fig. 2, taking an example that the quantum dot array sheet comprises five quantum dot strips (i.e. a first strip, a second strip, a third strip, a fourth strip and a fifth strip in fig. 2), the five quantum dot strips respectively have different optical characteristics, and adjacent quantum dot strips are contacted with each other and are sequentially arranged, so that the spectrum information of a certain area can be obtained by utilizing the quantum dot array sheet to perform hyperspectral imaging on the certain area.
Fig. 3 shows a schematic diagram of a target water area provided in accordance with an embodiment of the present disclosure. In one example, a desired spectral image is acquired using a remote sensing monitoring terminal that includes at least an image sensor integrated with a quantum dot array chip. The image sensor can be used to perform hyperspectral imaging on the target water area shown in fig. 3 (i.e. step S101), so as to obtain N first images P 1 、P 2 ……P N Wherein N is a positive integer; the target water area may be a partial water area in the water area to be monitored, and generally may be a fixed area that is close to water quality monitoring equipment for monitoring water quality parameters and is less affected by reflection and stray light. N first images P 1 、P 2 ……P N Respectively corresponding to N areas one by one, namely 1 st first image P 1 Can include the spectral information of the first region in the target water area shown in FIG. 3, the 2 nd first image P 2 Can include the spectral information of region two in the target water domain shown in FIG. 3, and so on, NThe first image P N Spectral information of the region N in the target water domain shown in fig. 3 may be included. Since the first spectral image including spectral information of all regions in the target water area determined by all the quantum dot strips is determined from the N first images later (see later in detail), hyperspectral imaging based on each quantum dot strip is required for each region of the target water area, which is also the reason why the region one and the region two shown in fig. 3 have overlapping regions. In fact, the first region overlaps with the second region, the first region overlaps with the third region, the fourth region, and the like, and the size of the overlapping region may be set according to practical situations, so long as N first images can be ensured to cover all spectrum information determined by hyperspectral imaging of all regions of the target water area by each quantum dot strip, which is not limited by the embodiment of the present disclosure. Therefore, the hyperspectral imaging of the same region based on each quantum dot strip can be guaranteed, richer spectral information can be obtained, and more accurate inversion results can be obtained.
Fig. 4 shows a schematic view of a first image provided according to an embodiment of the present disclosure. With the 1 st first image P 1 The following description is given for the sake of example: as shown in FIG. 4, the 1 st first image P 1 Is the imaging result corresponding to the first region in the target water area, the first image P 1 Five portions of spectral information may be included. The five parts of spectral information are spectral information of a region one neutron region 1 corresponding to a first strip, spectral information of a region one neutron region 2 corresponding to a second strip, spectral information of a region one neutron region 3 corresponding to a third strip, spectral information of a region one neutron region 4 corresponding to a fourth strip, and spectral information of a region one neutron region 5 corresponding to a fifth strip, respectively. The rest of the first images are identical to the 1 st first image P 1 . In the case of capturing the 1 st first image P 1 The image sensor is oriented in one direction, and the 2 nd first image P is shot 2 When the image sensor needs to rotate a preset angle and then shoot, and so on, the image sensor acquires a plurality of first images through multiple times of rotation shooting, so that all areas of the target water area are highAnd (5) spectral imaging. In this way, the obtained N first images each include spectral information covering all spectral information determined by the remote sensing imaging system (or called each quantum dot strip) for hyperspectral imaging of all regions of the target water area, so that one first spectral image can be determined based on these first images in the subsequent step S102.
N first images at a plurality of sampling times can be acquired through step S101. Since an abnormal situation such as occlusion of the target water area, a change in the position of the image sensor, etc. may occur during the acquisition of the image, this may affect the quality of the acquired first image. Thus in one possible implementation, before performing step S102, the obtaining method may further include: the acquired plurality of first images are preprocessed. The preprocessing mode may be to determine, for a first image acquired at each sampling time, whether there is a deletion of a spectral band in the first image or whether there is a deletion of a spectral image. When the first images are abnormal, the first images with problems can be filtered, so that the subsequent use of the abnormal images is avoided, and the accurate inversion of the water quality parameters is not facilitated.
Since one of the possible implementations of hyperspectral imaging based on the quantum dot strips is to place the quantum dot array sheet in strip shape in front of the front mirror focal plane, each first image acquired by the image sensor may be composed of a plurality of rectangular strips connected in the horizontal direction. However, due to the difference of the manufacturing process and the uncertainty factors existing in the imaging process, the positions of the quantum dot strips cannot be accurately known in the acquired first images, so that strip segmentation can be performed to obtain strip segmentation results before splicing (details are described later) based on a plurality of first images, namely, the actual position information of each quantum dot strip is determined, so that the position information of each quantum dot strip in the first image is obtained, and therefore, the positions of each quantum dot strip in the first image can be determined by performing strip segmentation before splicing based on a plurality of first images, a basis is provided for effectively utilizing quantum dot hyperspectral imaging data (namely, the first images), and the accurate and rapid execution of subsequent image splicing work is facilitated. Thus, in step S102, a first spectral image may be further determined based on the plurality of first images and the actual position information of each quantum dot strip determined in step S101. The number of the first spectral images is one, and the first spectral images can comprise spectral information of all areas in the target water area, that is, the first spectral images cover all spectral information determined by hyperspectral imaging of all areas of the target water area by each quantum dot strip.
The actual position information of each quantum dot strip can be determined by strip segmentation of the image to be processed. The image to be processed is also determined by hyperspectral imaging based on the remote sensing imaging system (or a plurality of quantum dot strips), and the image to be processed and the first image are obtained based on the same remote sensing imaging system, namely, the quantum dot strips used in the imaging process of the image to be processed are consistent with the quantum dot strips used in the imaging process of the first image. The stripe division may be performed only once, that is, the positions of the respective quantum dot stripes in the other images acquired by the image sensor may be determined only by determining the positions of the respective quantum dot stripes in any one image (the image may be a certain first image or any other image acquired by the image sensor, that is, an image to be processed) acquired by the image sensor integrated with the plurality of quantum dot stripes.
In one possible implementation, the determining of the banding for the image to be processed may include: performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to a result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip. In this way, the actual position information of each quantum dot strip is obtained by carrying out cluster analysis, initial rough position determination and initial accurate position determination on the image to be processed, so that the subsequent accurate and rapid determination of the first spectrum image is facilitated.
In one possible implementation manner, performing cluster analysis on the image to be processed, and determining the first position of each quantum dot strip according to the result of the cluster analysis may include: acquiring an image to be processed, and preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of converting an image format, adjusting an image size and adjusting an image pixel value; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image to be processed according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range, wherein the first position indicates the initial rough position of the strip; and/or determining a second location of each quantum dot strip from the first location, thereby determining actual location information for each quantum dot strip from the second location may include: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information and a first position of each quantum dot strip, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the linear detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal, wherein the second position indicates the initial accurate position of the strip; judging whether the strip width needs to be expanded according to the second position; according to the distribution condition of the second position adjusting strips, the adjusting mode comprises adding strips and/or deleting strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip. Therefore, the series of operations including preprocessing, cluster analysis, strip filling, straight line detection, boundary constraint, noise removal and strip distribution condition adjustment are performed on the image to be processed, strip segmentation can be accurately realized, and the actual position information of each quantum dot strip is determined, so that the follow-up accurate and rapid determination of the first spectrum image is facilitated.
In one example, a whiteboard may be photographed with an image sensor integrated with a plurality of quantum dot stripes, resulting in one image Pic (i.e. the image to be processed), and the stripe segmentation may be achieved by performing the following steps on the image Pic:
in the first step, the image Pic is read and preprocessed, that is, the format of the image Pic is converted into a picture format suitable for the OpenCV vision processing library, the length and width dimensions of the image Pic are adjusted, and the pixel maximum value of the image Pic is set to 251.
And secondly, carrying out cluster analysis on the preprocessed image Pic to obtain a segmentation result. The clustering analysis may be performed by using a greedy algorithm, or may be performed by using other algorithms, which is not limited in the embodiments of the present disclosure.
And thirdly, counting the maximum interval range of black pixels continuously appearing in the image Pic according to the segmentation result, and finding the initial rough position of the strip according to the maximum interval range, namely the first position of each quantum dot strip.
Fourth, post-processing, wherein the post-processing can determine whether the image Pic has a missing strip according to the first position, and if the image Pic has a missing strip, the missing strip can be filled with the distribution information of the strip, wherein the distribution information of the strip can include, but is not limited to, the number of strips, the width of the strip and the interval between adjacent strips. In this example, the banding may be padded by calculating a pixel average value of the banding in the image Pic, and using the pixel average value in combination with the distribution information of the banding.
Fifth, according to the prior information (such as the width of the strip) and the first position of the strip, an image Img (i.e. the sub-image to be processed) is cut out from the image Pic, the width of the image Img may be preset to a certain fixed value, the image Img is located in the central area of the image Pic and the contained strip is located in the central area of the image Img.
And sixthly, performing cluster analysis on the image Img, and performing linear detection on the image Img subjected to cluster analysis to obtain a linear detection result. The k-means clustering algorithm may be used for cluster analysis, or other algorithms may be used for cluster analysis, which is not limited in the embodiments of the present disclosure.
And seventh, constraining the left and right boundaries of the strip in the image Pic by using the straight line detection result to avoid the strip from crossing the boundary, and removing irrelevant pixels above the upper edge of the image Pic to remove noise. The noise can be removed by removing pixels between the upper edge of the stripe and the image edge with pixel values greater than a preset threshold.
And eighth step, finding the initial accurate position of the strip, namely the second position of each quantum dot strip according to the image Pic processed in the seventh step.
And ninth, judging whether the width of the strip needs to be expanded according to the second position, wherein the width of the strip can be expanded in a relatively large range, so that the position of the strip tends to be ideal.
And tenth, post-processing, wherein the distribution condition of the strips can be adjusted according to the second position, or the distribution condition of the strips can be further adjusted by further combining the distribution information of the strips. The adjustment may be to add a strip at one position and delete a strip at another position to adjust the distribution of the strips, which is not limited by the embodiments of the present disclosure.
And eleventh, saving the modified stripe segmentation result graph, and taking stripe positions after the distribution condition of stripes is adjusted as actual position information of each quantum dot stripe. Fig. 5 shows a schematic diagram of a stripe segmentation result provided according to an embodiment of the present disclosure. The image Pic is subjected to the banding, and the banding result shown in fig. 5 can be obtained.
In step S102, in the case of determining the actual position information of each quantum dot stripe (i.e., after stripe division is achieved), the first spectral image may be determined by performing stitching and registration processing on the plurality of first images determined in step S101.
After the stripe segmentation, i.e. after determining the position information of each quantum dot stripe in the first image, the image stitching and image registration steps in step S102 may be continued: determining a plurality of first panoramic images according to the plurality of first images, wherein each first panoramic image comprises spectrum information (namely image stitching) of all areas in a target water area corresponding to the same quantum dot strip, namely stitching the areas shot by the same quantum dot strip to obtain a first panoramic image; and performing image registration according to the multi Zhang Quanjing map to obtain a first spectrum image.
In one possible implementation, step S102 (i.e., the image stitching step it includes) may include: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; and splicing the plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain first panoramic pictures corresponding to each quantum dot strip, wherein each first panoramic picture comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip.
In one example, a cone pendulum type push broom method can be used to obtain multiple first images through an image sensor integrated with the quantum dot array sheet shown in fig. 2, i.e. the push broom platform can rotate at a uniform speed for multiple times to expose and store N first images P with the same size 1 、P 2 ……P N . Based on the stripe division result, the left and right boundaries of each quantum dot stripe can be read, that is, each quantum dot stripe can be determined in the first images P 1 、P 2 ……P N The positions of the same quantum dot stripe in different first images are the same. After determining the position of each quantum dot stripe in the first image, the image portion (i.e., spectral information) of each first image corresponding to the same quantum dot stripe may be extracted for stitching.
The purpose of the stitching is to fuse the image parts corresponding to the same quantum dot strips in each first image into a single first panoramic image, each first panoramic image reflects spectrum information of all areas of a target water area after being modulated by the same quantum dot strips, and the quantity of the first panoramic images obtained by stitching is determined by the quantity of the quantum dot strips. In addition, the spectrum information of the same region may exist in the image portions cut from different first images for the same quantum dot strip, limited by factors such as the rotation speed set by the push-broom platform, the size of the region that can be covered by a single hyperspectral imaging, and the like.
In this example, as shown in FIG. 2, the number of the quantum dot stripes is 5 (i.e., stripe one, stripe two, stripe three, stripe four, stripe five), and accordingly, according to N first images P 1 、P 2 ……P N Can determine 5 first panoramic pictures Q 1 、Q 2 ……Q 5 Wherein the first panorama Q 1 May include spectral information corresponding to all regions in the target water area of strip one, a first panorama Q 2 Spectral information corresponding to all regions in the target water domain for band two may be included, and so on.
To a first panorama Q corresponding to the second strip 2 The splicing process of (2) is illustrated by way of example: position information of the second stripe in the first image is acquired, which may include, but is not limited to, one or more of stripe width, stripe left boundary, stripe right boundary, stripe upper boundary, stripe lower boundary. Based on the location information of the second stripe, the image range corresponding to the second stripe can be cut out from all the first images to obtain a screenshot 1 corresponding to the first image acquisition (i.e. shooting) sequence (i.e. in the first image P) 1 Image portion corresponding to stripe two taken in), screenshot 2 (i.e., in the first image P 2 Image portion corresponding to stripe two taken in) … … screenshot N (i.e., in the first image P N The image portion corresponding to the second strip) and calculates the size of the spliced image according to the width of the strip, the rotation (also called push-broom) speed of the push-broom platform and the number of the first images, and then creates a blank image with the size. Because adjacent screenshot in the intercepted screenshot 1 and screenshot 2 … … screenshot N has a certain overlapping degree (namely has an overlapping part), the screenshot 1 and screenshot 2 … … screenshot N can be sequentially embedded into the blank image according to the acquisition sequence and the overlapping part is subjected to image fusion, and finally the screenshot 1 and the screenshot 2 … … screenshot N are splicedReceiving a first panoramic view Q corresponding to the second strip 2
In this example, 30% of the overlapping portion in the shots 1 and … … N may be selected for image fusion, and it should be noted that 30% is only illustrative, and a suitable percentage may be selected according to the actual situation, which is not limited in the embodiments of the present disclosure.
Same as the first panorama Q 2 And (3) splicing to obtain first panoramas corresponding to other quantum dot strips, wherein each first panoramas can comprise spectrum information of all areas in a target water area corresponding to the same quantum dot strip. Image registration may then be performed based on these first panoramic images to obtain first spectral images covering spectral information for all regions in the target water area determined via all quantum dot strips.
A first panorama corresponding to the same quantum dot stripe at a plurality of sampling times may be determined through step S102. Due to the abnormal conditions such as incorrect stitching, incorrect screenshot interception or lack of corresponding screenshot and the like which can occur in the stitching process of the panoramic image, the quality of the subsequently synthesized first spectrum image can be affected. Thus in one possible implementation, before image registration based on the plurality of first panoramic views, the acquisition method may further comprise: and preprocessing the spliced first panoramic pictures. The preprocessing method may be to determine, for the first panorama acquired at each sampling time, whether the positional relationship of all the areas of the target water area in the first panorama is accurate, for example, whether there is a defect or whether there is left-right inversion. In the event of the above or other anomalies in the first panorama, the problematic first panorama can be selectively filtered to avoid subsequent use of the anomalies and adverse effects on the accurate inversion of the water quality parameters. The judging step included in the preprocessing can be judged by combining the sizes of the panoramic images, the similarity of the panoramic images after registration, precision indexes such as mutual information, the number of single-frame images, the template matching similarity and the like through some checking algorithms.
In one possible implementation, after performing the image stitching step, step S102 (i.e. the image registration step it includes) may further include: extracting features of each first panoramic image to obtain a plurality of first feature points of each first panoramic image; one of the first panoramas is taken as a first center panoramas, a first homography transformation set is determined according to first characteristic points of the first center panoramas and first characteristic points of other first panoramas, and the first homography transformation set comprises a first homography transformation matrix between the first center panoramas and other first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain a first spectrum image. In this way, a plurality of first panoramic images are obtained by stitching the plurality of first images, and registration is carried out on the basis of the plurality of first panoramic images, so that the first spectral images with all required spectral information can be obtained, and the accurate inversion of water quality parameters based on the first spectral images can be facilitated.
In one possible implementation manner, determining the first homography transformation set according to the first feature points of the first center panorama and the first feature points of the rest of the first panorama in the image registration step may further include: determining a plurality of undetermined homography transformation sets by means of a direct method, an analog method combined with track tracking, a direct method combined with template matching, an analog method combined with track tracking and template matching and a direct method combined with interpolation; and determining the first homography transformation set from the plurality of homography transformation sets to be determined according to preset index evaluation. In this way, homography transformation sets under different modes are determined through combinations among a direct method, an analog method, track tracking, template matching and an interpolation method, and evaluation is carried out according to various indexes, so that an optimal first homography transformation set is determined, the problem of matching errors caused by factors such as integral color difference, unobvious characteristics and the like among images of odd and even frames in the actual use process and other problems affecting the precision of the homography transformation set can be avoided, the optimal first homography transformation set is determined, and further, a corresponding first spectrum image is determined, and the accurate inversion of water quality parameters based on the first spectrum image is facilitated.
In one example, the above-described representation under the concatenation results in a multiframeFirst panorama Q in the example 1 、Q 2 ……Q 5 Thereafter, image registration may be achieved by performing the following steps:
first step, the first panoramic view Q can be obtained for each sheet 1 、Q 2 ……Q 5 The feature extraction is performed to obtain 2000 Scale-invariant feature transform (SIFT) feature points, i.e., first feature points, of each first panorama, where the number of the first feature points is not limited to 2000, but may be less than 2000 or greater than 2000.
Second, the first panorama Q 3 As a first center panorama, and the first center panorama Q 3 With the rest of the first panoramic view Q 1 、Q 2 、Q 4 、Q 5 And (3) performing characteristic point matching, estimating homography transformation, and storing the homography transformation in a predefined file by only keeping the inner points and outputting the point numbers and coordinates. In the matching process, more characteristic points can be selected as much as possible, and the reprojection error can be set to be slightly larger when the function findHomoprography is executed so as to ensure more matching point pairs.
Third, a corresponding first homography transformation set including the first center panorama Q can be determined according to five ways 3 With the rest of the first panoramic view Q 1 、Q 2 、Q 4 、Q 5 A first homography transformation matrix between:
First, the corresponding first homography transformation set can be solved by a direct method. Reading matching point pairs stored in a predefined file, and respectively solving and calculating the rest first panoramic images Q by using a direct method 1 、Q 2 、Q 4 、Q 5 With the first central panorama Q 3 Homography matrix between, i.e. H 13 、H 23 、H 43 、H 53 Thereby obtaining a first homography transformation set H 1 {H 13 、H 23 、H 43 、H 53 And H is formed by 1 Output to a yaml file. Wherein at least 4 pairs of matching points may be used in calculating the homography matrix.
Second, by combining trajectory tracking into simulationA corresponding first homographic transformation set is solved. And reading the first characteristic points stored in the predefined file, calculating the larger common frame difference s and the s power of a homography matrix H' in the multi-frame first panoramic image corresponding to the same quantum dot strip, and further solving H, wherein H can represent average homography transformation between adjacent image frames. Then, the size of each first panorama can be calculated according to the width of the strip, the rotation speed of the push-broom platform and the number of the first images, and the first central panorama Q 3 Generating 50 points randomly, and calculating the rest first panoramic image Q based on the solved H 1 、Q 2 、Q 4 、Q 5 Corresponding points are added, and according to the calculated rest of the first panorama Q 1 、Q 2 、Q 4 、Q 5 Corresponding point and first center panorama Q 3 The homography is estimated by 50 points which are randomly generated, thereby obtaining a first homography transformation set H 2
Third, the corresponding first homography transformation set can be solved by combining template matching to a direct method. The OpenCV template matching algorithm can be used for correcting the preliminarily determined matching point pairs obtained in the second step, the corrected more accurate matching points are restored to the predefined file, and then the corresponding first homography transformation set H is solved in a direct method based on the corrected matching point pairs in the newly-stored predefined file 3 The direct method can be referred to the first mode, and will not be described herein.
Fourth, the corresponding first homography transformation set can be solved by combining template matching and trajectory tracking into an analog method. The preliminarily determined matching point pairs obtained in the second step can be corrected by using an OpenCV template matching algorithm, the corrected more accurate matching points are restored to the predefined file, and then the corresponding first homography transformation set H is solved by combining trace tracking to a simulation method based on the corrected matching point pairs in the newly-stored predefined file 4 The way of combining the trace tracking to the simulation method can be referred to the second way, and will not be described here.
Fifth, the corresponding first homography can be solved by combining the direct method with the interpolation methodA set of transforms. For the odd frame first panorama, a direct method may be used to solve for the odd frame first panorama Q 1 、Q 2 、Q 4 、Q 5 First center panorama Q with odd frame 3 The first homography transformation set h1 is referred to in the first manner, and will not be described herein. For the even frame first panorama, interpolation may be performed based on the odd frame first panorama adjacent to the even frame first panorama and solving for the even frame first panorama Q 1 、Q 2 、Q 4 、Q 5 First center panorama Q with even frame 3 A first homography transform set h2 in between. Taking the average value of H1 and H2 as a first homography transformation set H 5 . Therefore, the problem of matching errors caused by factors such as integral color difference, unobvious characteristics and the like existing between the odd-even frame images in the actual use process can be avoided.
Fourth, a first homography transformation set H which can be solved from the five modes 1 、H 2 、H 3 、H 4 、H 5 The optimal first homography transform set H is selected. The registration effect of the five modes can be evaluated by selecting proper index evaluation from one or more of evaluation indexes such as mean square error, mutual information, peak signal-to-noise ratio, cross correlation coefficient and the like, and the optimal first homography transformation set H can be stored.
Fifth, the first panorama Q under one frame can be transformed by the determined optimal first homography transformation set H 1 、Q 2 ……Q 5 And carrying out image registration to obtain a first spectrum image, wherein the first spectrum image covers all spectrum information determined by hyperspectral imaging of all areas of the target water area by each quantum dot strip.
After the first spectral image is determined in step S102, the inversion model may be used to invert the water quality parameter, that is, in step S103, the first spectral image and the first sampling time determined in step S102 may be input into the inversion model for calculation, so as to obtain the corresponding first water quality parameter. The first sampling time is the sampling time included in the first spectrum image, and the first water quality parameter characterizes the water quality condition of the target water area.
In this way, the hyperspectral remote sensing imaging can be carried out on different areas of the target water area based on the same remote sensing imaging system, a plurality of first images can be obtained, each first image can reflect spectrum information of different areas of the target water area, all first images can cover spectrum information of all areas of the target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectral imaging can be carried out by utilizing the quantum dots, the characteristics of high energy utilization rate, small size, easiness in modulation and low cost can be achieved while the spectral resolution is ensured, then the corresponding first spectrum images can be determined based on the first images and the actual position information of each quantum dot strip determined by carrying out strip division on the image to be processed based on the same remote sensing imaging system, the spectrum information of all areas of the target water area can be reflected, the first spectrum images and the corresponding sampling time are input into the inversion model, and corresponding parameters can be obtained, so that the water quality of the target can be quickly inverted, the water quality condition can be accurately monitored, and the water quality condition of the target water quality can be monitored comprehensively.
It should be noted that, since the first spectral image needs to be determined through the above processing procedures of acquiring the first image, stitching and registering the first image, and since the push-broom imaging needs a certain time (for example, 3 minutes), the sampling time of the first spectral image should be a time period in practice, but in order to better calculate the first water quality parameter by using the inversion model, the time point when the push-broom is completed is taken as the first sampling time. In fact, the sampling time of the first spectral image may be set by the user according to the actual scene, for example, the time when the last first image is acquired may be taken as the sampling time of the first spectral image, the time when the image registration step is performed may be taken as the sampling time of the first spectral image, or the time when the first image is acquired may be taken as the sampling time of the first spectral image, which is not limited in the embodiments of the present disclosure.
The method for acquiring the water quality parameters further comprises a training step of inverting the model. Thus in one possible implementation, the training step may comprise: constructing a sample set, wherein the sample set comprises a plurality of sample pairs, each sample pair comprises spectrum image data and corresponding water quality parameter data, and the spectrum image data has spectrum information of a plurality of wave bands; according to the correlation between each wave band and the water quality parameter data, screening out partial wave bands from all wave bands to form a characteristic wave band set, wherein the correlation between the characteristic wave band set and the water quality parameter data is in a preset threshold range; and training an initial inversion model based on the characteristic band set and the sample set to obtain a trained inversion model. Therefore, by selecting a proper characteristic wave band set, namely screening sensitive wave bands from the whole wave bands, the method is beneficial to training and can obtain an inversion model capable of inverting water quality parameters with higher precision.
In one possible implementation manner, the step of filtering out the partial wave bands from all the wave bands to form the characteristic wave band set according to the correlation between each wave band and the water quality parameter data in the training step may include: calculating the correlation between each wave band and the water quality parameter data, and sequencing the wave bands according to the correlation from big to small to obtain the sequence of the wave bands; and constructing a target wave band set with an initial state of an empty set, adding wave bands one by one into the target wave band set according to the wave band sequence until the correlation between the target wave band set after adding the new wave band and the water quality parameter data is reduced or the adding amplitude is smaller than a preset threshold value, and taking the target wave band set before adding the new wave band as a characteristic wave band set. Therefore, a proper characteristic band set is determined based on the correlation between each band and the water quality parameters, so that the sensitive bands can be screened out from the whole bands, and the water quality parameters with higher precision can be inverted by the inversion model obtained by training based on the sensitive bands.
In one possible implementation, the sample set used to train the inversion model may include at least one set of spectral image data and corresponding water quality parameter data. The spectral image data may include a second sampling time and a second spectral image, where the second sampling time is a sampling time of the second spectral image; the water quality parameter data may include a third sampling time and a second water quality parameter, where the third sampling time is the sampling time of the second water quality parameter, and may be generally directly read by the water quality parameter monitoring device.
In one possible implementation, the second sampling time and the third sampling time may be the same sampling time.
In one possible implementation, the second sampling time and the third sampling time may satisfy a preset interval time condition. For example, a second sampling time and a third sampling time may be selected that are very close together, separated by no more than 2 minutes.
The second spectral image comprises spectral information of all areas in the preset water area. The second water quality parameter characterizes the water quality condition of the preset water area. The preset water area is a target water area and/or a non-target water area.
In one possible implementation, the predetermined body of water is the target body of water. In this case, the sample set used for training the inversion model includes the relevant data of the target water area, so that the water quality parameters of the target water area on which the inversion model is inverted by training will be more accurate.
In one possible implementation, the predetermined body of water is a non-target body of water. In this case, although the sample set used for training the inversion model does not include the relevant data of the target water area, the inversion model obtained by training through the training method provided by the embodiment of the disclosure has a stronger generalization capability, and the water quality parameters of the target water area can still be inverted.
In one possible implementation, the pre-set body of water includes a target body of water and a non-target body of water. Under the condition, the sample set used for training the inversion model comprises the related data of the target water area and the non-target water area, so that the inversion model obtained through training can invert the water quality parameters of the accurate target water area and can invert the water quality parameters of the accurate non-target water area.
The acquiring method provided by the embodiment of the present disclosure not only includes an acquiring process of the first spectrum image in the inversion model prediction process, but also includes an acquiring process of the second spectrum image in the sample set, that is, in a possible implementation manner, the acquiring method may further include: carrying out hyperspectral remote sensing imaging on different areas of a preset water area based on the same remote sensing imaging system (namely a plurality of quantum dot strips) to obtain a plurality of second images, wherein the remote sensing imaging system for acquiring the second images can be consistent with the remote sensing imaging system for acquiring the first images, the remote sensing imaging system can comprise a plurality of remote sensing channels, each remote sensing channel can be correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and each second image comprises spectral information of different areas in the preset water area; and determining a second spectrum image based on the plurality of second images, wherein the second spectrum image comprises spectrum information of all areas in the preset water area. In this way, hyperspectral remote sensing imaging aiming at a preset water area is carried out based on the same remote sensing imaging system (namely a plurality of quantum dot strips), a plurality of second images can be obtained, each second image can reflect spectrum information of different areas of the preset water area, and the quantum dots are utilized for carrying out spectrum imaging, so that the characteristics of high spectrum resolution, wide spectrum range, high energy utilization rate, small volume, easiness in modulation and low cost are ensured, then corresponding second spectrum images can be determined based on the second images and actual position information (the determination mode is detailed in the strip segmentation) of each quantum dot strip, the second spectrum images can reflect spectrum information of all areas of the preset water area, and the second spectrum images are added in a sample set used for training an inversion model, so that an inversion model capable of rapidly and accurately inverting water quality parameters of a target water area can be trained.
In one possible implementation manner, the determining the second spectral image based on the plurality of second images may further include: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each second image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the preset water area to obtain second panoramic views corresponding to each quantum dot strip, wherein each second panoramic view comprises spectrum information of all areas in the preset water area corresponding to the same quantum dot strip; extracting features of each second panoramic image to obtain a plurality of second feature points of each second panoramic image; determining a second homography transformation set by taking one of the second panoramas as a second center panoramas according to second characteristic points of the second center panoramas and second characteristic points of other second panoramas, wherein the second homography transformation set comprises a second homography transformation matrix between the second center panoramas and other second panoramas; and processing the plurality of second panoramic images by using the second homography transformation set to obtain second spectrum images. In this way, a plurality of second panoramic images are obtained by splicing the plurality of second images, and registration is carried out on the basis of the plurality of second panoramic images, so that the second spectral images with all required spectral information can be obtained, and the inversion model capable of quickly and accurately inverting the water quality parameters of the target water area can be trained by adding the second spectral images in the sample set used for training the inversion model.
In a possible implementation manner, before obtaining the plurality of second panoramic images, the position information of each quantum dot strip in the second image may be further determined, where the determination manner may be referred to the above strip segmentation, and details are not repeated herein. Therefore, the positions of the quantum dot strips in the second images can be determined by carrying out strip segmentation before stitching based on the plurality of second images, a basis is provided for effectively utilizing quantum dot hyperspectral imaging data (namely the second images), and the follow-up image stitching work can be accurately and rapidly carried out.
The second spectral image acquisition process is similar to the first spectral image acquisition process (see above for details), and for brevity, the description thereof will not be repeated here. It should be noted that, in the step S103, the inversion model may be trained based on the sample set in advance, in this case, the second spectrum image needs to be acquired when the sample set is constructed, which is similar to the acquisition process of the first spectrum image, the acquisition process of the second spectrum image also needs to be subjected to the strip segmentation and the image registration, accordingly, in the training process of the inversion model, the strip segmentation result is already determined, and the second homography transformation sets between the remaining second panoramic image and the second central panoramic image are already determined, so in the application process of the inversion model, the positions of the quantum dot strips in each first image may be determined directly using the strip segmentation result determined in the training process, and the second homography transformation set determined in the training process may be directly used as the first homography transformation set to perform the image registration. But the band segmentation result and the first homography transformation set may be determined again in the application process of the inversion model, and the specific manner may be selected according to the actual situation, which is not limited in the embodiment of the present disclosure.
In one example, training of the inversion model may be performed by performing the following steps:
first, a sample set is constructed. The sample set may include a plurality of sample pairs, each sample pair including a second spectral image and a second sampling time, a second water quality parameter, and a third sampling time, wherein the second spectral image has spectral information of a plurality of bands.
For the acquisition of the second spectrum image, a plurality of remote sensing monitoring terminals with image sensors integrated with quantum dot array sheets can be used for carrying out hyperspectral imaging on a spectrum feature extraction candidate region (namely a fixed region which is close to water quality monitoring equipment in the water to be monitored and is less influenced by reflection and stray light), so as to obtain a plurality of second images. These second images are then data cleaned, for each sampling time, it is determined whether there is a spectral band deficiency or a spectral image insufficiency, and such images are automatically identified and filtered. And then extracting spectral features, carrying out image registration of each wave band in a selected target water area for reserved sampling time to obtain a corresponding second spectral image so as to ensure that spectral information of the same spatial position corresponds to data of each wave band, then solving a reflection spectrum mean value filtered according to 1.5 times of standard deviation from wave band to wave band, and storing a calculation result. The 1.5 times of the super parameter is selected according to experience in actual treatment, and generally, the spectral values of each wave band in the selected target water area are assumed to obey standard Gaussian distribution, certain noise points exist in the spectral values, noise data are removed when the mean value is calculated, standard deviation can be used for filtering at the moment, a proper standard deviation multiple can be selected according to the estimated noise level (size), for example, 2 times of standard deviation can be selected when the data exist about 5% of noise, and 1.5 times of standard deviation can be selected when the data exist about 15% of noise.
For the acquisition of the second water quality parameter, according to the sampling time of the second spectrum image and the selected target water area, measurement data under the same sampling time or similar sampling time can be acquired from the water quality monitoring equipment to serve as the second water quality parameter.
After the data of the second spectral image and the second water quality parameter are acquired, outlier cleaning and time window smoothing processing are carried out on the data. And in the processed data, selecting the second spectral image and the second water quality parameter with the same or similar sampling time, and combining the sampling time to construct a sample pair, so that a plurality of sample pairs, namely a sample set, can be obtained.
And secondly, determining a characteristic wave band set. The correlation of each band with the sample, especially the water quality parameter data (i.e. the second water quality parameter and the third sampling time), can be calculated, and the band sequence, such as lambda, can be obtained by sorting the correlations from large to small 1 、λ 2 ……λ n . And then, constructing a target wave band set A with an initial state of empty set, adding wave bands to the target wave band set one by one according to the wave band sequence until the correlation between the target wave band set after adding the new wave band and the water quality parameter data is reduced or the adding amplitude is smaller than a preset threshold value, and taking the target wave band set before adding the new wave band as a characteristic wave band set. In this example, when λ is 6 Added to the target band set A { lambda ] 1 、λ 2 、λ 3 、λ 4 、λ 5 After in the new target band set A { lambda } 1 、λ 2 、λ 3 、λ 4 、λ 5 、λ 6 Correlation of the water quality parameter data is R6 when lambda is calculated 7 Added to the target band set A { lambda ] 1 、λ 2 、λ 3 、λ 4 、λ 5 、λ 6 After in the new target band set A { lambda } 1 、λ 2 、λ 3 、λ 4 、λ 5 、λ 6 、λ 7 The correlation of the water quality parameter data is R7,and R7 is smaller than R6, then the target band set A { lambda }, can be set 1 、λ 2 、λ 3 、λ 4 、λ 5 、λ 6 As a feature band set for training the inversion model.
And thirdly, training and testing an inversion model. The sample set constructed in the first step can be randomly divided into a training set and a test set according to the proportion of 70% and 30%. Then, modeling is performed by at least one statistical learning method based on the training set, and an inversion model is trained according to the characteristic wave band set determined in the second step, wherein more prior information such as physical characteristic information and parameter characteristics can be added during modeling. After the inversion model finishes the preset training times or the loss function meets the threshold value condition, spectral image data (a second spectral image and a second sampling time) in the test set is input into the trained inversion model for prediction, a predicted water quality parameter result is output, the predicted water quality parameter result is compared with corresponding water quality parameter data (namely, a second water quality parameter and a third sampling time corresponding to the second spectral image and corresponding to a water quality parameter true value corresponding to the second spectral image) in the test set, and whether the parameter adjustment is needed to be continued to train the inversion model is judged based on the comparison result until the difference value between the predicted water quality parameter result and the water quality parameter true value is smaller than the preset threshold value or the difference value tends to be stable.
Statistical learning methods may include, but are not limited to, one or more of linear models, support vector machines, random forests, guided-aggregation algorithms, K-nearest neighbor classification algorithms. Fig. 6 shows a schematic diagram of the results of prediction using a single point linear model provided in accordance with an embodiment of the present disclosure. Fig. 7 shows a schematic diagram of the results of predictions using a single point random forest model provided in accordance with an embodiment of the present disclosure. Fig. 8 shows a schematic diagram of the results of predictions using a single point guided aggregation algorithm provided in accordance with an embodiment of the present disclosure. Fig. 9 shows a schematic diagram of the results of predictions using K nearest neighbor classification algorithm provided in accordance with an embodiment of the present disclosure. Modeling training may be performed using different statistical learning methods, and according to the prediction results shown in fig. 6 to 9, an appropriate statistical learning method is selected in combination with actual requirements, and the above-mentioned guided aggregation algorithm, K nearest neighbor classification algorithm, and the like are merely examples, which are not limited by the embodiments of the present disclosure.
The method for acquiring the water quality parameters, provided by the embodiment of the disclosure, applies the quantum dot hyperspectral imaging system to the field of water quality pollution monitoring. According to the embodiment of the disclosure, quantum dots are used as light absorbing materials in an image sensor, the absorption characteristics of the light spectrum are utilized to modulate the incident light spectrum of a detection target, namely a target water area, so that the spectrum information and the space information of the target water area are obtained, then panorama stitching is carried out on the spectrum information of the same quantum dot strip, the spectrum information of all quantum dot strips are registered, further, the three-dimensional data cube, namely hyperspectral remote sensing information (a first spectrum image or a second spectrum image) of the target water area is recovered, the recovered three-dimensional data cube is combined with the water quality parameter true value of an actual water sample collecting point to carry out data preprocessing and matching, then the established sample data set, namely (spectrum data and water quality parameter) is obtained, an inversion model is constructed by using a statistical learning method, and after the inversion model is subjected to parameter adjustment and test, the finally determined inversion model is used for large-range fast dynamic monitoring of the water quality parameter, so that the cost reduction and efficiency of water pollution treatment are realized.
The embodiment of the disclosure also provides an image processing method, and fig. 10 shows a flowchart of the image processing method according to the embodiment of the disclosure. As shown in fig. 10, the image processing method may include:
step S1001, performing hyperspectral remote sensing imaging based on the same remote sensing imaging system, to obtain an image to be processed and a plurality of first images.
Step S1002, performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to a result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, thereby determining actual position information of each quantum dot strip according to the second position.
Step S1003, determining a first spectrum image based on the plurality of first images and the actual position information of each quantum dot strip, where the first spectrum image includes spectrum information of all regions in the target water.
The remote sensing imaging system comprises a plurality of remote sensing channels, different quantum dot strips are correspondingly arranged on each remote sensing channel, each quantum dot strip has different optical characteristics, and all first images cover spectral information of all areas in the target water area. The first position indicates an initial coarse position of the strip and the second position indicates an initial precise position of the strip.
In this way, the hyperspectral remote sensing imaging is performed based on the same remote sensing imaging system through step S1001, the to-be-processed image and a plurality of first images can be obtained, all the first images can cover the spectrum information of all the areas in the target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectral imaging by utilizing the quantum dots can ensure that the spectral resolution is high and the spectral range is wide, the device has the characteristics of high energy utilization rate, small volume, easy modulation and low cost, then the clustering analysis is performed on the to-be-processed image through step S1002, the first position and the second position of each quantum dot strip are determined according to the result of the clustering analysis, the actual position information of each quantum dot strip is determined according to the second position, then the first spectral image can be determined quickly and accurately based on the actual position information of the plurality of first images and each quantum dot strip in the target water area through step S1003, the first spectral image can reflect the spectrum information of all the areas in the target water area, and thus the water area can be accurately inverted based on the first image, the water quality parameters can be monitored comprehensively and accurately.
In a possible implementation manner, performing cluster analysis on the image to be processed in step S1002, determining, according to a result of the cluster analysis, a first position of each quantum dot strip may include: preprocessing an image to be processed, wherein the preprocessing mode comprises at least one of converting an image format, adjusting an image size and adjusting an image pixel value; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image to be processed according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range; and/or determining the second position of each quantum dot strip according to the first position in step S1002, so as to determine the actual position information of each quantum dot strip according to the second position, may include: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information and a first position of each quantum dot strip, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the linear detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal; judging whether the strip width needs to be expanded according to the second position; according to the distribution condition of the second position adjusting strips, the adjusting mode comprises adding strips and/or deleting strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
Therefore, the series of operations including preprocessing, cluster analysis, strip filling, straight line detection, boundary constraint, noise removal and strip distribution condition adjustment are performed on the image to be processed, strip segmentation can be accurately realized, and the actual position information of each quantum dot strip is determined, so that the follow-up accurate and rapid determination of the first spectrum image is facilitated.
In a possible implementation manner, the determining the first spectral image in step S1003 based on the plurality of first images and the actual position information of each quantum dot strip may include: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip; extracting features of each first panoramic image to obtain a plurality of first feature points of each first panoramic image; one of the first panoramas is taken as a first center panoramas, a first homography transformation set is determined according to first characteristic points of the first center panoramas and first characteristic points of other first panoramas, and the first homography transformation set comprises a first homography transformation matrix between the first center panoramas and other first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain a first spectrum image.
In this way, a plurality of first panoramic images are obtained by stitching the plurality of first images, and registration is carried out on the basis of the plurality of first panoramic images, so that the first spectral images with all required spectral information can be obtained, and the accurate inversion of water quality parameters based on the first spectral images can be facilitated.
The above image processing method has the same concept as the strip segmentation, the image stitching step and the image registration step in the above water quality parameter obtaining method, and for the specific implementation of the image processing method, reference may be made to the description of the above embodiment of the water quality parameter obtaining method, which is not repeated herein for brevity.
The embodiment of the disclosure also provides a device for acquiring the water quality parameters. Fig. 11 shows a block diagram of an acquisition device of water quality parameters provided according to an embodiment of the present disclosure. As shown in fig. 11, the acquisition device 110 may include:
the hyperspectral remote sensing imaging module 111 is used for performing spectral imaging on a target water area based on a plurality of quantum dot strips to obtain a plurality of first images, wherein each quantum dot strip has different optical characteristics, and each first image comprises spectral information of different areas in the target water area;
The image processing module 112 is configured to determine a first spectral image based on the plurality of first images, where the first spectral image includes spectral information of all regions in the target water area;
the parameter inversion module 113 is configured to input the first spectral image and a first sampling time into an inversion model for calculation, so as to obtain a first water quality parameter, where the first sampling time is the sampling time of the first spectral image, and the first water quality parameter characterizes the water quality condition of the target water area.
In this way, the hyperspectral remote sensing imaging module performs hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system, a plurality of first images can be obtained, each first image can reflect spectrum information of different areas of the target water area, all the first images can cover spectrum information of all areas in the target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectrum imaging by utilizing quantum dots can be performed while ensuring high spectrum resolution and wide spectrum range, and the hyperspectral remote sensing imaging system has the characteristics of high energy utilization rate, small volume, easy modulation and low cost, then the image processing module can determine corresponding first spectrum images based on the first images and the actual position information of each quantum dot strip determined by carrying out strip segmentation on the images to be processed acquired based on the same remote sensing imaging system, the first spectrum images can reflect spectrum information of all areas of the target water area, the first spectrum images and corresponding sampling time are input into an inversion model through the parameter inversion module, and accordingly, water quality parameters of the target water area can be monitored accurately and comprehensively.
In one possible implementation manner, the determining the first spectral image based on the plurality of first images and the actual position information of each quantum dot strip includes: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip; extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images; taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
In one possible implementation manner, the determining a first homography transformation set according to the first feature points of the first center panorama and the first feature points of the rest of the first panorama includes: determining a plurality of undetermined homography transformation sets by means of a direct method, an analog method combined with track tracking, a direct method combined with template matching, an analog method combined with track tracking and template matching and a direct method combined with interpolation; and determining the first homography transformation set from the plurality of homography transformation sets to be determined according to preset index evaluation.
In one possible implementation, striping an image to be processed includes: performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip.
In one possible implementation manner, the performing cluster analysis on the image to be processed, determining the first position of each quantum dot strip according to the result of the cluster analysis, includes: acquiring the image to be processed, and preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of image format conversion, image size adjustment and image pixel value adjustment; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range, wherein the first position indicates the initial rough position of the strip; and/or, determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, including: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal, wherein the second position indicates an initial accurate position of the strip; judging whether the strip width needs to be expanded according to the second position; adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
In one possible implementation, the apparatus further includes a training module for the inversion model, the training module to: constructing a sample set, wherein the sample set comprises a plurality of sample pairs, each sample pair comprises spectrum image data and corresponding water quality parameter data, and the spectrum image data has spectrum information of a plurality of wave bands; according to the correlation between each wave band and the water quality parameter data, screening out partial wave bands from all wave bands to form a characteristic wave band set, wherein the correlation between the characteristic wave band set and the water quality parameter data is in a preset threshold range; and training an initial inversion model based on the characteristic band set and the sample set to obtain a trained inversion model.
In one possible implementation manner, the filtering a part of the bands from all the bands to form a characteristic band set according to the correlation between each of the bands and the water quality parameter data includes: calculating the correlation between each wave band and the water quality parameter data, and sequencing from big to small according to the correlation to obtain a wave band sequence; and constructing a target wave band set with an initial state of an empty set, adding the wave bands to the target wave band set one by one according to the wave band sequence until the correlation between the target wave band set after adding the new wave band and the water quality parameter data is reduced or the adding amplitude is smaller than a preset threshold value, and taking the target wave band set before adding the new wave band as the characteristic wave band set.
In a possible implementation manner, the spectral image data includes a second sampling time and a second spectral image, the water quality parameter data includes a third sampling time and a second water quality parameter, wherein the second sampling time is the sampling time of the second spectral image, the third sampling time is the sampling time of the second water quality parameter, and the second sampling time and the third sampling time are the same sampling time or satisfy a preset interval time condition; the second spectral image comprises spectral information of all areas in the preset water area, and the second water quality parameter characterizes the water quality condition of the preset water area, wherein the preset water area is the target water area and/or the target water area.
In some embodiments, functions or modules included in the device for acquiring water quality parameters provided in the embodiments of the present disclosure may be used to perform the method described in the method embodiments, and specific implementation of the method may refer to the description of the method embodiments for acquiring water quality parameters, which is not repeated herein for brevity.
The embodiment of the disclosure also provides an image processing apparatus, which may include: the imaging module is used for carrying out hyperspectral remote sensing imaging based on the same remote sensing imaging system to obtain an image to be processed and a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in a target water area; the strip segmentation module is used for carrying out cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip; the determining module is used for determining a first spectrum image based on the plurality of first images and the actual position information of each quantum dot strip, and the first spectrum image comprises spectrum information of all areas in the target water area.
In this way, the imaging module is used for carrying out hyperspectral remote sensing imaging based on the same remote sensing imaging system, the image to be processed and a plurality of first images can be obtained, all the first images can cover spectral information of all areas in a target water area, the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, so that the spectral imaging by utilizing quantum dots can ensure that the spectral resolution is high and the spectral range is wide, the device has the characteristics of high energy utilization rate, small volume, easy modulation and low cost, then the cluster analysis is carried out on the image to be processed by the strip segmentation module, the first position and the second position of each quantum dot strip are determined according to the result of the cluster analysis, the actual position information of each quantum dot strip is determined according to the second position, and then the determination module can quickly and accurately determine the first spectral image based on the actual position information of the plurality of first images and each quantum dot strip, the first spectral image can reflect the spectral information of all areas in the target water area, so that the water quality parameter of a target water area can be quickly and reversely obtained, and the water quality condition of a target can be accurately monitored comprehensively.
In one possible implementation manner, the performing cluster analysis on the image to be processed, determining the first position of each quantum dot strip according to the result of the cluster analysis, includes: preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of converting an image format, adjusting an image size and adjusting an image pixel value; performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result; counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range; and/or, determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, including: judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips; extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed; performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result; performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value; determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal; judging whether the strip width needs to be expanded according to the second position; adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips; and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
Therefore, the series of operations including preprocessing, cluster analysis, strip filling, straight line detection, boundary constraint, noise removal and strip distribution condition adjustment are performed on the image to be processed, strip segmentation can be accurately realized, and the actual position information of each quantum dot strip is determined, so that the follow-up accurate and rapid determination of the first spectrum image is facilitated.
In one possible implementation manner, the determining the first spectral image based on the plurality of first images and the actual position information of each quantum dot strip includes: according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image; splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip; extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images; taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas; and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
In this way, a plurality of first panoramic images are obtained by stitching the plurality of first images, and registration is carried out on the basis of the plurality of first panoramic images, so that the first spectral images with all required spectral information can be obtained, and the accurate inversion of water quality parameters based on the first spectral images can be facilitated.
The embodiment of the disclosure also provides a device for acquiring the water quality parameter, which comprises: a processor; a memory for storing processor-executable instructions; the processor is configured to implement the water quality parameter acquiring method when executing the instructions stored in the memory.
In some embodiments, functions or modules included in the device for acquiring water quality parameters provided in the embodiments of the present disclosure may be used to perform the method described in the method embodiments, and specific implementation of the method may refer to the description of the method embodiments for acquiring water quality parameters, which is not repeated herein for brevity.
The embodiment of the disclosure also provides a computer readable storage medium, on which computer program instructions are stored, which when executed by a processor, implement the method for acquiring water quality parameters. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium.
In some embodiments, functions or modules included in the computer readable storage medium provided by the embodiments of the present disclosure may be used to perform the method described in the method embodiments, and specific implementation of the method may refer to the description of the method embodiments for obtaining the water quality parameter, which is not repeated herein for brevity.
Embodiments of the present disclosure also provide a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when executed in a processor of an electronic device, performs the above-described method of obtaining a water quality parameter.
In some embodiments, a function or a module included in a computer program product provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and a specific implementation of the method may refer to the description of the foregoing method embodiment for obtaining a water quality parameter, which is not repeated herein for brevity.
Fig. 12 shows a block diagram of an apparatus for performing an acquisition method of water quality parameters provided in accordance with an embodiment of the present disclosure. For example, the apparatus 1900 may be provided as a server or terminal device. Referring to fig. 12, the apparatus 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that are executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, processing component 1922 is configured to execute instructions to perform the methods described above.
The apparatus 1900 may further comprise a power component 1926 configured to perform power management of the apparatus 1900, a wired or wireless network interface 1950 configured to connect the apparatus 1900 to a network, and an input/output interface 1958 (I/O interface). The apparatus 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server TM ,Mac OS X TM ,Unix TM , Linux TM ,FreeBSD TM Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 1932, including computer program instructions executable by processing component 1922 of apparatus 1900 to perform the above-described methods.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for performing the operations of the present disclosure can be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvements in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (14)

1. The method for acquiring the water quality parameters is characterized by comprising the following steps:
performing hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system to obtain a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in the target water area;
determining a first spectrum image based on the plurality of first images and actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water, the actual position information of each quantum dot strip is determined by carrying out strip segmentation on an image to be processed, and the image to be processed and the first image are obtained based on the same remote sensing imaging system;
And inputting the first spectral image and the first sampling time into an inversion model for calculation to obtain a first water quality parameter, wherein the first sampling time is the sampling time included in the first spectral image, and the first water quality parameter characterizes the water quality condition of the target water area in the sampling time.
2. The method of claim 1, wherein the determining a first spectral image based on the plurality of first images and actual position information for each of the quantum dot strips comprises:
according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image;
splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip;
extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images;
Taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas;
and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
3. The method of claim 2, wherein the determining a first homography transformation set from the first feature points of the first center panorama and the first feature points of the remaining first panoramas comprises:
determining a plurality of undetermined homography transformation sets by means of a direct method, an analog method combined with track tracking, a direct method combined with template matching, an analog method combined with track tracking and template matching and a direct method combined with interpolation;
and determining the first homography transformation set from the plurality of homography transformation sets to be determined according to preset index evaluation.
4. The method of claim 1, wherein striping the image to be processed comprises:
Performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, so as to determine actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip.
5. The method of claim 4, wherein performing cluster analysis on the image to be processed, and determining the first position of each quantum dot strip according to the result of the cluster analysis comprises:
acquiring the image to be processed, and preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of image format conversion, image size adjustment and image pixel value adjustment;
performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result;
counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range, wherein the first position indicates the initial rough position of the strip;
And/or the number of the groups of groups,
determining a second position of each quantum dot strip according to the first position, thereby determining actual position information of each quantum dot strip according to the second position, including:
judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips;
extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed;
performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result;
performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value;
determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal, wherein the second position indicates an initial accurate position of the strip;
Judging whether the strip width needs to be expanded according to the second position;
adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips;
and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
6. The method of claim 1, further comprising a training step of the inversion model, the training step comprising:
constructing a sample set, wherein the sample set comprises a plurality of sample pairs, each sample pair comprises spectrum image data and corresponding water quality parameter data, and the spectrum image data has spectrum information of a plurality of wave bands;
according to the correlation between each wave band and the water quality parameter data, screening out partial wave bands from all wave bands to form a characteristic wave band set, wherein the correlation between the characteristic wave band set and the water quality parameter data is in a preset threshold range;
and training an initial inversion model based on the characteristic band set and the sample set to obtain a trained inversion model.
7. The method of claim 6, wherein the step of screening out partial bands from all bands to form a characteristic band set based on correlation between each of the bands and the water quality parameter data comprises:
Calculating the correlation between each wave band and the water quality parameter data, and sequencing from big to small according to the correlation to obtain a wave band sequence;
and constructing a target wave band set with an initial state of an empty set, adding the wave bands to the target wave band set one by one according to the wave band sequence until the correlation between the target wave band set after adding the new wave band and the water quality parameter data is reduced or the adding amplitude is smaller than a preset threshold value, and taking the target wave band set before adding the new wave band as the characteristic wave band set.
8. The method of claim 6 or 7, wherein the spectral image data comprises a second sample time and a second spectral image, the water quality parameter data comprises a third sample time and a second water quality parameter, wherein,
the second sampling time is the sampling time of the second spectrum image, the third sampling time is the sampling time of the second water quality parameter, and the second sampling time and the third sampling time are the same sampling time or meet the preset interval time condition;
the second spectral image comprises spectral information of all areas in the preset water area, and the second water quality parameter characterizes the water quality condition of the preset water area, wherein the preset water area is the target water area and/or the target water area.
9. An image processing method, comprising:
carrying out hyperspectral remote sensing imaging based on the same remote sensing imaging system to obtain an image to be processed and a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in a target water area;
performing cluster analysis on the image to be processed, determining a first position of each quantum dot strip according to the result of the cluster analysis, and determining a second position of each quantum dot strip according to the first position, thereby determining actual position information of each quantum dot strip according to the second position, wherein the first position indicates an initial rough position of the strip, and the second position indicates an initial accurate position of the strip;
and determining a first spectrum image based on the plurality of first images and the actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water area.
10. The method of claim 9, wherein performing cluster analysis on the image to be processed, and determining the first position of each quantum dot strip according to the result of the cluster analysis comprises:
Preprocessing the image to be processed, wherein the preprocessing mode comprises at least one of converting an image format, adjusting an image size and adjusting an image pixel value;
performing cluster analysis on the preprocessed image to be processed to obtain a segmentation result;
counting the interval range of the preset pixels continuously appearing in the preprocessed image according to the segmentation result, and determining the first position of each quantum dot strip according to the interval range;
and/or the number of the groups of groups,
determining a second position of each quantum dot strip according to the first position, thereby determining actual position information of each quantum dot strip according to the second position, including:
judging whether the image to be processed lacks a strip according to the first position, if the image to be processed has the missing strip, filling the strip by using the distribution information of the strip, wherein the distribution information of the strip comprises at least one of the number of the strip, the width of the strip and the interval between adjacent strips;
extracting a sub-image to be processed from the image to be processed according to prior information of each quantum dot strip and the first position, wherein the sub-image to be processed is positioned in a central area in the image to be processed;
Performing cluster analysis on the sub-images to be processed, and performing linear detection on the sub-images to be processed after the cluster analysis to obtain a linear detection result;
performing boundary constraint on the image to be processed by using the straight line detection result, and removing noise in the image to be processed, wherein the noise removing mode comprises removing pixels with pixel values larger than a preset threshold value;
determining a second position of each quantum dot strip according to the image to be processed after boundary constraint and noise removal;
judging whether the strip width needs to be expanded according to the second position;
adjusting the distribution condition of the strips according to the second position, wherein the adjustment mode comprises adding the strips and/or deleting the strips;
and taking the strip position after the distribution condition of the strip is adjusted as the actual position information of each quantum dot strip.
11. The method of claim 9, wherein the determining a first spectral image based on the plurality of first images and actual position information for each of the quantum dot strips comprises:
according to the actual position information of each quantum dot strip, extracting the spectrum information corresponding to the same quantum dot strip in each first image;
Splicing a plurality of spectrum information corresponding to the same quantum dot strip according to the position of the area corresponding to each spectrum information in the target water area to obtain a first panorama corresponding to each quantum dot strip, wherein each first panorama comprises spectrum information of all areas in the target water area corresponding to the same quantum dot strip;
extracting features of the first panoramic images to obtain a plurality of first feature points of the first panoramic images;
taking one of the plurality of first panoramas as a first central panoramas, and determining a first homography transformation set according to first characteristic points of the first central panoramas and first characteristic points of the rest first panoramas, wherein the first homography transformation set comprises a first homography transformation matrix between the first central panoramas and the rest first panoramas;
and processing the plurality of first panoramic images by using the first homography transformation set to obtain the first spectrum image.
12. An acquisition device of water quality parameters, characterized by comprising:
the hyperspectral remote sensing imaging module is used for carrying out hyperspectral remote sensing imaging on different areas of a target water area based on the same remote sensing imaging system to obtain a plurality of first images, wherein the remote sensing imaging system comprises a plurality of remote sensing channels, each remote sensing channel is correspondingly provided with different quantum dot strips, each quantum dot strip has different optical characteristics, and all the first images cover spectral information of all areas in the target water area;
The image processing module is used for determining a first spectrum image based on the plurality of first images and actual position information of each quantum dot strip, wherein the first spectrum image comprises spectrum information of all areas in the target water, the actual position information of each quantum dot strip is determined by carrying out strip segmentation on an image to be processed, and the image to be processed and the first image are obtained based on the same remote sensing imaging system;
the parameter inversion module is used for inputting the first spectrum image and the first sampling time into an inversion model for calculation to obtain a first water quality parameter, wherein the first sampling time is the sampling time included in the first spectrum image, and the first water quality parameter characterizes the water quality condition of the target water area.
13. An acquisition device of water quality parameters, characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any one of claims 1 to 8 when executing the instructions stored by the memory.
14. A non-transitory computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 8.
CN202311451968.1A 2023-11-03 2023-11-03 Water quality parameter acquisition method and device, image processing method and medium Active CN117173580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311451968.1A CN117173580B (en) 2023-11-03 2023-11-03 Water quality parameter acquisition method and device, image processing method and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311451968.1A CN117173580B (en) 2023-11-03 2023-11-03 Water quality parameter acquisition method and device, image processing method and medium

Publications (2)

Publication Number Publication Date
CN117173580A true CN117173580A (en) 2023-12-05
CN117173580B CN117173580B (en) 2024-01-30

Family

ID=88939901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311451968.1A Active CN117173580B (en) 2023-11-03 2023-11-03 Water quality parameter acquisition method and device, image processing method and medium

Country Status (1)

Country Link
CN (1) CN117173580B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437553A (en) * 2023-12-21 2024-01-23 贵州省环境工程评估中心 Remote sensing image data processing method and device for monitoring river sewage outlet
CN117893177A (en) * 2024-03-15 2024-04-16 山东得和明兴生物科技有限公司 Method for regulating and controlling pond water quality by using elastic filler

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106872035A (en) * 2017-03-13 2017-06-20 中国科学院光电研究院 Quantum dot light spectrum imaging system
US20190018143A1 (en) * 2011-06-30 2019-01-17 The Regents Of The University Of Colorado, A Body Corporate Remote measurement of shallow depths in semi-transparent media
CN112051222A (en) * 2020-08-30 2020-12-08 山东锋士信息技术有限公司 River and lake water quality monitoring method based on high-resolution satellite image
CN113063496A (en) * 2021-03-11 2021-07-02 芯视界(北京)科技有限公司 Imaging spectrum device
CN113125355A (en) * 2019-12-31 2021-07-16 芯视界(北京)科技有限公司 Water quality supervision system
CN114936971A (en) * 2022-06-08 2022-08-23 浙江理工大学 Unmanned aerial vehicle remote sensing multispectral image splicing method and system for water area
CN114998750A (en) * 2022-08-01 2022-09-02 四川工程职业技术学院 Method, device, equipment and medium for removing random length strips of remote sensing image
CN115266632A (en) * 2022-07-29 2022-11-01 阿尔爱思科技(苏州)有限公司 Unmanned aerial vehicle hyperspectral remote sensing investigation method for water pollution source
CN116630148A (en) * 2023-07-25 2023-08-22 芯视界(北京)科技有限公司 Spectral image processing method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190018143A1 (en) * 2011-06-30 2019-01-17 The Regents Of The University Of Colorado, A Body Corporate Remote measurement of shallow depths in semi-transparent media
CN106872035A (en) * 2017-03-13 2017-06-20 中国科学院光电研究院 Quantum dot light spectrum imaging system
CN113125355A (en) * 2019-12-31 2021-07-16 芯视界(北京)科技有限公司 Water quality supervision system
CN112051222A (en) * 2020-08-30 2020-12-08 山东锋士信息技术有限公司 River and lake water quality monitoring method based on high-resolution satellite image
CN113063496A (en) * 2021-03-11 2021-07-02 芯视界(北京)科技有限公司 Imaging spectrum device
CN114936971A (en) * 2022-06-08 2022-08-23 浙江理工大学 Unmanned aerial vehicle remote sensing multispectral image splicing method and system for water area
CN115266632A (en) * 2022-07-29 2022-11-01 阿尔爱思科技(苏州)有限公司 Unmanned aerial vehicle hyperspectral remote sensing investigation method for water pollution source
CN114998750A (en) * 2022-08-01 2022-09-02 四川工程职业技术学院 Method, device, equipment and medium for removing random length strips of remote sensing image
CN116630148A (en) * 2023-07-25 2023-08-22 芯视界(北京)科技有限公司 Spectral image processing method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437553A (en) * 2023-12-21 2024-01-23 贵州省环境工程评估中心 Remote sensing image data processing method and device for monitoring river sewage outlet
CN117437553B (en) * 2023-12-21 2024-02-23 贵州省环境工程评估中心 Remote sensing image data processing method and device for monitoring river sewage outlet
CN117893177A (en) * 2024-03-15 2024-04-16 山东得和明兴生物科技有限公司 Method for regulating and controlling pond water quality by using elastic filler

Also Published As

Publication number Publication date
CN117173580B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
CN117173580B (en) Water quality parameter acquisition method and device, image processing method and medium
Liebel et al. Single-image super resolution for multispectral remote sensing data using convolutional neural networks
Nie et al. Deeply learned filter response functions for hyperspectral reconstruction
Baek et al. Compact single-shot hyperspectral imaging using a prism
JP6752212B2 (en) Image system and how to use it
Chakrabarti et al. Depth and deblurring from a spectrally-varying depth-of-field
Fu et al. Joint camera spectral sensitivity selection and hyperspectral image recovery
US11532071B2 (en) Creating super-resolution images
Rashidi et al. Optimized selection of key frames for monocular videogrammetric surveying of civil infrastructure
CN102203827A (en) Methods and apparatus for editing images
De Lutio et al. Learning graph regularisation for guided super-resolution
Jiang et al. Determining ground elevations covered by vegetation on construction sites using drone-based orthoimage and convolutional neural network
Duan et al. Guided event filtering: Synergy between intensity images and neuromorphic events for high performance imaging
CN113469074A (en) Remote sensing image change detection method and system based on twin attention fusion network
EP2909671B1 (en) Method for designing a single-path imager able to estimate the depth of field
James et al. An innovative photogrammetry color segmentation based technique as an alternative approach to 3D scanning for reverse engineering design
CN113421216A (en) Hyperspectral fusion calculation imaging method and system
CN107220945A (en) The restored method of the pole blurred picture of multiple degeneration
CN116630148B (en) Spectral image processing method and device, electronic equipment and storage medium
Liu et al. Deep self-supervised hyperspectral image reconstruction
CN116206221A (en) Water flare detection method and system
O'Connor Impact of image quality on SfM Photogrammetry: colour, compression and noise
CN115578256A (en) Unmanned aerial vehicle aerial insulator infrared video panorama splicing method and system
Wang et al. Single-frame super-resolution for high resolution optical remote-sensing data products
Wu et al. Light field all-in-focus image fusion based on spatially-guided angular information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant