Black and odorous water body identification method and system based on mobile phone photographing
By taking images by mobile phones and combining geographical information to identify black and odorous water bodies, the problem of insufficient image quality assessment and geographical environment adaptability in traditional methods is solved, and the accuracy and applicability of water body quality assessment is achieved.
Patent Information
- Application Number
- CN202510225832.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Traditional black and odorous water recognition methods rely on complex equipment and professionals, and cannot provide real-time feedback on image quality, resulting in reduced accuracy in water quality judgment, and ignore the impact of geographical location and environmental factors on water quality assessment, resulting in inaccurate monitoring results.
Images are taken through mobile phones, and the location coordinates and text information entered by users are recorded in real time to generate water body data sets. Then, the image quality is evaluated, the reflectivity difference between the water body and the reflective plate is calculated, the spectral characteristics are extracted, and the detection threshold is set based on geographical location information to identify black and odorous water bodies.
It improves the accuracy of image quality assessment and data acquisition, adapts to the needs of the geographical environment, improves the accuracy and applicability of water body quality assessment, and quickly identifys water pollution problems.
Smart Images

Figure CN119723356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and system for identifying black and odorous water bodies based on mobile phone photography. Background Art
[0002] The field of image recognition technology involves the use of computer vision and machine learning methods to enable computers to recognize and process the content in images or videos, and to identify objects, scenes, and activities by analyzing digital images or video frames. It includes multiple processing steps such as image preprocessing, feature extraction, and classification. It combines convolutional neural networks and deep learning models to improve recognition accuracy and efficiency. It is applied to security monitoring, medical image analysis, autonomous driving, interactive media, facial recognition, industrial automation, and environmental monitoring.
[0003] Among them, the black and odorous water body identification method based on mobile phone photography is to use the water body photos taken by the smartphone camera, and use image recognition technology to identify the changes in water color, the density of suspended particles and various pollution indicators to determine whether it is a black and odorous water body. It aims to provide a convenient and economical way to monitor water quality, provide environmental protection agencies and the public with a simple and economical water quality monitoring tool, and monitor water quality conditions in real time, and quickly respond to and deal with water pollution problems.
[0004] Traditional black and odorous water identification methods rely on traditional water monitoring technology, which requires complex equipment and professionals to operate. There are obvious deficiencies in real-time data processing and adaptability to geographical environments. It is unable to provide real-time feedback on the quality of collected images, resulting in subsequent analysis being based on poor quality data, affecting the accuracy of water quality judgments. When processing water data from different geographical regions, a unified threshold standard is used, ignoring the important impact of geographical location and environmental factors on water quality assessment, making it impossible for monitoring results to accurately reflect the actual water quality conditions in local areas, reducing the scientific nature and applicability of monitoring, leading to incorrect water quality judgments, and bringing about inappropriate environmental management and public health risks. Summary of the invention
[0005] In order to solve the above technical problems existing in the prior art, the embodiment of the present invention provides a method and system for identifying black and odorous water bodies based on mobile phone photography. The technical solution is as follows:
[0006] On the one hand, a method for identifying black and odorous water bodies based on mobile phone photography is provided, the method comprising:
[0007] S1: Based on the image information taken by the mobile phone, the location coordinates of the shooting location are recorded in real time, and the text information entered by the user is analyzed to extract multiple keywords related to the water body status and generate a water body data set;
[0008] S2: Based on the water body dataset, the image quality is evaluated by identifying whether the image contains the bottom of the water and a reflector, overly bright spots, and obstructions, marking the qualified state, and sending a reshoot prompt message to the user to generate an image data review result;
[0009] S3: Based on the image data review result, the qualified image data is analyzed, the color data in the image is extracted, the remote sensing reflectivity of the water body is identified by calculating the reflectivity difference between the reflector and the water body, and the water body reflectivity calculation result is generated;
[0010] S4: using the water body reflectance calculation result, extracting the spectral characteristics of the target water body, and comparing the spectral characteristics with the known black and odorous water body characteristics, identifying the key differences in the water body spectrum, calculating the black and odorous water body index, and generating the water body score calculation result;
[0011] S5: Based on the water body score calculation result, combined with the geographical location information of the target water body, considering the water turbidity in multiple geographical locations, setting black and odorous water body detection thresholds for multiple geographical areas, and judging the target water body according to the threshold to generate black and odorous water body identification results.
[0012] Optionally, the water body dataset generation result includes merged image files, geographic coordinate data, and keyword extraction records; the image data review result includes image quality score, re-shooting prompt information, and image status mark; the water body reflectivity calculation result includes color comparison analysis results between the water body and a reference plate, a calculated reflectivity difference value, and water body reflectivity data; the water body score calculation result includes extracted spectral feature data, known black and odorous water body feature information, and a black and odorous water body index; the black and odorous water body identification result includes a list of water body turbidity data in a geographical area, a set detection threshold, and a water body classification result.
[0013] Optionally, based on the image information captured by the mobile phone, the location coordinates of the shooting location are recorded in real time, and the text information input by the user is analyzed to extract multiple keywords related to the water body state. The specific steps of generating the water body data set are:
[0014] S101: Based on the image information captured by the mobile phone, the geographical coordinate data when the image is captured is synchronously recorded by the mobile phone to generate a geographical coordinate record;
[0015] S102: Analyze the descriptive text input by the user based on the geographic coordinate record, extract multiple keywords in the description, including color, smell, and pollution signs, and generate a descriptive keyword set;
[0016] S103: Based on the descriptive keyword set, the collected image data, location information and text keywords are integrated to generate a water body dataset.
[0017] Optionally, based on the water body dataset, by identifying whether the image contains the bottom of the water and a reflector, an overly bright spot, or obstructing debris, the image quality is evaluated, a qualified state is marked, and a reshooting prompt message is sent to the user, and the steps of generating the image data review result are specifically as follows:
[0018] S201: Analyze the captured image data based on the water body data set, detect the bottom and reflector in the image, identify the visibility and integrity of the target element, and generate an element visibility detection result;
[0019] S202: Based on the element visibility detection result, detect and identify visual obstacles in the image, including occluders, light spots, and debris, and generate obstacle detection records;
[0020] S203: Based on the obstacle detection record, mark the qualified status of the image, match the re-shooting prompt message according to the unqualified reason, and send it to the user to generate the image data review result.
[0021] Optionally, based on the image data review result, the qualified image data is analyzed, the color data in the image is extracted, and the remote sensing reflectivity of the water body is identified by calculating the reflectivity difference between the reflector and the water body. The specific steps of generating the water body reflectivity calculation result are:
[0022] S301: Based on the image data review result, analyzing the qualified image data, performing color extraction on the image, including measuring the color of the water body and the reflector, and generating color extraction data;
[0023] S302: Based on the color extraction data, using color information, calculating the reflectivity difference between the water body and the reflector, and generating reflectivity difference data;
[0024] S303: Based on the reflectivity difference data, combined with the actual color and light reflectivity information of the reflector, the actual remote sensing reflectivity of the water body is calculated to generate a water body reflectivity calculation result.
[0025] Optionally, the specific formula for calculating the reflectivity difference between the water body and the reflector is:
[0026]
[0027] in, represents the average pixel intensity of water in a specific spectral band, represents the average pixel intensity of the reflector in the same spectral band, represents the reflectivity difference value, Represents the adjustment factor, which is used to adapt to different ambient lighting conditions.
[0028] Optionally, the steps of extracting the spectral features of the target water body using the water body reflectance calculation result, comparing the spectral features with known black and odorous water body features, identifying key differences in the water body spectrum, calculating the black and odorous water body index, and generating the water body score calculation result are specifically as follows:
[0029] S401: Based on the water body reflectance calculation result, frequency analysis is performed on the water body spectrum data, key feature data of the water body in the spectrum graph is extracted, and spectrum feature data is generated;
[0030] S402: Based on the spectral feature data, the extracted spectral features are compared with the known black and odorous water spectra, similarities are calculated, spectral differences are identified, and spectral difference analysis results are generated;
[0031] S403: Based on the spectral difference analysis result, the black and odorous water index is calculated using the spectral difference to generate a water body score calculation result.
[0032] Optionally, the specific formula for calculating the similarity is:
[0033]
[0034] in, The target water body is The reflection intensity of each spectral band, Represents the reflection intensity of the corresponding spectral band in the black and odorous water spectral library, Represents the similarity between the two. represents the total number of spectral bands, is the index of the spectral band.
[0035] Optionally, based on the water body score calculation result, combined with the geographical location information of the target water body, considering the water turbidity in multiple geographical locations, setting black and odorous water body detection thresholds for multiple geographical areas, and judging the target water body according to the threshold, the steps of generating black and odorous water body identification results are specifically as follows:
[0036] S501: Based on the water body score calculation result, collect water body turbidity data of multiple geographical areas to generate water body turbidity data;
[0037] S502: Based on the water turbidity data, adjusting the black and odorous water detection thresholds of multiple geographical areas to generate regional threshold settings;
[0038] S503: Based on the regional threshold setting, by comparing the black and odorous water body indexes of multiple sampling points with the regional detection threshold, marking the black and odorous water body status for the target location, and generating a black and odorous water body identification result.
[0039] On the other hand, a black and odorous water body identification system based on mobile phone photography is provided, and the system is applied to a black and odorous water body identification method based on mobile phone photography, and the system comprises:
[0040] The data collection and integration module records the geographical location of the image based on the image information captured by the mobile phone, and extracts keywords related to the water body status from the user input text to generate a water body data set;
[0041] An image quality detection module, based on the water body data set, identifies whether the image contains the bottom of the water and the reflector, detects overly bright spots and obstructions in the image, evaluates the quality of the image and marks the status, and sends a prompt message to the user to reshoot according to the reason for failure, and generates an image data review result;
[0042] An image data analysis module, based on the image data review result, analyzes the color data in the image, calculates the reflectivity difference between the reflector and the water body, identifies the remote sensing reflectivity of the water body, and generates a water body reflectivity calculation result;
[0043] A spectral feature analysis module, using the water body reflectance calculation result, extracts the spectral features of the water body in the image, compares the target features with the feature database of known black and odorous water bodies, identifies key spectral differences, calculates the black and odorous water body index, and generates a water body score calculation result;
[0044] A threshold setting module, combining the water body score calculation result, taking into account the turbidity of the water body in the target area, setting black and odorous water body detection thresholds for multiple geographical areas, and generating threshold setting results;
[0045] The water body state identification module uses the threshold setting result to compare the actually measured water body index with the set threshold value to determine the black and odorous water state of each target water body and generate a black and odorous water body identification result.
[0046] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0047] By detecting and identifying the bottom of the water, reflectors, light spots and obstructions in the image, the image quality is evaluated in real time and the user is guided to re-shoot, the quality standards of data input are guaranteed, the accuracy of data collection and the reliability of data analysis are improved, and the regional black and odorous water detection threshold is set by calculating the reflectivity difference between the water body and the reflector, combining the geographic location information and water turbidity, so that water monitoring reflects the actual condition of the water body, adapts to the needs of the geographical environment, provides higher accuracy and applicability for water quality assessment, and helps to quickly identify water pollution problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0050] Figure 2 This is a detailed flow chart of S1 of the present invention;
[0051] Figure 3 This is a detailed flow chart of S2 of the present invention;
[0052] Figure 4 This is a detailed flow chart of S3 of the present invention;
[0053] Figure 5 This is a detailed flow chart of S4 of the present invention;
[0054] Figure 6 This is a detailed flow chart of S5 of the present invention;
[0055] Figure 7 It is a system flow chart of the present invention. DETAILED DESCRIPTION
[0056] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0057] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0058] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0059] In the embodiments of the present invention, sometimes the subscripts such as W 1 It may be written in non-subscript form such as W1. When the difference is not emphasized, the meaning is the same.
[0060] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0061] The embodiment of the present invention provides a method for identifying black and odorous water bodies based on mobile phone photography, such as Figure 1 The flowchart of the method for identifying black and odorous water bodies based on mobile phone photography is shown. The processing flow of the method may include the following steps:
[0062] S1: Based on the image information taken by the mobile phone, the location coordinates of the shooting location are recorded in real time, and the text information entered by the user is analyzed to extract multiple keywords related to the water body status and generate a water body data set;
[0063] S2: Based on the water body dataset, the image quality is evaluated by identifying whether the image contains the bottom of the water, reflectors, overly bright spots, and obstructions, marking the qualified status, and sending a reshoot prompt message to the user to generate the image data review result;
[0064] S3: Based on the image data review results, analyze the qualified image data, extract the color data in the image, calculate the reflectivity difference between the reflector and the water body, identify the remote sensing reflectivity of the water body, and generate the water body reflectivity calculation result;
[0065] S4: Using the water body reflectance calculation result, extract the spectral characteristics of the target water body, and compare the spectral characteristics with the known black and odorous water body characteristics, identify the key differences in the water body spectrum, calculate the black and odorous water body index, and generate the water body score calculation result;
[0066] S5: Based on the water body score calculation results, combined with the geographical location information of the target water body, considering the water turbidity in multiple geographical locations, set black and odorous water body detection thresholds for multiple geographical areas, and judge the target water body according to the threshold to generate black and odorous water body identification results.
[0067] The results of water body dataset generation include merged image files, geographic coordinate data, and keyword extraction records. The results of image data review include image quality score, re-shooting prompt information, and image status mark. The water body reflectance calculation results include the color comparison analysis results between the water body and the reference plate, the calculated reflectance difference value, and water body reflectance data. The water body score calculation results include the extracted spectral feature data, known black and odorous water body feature information, and black and odorous water body index. The black and odorous water body identification results include a list of water body turbidity data in the geographical area, the set detection threshold, and water body classification results.
[0068] See also Figure 2Based on the image information captured by the mobile phone, the location coordinates of the shooting location are recorded in real time, and the text information entered by the user is analyzed to extract multiple keywords related to the water body status. The specific steps for generating the water body data set are as follows:
[0069] S101: Based on the image information captured by the mobile phone, the geographical coordinate data when the image is captured is synchronously recorded by the mobile phone to generate a geographical coordinate record;
[0070] In sub-step S101, based on the image information captured by the mobile phone, the GPS function of the mobile phone is activated to capture and record the precise geographic location coordinates when the image was captured. The process includes initializing the positioning service of the mobile phone, ensuring that the GPS signal strength is sufficient to provide stable positioning data, and while the mobile phone camera captures the image, the GPS module captures the current latitude and longitude coordinates, timestamp, altitude information, and the target data are encoded and saved as a geographic location record file to ensure that each image has corresponding geographic coordinates, so that the location data can be used in subsequent analysis to associate environmental characteristics with water status, provide data support for environmental protection agencies, help understand the environmental background of the image capture area and existing water pollution problems, and generate geographic coordinate records.
[0071] S102: Analyze the descriptive text input by the user based on the geographic coordinate record, extract multiple keywords in the description, including color, smell, and pollution signs, and generate a descriptive keyword set;
[0072] In sub-step S102, based on the geographic coordinate records, natural language processing technology is used to analyze the descriptive text entered by the user through the mobile phone application, including starting the text analysis engine and loading advanced text processing models such as BERT or LSTM. The target model has been trained on a large amount of text data to understand and extract keywords. After the text is input into the model, the model parses the text content and identifies keywords related to the water body status, such as "color", "smell" and "signs of pollution". The target keywords are determined by the model analyzing the semantic context and the co-occurrence frequency of words. After each keyword extraction is completed, the system will integrate the target keywords into a descriptive keyword set. The set will be used as an important input parameter for water body status analysis, which is used to refine the content of the water body data set and generate a descriptive keyword set.
[0073] S103: Based on the descriptive keyword set, the collected image data, location information and text keywords are integrated to generate a water body data set;
[0074] In sub-step S103, based on the descriptive keyword set, the collected image data and the previously generated geographic coordinate records are integrated, and data fusion technology such as data lake or data warehouse technology is used to realize the storage and query of large-scale data. The image data and geographic coordinates are aligned according to the timestamp to ensure the consistency of each record. The descriptive text keywords are associated with the corresponding images and geographic coordinates. Using relational database technology, a multidimensional data model is constructed to perform data retrieval and analysis. The target comprehensive data is quality checked and cleaned to ensure the accuracy and completeness of the data set, and a water body data set is generated. The data set will be directly applied to the subsequent water quality analysis and assessment process, providing a comprehensive perspective to monitor and assess the health status of water bodies.
[0075] See also Figure 3 Based on the water body dataset, the image quality is evaluated by identifying whether the image contains the bottom of the water and reflectors, overly bright spots, and obstructions, marking the qualified status, and sending a reshoot prompt message to the user. The specific steps for generating the image data review results are as follows:
[0076] S201: Based on the water body data set, analyze the captured image data, detect the bottom of the water and the reflector in the image, identify the visibility and integrity of the target element, and generate the element visibility detection result;
[0077] In sub-step S201, based on the water body data set, the image processing software is started, and image segmentation techniques such as threshold segmentation and edge detection algorithms are used. The color analysis method is applied to determine the boundary between the water body and the non-water body area. The outline of the bottom and the reflector in the image is identified through edge detection algorithms such as the Canny edge detector. The system automatically evaluates the clarity and integrity of target elements such as the bottom and the reflector to ensure that the target elements are not partially cropped or blocked in the image to ensure the accuracy of the water quality analysis. By comparing the proportion and position of the target elements in the image, the system evaluates the visibility of each element and generates an element visibility detection result. This result is used in the subsequent quality assessment process to ensure the reliability and validity of the analysis data.
[0078] S202: Based on the element visibility detection result, detect and identify visual obstacles in the image, including occlusions, light spots, and debris, and generate obstacle detection records;
[0079] In sub-step S202, based on the element visibility detection results, image processing techniques such as region growing method and template matching technology are used to analyze the image and identify visual obstacles that affect image quality in the image, including occlusions, light spots and debris. The region growing method is used to identify light spots or shadows in continuous areas, and the area that meets the specific color range is grown by setting a threshold. Template matching technology detects debris similar to predefined shapes, such as fallen leaves or garbage. Each obstacle is marked and recorded in the system, and an obstacle detection record is generated based on the type and location information. The target record provides key data for image quality control to ensure that only undisturbed images are used for analysis.
[0080] S203: Based on the obstacle detection record, mark the qualified status of the image, match the re-shooting prompt message according to the unqualified reason, and send it to the user to generate the image data review result;
[0081] In sub-step S203, based on the obstacle detection records, the system evaluates whether each image meets the quality standards, marks the qualified status of the image, and uses an image quality assessment algorithm, such as an image classification model based on machine learning, to automatically distinguish qualified from unqualified images. For each reason for failure, the system matches an appropriate re-shooting prompt message. The target message is customized based on the specific problem of the image, such as "adjust the shooting angle to avoid light spots" or "remove debris in the picture". The target prompt is sent directly to the user through the user interface to guide the improvement of shooting and generate image data review results. As a result, the efficiency of data collection is improved, the quality of data is optimized, and the accuracy of subsequent water body analysis is ensured.
[0082] See also Figure 4 , based on the image data review results, the qualified image data is analyzed, the color data in the image is extracted, and the remote sensing reflectivity of the water body is identified by calculating the reflectivity difference between the reflector and the water body. The specific steps for generating the water body reflectivity calculation results are as follows:
[0083] S301: Based on the image data review result, analyze the qualified image data, perform color extraction on the image, including measuring the color of the water body and the reflector, and generate color extraction data;
[0084] In sub-step S301, based on the image data review results, qualified images are selected for analysis, and the color space conversion method in digital image processing technology is used to convert the image from RGB color space to LAB color space to accurately measure color differences. In the process, the water area and reflector area of each image are located and color data is extracted. The brightness, color contrast from green to red, and color contrast from blue to yellow in the LAB color space are used to describe the color characteristics of each area, and the color data of the water body and reflector are extracted. The target data is recorded and processed to generate color extraction data, which provides basic color information for reflectance calculation and ensures the accuracy of reflectance analysis.
[0085] S302: Based on the color extraction data, using the color information, calculating the reflectivity difference between the water body and the reflector, and generating reflectivity difference data;
[0086] The specific formula for calculating the difference in reflectivity between the water body and the reflector is:
[0087]
[0088] in, represents the average pixel intensity of water in a specific spectral band, represents the average pixel intensity of the reflector in the same spectral band, represents the reflectivity difference value, Represents the adjustment factor, which is used to adapt to different ambient lighting conditions.
[0089] formula:
[0090] ;
[0091] Detailed explanation of the formula and the process of formula calculation and derivation:
[0092] The formula is used to calculate the difference in reflectivity between the water body and the reflector, which is used to evaluate the degree of water pollution and determine whether the water body is black and smelly.
[0093] Parameter meaning and setting value:
[0094] is the average pixel intensity of the water body in a specific spectral band, assuming that the average pixel intensity of the red band is 180;
[0095] is the average pixel intensity of the reflector in the same spectral band, assumed to be 220;
[0096] is the reflectivity difference value, which is a direct measure of the reflective characteristics of the water body;
[0097] It is an adjustment coefficient used to adapt to the influence of different ambient lighting conditions and is assumed to be 0.8.
[0098] Substitute the parameters into the formula for calculation:
[0099] ;
[0100] result It shows that the difference in reflectivity between the water body and the reflector is 11.6%, reflecting the lower difference in the spectral reflectivity characteristics of the water body compared to the standard reflector. The results are used to help calculate the actual remote sensing reflectivity of the water body and provide a data basis for water quality management and treatment measures.
[0101] S303: Based on the reflectivity difference data, combined with the actual color and light reflectivity information of the reflector, the actual remote sensing reflectivity of the water body is calculated to generate a water body reflectivity calculation result;
[0102] In sub-step S303, the actual remote sensing reflectivity is calculated based on the reflectivity difference data. During the process, the correction algorithm is used to adjust the preliminarily calculated remote sensing reflectivity in combination with the reflector color data obtained by actual measurement and the reflectivity standard information under the on-site lighting conditions. The process includes considering the impact of changes in light intensity on color data and the impact of reflector material on light reflection characteristics. Through this composite correction method, it is ensured that the measurement results of water body reflectivity are closer to the optical properties of water bodies under real conditions, and the generated water body reflectivity calculation results will be used for subsequent water quality analysis and evaluation.
[0103] See also Figure 5 , using the water body reflectance calculation results, extracting the spectral features of the target water body, and comparing the spectral features with the known black and odorous water body features, identifying the key differences in the water body spectrum, calculating the black and odorous water body index, and generating the water body score calculation results are specifically as follows:
[0104] S401: Based on the water body reflectance calculation result, frequency analysis is performed on the water body spectrum data, key feature data of the water body in the spectrum is extracted, and spectrum feature data is generated;
[0105] In sub-step S401, based on the calculation result of water body reflectance, frequency analysis of water body spectral data is performed, and Fourier transform technology is used to convert time or space to frequency domain, including obtaining time series data from water body reflectance data, applying Fourier transform, converting target time series data into spectral data in frequency domain, and extracting main frequency components in water body spectrum, such as peaks and troughs of specific wavelengths, by analyzing the converted frequency distribution. The target components characterize the spectral behavior and chemical composition of the water body. Each extracted feature is recorded and encoded to generate spectral feature data, providing an accurate scientific basis for water quality analysis.
[0106] S402: Based on the spectral feature data, the extracted spectral features are compared with the known black and odorous water spectra, similarities are calculated, spectral differences are identified, and spectral difference analysis results are generated;
[0107] The specific formula for calculating similarity is:
[0108]
[0109] in, The target water body is The reflection intensity of each spectral band, Represents the reflection intensity of the corresponding spectral band in the black and odorous water spectral library, Represents the similarity between the two. represents the total number of spectral bands, is the index of the spectral band.
[0110] formula:
[0111] ;
[0112] Detailed explanation of the formula and the process of formula calculation and derivation:
[0113] The formula is used to calculate the similarity between the water body and the black and odorous water body spectral library, and the obtained result is used to evaluate whether the water body belongs to the black and odorous water body;
[0114] Parameter meaning and setting value:
[0115] The target water body is The reflection intensity of each spectral band is assumed to be 0.5, 0.6, and 0.55, respectively, which reflects the spectral response state of the target water body in the spectral band;
[0116] The black and odorous water spectral library is The average reflection intensity of the three spectral bands is assumed to be 0.8, 0.75, and 0.78, respectively, which reflects the spectral response state of the black and odorous water body in the spectral band;
[0117] is the total number of spectral bands;
[0118] Substitute the parameters into the formula for calculation:
[0119] ;
[0120] ;
[0121] ;
[0122] ;
[0123] ;
[0124] The result of 0.995 shows that the spectral characteristics of the target water body and the black and odorous water body are very similar. The data is used to calculate the black and odorous water body index to determine whether the target water body is a black and odorous water body.
[0125] S403: Based on the spectral difference analysis result, the black and odorous water index is calculated using the spectral difference to generate a water body score calculation result;
[0126] In sub-step S403, based on the results of spectral difference analysis, the target spectral difference data is used to calculate the black and odorous water index. A comprehensive scoring method is adopted to conduct a comprehensive evaluation based on the degree of influence of different spectral features and the corresponding difference sizes. An influence weight is assigned to each spectral feature, and the overall pollution level of the water body is calculated in combination with the corresponding difference degree. The black and odorous water index of each water sample is evaluated, and the scoring calculation results of the water body are generated, which provides accurate data support for environmental protection supervision and accelerates the response and treatment of water pollution problems.
[0127] See also Figure 6 Based on the water body score calculation results, combined with the geographical location information of the target water body, considering the water turbidity in multiple geographical locations, setting black and odorous water body detection thresholds for multiple geographical areas, and judging the target water body according to the threshold, the steps for generating black and odorous water body identification results are as follows:
[0128] S501: Based on the water body score calculation result, collect water body turbidity data of multiple geographical areas to generate water body turbidity data;
[0129] In sub-step S501, based on the water body score calculation results, water turbidity data is collected, multiple geographical areas are defined, and water quality monitoring equipment is deployed in each area to measure the turbidity of the water body. The target equipment regularly records the turbidity of the water body and automatically uploads the data to the central monitoring system. The system collects water turbidity data from different areas and organizes it into a detailed database. The target turbidity data provides direct insights into the water quality conditions of each area, provides basic data for analysis and decision-making, and generates water turbidity data.
[0130] S502: Based on the water turbidity data, adjusting the black and odorous water detection thresholds of multiple geographical regions to generate regional threshold settings;
[0131] In sub-step S502, based on the water turbidity data, the black and odorous water detection thresholds of multiple geographical areas are adjusted. The linear adjustment formula is used to consider the correlation between water turbidity and historical black and odorous events, and the threshold is adjusted according to the formula , calculate the regional detection threshold and generate the regional threshold setting;
[0132] In the formula, Representative New testing thresholds for regions, It is the basic threshold, reflecting the baseline for black and odorous water detection under general conditions. is the adjustment coefficient, which indicates the sensitivity of the threshold adjustment for each unit change in turbidity data. It is The current measured water turbidity in the region, is the average turbidity of all regions;
[0133] Detailed explanation of the formula and the process of formula calculation and derivation:
[0134] Assume the current water turbidity in the target area The average turbidity is 0.5 is 0.4, substitute the parameters for calculation:
[0135] ;
[0136] The result 0.305 shows that the detection threshold of new black and odorous water bodies in the region is 0.305. The value is used to adjust the detection threshold of black and odorous water bodies to adapt to the changes in water quality in different regions and improve the accuracy and adaptability of black and odorous water body identification.
[0137] S503: Based on the regional threshold setting, by comparing the black and odorous water body indexes of multiple sampling points with the regional detection threshold, marking the black and odorous water body status for the target location, and generating a black and odorous water body identification result;
[0138] In sub-step S503, the state of black and odorous water bodies is determined based on the regional threshold setting. The black and odorous water index of each sampling point is compared with the detection threshold of the corresponding area to determine which locations have water bodies in a black and odorous state. The comparison process is performed automatically. The system evaluates the water index of each sampling point according to the set threshold, marks the locations that exceed the threshold as potential pollution areas, quickly identifies problematic water bodies, provides clear direction for local environmental protection actions, guides resources and attention to areas that need intervention, and generates black and odorous water body identification results.
[0139] See also Figure 7, a black and odorous water body recognition system based on mobile phone photography, a black and odorous water body recognition system based on mobile phone photography is used to execute the above-mentioned black and odorous water body recognition method based on mobile phone photography, and the system includes:
[0140] The data collection and integration module records the geographical location of the image based on the image information captured by the mobile phone, and extracts keywords related to the water body status from the user input text to generate a water body data set;
[0141] Image quality detection module, based on water body data set, identifies whether the image contains the bottom and reflector, detects over-bright spots and obstructions in the image, evaluates the image quality and marks the status, and sends a prompt message to the user to reshoot according to the reason for failure, generating image data review results;
[0142] The image data analysis module analyzes the color data in the image based on the image data review results, calculates the reflectivity difference between the reflector and the water body, identifies the remote sensing reflectivity of the water body, and generates the water body reflectivity calculation results;
[0143] The spectral feature analysis module uses the water body reflectance calculation results to extract the spectral features of the water body in the image, compares the target features with the feature database of known black and odorous water bodies, identifies key spectral differences, calculates the black and odorous water body index, and generates the water body score calculation results;
[0144] The threshold setting module combines the water body score calculation results, considers the turbidity of the water body in the target area, sets the black and odorous water body detection threshold for multiple geographical areas, and generates the threshold setting results;
[0145] The water body status recognition module uses the threshold setting results to compare the actually measured water body index with the set threshold, judges the black and odorous water state of each target water body, and generates a black and odorous water body recognition result.
[0146] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0147] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0148] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0149] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0150] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0152] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0155] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0156] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for identifying black and smelly water bodies based on mobile phone photography, characterized in that: The method comprises: Based on the image information captured by the mobile phone, the location coordinates of the shooting location are recorded in real time, and the text information entered by the user is analyzed to extract multiple keywords related to the water body status and generate a water body data set; Based on the water body dataset, by identifying whether the image contains the bottom of the water and a reflector, overly bright spots, and obstructing debris, the image quality is evaluated, a qualified state is marked, and a reshoot prompt message is sent to the user to generate an image data review result; Based on the image data review results, the qualified image data is analyzed, the color data in the image is extracted, the remote sensing reflectivity of the water body is identified by calculating the reflectivity difference between the reflector and the water body, and the water body reflectivity calculation result is generated; Utilizing the water body reflectance calculation result, extracting the spectral characteristics of the target water body, and comparing the spectral characteristics with known black and odorous water body characteristics, identifying key differences in the water body spectrum, calculating the black and odorous water body index, and generating a water body score calculation result; Based on the water body score calculation results, combined with the geographical location information of the target water body, the water turbidity in multiple geographical locations is considered, black and odorous water body detection thresholds are set for multiple geographical areas, and the target water body is judged according to the threshold to generate black and odorous water body identification results.
2. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 1 is characterized in that: The water body data set generation result includes merged image files, geographic coordinate data, and keyword extraction records; the image data review result includes image quality score, re-shooting prompt information, and image status mark; the water body reflectivity calculation result includes color comparison analysis results between the water body and the reference plate, calculated reflectivity difference value, and water body reflectivity data; the water body score calculation result includes extracted spectral feature data, known black and odorous water body feature information, and a black and odorous water body index; the black and odorous water body identification result includes a list of water body turbidity data in a geographical area, a set detection threshold, and a water body classification result.
3. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 1 is characterized in that: Based on the image information captured by the mobile phone, the location coordinates of the shooting location are recorded in real time, and the text information entered by the user is analyzed to extract multiple keywords related to the water body status. The specific steps for generating the water body data set are as follows: Based on the image information captured by the mobile phone, the geographical coordinate data when the image is captured is synchronously recorded by the mobile phone to generate a geographical coordinate record; Based on the geographic coordinate record, analyzing the descriptive text input by the user, extracting multiple keywords in the description, including color, smell, and pollution signs, and generating a descriptive keyword set; Based on the descriptive keyword set, the collected image data, location information and text keywords are integrated to generate a water body dataset.
4. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 1 is characterized in that: Based on the water body dataset, the steps of generating the image data review result are as follows: Based on the water body data set, the captured image data is analyzed, the bottom of the water and the reflector in the image are detected, the visibility and integrity of the target element are identified, and the element visibility detection result is generated; Based on the element visibility detection result, detect and identify visual obstacles in the image, including occlusions, light spots, and debris, and generate obstacle detection records; Based on the obstacle detection record, the qualified status of the image is marked, and a re-shooting prompt message is matched according to the unqualified reason and sent to the user to generate an image data review result.
5. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 1 is characterized in that: Based on the image data review results, the qualified image data is analyzed, the color data in the image is extracted, and the remote sensing reflectivity of the water body is identified by calculating the reflectivity difference between the reflector and the water body. The specific steps of generating the water body reflectivity calculation result are as follows: Based on the image data review results, analyzing qualified image data, performing color extraction on the image, including measuring the color of the water body and the reflector, and generating color extraction data; Based on the color extraction data, using color information, calculating the reflectivity difference between the water body and the reflector to generate reflectivity difference data; Based on the reflectivity difference data, combined with the actual color and light reflectivity information of the reflector, the actual remote sensing reflectivity of the water body is calculated to generate a water body reflectivity calculation result.
6. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 5 is characterized in that: The specific formula for calculating the reflectivity difference between the water body and the reflector is: ; in, represents the average pixel intensity of water in a specific spectral band, represents the average pixel intensity of the reflector in the same spectral band, represents the reflectivity difference value, Represents the adjustment factor, which is used to adapt to different ambient lighting conditions.
7. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 1 is characterized in that: The steps of extracting the spectral features of the target water body by using the water body reflectance calculation result, comparing the spectral features with the known black and odorous water body features, identifying the key differences in the water body spectrum, calculating the black and odorous water body index, and generating the water body score calculation result are as follows: Based on the water body reflectance calculation result, frequency analysis is performed on the water body spectral data, key feature data of the water body in the spectrum is extracted, and spectral feature data is generated; Based on the spectral feature data, the extracted spectral features are compared with the known black and odorous water spectra, similarities are calculated, spectral differences are identified, and spectral difference analysis results are generated; Based on the spectral difference analysis results, the black and odorous water index is calculated using the spectral difference to generate a water body score calculation result.
8. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 7 is characterized in that: The specific formula for calculating the similarity is: ; in, Represents the target water body in The reflection intensity of each spectral band, Represents the reflection intensity of the corresponding spectral band in the black and odorous water spectral library, Represents the similarity between the two. represents the total number of spectral bands, is the index of the spectral band.
9. The method for identifying black and odorous water bodies based on mobile phone photography according to claim 1 is characterized in that: Based on the water body score calculation result, combined with the geographical location information of the target water body, considering the water turbidity of multiple geographical locations, setting black and odorous water body detection thresholds for multiple geographical areas, and judging the target water body according to the threshold, the steps of generating black and odorous water body identification results are specifically as follows: Based on the water body score calculation result, collecting water body turbidity data of multiple geographical areas to generate water body turbidity data; Based on the water turbidity data, adjusting the black and odorous water detection thresholds for multiple geographical regions to generate regional threshold settings; Based on the regional threshold setting, the black and odorous water body indices of multiple sampling points are compared with the detection threshold of the region, the black and odorous water body status is marked for the target location, and a black and odorous water body identification result is generated.
10. A black and odorous water body identification system based on mobile phone photography, characterized in that: According to any one of claims 1 to 9, the method for identifying black and odorous water bodies based on mobile phone photography comprises: The data collection and integration module records the geographical location of the image based on the image information captured by the mobile phone, and extracts keywords related to the water body status from the user input text to generate a water body data set; An image quality detection module, based on the water body data set, identifies whether the image contains the bottom of the water and the reflector, detects overly bright spots and obstructions in the image, evaluates the quality of the image and marks the status, and sends a prompt message to the user to reshoot according to the reason for the failure, and generates an image data review result; An image data analysis module, based on the image data review result, analyzes the color data in the image, calculates the reflectivity difference between the reflector and the water body, identifies the remote sensing reflectivity of the water body, and generates a water body reflectivity calculation result; A spectral feature analysis module, using the water body reflectance calculation result, extracts the spectral features of the water body in the image, compares the target features with the feature database of known black and odorous water bodies, identifies key spectral differences, calculates the black and odorous water body index, and generates a water body score calculation result; A threshold setting module, combining the water body score calculation result, taking into account the turbidity of the water body in the target area, setting black and odorous water body detection thresholds for multiple geographical areas, and generating threshold setting results; The water body state identification module uses the threshold setting result to compare the actually measured water body index with the set threshold value to determine the black and odorous water state of each target water body and generate a black and odorous water body identification result.
Citation Information
Patent Citations
Water quality detection method, system, device and equipment and storage medium
CN115753634A
Rural suspected black and odorous water body identification method based on high-resolution image
CN116704349A
Water quality analysis method and system based on machine vision
CN117233116A
Rural black and odorous water body monitoring method based on satellite remote sensing
CN117710831A
Satellite remote sensing recognition method and system for provincial rural black and odorous water body
CN118968328A