Urban green land health situation monitoring method based on mobile phone camera visible light image

By using square preview boxes and gyroscope calibration system, matrix parallel operation and adaptive compression factors on the mobile phone, the distortion and efficiency problems in urban green space health situation monitoring are solved, and high-precision and real-time green space health situation monitoring is achieved.

CN120431467APending Publication Date: 2025-08-05CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510567008.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The existing technology has defects such as distortion problems, low processing efficiency, inefficient algorithms, and platform fragmentation in the monitoring of health situations of urban green spaces on mobile, resulting in low monitoring accuracy and poor environmental adaptability, and real-time and efficient monitoring cannot be achieved.

Method used

The square preview box and the gyroscope are used to vertical calibration system, combined with matrix parallel operation and adaptive compression factors, light interference is eliminated through RGB-HSI mapping relationship, and a full-process anti-interference solution is designed to achieve efficient image processing and stable monitoring.

Benefits of technology

It improves the geometric accuracy and stability of image acquisition, improves processing efficiency and equipment compatibility, enhances lighting robustness, and achieves high-precision and real-time monitoring of urban green space health situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120431467A_ABST
    Figure CN120431467A_ABST
Patent Text Reader

Abstract

The invention relates to an urban green land health situation monitoring method and device based on a mobile phone camera visible light image. The method comprises the steps that the visible light image of an urban green land canopy is collected through a mobile phone camera; distortion correction and vertical calibration are carried out on the acquired image; compressing and re-sampling the image; noise reduction processing is performed on the image, and image details are reserved; converting the image from an RGB color space to an HSI color space, and eliminating the influence of an illumination condition on the image; calculating an EXG index, a leaf area index and a vegetation coverage; performing pseudo-color enhancement display on the vegetation index result; and outputting a monitoring result. According to the invention, through the square preview frame and the gyroscope vertical calibration system, the geometric error of the image is significantly reduced, and the area measurement and calculation precision is improved; matrix parallel operation and self-adaptive compression factors are adopted, so that the computing power bottleneck of a mobile terminal is broken through, and the image processing efficiency and the equipment compatibility are remarkably improved; through the whole-process anti-interference design, stable monitoring in a field complex scene is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of environmental monitoring technology, and in particular relates to a method and device for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras. Background Art

[0002] With the acceleration of urbanization, monitoring the health of urban green spaces is of great significance for urban greening management and maintenance. Traditional urban green space monitoring methods mainly rely on visible light images, obtaining growth information of urban green spaces through image processing and analysis. However, existing technologies still have many shortcomings in mobile monitoring, as follows: 1. Hardware limitations Distortion: Mobile phone camera lenses are typically low-cost convex lenses with inherent distortion (such as pincushion or barrel distortion), with edge deformation rates reaching 10% to 15%. In traditional photography, due to the lack of angle calibration, tilted shooting further exacerbates geometric distortion, affecting image accuracy.

[0003] Processing efficiency and memory bottlenecks: Mobile devices have limited image processing capabilities and are prone to crashes. Taking a 1920×1080 resolution image as an example, it occupies about 8MB of memory, while the time complexity of the traditional pixel-by-pixel traversal algorithm is O(n 2 ), which can easily lead to memory overflow when processing large-resolution images, seriously affecting image processing efficiency.

[0004] 2. Inefficient algorithms Low color model conversion efficiency: Traditional RGB-HSI color model conversion requires pixel-by-pixel trigonometric function calculations, and processing a single image takes more than 5 seconds, which cannot meet the needs of real-time monitoring.

[0005] Limited accuracy of monitoring indicators: Existing technologies primarily rely on single color models (such as RGB) or isolated indicators (such as leaf area index) for evaluation, making it difficult to fully reflect the growth status of urban green spaces. Furthermore, the RGB model has flaws: its three channels couple brightness information, which can easily cause saturation distortion in strong light environments, causing the accuracy of monitoring indicators to be affected by ambient lighting.

[0006] Limitations of grayscale images: Grayscale images have low resolution, and the human eye can only distinguish about 20 grayscale levels, making it difficult to identify subtle changes and unable to meet the requirements for accurate monitoring of the health status of urban green spaces.

[0007] 3. Platform fragmentation Traditional urban green space monitoring methods rely on PCs for image processing and analysis, using specialized software like ENVI and Photoshop. Images captured by mobile phones must be exported to a PC for processing, preventing real-time feedback and creating a fragmented system that fails to meet the demands of mobile monitoring.

[0008] In summary, urban green space health status monitoring is a complex system with deep coupling of multispectral characteristics and agronomic parameters. Traditional methods ignore key factors such as color space conversion, distortion correction, and multi-index fusion, resulting in low monitoring accuracy and poor environmental adaptability. In particular, there are still obvious shortcomings in mobile monitoring research. Summary of the Invention

[0009] In order to address the above problems, this application proposes a new method and device for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras.

[0010] Traditional urban green space health status monitoring usually relies on visible light images, and the spectral information and growth status of urban green spaces are obtained through image processing and analysis. Compared with ordinary digital cameras, mobile phone digital cameras not only have high-pixel imaging capabilities, but are also compact and lightweight, easy to carry and operate. Therefore, people tend to use mobile phones for image acquisition. The present invention combines visible light image monitoring technology with mobile platforms, utilizes the high-pixel imaging capabilities of mobile phone cameras, collects image data of urban green spaces, extracts spectral information of urban green spaces through image processing and analysis, and then evaluates their growth status to achieve real-time monitoring of the health status of urban green spaces.

[0011] In summary, the present invention addresses the shortcomings of the existing technology and systematically solves the defects caused by hardware limitations, algorithm inefficiency, and platform fragmentation through three levels of innovation: hardware interaction optimization (coordination between cameras and sensors), algorithm reconstruction (matrix parallel processing and HSI model optimization), and mobile engineering implementation (memory compression and asynchronous thread technology). It achieves a technological leap from laboratory sample analysis to real-time field monitoring in urban green space monitoring, and provides a new solution for real-time and efficient monitoring of the health status of urban green spaces.

[0012] This application mainly adopts the following technical strategies: 1. Square preview frame and gyroscope vertical calibration system This method uses a SurfaceView + ImageView control combination to force the capture area into a square preview frame and incorporates a vertex alignment algorithm to eliminate edge distortion. Furthermore, a gyroscope-based dynamic calibration system ensures the camera is perpendicular to the canopy plane with an accuracy of ±1°, effectively addressing the issue of image perspective distortion caused by pitch deviation. This technology reduces image geometric error by 30% and achieves 97% area measurement accuracy.

[0013] Compared with the existing technology, this invention deeply binds gyroscope attitude data with the image acquisition interface (SurfaceView) for the first time, solving the problem that traditional mobile image acquisition relies on manual visual alignment, lacks forced geometric constraints and real-time attitude feedback. The hardware collaborative optimization technology adopted in this invention significantly improves the geometric accuracy and stability of mobile shooting.

[0014] 2. Matrix Parallel Operations and Adaptive Compression Factor This invention uses the Jama matrix library to implement point-to-point operations, replacing the traditional pixel-by-pixel traversal algorithm, reducing computational time by 60%. Furthermore, combined with bilinear interpolation downsampling (compression factors a = 2 / 4 / 8), it dynamically adjusts image resolution and reduces memory usage by 70%. This technology enables low-end devices (such as those with 2GB of RAM) to process 20-megapixel images without crashing, resolving the issues of traditional image processing, which relies on pixel-by-pixel loops and is prone to memory overflow and low efficiency on mobile devices.

[0015] Compared with the existing technology, this invention combines matrix operations (Jama library) with adaptive compression (compression factor a = 2 / 4 / 8) through lightweight algorithm design, breaking through the computing power bottleneck of mobile terminals and significantly improving image processing efficiency and device compatibility.

[0016] 3. Anti-interference throughout the entire process This method uses a 24-color standard calibration plate spatial mapping method to establish an RGB-HSI mapping relationship, eliminating the effects of ambient light on the image. By separating the luminance (I) and chrominance (H / S) channels, only H / S is retained for vegetation index calculation, reducing the standard deviation of chromaticity characteristics from 0.15 to 0.04 under light fluctuations. Simultaneously, a rainbow color linear interpolation algorithm (red to blue) is used to convert the EXG grayscale image into a pseudo-color image, increasing the human eye's sensitivity to color differences by eight times. Furthermore, forced square image acquisition combined with metadata binding (resolution, GPS coordinates, time, etc.) generates standardized data packets, reducing the visualization response time of monitoring results by 60% and achieving 100% cross-device data comparability.

[0017] Compared with existing technologies, this invention achieves full-process anti-interference, eliminating environmental interference throughout the entire process, from image acquisition (color card calibration) to processing (HSI separation) to output (normalized data), enabling stable monitoring in complex field scenarios. Traditional methods often ignore illumination interference in RGB-to-HSI conversion, rely on complex transformation formulas, and suffer from poor grayscale visualization. Heterogeneous data formats also hinder scientific comparison. By optimizing this entire process, this invention significantly improves the robustness and practicality of monitoring.

[0018] In summary, the present invention comprehensively improves the accuracy, efficiency, and stability of mobile image acquisition and processing through designs such as a square preview frame and a gyroscope vertical calibration system, matrix parallel operation and adaptive compression factor, and full-process anti-interference. It provides an efficient and reliable solution for monitoring the health status of urban green spaces and has great application value.

[0019] In order to achieve the above objectives, this application provides the following technical solutions: The first aspect of the present application provides a method for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras, the method comprising: Visible light images of urban green space canopies are collected using mobile phone cameras, and distortion correction and vertical calibration are performed on the collected images to reduce image distortion and ensure the accuracy of the shooting angle; Compress and resample images to optimize image processing efficiency; Perform denoising on the image to remove noise and preserve image details; Convert the image from RGB color space to HSI color space to eliminate the influence of lighting conditions on the image; Calculate vegetation indices, including EXG index, leaf area index and vegetation cover; The vegetation index results are displayed in pseudo-color to improve the visibility of the monitoring results; Output monitoring results, including vegetation index and pseudo-color images.

[0020] Furthermore, in the method of the present application, the process of collecting visible light images of urban green space canopies using a mobile phone camera includes: Use a square preview frame (SurfaceView + ImageView combination control) to force the shooting area to be framed and place the urban green space canopy in the center of the image; A gyroscope dynamic calibration system is used to ensure that the camera is perpendicular to the canopy plane with an accuracy of ±1°.

[0021] Furthermore, in the method of the present application, the image compression and resampling includes: The image is downsampled using bilinear interpolation and the image resolution is dynamically adjusted using an adaptive compression factor (a = 2 / 4 / 8); Optimize memory management based on matrix operations (Jama library) to avoid mobile end memory overflow caused by full pixel traversal.

[0022] Furthermore, in the method of the present application, the image noise reduction processing includes: The median filter algorithm (3×3 convolution kernel) is used to perform convolution operation on the image to remove noise and retain the texture details of urban green spaces.

[0023] Furthermore, in the method of the present application, converting the image from the RGB color space to the HSI color space includes: The RGB-HSI conversion model is established using the 24-color standard calibration plate space mapping method. The RGB-HSI conversion model is used to separate brightness (I) and chromaticity (H / S) to eliminate the influence of daytime lighting changes on color characteristics. A lightweight conversion formula is designed based on the geometric deduction method, and real-time conversion is achieved through matrix parallel computing.

[0024] Furthermore, in the present application method, the RGB-HSI conversion formula is as follows: (1) (2) (3) Among them, H is the hue that describes the color attribute of the object, S is the saturation that measures the degree to which pure color is diluted by white light, I is the intensity that measures the brightness of the color, R, G, and B are the grayscale values of the red, green, and blue bands of the image respectively, and C is the phase adjustment parameter in the hue calculation, which is used to correct the quadrant of the hue angle.

[0025] Furthermore, in the method of the present application, the calculation of the vegetation index includes: (1) EXG index calculation The calculation formula is as follows: (4) Among them, EXG stands for vegetation index, which is used for color component analysis in image processing, especially in plant recognition, to highlight the green vegetation features and effectively segment the target and background. r, g, and b are the color values after the grayscale values of the R, G, and B bands of the original image are normalized. The normalization calculation formula is: (5) (6) (7) Among them, R max , G max 、B max are the maximum grayscale values of the red, green, and blue bands of the image, respectively.

[0026] (2) Calculation of leaf area index The calculation formula is as follows: (8) Among them, LAI is the leaf area index, which is the core parameter for measuring the structure and function of vegetation canopy, a and b are localized parameters in the application software; (3) Calculation of vegetation coverage The calculation formula is as follows: (9) The total number of pixels in the image is obtained by reading the size of the image.

[0027] Furthermore, in the method of this application, the number of vegetation pixels in the vegetation coverage calculation is obtained by the following method: (1) Grayscale image conversion: convert true color image into grayscale image; (2) Grayscale histogram statistics: Use the number of pixels and the grayscale level from 0 to 255 to construct a grayscale histogram and perform grayscale frequency statistics; (3) Image segmentation: Determine the grayscale range of the corresponding vegetation pixels for image segmentation; (4) Binarization: The monitoring pixels and non-monitoring pixels are binarized, where 0 represents vegetation and 1 represents non-vegetation. The number of vegetation pixels is then counted using the binarized image.

[0028] Furthermore, in the method of the present application, the pseudo-color enhanced display of the vegetation index result includes: Design a rainbow color mapping algorithm (red→blue linear interpolation) to convert the EXG grayscale image into a pseudo-color image to enhance human eye recognition; Supports result overlay display, comparing the original image with the pseudo-color image, and dynamically marking monitoring values (EXG index, LAI, vegetation coverage).

[0029] A second aspect of the present application provides a device for monitoring the health status of urban green spaces based on visible light images from a mobile phone camera, the device comprising: An image acquisition module, used to capture visible light images of urban green space canopies using a mobile phone camera; Image preprocessing module, used to perform distortion correction, vertical calibration, compression, resampling, and noise reduction on the collected images; A color space conversion module is used to convert images from RGB color space to HSI color space to eliminate the influence of lighting conditions on the image; Vegetation index calculation module, used to calculate EXG index, leaf area index and vegetation coverage; Pseudo-color enhancement module, used to perform pseudo-color enhancement on vegetation index results to improve the visibility of monitoring results; The output module is used to output monitoring results, including vegetation index and pseudo-color images.

[0030] When the device is running, it implements the steps of the aforementioned method for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras.

[0031] A third aspect of the present application provides an electronic device, comprising: a memory and a processor; Memory: used to store computer programs; Processor: used to execute the computer program to implement the steps of the aforementioned urban green space health status monitoring method based on visible light images of mobile phone cameras.

[0032] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the aforementioned method for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras are implemented.

[0033] In summary, the urban green space health status monitoring method based on visible light images from mobile phone cameras in this application has the following advantages: (1) High-precision image acquisition and stability improvement Distortion correction and shooting accuracy optimization: Using a SurfaceView + ImageView combination control, users are forced to place the green canopy in the center of the square preview frame. Combined with a vertex alignment calibration algorithm, this ensures that the shooting target strictly matches the image coordinate system, eliminating edge stretching caused by wide-angle lens distortion, and reducing the measured edge distortion error by 35%. Based on a gyroscope dynamic feedback system (sampling frequency ≥ 100Hz), the vertical deviation between the phone's tilt angle and the canopy plane is calculated in real time, and the user is prompted to make adjustments through the UI interface to achieve a vertical shooting accuracy of within ±1° and avoid image perspective distortion. Experiments have shown that this solution reduces the area measurement error of the monitored area from 12% of traditional methods to within 3%, making it suitable for high-precision geometric data scenarios such as urban green canopy coverage.

[0034] (2) Efficient computing and device compatibility optimization Image processing and memory optimization: Using bilinear interpolation downsampling (compression factors a = 2 / 4 / 8) to dynamically adjust resolution, combined with an adaptive compression algorithm (automatically selecting the a value based on image texture complexity), the processing data size of a single image is compressed from 12MB (4K resolution) to 0.5-3MB, while preserving canopy detail, reducing memory usage by 70%. The Jama matrix operation library enables pixel-level parallel computation, replacing traditional per-pixel loops. This reduces EXG index calculation time from 2.1 seconds (1080P image) to 0.3 seconds (measured on a Redmi Note 10). This algorithm supports low-end Android devices (such as those with 2GB of RAM) to process 20-megapixel images without lag, and is compatible with over 95% of mobile phone models, significantly improving the algorithm's universality.

[0035] (3) Enhanced lighting robustness and anti-interference capabilities Color model optimization and improved light adaptability: An RGB-HSI mapping relationship is established based on a 24-color standard calibration plate, and a lightweight conversion formula is designed to avoid the high computational load of traditional iterative methods, achieving a single-frame conversion time of ≤50ms. The luminance (I) channel and the chrominance (H / S) channel are separated, and only the H / S channel is retained in the HSI model for vegetation index calculation, eliminating brightness interference caused by light variations (for example, the fluctuation rate of vegetation chromaticity characteristics under strong midday sunlight is reduced from 25% to 7%). Under various lighting conditions, such as cloudy and bright days, the standard deviation of the EXG index is reduced from 0.15 (compared to the traditional RGB model) to 0.04, ensuring reliable monitoring results all day long.

[0036] (4) Multi-dimensional monitoring and visual decision support Multi-model collaborative computing and visualization enhancement: The EXG index is used to quickly segment vegetation and non-vegetation areas with an accuracy of ≥90%; the LAI index fits canopy density through localized parameters and has a correlation R with the measurement results of professional instruments (such as LAI-2200). 2 = 0.89; the coverage model automatically determines thresholds based on grayscale histogram peak and valley analysis, avoiding manual bias. A rainbow color linear interpolation algorithm (red→blue mapping) was designed to convert EXG grayscale images into 256 levels of pseudo-color, increasing the human eye's sensitivity to color differences by eight times (JND index testing). The system supports overlay and comparison of original and pseudo-color images, dynamically annotating abnormal areas (e.g., red marking for coverage <30%), helping users quickly locate areas of sparse canopy. In a test of 50 urban green spaces, the monitoring results achieved 92% consistency with manual field surveys, and the results visualization interface reduced decision-making response time by 60%.

[0037] (5) Standardized data collection and scientific research adaptability Data Collection and Metadata Management: By maintaining a fixed preview frame ratio (1:1) and using an image cropping algorithm, standard 1024×1024 pixel images are output, eliminating scale deviations caused by differences in mobile phone sensor sizes (e.g., the spatial resolution difference between iPhone and Huawei P series images is reduced from ±15% to zero). Parameters such as capture time, GPS coordinates, phone model, and compression factor are automatically recorded, generating a structured data package (JSON format) that can be directly imported into GIS platforms or statistical analysis software (such as ArcGIS and Python Pandas). This supports direct comparison of data across devices and time series, such as analyzing changes in canopy cover of the same green space during rainy and dry seasons, providing a standardized data source for urban ecological research.

[0038] In summary, the present invention has comprehensively improved the accuracy, efficiency and reliability of urban green space health status monitoring and reduced monitoring costs through technical innovations such as high-precision image acquisition, efficient computing optimization, enhanced lighting robustness, multi-dimensional monitoring and visualization support, and standardized data acquisition. In addition, the present invention also makes full use of the portability of mobile phones to realize real-time and dynamic collection and analysis of monitoring data, providing efficient and scientific technical support for the refined management of urban greening.

[0039] Other features and advantages of this application will be described in detail in the following description, or will be understood through the implementation of the relevant technical solutions of this application. The objectives and other advantages of this application can be achieved through the technical features and technical means clearly indicated in the description, claims, and drawings, and obtained through the implementation of these technical contents. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] To more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings involved in the description of the embodiments. It should be noted that the drawings only illustrate some of the embodiments of the present application. For those skilled in the art, other relevant drawings can be derived from these drawings without engaging in creative work.

[0041] Figure 1 This is the overall implementation flow chart of the urban green space health status monitoring method based on visible light images of mobile phone cameras in this application.

[0042] Figure 2 This is an example diagram of the image acquisition method in this application method.

[0043] Figure 3 This is the flow chart of vegetation pixel statistics in this application method.

[0044] Figure 4 This is a diagram showing the effect of pseudo-color conversion of a grayscale image in the method of this application (the left side of the figure is a grayscale image, and the right side is a pseudo-color image after conversion).

[0045] Figure 5 This is the effect diagram of the mobile phone image monitoring interface in this application method (the left side of the figure is the calculated monitoring result, and the right side is the re-photographed monitoring result).

[0046] Figure 6 This is a structural diagram of the urban green space health status monitoring device based on visible light images from mobile phone cameras in this application.

[0047] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] In this document, the term "including" and any variations thereof (such as "including," "comprising," etc.) are open-ended expressions and should be understood as meaning "including but not limited to," meaning that the listed contents are not exhaustive and may include other contents not explicitly mentioned. The term "based on" should be understood as meaning "based at least in part on," meaning that the basis or condition referred to may not be the only factor and may also involve other relevant factors. The term "one embodiment" should be understood as meaning "at least one embodiment," meaning that the described embodiment is not the only possible implementation method and that other similar embodiments may exist.

[0050] In this application, the terms "a" and "a plurality" are used to modify related elements or features in an illustrative, non-restrictive manner. Unless the context clearly indicates otherwise, "a" should be understood as meaning "at least one," and "a plurality" should be understood as meaning "at least two." Those skilled in the art should interpret these terms appropriately based on the semantics and logical relationships of the context to ensure that they encompass the possibility of "one or more."

[0051] Figure 1 The following is the overall implementation process of the urban green space health status monitoring method based on visible light images from mobile phone cameras provided by this application, including the following steps: S1. Use a mobile phone camera to capture visible light images of urban green space canopies. Perform distortion correction and vertical calibration on the captured images to reduce image distortion and ensure the accuracy of the shooting angle. S2. compress and resample the image to optimize image processing efficiency; S3. performing denoising on the image to remove noise and preserve image details; S4. Convert the image from the RGB color space to the HSI color space to eliminate the influence of lighting conditions on the image; S5. Calculate vegetation indices, including EXG index, leaf area index, and vegetation cover; S6. Enhance the display of vegetation index results with pseudo-color to improve the visibility of monitoring results; S7. Output monitoring results, including vegetation index and pseudo-color image.

[0052] In order to more clearly illustrate the technical solution of the present application, the following will further illustrate it through embodiments of specific scenarios.

[0053] The implementation process of this application's urban green space health status monitoring method based on visible light images from mobile phone cameras is as follows: Step 1: Mobile phone camera distortion correction like Figure 2 As shown, first select a square area, place your phone at a certain height above the urban green space canopy, keep the phone level with the canopy, aim the camera at the center of the square monitoring area, and finally click a button to take a photo. This method can accurately measure the area of the monitoring area. Aligning the vertices of the preview image with the vertices of the square monitoring area ensures operational accuracy. The image sampling method of the present invention can reduce image distortion and accurately measure the range of image acquisition.

[0054] The implementation of this solution is as follows: (1) Design a square preview frame (SurfaceView + ImageView combination control) to force users to place the urban green space in the center of the image and reduce the effect of lens edge distortion.

[0055] (2) A vertical shooting angle calibration algorithm is used to provide real-time feedback on the phone’s posture through gyroscope data to ensure that the camera is perpendicular to the canopy plane of the urban green space.

[0056] Step 2: High-resolution image compression and resampling Mobile phone images have higher resolution than satellite images. However, high-resolution image data consumes more memory and has more pixels, which can lead to longer image processing times and application crashes. Mobile devices have relatively low computing power for big data. Appropriately lowering image resolution can reduce the amount of data computation and increase image processing speed.

[0057] Each monitoring image has a spatial resolution, determined by both the camera's image height and the camera's pixel count. Explorations in monitoring the growth of urban green spaces on mobile platforms have shown that image monitoring results vary with both the camera's image height and the camera's pixel count, contributing significantly to the lack of stability in mobile phone camera monitoring results. Similar issues are also evident in remote sensing image monitoring, where the same feature appears differently in images with different spatial resolutions.

[0058] The implementation of this solution is as follows: Digital images can generally be expressed using matrices. Traditional image algebraic operations are performed pixel by pixel. This invention converts a single band of an image into a pixel matrix and performs point-to-point operations on the matrix. This changes the traditional pixel-by-pixel calculation method to parallel operations on corresponding matrix points. This significantly speeds up image processing efficiency on mobile devices and solves the problem of system crashes caused by time-consuming image operations. The specific steps are as follows: (1) Use bilinear interpolation to downsample the image (e.g., compress the resolution to 1 / 4 of the original image), combined with an adaptive compression factor (a = 2 / 4 / 8) to balance processing speed and image distortion rate.

[0059] (2) Optimize memory management based on matrix operations (Jama library) to avoid mobile terminal memory overflow caused by full pixel traversal.

[0060] Step 3: Image Noise Reduction During image acquisition and transmission, imaging sensors are affected by environmental conditions and the sensor itself, generating image noise. Image noise is a major factor affecting image quality and can impact image analysis and processing results. Image denoising aims to reduce noise while preserving as much important image information as possible. Common methods include spatial and frequency domain filtering. However, frequency domain filtering is not suitable for mobile phone applications because it requires image transformation and is computationally expensive.

[0061] The implementation of this solution is as follows: Image denoising is achieved by using spatial domain filtering and various smoothing templates to perform convolution operations on the image.

[0062] The median filter algorithm (3×3 convolution kernel) is used to remove noise and retain the texture details of urban green spaces.

[0063] Step 4: Efficient RGB-HSI conversion Original images captured by mobile phone cameras use the RGB color model for color representation. Each color appears in the red, green, and blue primary spectral components based on the principle of the three primary colors. This is a hardware-oriented color acquisition and display method. Image processing software typically uses the HSI color model (hue, saturation, and intensity), which represents colors more closely aligned with the visual and psychological characteristics of human observation and perception of color.

[0064] Because RGB is highly correlated, all three channels contain brightness information, making it susceptible to the effects of ambient lighting. However, the HSI space is unaffected by daytime lighting variations. Therefore, converting images from the RGB color model to the HSI model effectively mitigates this effect, making the processed monitoring results more realistic and effective, eliminating interference from uncertainties in the wild.

[0065] The implementation of this solution is as follows: The spatial mapping method of the standard color card (24-color calibration plate) is used to establish the RGB-HSI conversion model to eliminate the interference of lighting conditions.

[0066] (1) A lightweight conversion formula is designed based on the geometric deduction method, and matrix parallel computing is used to replace pixel-by-pixel operations to achieve real-time conversion.

[0067] (2) The HSI model is used to separate brightness (I) and chromaticity (H / S) to eliminate the influence of daytime lighting changes on color characteristics.

[0068] The specific formula is as follows: (1) (2) (3) Among them, H is the hue that describes the color attribute of the object, S is the saturation that measures the degree to which pure color is diluted by white light, I is the intensity that measures the brightness of the color, R, G, and B are the grayscale values of the red, green, and blue bands of the image respectively, and C is the phase adjustment parameter in the hue calculation, which is used to correct the quadrant of the hue angle.

[0069] Step 5: Calculation of vegetation index The present invention adopts the following three vegetation index calculation methods: (1) EXG Index Model In visible light images, healthy vegetation appears green. In a single-band grayscale comparison, the green band is larger than the red and blue bands. This paper uses EXG as a vegetation index. Based on the spectral characteristics of vegetation color, various color indices are constructed using the red, green, and blue bands. The EXG index, also known as the Excess Green Index, is effective for automatically separating urban green spaces from soil. The calculation formula is as follows: (4) Among them, EXG stands for vegetation index, which is used for color component analysis in image processing, especially in plant recognition, to highlight the green vegetation features and effectively segment the target and background. r, g, and b are the color values after the grayscale values of the R, G, and B bands of the original image are normalized. The normalization calculation formula is: (5) (6) (7) Among them, R max , G max 、B max are the maximum grayscale values of the red, green, and blue bands of the image, respectively.

[0070] (2) Leaf area index model The leaf area index (LAI) is the sum of the single-sided surface areas of all leaves per unit area of ground surface and is one of the most fundamental parameters for characterizing vegetation canopy structure. The LAI can be obtained indirectly through image information. Different color indices have good correlations with the LAI of urban green spaces. We found that the EXG index has the highest correlation and is relatively stable with urban green spaces throughout their growth period. Therefore, this paper uses the EXG index to derive the LAI. The calculation formula is as follows: (8) Among them, LAI is the leaf area index, which is the core parameter for measuring the structure and function of vegetation canopy, and a and b are localized parameters in the application software.

[0071] (3) Vegetation coverage model Vegetation coverage refers to the ratio of the vertical projection area of the vegetation canopy to the total soil area. It is a quantitative parameter used to describe the vegetation canopy and soil, and is one of the important parameters for measuring the state of the crop canopy. The main methods for measuring vegetation coverage include sampling method, instrument method, regression model method, vegetation index method, pixel decomposition model method, etc. The present invention obtains vegetation coverage by calculating the percentage of the number of pixels containing vegetation in the image in the pixels of the entire image, automatically determines the vegetation pixel threshold based on the grayscale histogram peak and valley analysis, and counts the vegetation proportion by binarizing the image. The specific calculation formula is as follows: (9) The total number of pixels in the image is obtained by reading the image size, and the number of vegetation pixels is obtained by the following method: Figure 3 As shown: Statistical methods for vegetation pixels: 1) Grayscale image conversion: convert a true color image into a grayscale image; 2) Grayscale histogram statistics: use the number of pixels and the grayscale level of 0~255 to construct a grayscale histogram for grayscale frequency statistics. In the image of the crop canopy, vegetation is the monitored object, and the number of vegetation pixels occupies the vast majority of the entire image, showing an obvious peak in the grayscale histogram. Therefore, the grayscale range expressed by the vegetation pixels can be determined; 3) Image segmentation: determine the corresponding vegetation pixel grayscale range for image segmentation; 4) Binarization processing: perform binarization processing on the monitoring pixels and non-monitoring pixels, that is, 0 represents vegetation and 1 represents non-vegetation, and then use the binarized image to count the number of vegetation pixels, and finally perform a ratio operation with the total number of pixels to obtain the vegetation coverage of the image.

[0072] Step 6: Pseudo-color enhanced display In this invention, the main idea of grayscale image pseudo color conversion is to convert the 0-255 values corresponding to the grayscale image into rainbow colors: red, orange, yellow, green, cyan, and blue, respectively, and realize the correspondence between rainbow colors and R, G, and B values through linear interpolation, thereby realizing the conversion of grayscale image to pseudo color image, thereby enhancing the visibility of monitoring results. The effect achieved by this solution is as follows: Figure 4 shown.

[0073] The implementation of this solution is as follows: (1) Design a rainbow color mapping algorithm (red→blue linear interpolation) to convert the EXG grayscale image into a pseudo-color image to enhance the human eye's recognition.

[0074] (2) Supports overlay display of results (comparison between original image and pseudo-color image) and dynamic annotation of monitoring values (EXG index, LAI, vegetation coverage).

[0075] Step 7: Implement mobile phone image monitoring Mobile phone image monitoring module, first you need to open the mobile phone camera interface, click the camera frame to focus on the urban green canopy image, click the camera button, get the image and camera time in the preview frame and jump to the image monitoring interface, such as Figure 5 As shown in the left picture, check the photo results and click the button below to calculate the monitoring results. The color matrix of the monitoring image can be read to perform band calculations, such as Figure 5 As shown in the right picture, the three monitoring indicators of the urban green space canopy, EXG index, LAI, and vegetation coverage are obtained. At the same time, the monitoring result image can be viewed in the picture preview above. Users can use the Android phone they carry with them to monitor the growth of urban green space and achieve the effect as follows Figure 5 shown.

[0076] Figure 6 The present application shows a device for monitoring the health of urban green spaces based on visible light images from a mobile phone camera, comprising: An image acquisition module, used to capture visible light images of urban green space canopies using a mobile phone camera; Image preprocessing module, used to perform distortion correction, vertical calibration, compression, resampling, and noise reduction on the collected images; A color space conversion module is used to convert images from RGB color space to HSI color space to eliminate the influence of lighting conditions on the image; Vegetation index calculation module, used to calculate EXG index, leaf area index and vegetation coverage; Pseudo-color enhancement module, used to perform pseudo-color enhancement on vegetation index results to improve the visibility of monitoring results; The output module is used to output monitoring results, including vegetation index and pseudo-color images.

[0077] When the above device is running, the steps of the urban green space health status monitoring method based on visible light images of mobile phone cameras disclosed in this application are implemented.

[0078] The flowcharts and block diagrams in the accompanying drawings illustrate possible implementations of the apparatus, methods, and computer program products according to various embodiments of the present application, including architecture, functions, and operations. In these figures, each box may represent a module, a program segment, or a portion of a code, which contains one or more executable instructions for implementing a specified logical function. It should be noted that each box in the block diagram and / or flowchart, and the combination of these boxes, can be implemented using a dedicated hardware-based system to implement the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0079] like Figure 7 As shown, an embodiment of the present application further discloses an electronic device, comprising: a processor 310, a communication interface 320, a memory 330 for storing a computer program executable by the processor, and a communication bus 340. The processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 executes the executable computer program to implement the steps of the above-mentioned method for monitoring the health status of urban green spaces based on visible light images from a mobile phone camera.

[0080] It is understood that, in addition to the memory and processor, the electronic device may also include an input device (e.g., a keyboard), an output device (e.g., a display), and other communication modules. These input devices, output devices, and other communication modules all communicate with the processor via an I / O interface (i.e., an input / output interface).

[0081] The operation of the present application can be implemented by writing computer program code using one or more programming languages or a combination thereof. The programming languages include but are not limited to the following types: Object-oriented programming languages, such as Java, Smalltalk, C++, etc.; A conventional procedural programming language, such as "C" or a similar programming language.

[0082] The execution methods of the program code include but are not limited to: Executes entirely on the user's computer; Partially executed on the user's computer and partially on a remote computer; Executed as a standalone software package; Executes entirely on the remote computer or server.

[0083] In scenarios involving a remote computer, the remote computer can be connected to the user's computer via any type of network, including but not limited to a local area network (LAN) or a wide area network (WAN). Additionally, the remote computer can be connected to an external computer via an Internet service provider, such as the Internet.

[0084] Furthermore, the present application also discloses a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device can execute the various steps of the urban green space health status monitoring method based on visible light images of mobile phone cameras disclosed in the present application.

[0085] In the context of this application, computer-readable storage media refers to tangible media that can store computer program code and related data. Specific examples include, but are not limited to, the following: (1) Portable computer disk: A removable magnetic storage medium such as a floppy disk.

[0086] (2) Hard disk: includes fixed storage devices such as mechanical hard disks and solid-state hard disks.

[0087] (3) Random Access Memory (RAM): Volatile storage medium used for temporary storage of data and program code.

[0088] (4) Read-only memory (ROM): A non-volatile storage medium used to store fixed programs and data.

[0089] (5) Erasable Programmable Read-Only Memory (EPROM) or Flash Memory: A non-volatile storage medium that supports multiple erasing and programming.

[0090] (6) Fiber optic storage device: storage medium based on fiber optic technology.

[0091] (7) Compact Disc Read-Only Memory (CD-ROM): A read-only medium that stores data in the form of an optical disc.

[0092] (8) Optical storage devices: storage media based on optical principles, such as DVDs and Blu-ray discs.

[0093] (9) Magnetic storage devices: storage media based on magnetic principles, such as magnetic tapes and disks.

[0094] (10) Any suitable combination of the above: for example, combining multiple storage media to meet different storage requirements.

[0095] These computer-readable storage media can be used to store the program code and related data described in this application to support the operation of the program and the persistent storage of data.

[0096] In particular, according to an embodiment of the present application, the process described in the flowchart can be implemented as a computer software program. For example, an embodiment of the present application relates to a computer program product, which includes a computer program carried on a non-transitory computer-readable medium. The computer program contains program code for executing the urban green space health status monitoring method based on visible light images of mobile phone cameras disclosed in this application. When the computer program is executed by a processing device, it can realize the above-mentioned functions defined in the embodiments of the present application.

[0097] Although the above discussion contains several specific implementation details, these details should not be interpreted as limiting the scope of this application. The above description is only a preferred embodiment of the present application and an illustration of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features. At the same time, this application should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concepts.

[0098] Those skilled in the art should also understand that they may modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein with equivalents, without departing from the spirit and scope of the technical solutions of the embodiments of the present application. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the core spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras, characterized in that: The method comprises: Visible light images of urban green space canopies are collected using mobile phone cameras, and distortion correction and vertical calibration are performed on the collected images to reduce image distortion and ensure the accuracy of the shooting angle; Compress and resample images; Perform denoising on the image to remove noise and preserve image details; Convert the image from RGB color space to HSI color space to eliminate the influence of lighting conditions on the image; Calculate vegetation indices, including EXG index, leaf area index and vegetation cover; The vegetation index results are displayed in pseudo-color to improve the visibility of the monitoring results; Output monitoring results, including vegetation index and pseudo-color images.

2. The monitoring method according to claim 1, characterized in that: The method of collecting visible light images of urban green space canopies by using a mobile phone camera includes: Use a square preview frame to force the shooting area to be framed, placing the urban green space canopy in the center of the image; A gyroscope dynamic calibration system is used to ensure that the camera is perpendicular to the canopy plane with an accuracy of ±1°.

3. The monitoring method according to claim 1, characterized in that The compressing and resampling of the image includes: The image is downsampled using bilinear interpolation and the image resolution is dynamically adjusted in combination with an adaptive compression factor; Optimize memory management based on matrix operations to avoid mobile end memory overflow caused by full pixel traversal.

4. The monitoring method according to claim 1, characterized in that: The image noise reduction process includes: The median filter algorithm is used to perform convolution operation on the image to remove noise and retain the texture details of urban green spaces.

5. The monitoring method according to claim 1, characterized in that: The image is converted from the RGB color space to the HSI color space, comprising: The RGB-HSI conversion model is established using the 24-color standard calibration plate space mapping method. The RGB-HSI conversion model is used to separate brightness and chromaticity to eliminate the influence of daytime lighting changes on color characteristics. A lightweight conversion formula is designed based on the geometric deduction method, and real-time conversion is achieved through matrix parallel computing.

6. The monitoring method according to claim 5, characterized in that: The RGB-HSI conversion formula is as follows: (1) (2) (3) Where H is hue, S is saturation, I is intensity, R, G, and B are the grayscale values of the red, green, and blue bands of the image, respectively. C is the phase adjustment parameter in hue calculation, which is used to correct the quadrant of the hue angle.

7. The monitoring method according to claim 1, characterized in that: The calculating of vegetation index comprises: (1) EXG index calculation The calculation formula is as follows: (4) Among them, EXG represents the vegetation index, r, g, and b are the color values of the R, G, and B bands of the original image after normalization of the grayscale values. The normalization calculation formula is: (5) (6) (7) Among them, R max , G max 、B max are the maximum grayscale values of the red, green and blue bands of the image respectively; (2) Calculation of leaf area index The calculation formula is as follows: (8) Where LAI is the leaf area index, a and b are localized parameters in the application software; (3) Calculation of vegetation coverage The calculation formula is as follows: (9) The total number of pixels in the image is obtained by reading the size of the image.

8. The monitoring method according to claim 7, characterized in that: The number of vegetation pixels in vegetation coverage calculation is obtained by the following method: (1) Grayscale image conversion: convert true color image into grayscale image; (2) Grayscale histogram statistics: Use the number of pixels and the grayscale level from 0 to 255 to construct a grayscale histogram and perform grayscale frequency statistics; (3) Image segmentation: Determine the grayscale range of the corresponding vegetation pixels for image segmentation; (4) Binarization: The monitoring pixels and non-monitoring pixels are binarized, where 0 represents vegetation and 1 represents non-vegetation. The number of vegetation pixels is then counted using the binarized image.

9. The monitoring method according to claim 1, characterized in that: The pseudo-color enhanced display of the vegetation index result includes: Design a rainbow color mapping algorithm to convert the EXG grayscale image into a pseudo-color image to enhance human eye recognition; It supports result overlay display, compares the original image with the pseudo-color image, and dynamically annotates monitoring values, including EXG index, LAI, and vegetation coverage.

10. A device for monitoring the health status of urban green spaces based on visible light images from mobile phone cameras, characterized in that: The device comprises: An image acquisition module, used to capture visible light images of urban green space canopies using a mobile phone camera; Image preprocessing module, used to perform distortion correction, vertical calibration, compression, resampling, and noise reduction on the collected images; A color space conversion module is used to convert images from RGB color space to HSI color space to eliminate the influence of lighting conditions on the image; Vegetation index calculation module, used to calculate EXG index, leaf area index and vegetation coverage; Pseudo-color enhancement module, used to perform pseudo-color enhancement on vegetation index results to improve the visibility of monitoring results; The output module is used to output monitoring results, including vegetation index and pseudo-color images.