Slope protection vegetation optimization system and method based on machine vision

Through the machine vision-based slope protection vegetation optimization system, the particle swarm algorithm is used to optimize the fast fuzzy C-mean clustering algorithm, analyze and evaluate vegetation health, and solve the problem of improper slope protection vegetation selection in the existing technology, and achieve more efficient vegetation growth and slope stability.

CN119723324APending Publication Date: 2025-03-28CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411597571.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

It is difficult for the prior art to choose suitable slope protection vegetation according to local conditions, and it cannot guarantee the growth quality and long-term survival of vegetation, which in turn affects the ecological environment and stability of the slope.

Method used

Using a machine vision-based slope protection vegetation optimization system, through image acquisition, preprocessing, analysis and data processing modules, the particle swarm algorithm is used to optimize the fast fuzzy C-mean clustering algorithm, analyze image data, evaluate the health of vegetation and select the most suitable vegetation.

Benefits of technology

The machine vision technology has been used to select slope protection vegetation according to local conditions, which has improved the growth quality and long-term survival rate of vegetation, and enhanced the ecological environment and stability of the slope.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723324A_ABST
    Figure CN119723324A_ABST
Patent Text Reader

Abstract

The invention discloses a machine vision-based slope protection vegetation optimization system. The system comprises an image acquisition module, an image preprocessing module, an image analysis module and a data processing module, the image acquisition module is used for acquiring an original image of a target slope according to a preset frequency; the target slope comprises a preset type and number of to-be-selected vegetation; the image preprocessing module is used for slicing the original image according to the type of vegetation to be selected to obtain a slice image set; the image analysis module is used for analyzing the slice image set through particle swarm optimization algorithm optimization fast fuzzy C-means clustering to obtain first data; the first data comprises preset growth parameter data of all to-be-selected vegetation; and the data processing module is used for performing health degree evaluation on all the to-be-selected vegetation according to the first data to obtain second data, and selecting the to-be-selected vegetation with the highest health degree as the slope protection vegetation of the target slope according to the second data. The invention further discloses a slope protection vegetation optimization method based on machine vision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of slope protection vegetation optimization, and in particular to a slope protection vegetation optimization system and method based on machine vision. Background Art

[0002] Under engineering disturbance, exposed slopes are inevitable, and vegetation slope protection has become the most direct and effective new means of treating exposed slopes. Slope protection vegetation can form a good ecological structure, thereby effectively resolving the contradiction between traditional protection measures and ecological environmental protection. Exposed slope soil and water can provide basic conditions for the growth of slope protection vegetation. Slope protection vegetation can create a better ecological environment for exposed slopes, reduce soil permeability and reduce the infiltration rate of rainwater. The huge root network of slope protection vegetation can improve the soil structure.

[0003] Reasonable selection of slope protection vegetation is a prerequisite for regreening exposed slopes and improving the stability of exposed slopes. However, for the selection of slope protection vegetation, most of the existing studies directly select from commonly used slope protection vegetation, and do not configure slope protection vegetation according to local conditions, and the growth quality of slope protection vegetation cannot be guaranteed. Slope protection plants selected and configured by existing methods usually cannot survive for a long time, and thus cannot form a good ecological environment with the slope. Machine vision uses machines to simulate the visual function of the eye, establishes the correspondence between three-dimensional scenes and two-dimensional images through the software and hardware of the machine, and then effectively captures visual information and makes the visual information more intuitive. Machine vision has the characteristics of real-time, automation and high precision, and can realize the perception and recognition of the objective world. It is widely used in defect detection, food sorting and crop identification, but it is rarely used in the field of slope protection vegetation optimization.

[0004] In summary, a new technical solution is urgently needed to solve the technical problem of how to select slope protection vegetation according to local conditions through machine vision technology. Summary of the invention

[0005] The present invention provides a machine vision-based slope protection vegetation optimization system and method, which are used to solve the technical problem of how to select slope protection vegetation according to local conditions through machine vision technology.

[0006] To achieve the above-mentioned purpose, the present invention provides a slope protection vegetation optimization system based on machine vision, including an image acquisition module, an image preprocessing module, an image analysis module and a data processing module;

[0007] The image acquisition module is used to acquire the original image of the target slope at a preset frequency and send the original image to the image preprocessing module; the target slope includes the vegetation to be selected of preset types and quantities;

[0008] The image preprocessing module is used to receive the original image, slice the original image according to the type of vegetation to be selected, obtain a slice image set, and send the slice image set to the image analysis module;

[0009] The image analysis module is used to receive a slice image set, analyze the slice image set by optimizing fast fuzzy C-means clustering through a particle swarm algorithm, obtain first data, and send the first data to the data processing module; the first data includes preset growth parameter data of all vegetation to be selected;

[0010] The data processing module is used to receive the first data, and evaluate the health of all candidate vegetation according to the first data to obtain second data, and select the candidate vegetation with the highest health as the slope protection vegetation of the target slope according to the second data.

[0011] Preferably, the image acquisition module includes a lighting unit, a power supply unit, an image acquisition unit and a support unit;

[0012] The power supply unit is used to provide power to the lighting unit and the image acquisition unit; the lighting unit is used to provide a light source; the support unit is used to fix the lighting unit, the power supply unit and the image acquisition unit;

[0013] The image acquisition unit is used to acquire the original image of the target slope at a preset frequency and send the original image to the image preprocessing module; the original image includes time information.

[0014] Preferably, the image preprocessing module includes an image reading unit, an image slicing unit and a brightness adaptation unit;

[0015] The image reading unit is used to receive the original image; the image slicing unit is used to slice the original image according to the type of vegetation to be selected to obtain a sub-image set; the image in the sub-image set includes type information;

[0016] The brightness adaptation unit is used to process the influence of uneven illumination of the images in the sub-image set, obtain a slice image set, and send the slice image set to the image analysis module.

[0017] Preferably, analyzing the slice image set by optimizing fast fuzzy C-means clustering by particle swarm algorithm includes:

[0018] Step 1: Obtain the resolution of a single slice image in the slice image set, convert the slice image from the RGB color space to the Lab space, and obtain the Lab pixel matrix; extract the data in the a channel and b channel of the Lab space respectively, flatten the data of the a channel and b channel, and then merge the flattened a channel and b channel data in the horizontal direction to obtain the first matrix x[n]; convert the data of the first matrix x[n] to the frequency domain through fast Fourier transform to obtain the second matrix X[k]:

[0019]

[0020] Where x[n] represents the value of the original discrete-time signal at sample index n; k represents the frequency index variable in the frequency domain; N represents the total number of sample points; n represents the sample index variable;

[0021] Step 2: Set the parameters of the particle swarm optimization fast fuzzy C-means algorithm, initialize the particle position and velocity, and the position of each particle represents a group of cluster centers; use the objective function of the fast fuzzy C-means algorithm as the fitness function; the objective function calculates the objective function value according to the given cluster center;

[0022] Step 3: Iteratively optimize the fast fuzzy C-means algorithm through the PSO algorithm, including:

[0023] use Update the particle's speed and position, calculate the new fitness value, if the new fitness value is less than the individual's best fitness value, then update the individual's best position and fitness value, include:

[0024]

[0025] in, is the velocity vector of the ith particle at the t+1th time; w is the inertia weight; is the velocity vector of the ith particle at the tth time; c1 and c2 are learning factors, usually non-negative constants; rand() is a random number between (0, 1); pbest i is the best individual position found by the i-th particle so far; is the position vector of the ith particle at the ith iteration; gbest is the global best position found for the entire particle; The position vector of the i-th particle at the i-th iteration.

[0026] Extract the cluster center from the optimized particle position, and initialize the difference matrix between the sample and the cluster center in the frequency domain to calculate the similarity distance between the sample and the cluster center, including:

[0027]

[0028] Among them, d ij represents the similarity distance between the i-th sample and the j-th cluster center in the frequency domain; A represents the sample data matrix after fast Fourier transformation; C represents the cluster center matrix; A ik represents the element in the i-th row and k-th column of matrix A; C jk represents the element in the jth row and the kth column in the matrix C; m represents the frequency domain feature dimension;

[0029] Update the membership matrix, which can be expressed by the following relationship:

[0030]

[0031] Among them, c represents the clustering category; m represents the fuzzy index; d ij Represents the similarity distance from data point i to cluster center j; d ik Represents the similarity distance from data point i to cluster center k; u ij Indicates the degree of membership of the i-th data to the j-th cluster center;

[0032] Check whether it converges, which can be expressed by the following relationship:

[0033] ||U new -U||<ε

[0034] Among them, U new represents the new membership matrix obtained in the current iteration; U represents the membership matrix of the previous iteration; ε represents the convergence threshold;

[0035] If it does not converge, iterate again; if it converges, the loop ends, and the average value of the green category membership is used as the threshold. A mask is generated according to the threshold to obtain the pixel points belonging to the green category;

[0036] Step 4: Calculate the preset growth parameter data of all selected vegetation based on the green category pixels, including:

[0037] Calculate vegetation coverage F:

[0038]

[0039] Among them, N represents the number of green pixels, and M represents the total pixels of the target slope;

[0040] Connected region analysis is performed to calculate the seed germination rate GR, which can be expressed by the following relationship:

[0041]

[0042] Among them, n represents the number of connected domains of the slice image, and s represents the number of seeds of the slope protection vegetation;

[0043] Get the number of pixels in each connected area and multiply it by the actual area represented by each pixel to calculate the vegetation growth uniformity S, which is used to measure the discreteness of the vegetation area dataset, including:

[0044]

[0045] in, represents the average vegetation area, A irepresents the area of ​​the i-th plant in the slice image;

[0046] The first sub-data is obtained according to the vegetation coverage F, the seed germination rate GR and the vegetation growth uniformity S;

[0047] All slice images in the slice image set are processed to obtain first sub-data of all slice images, and first data are obtained according to the first sub-data of all slice images.

[0048] Preferably, the health of all the selected vegetation is evaluated according to the first data to obtain the second data including:

[0049] According to the first data, the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of each type of vegetation to be selected over time are obtained;

[0050] According to the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of various types of vegetation to be selected over time, the fuzzy comprehensive evaluation method is used to evaluate the vegetation to be selected, and the second data G is obtained:

[0051] M=V·T

[0052] G=V'·S T

[0053] Among them, M is the mathematical model of fuzzy comprehensive evaluation; V is the weight vector; T is the evaluation matrix; G is the comprehensive evaluation result, that is, the second data; V' is the normalized weight vector; S is the median obtained according to the comment level.

[0054] The present invention also provides a slope protection vegetation optimization method based on machine vision. Based on the system of the present invention, the method includes:

[0055] The original image of the target slope is collected by the image acquisition module at a preset frequency, and the original image is sent to the image preprocessing module; the target slope includes vegetation of preset types and quantities to be selected;

[0056] The original image is received through the image preprocessing module, the original image is sliced ​​according to the type of vegetation to be selected to obtain a slice image set, and the slice image set is sent to the image analysis module;

[0057] The image analysis module receives the slice image set, analyzes the slice image set by optimizing the fast fuzzy C-means clustering by the particle swarm algorithm, obtains the first data, and sends the first data to the data processing module; the first data includes the preset growth parameter data of all the vegetation to be selected;

[0058] The first data is received through the data processing module, and the health of all candidate vegetation is evaluated according to the first data to obtain second data, and the candidate vegetation with the highest health is selected as the slope protection vegetation of the target slope according to the second data.

[0059] Preferably, the image acquisition module acquires the original image of the target slope at a preset frequency, and sends the original image to the image preprocessing module, including

[0060] The lighting unit and the image acquisition unit are provided with power by the power supply unit; the light source is provided by the lighting unit; the lighting unit, the power supply unit and the image acquisition unit are fixed by the support unit;

[0061] The original image of the target slope is collected by the image collection unit at a preset frequency, and the original image is sent to the image preprocessing module; the original image includes time information.

[0062] Preferably, receiving the original image through the image preprocessing module, slicing the original image according to the type of vegetation to be selected to obtain a slice image set, and sending the slice image set to the image analysis module includes:

[0063] The original image is received by the image reading unit; the image slicing unit slices the original image according to the type of vegetation to be selected to obtain a sub-image set; the images in the sub-image set include type information;

[0064] The brightness adaptation unit processes the influence of uneven illumination of the images in the sub-image set to obtain a slice image set, and the slice image set is sent to the image analysis module.

[0065] Preferably, analyzing the slice image set by optimizing fast fuzzy C-means clustering by particle swarm algorithm includes:

[0066] Step 1: Obtain the resolution of a single slice image in the slice image set, convert the slice image from the RGB color space to the Lab space, and obtain the Lab pixel matrix; extract the data in the a channel and b channel of the Lab space respectively, flatten the data of the a channel and b channel, and then merge the flattened a channel and b channel data in the horizontal direction to obtain the first matrix x[n]; convert the data of the first matrix x[n] to the frequency domain through fast Fourier transform to obtain the second matrix X[k]:

[0067]

[0068] Where x[n] represents the value of the original discrete-time signal at sample index n; k represents the frequency index variable in the frequency domain; N represents the total number of sample points; n represents the sample index variable;

[0069] Step 2: Set the parameters of the particle swarm optimization fast fuzzy C-means algorithm, initialize the particle position and velocity, and the position of each particle represents a group of cluster centers; use the objective function of the fast fuzzy C-means algorithm as the fitness function; the objective function calculates the objective function value according to the given cluster center;

[0070] Step 3: Iteratively optimize the fast fuzzy C-means algorithm through the PSO algorithm, including:

[0071] use Update the particle's speed and position, calculate the new fitness value, if the new fitness value is less than the individual's best fitness value, then update the individual's best position and fitness value, include:

[0072]

[0073]

[0074] in, is the velocity vector of the ith particle at the t+1th time; w is the inertia weight; is the velocity vector of the ith particle at the tth time; c1 and c2 are learning factors, usually non-negative constants; rand() is a random number between (0, 1); pbest i is the best individual position found by the i-th particle so far; is the position vector of the ith particle at the ith iteration; gbest is the global best position found for the entire particle; The position vector of the i-th particle at the i-th iteration.

[0075] Extract the cluster center from the optimized particle position, and initialize the difference matrix between the sample and the cluster center in the frequency domain to calculate the similarity distance between the sample and the cluster center, including:

[0076]

[0077] Among them, d ij represents the similarity distance between the i-th sample and the j-th cluster center in the frequency domain; A represents the sample data matrix after fast Fourier transformation; C represents the cluster center matrix; A ik represents the element in the i-th row and k-th column of matrix A; C jk represents the element in the jth row and the kth column in the matrix C; m represents the frequency domain feature dimension;

[0078] Update the membership matrix, which can be expressed by the following relationship:

[0079]

[0080] Among them, c represents the clustering category; m represents the fuzzy index; d ij Represents the similarity distance from data point i to cluster center j; d ik Represents the similarity distance from data point i to cluster center k; u ij Indicates the degree of membership of the i-th data to the j-th cluster center;

[0081] Check whether it converges, which can be expressed by the following relationship:

[0082] ||U new -U||<ε

[0083] Among them, U new represents the new membership matrix obtained in the current iteration; U represents the membership matrix of the previous iteration; ε represents the convergence threshold;

[0084] If it does not converge, iterate again; if it converges, the loop ends, and the average value of the green category membership is used as the threshold. A mask is generated according to the threshold to obtain the pixel points belonging to the green category;

[0085] Step 4: Calculate the preset growth parameter data of all selected vegetation based on the green category pixels, including:

[0086] Calculate vegetation coverage F:

[0087]

[0088] Among them, N represents the number of green pixels, and M represents the total pixels of the target slope;

[0089] Connected region analysis is performed to calculate the seed germination rate GR, which can be expressed by the following relationship:

[0090]

[0091] Among them, n represents the number of connected domains of the slice image, and s represents the number of seeds of the slope protection vegetation;

[0092] Get the number of pixels in each connected area and multiply it by the actual area represented by each pixel to calculate the vegetation growth uniformity S, which is used to measure the discreteness of the vegetation area dataset, including:

[0093]

[0094] in, represents the average vegetation area, A i represents the area of ​​the i-th plant in the slice image;

[0095] The first sub-data is obtained according to the vegetation coverage F, the seed germination rate GR and the vegetation growth uniformity S;

[0096] All slice images in the slice image set are processed to obtain first sub-data of all slice images, and first data are obtained according to the first sub-data of all slice images.

[0097] Preferably, the health of all the selected vegetation is evaluated according to the first data to obtain the second data including:

[0098] According to the first data, the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of each type of vegetation to be selected over time are obtained;

[0099] According to the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of various types of vegetation to be selected over time, the fuzzy comprehensive evaluation method is used to evaluate the vegetation to be selected, and the second data G is obtained:

[0100] M=V·T

[0101] G=V'·S T

[0102] Among them, M is the mathematical model of fuzzy comprehensive evaluation; V is the weight vector; T is the evaluation matrix; G is the comprehensive evaluation result, that is, the second data; V' is the normalized weight vector; S is the median obtained according to the comment level.

[0103] The present invention has the following beneficial effects:

[0104] The slope protection vegetation optimization system based on machine vision of the present invention regards image pixels as data points in feature space through fuzzy c-means clustering algorithm, and can classify and extract image colors when the number of samples is unknown and the samples are fuzzy, and the image partition is relatively obvious, and there will be no color mixing; and the clustering algorithm performs well in processing complex and high-dimensional data, and is relatively mature in color extraction. Further, the fuzzy c-means clustering algorithm is optimized, and the fast Fourier transform is used to improve the computational efficiency of the fuzzy c-means algorithm, and the data samples are mapped to the frequency domain, and the spectrum similarity is used to replace the traditional Euclidean distance calculation, which significantly reduces the amount of calculation, thereby obtaining a fast fuzzy c-means clustering algorithm; the particle swarm optimization algorithm optimizes the initial clustering center of the fast fuzzy c-means clustering algorithm, and the output global optimal position is used as the initial clustering center of the fast fuzzy c-means clustering algorithm. The optimized algorithm has high computational efficiency, and at the same time, compared with the traditional fuzzy c-means clustering algorithm, the particle swarm algorithm of the present invention optimizes the fast fuzzy c-means clustering algorithm with higher accuracy and stability. By optimizing the fast fuzzy C-means clustering algorithm using the particle swarm algorithm of the present invention for image processing of slope protection vegetation, the image processing results can be output more accurately and stably, which is conducive to the optimization of slope protection vegetation, that is, slope protection vegetation can be selected according to local conditions through machine vision technology.

[0105] The machine vision-based slope protection vegetation optimization method of the present invention is based on the system of the present invention, and therefore has the same beneficial effects as the system of the present invention.

[0106] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0108] Figure 1 It is a schematic diagram of the system framework of the preferred embodiment 1 of the present invention.

[0109] Figure 2 It is a flow chart of the second preferred embodiment of the present invention.

[0110] Figure 3 This is a slice image of the second preferred embodiment of the present invention.

[0111] Figure 4 This is a slice image retaining green pixels according to the second preferred embodiment of the present invention. DETAILED DESCRIPTION

[0112] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0113] Embodiment 1:

[0114] See also Figure 1 In a preferred embodiment of the present invention, a slope protection vegetation optimization system based on machine vision is provided, which includes an image acquisition module, an image preprocessing module, an image analysis module and a data processing module.

[0115] The image acquisition module is used to acquire the original image of the target slope at a preset frequency and send the original image to the image preprocessing module; the target slope includes preset types and quantities of vegetation to be selected.

[0116] The image acquisition module includes a lighting unit, a power supply unit, an image acquisition unit and a support unit;

[0117] The power supply unit is used to provide power to the lighting unit and the image acquisition unit; the lighting unit is used to provide a light source; the support unit is used to fix the lighting unit, the power supply unit and the image acquisition unit;

[0118] The image acquisition unit is used to acquire the original image of the target slope at a preset frequency and send the original image to the image preprocessing module; the original image includes time information.

[0119] The image preprocessing module is used to receive the original image, slice the original image according to the type of vegetation to be selected, obtain a slice image set, and send the slice image set to the image analysis module.

[0120] The image preprocessing module includes an image reading unit, an image slicing unit and a brightness adaptation unit;

[0121] The image reading unit is used to receive the original image; the image slicing unit is used to slice the original image according to the type of vegetation to be selected to obtain a sub-image set; the image in the sub-image set includes type information;

[0122] The brightness adaptation unit is used to process the influence of uneven illumination of the images in the sub-image set, obtain a slice image set, and send the slice image set to the image analysis module.

[0123] The image analysis module is used to receive a slice image set, analyze the slice image set by optimizing fast fuzzy C-means clustering through a particle swarm algorithm, obtain first data, and send the first data to the data processing module; the first data includes preset growth parameter data of all selected vegetation.

[0124] The analysis of the slice image set by optimizing fast fuzzy C-means clustering with particle swarm algorithm includes:

[0125] Step 1: Obtain the resolution of a single slice image in the slice image set, convert the slice image from the RGB color space to the Lab space, and obtain the Lab pixel matrix; extract the data in the a channel and b channel of the Lab space respectively, flatten the data of the a channel and b channel, and then merge the flattened a channel and b channel data in the horizontal direction to obtain the first matrix x[n]; convert the data of the first matrix x[n] to the frequency domain through fast Fourier transform to obtain the second matrix X[k]:

[0126]

[0127] Where x[n] represents the value of the original discrete-time signal at sample index n; k represents the frequency index variable in the frequency domain; N represents the total number of sample points; n represents the sample index variable;

[0128] Step 2: Set the parameters of the particle swarm optimization fast fuzzy C-means algorithm, initialize the particle position and velocity, and the position of each particle represents a group of cluster centers; use the objective function of the fast fuzzy C-means algorithm as the fitness function; the objective function calculates the objective function value according to the given cluster center;

[0129] Step 3: Iteratively optimize the fast fuzzy C-means algorithm through the PSO algorithm, including:

[0130] use Update the particle's speed and position, calculate the new fitness value, if the new fitness value is less than the individual's best fitness value, then update the individual's best position and fitness value, include:

[0131]

[0132] in, is the velocity vector of the ith particle at the t+1th time; w is the inertia weight; is the velocity vector of the ith particle at the tth time; c1 and c2 are learning factors, usually non-negative constants; rand() is a random number between (0, 1); pbest i is the best individual position found by the i-th particle so far; is the position vector of the ith particle at the ith iteration; gbest is the global best position found for the entire particle; The position vector of the i-th particle at the i-th iteration.

[0133] Extract the cluster center from the optimized particle position, and initialize the difference matrix between the sample and the cluster center in the frequency domain to calculate the similarity distance between the sample and the cluster center, including:

[0134]

[0135] Among them, d ij represents the similarity distance between the i-th sample and the j-th cluster center in the frequency domain; A represents the sample data matrix after fast Fourier transformation; C represents the cluster center matrix; A ik represents the element in the i-th row and k-th column of matrix A; C jk represents the element in the jth row and the kth column in the matrix C; m represents the frequency domain feature dimension;

[0136] Update the membership matrix, which can be expressed by the following relationship:

[0137]

[0138] Among them, c represents the clustering category; m represents the fuzzy index; d ij Represents the similarity distance from data point i to cluster center j; d ik Represents the similarity distance from data point i to cluster center k; u ij Indicates the degree of membership of the i-th data to the j-th cluster center;

[0139] Check whether it converges, which can be expressed by the following relationship:

[0140] ||U new -U||<ε

[0141] Among them, U new represents the new membership matrix obtained in the current iteration; U represents the membership matrix of the previous iteration; ε represents the convergence threshold;

[0142] If it does not converge, iterate again; if it converges, the loop ends, and the average value of the green category membership is used as the threshold. A mask is generated according to the threshold to obtain the pixel points belonging to the green category;

[0143] Step 4: Calculate the preset growth parameter data of all selected vegetation based on the green category pixels, including:

[0144] Calculate vegetation coverage F:

[0145]

[0146] Among them, N represents the number of green pixels, and M represents the total pixels of the target slope;

[0147] Connected region analysis is performed to calculate the seed germination rate GR, which can be expressed by the following relationship:

[0148]

[0149] Among them, n represents the number of connected domains of the slice image, and s represents the number of seeds of the slope protection vegetation;

[0150] Get the number of pixels in each connected area and multiply it by the actual area represented by each pixel to calculate the vegetation growth uniformity S, which is used to measure the discreteness of the vegetation area dataset, including:

[0151]

[0152] in, represents the average vegetation area, A i represents the area of ​​the i-th plant in the slice image;

[0153] The first sub-data is obtained according to the vegetation coverage F, the seed germination rate GR and the vegetation growth uniformity S;

[0154] All slice images in the slice image set are processed to obtain first sub-data of all slice images, and first data are obtained according to the first sub-data of all slice images.

[0155] The data processing module is used to receive the first data, and evaluate the health of all candidate vegetation according to the first data to obtain second data, and select the candidate vegetation with the highest health as the slope protection vegetation of the target slope according to the second data.

[0156] The health of all the selected vegetation is evaluated according to the first data, and the second data obtained includes:

[0157] According to the first data, the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of each type of vegetation to be selected over time are obtained;

[0158] According to the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of various types of vegetation to be selected over time, the fuzzy comprehensive evaluation method is used to evaluate the vegetation to be selected, and the second data G is obtained:

[0159] M=V·T

[0160] G=V'·S T

[0161] Among them, M is the mathematical model of fuzzy comprehensive evaluation; V is the weight vector; T is the evaluation matrix; G is the comprehensive evaluation result, that is, the second data; V' is the normalized weight vector; S is the median obtained according to the comment level.

[0162] The slope protection vegetation optimization system based on machine vision of the present invention regards image pixels as data points in feature space through fuzzy c-means clustering algorithm, and can classify and extract image colors when the number of samples is unknown and the samples are fuzzy, and the image partition is relatively obvious, and there will be no color mixing; and the clustering algorithm performs well in processing complex and high-dimensional data, and is relatively mature in color extraction. Further, the fuzzy c-means clustering algorithm is optimized, and the fast Fourier transform is used to improve the computational efficiency of the fuzzy c-means algorithm, and the data samples are mapped to the frequency domain, and the spectrum similarity is used to replace the traditional Euclidean distance calculation, which significantly reduces the amount of calculation, thereby obtaining a fast fuzzy c-means clustering algorithm; the particle swarm optimization algorithm optimizes the initial clustering center of the fast fuzzy c-means clustering algorithm, and the output global optimal position is used as the initial clustering center of the fast fuzzy c-means clustering algorithm. The optimized algorithm has high computational efficiency, and at the same time, compared with the traditional fuzzy c-means clustering algorithm, the particle swarm algorithm of the present invention optimizes the fast fuzzy c-means clustering algorithm with higher accuracy and stability. By optimizing the fast fuzzy C-means clustering algorithm using the particle swarm algorithm of the present invention for image processing of slope protection vegetation, the image processing results can be output more accurately and stably, which is conducive to the optimization of slope protection vegetation, that is, slope protection vegetation can be selected according to local conditions through machine vision technology.

[0163] Embodiment 2:

[0164] See also Figure 2 In a preferred embodiment of the present invention, a slope protection vegetation optimization method based on machine vision is provided. Based on the system of the present invention, the method includes:

[0165] S1: The original image of the target slope is collected by the image acquisition module at a preset frequency, and the original image is sent to the image preprocessing module; the target slope includes a preset type and number of vegetation to be selected. Specifically including:

[0166] The lighting unit and the image acquisition unit are provided with power by the power supply unit; the light source is provided by the lighting unit; the lighting unit, the power supply unit and the image acquisition unit are fixed by the support unit;

[0167] The original image of the target slope is collected by the image collection unit at a preset frequency, and the original image is sent to the image preprocessing module; the original image includes time information.

[0168] S2: receiving the original image through the image preprocessing module, slicing the original image according to the type of vegetation to be selected, obtaining a slice image set, and sending the slice image set to the image analysis module. Specifically including:

[0169] The original image is received by the image reading unit; the image slicing unit slices the original image according to the type of vegetation to be selected to obtain a sub-image set; the images in the sub-image set include type information;

[0170] The brightness adaptation unit processes the influence of uneven illumination of the images in the sub-image set to obtain a slice image set, and the slice image set is sent to the image analysis module.

[0171] S3: receiving a slice image set through an image analysis module, analyzing the slice image set through particle swarm algorithm optimized fast fuzzy C-means clustering, obtaining first data, and sending the first data to a data processing module; the first data includes preset growth parameter data of all vegetation to be selected.

[0172] The analysis of the slice image set by optimizing fast fuzzy C-means clustering with particle swarm algorithm includes:

[0173] Step 1: Get the resolution of a single slice image in the slice image set. Figure 3 , convert the slice image from RGB color space to Lab space to obtain a Lab pixel matrix; extract the data in the a channel and b channel of the Lab space respectively, flatten the data of the a channel and b channel, and then merge the flattened a channel and b channel data in the horizontal direction to obtain the first matrix x[n]; convert the data of the first matrix x[n] to the frequency domain through fast Fourier transform to obtain the second matrix X[k]:

[0174]

[0175] Where x[n] represents the value of the original discrete-time signal at sample index n; k represents the frequency index variable in the frequency domain; N represents the total number of sample points; n represents the sample index variable;

[0176] Step 2: Set the parameters of the particle swarm optimization fast fuzzy C-means algorithm, initialize the particle position and velocity, and the position of each particle represents a group of cluster centers; use the objective function of the fast fuzzy C-means algorithm as the fitness function; the objective function calculates the objective function value according to the given cluster center;

[0177] Step 3: Iteratively optimize the fast fuzzy C-means algorithm through the PSO algorithm, including:

[0178] use Update the particle's speed and position, calculate the new fitness value, if the new fitness value is less than the individual's best fitness value, then update the individual's best position and fitness value, include:

[0179]

[0180] in, is the velocity vector of the ith particle at the t+1th time; w is the inertia weight; is the velocity vector of the ith particle at the tth time; c1 and c2 are learning factors, usually non-negative constants; rand() is a random number between (0, 1); pbest i is the best individual position found by the i-th particle so far; is the position vector of the ith particle at the ith iteration; gbest is the global best position found for the entire particle; The position vector of the i-th particle at the i-th iteration.

[0181] Extract the cluster center from the optimized particle position, and initialize the difference matrix between the sample and the cluster center in the frequency domain to calculate the similarity distance between the sample and the cluster center, including:

[0182]

[0183] Among them, d ij represents the similarity distance between the i-th sample and the j-th cluster center in the frequency domain; A represents the sample data matrix after fast Fourier transformation; C represents the cluster center matrix; A ik represents the element in the i-th row and k-th column of matrix A; C jk represents the element in the jth row and the kth column in the matrix C; m represents the frequency domain feature dimension;

[0184] Update the membership matrix, which can be expressed by the following relationship:

[0185]

[0186] Among them, c represents the clustering category; m represents the fuzzy index; d ij Represents the similarity distance from data point i to cluster center j; d ik Represents the similarity distance from data point i to cluster center k; u ij Indicates the degree of membership of the i-th data to the j-th cluster center;

[0187] Check whether it converges, which can be expressed by the following relationship:

[0188] ||U new -U||<ε

[0189] Among them, U new represents the new membership matrix obtained in the current iteration; U represents the membership matrix of the previous iteration; ε represents the convergence threshold;

[0190] If it does not converge, iterate again; if it converges, the loop ends, and the average value of the green category membership is used as the threshold. A mask is generated according to the threshold to obtain the pixels belonging to the green category; the slice image of the green category pixels is retained. Figure 4 .

[0191] Step 4: Calculate the preset growth parameter data of all selected vegetation based on the green category pixels, including:

[0192] Calculate vegetation coverage F:

[0193]

[0194] Among them, N represents the number of green pixels, and M represents the total pixels of the target slope;

[0195] Connected region analysis is performed to calculate the seed germination rate GR, which can be expressed by the following relationship:

[0196]

[0197] Among them, n represents the number of connected domains of the slice image, and s represents the number of seeds of the slope protection vegetation;

[0198] Get the number of pixels in each connected area and multiply it by the actual area represented by each pixel to calculate the vegetation growth uniformity S, which is used to measure the discreteness of the vegetation area dataset, including:

[0199]

[0200] in, represents the average vegetation area, A i represents the area of ​​the i-th plant in the slice image;

[0201] The first sub-data is obtained according to the vegetation coverage F, the seed germination rate GR and the vegetation growth uniformity S;

[0202] All slice images in the slice image set are processed to obtain first sub-data of all slice images, and first data are obtained according to the first sub-data of all slice images.

[0203] S4: receiving the first data through the data processing module, and evaluating the health of all candidate vegetation according to the first data to obtain second data, and selecting the candidate vegetation with the highest health as the slope protection vegetation of the target slope according to the second data.

[0204] The health of all the selected vegetation is evaluated according to the first data, and the second data obtained includes:

[0205] According to the first data, the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of each type of vegetation to be selected over time are obtained;

[0206] According to the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of various types of vegetation to be selected over time, the fuzzy comprehensive evaluation method is used to evaluate the vegetation to be selected, and the second data G is obtained:

[0207] M=V·T

[0208] G=V'·S T

[0209] Among them, M is the mathematical model of fuzzy comprehensive evaluation; V is the weight vector; T is the evaluation matrix; G is the comprehensive evaluation result, that is, the second data; V' is the normalized weight vector; S is the median obtained according to the comment level.

[0210] The machine vision-based slope protection vegetation optimization method of the present invention is based on the system of the present invention, and therefore has the same beneficial effects as the system of the present invention.

[0211] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A slope protection vegetation optimization system based on machine vision, characterized in that: It includes an image acquisition module, an image preprocessing module, an image analysis module and a data processing module; The image acquisition module is used to acquire the original image of the target slope at a preset frequency and send the original image to the image preprocessing module; the target slope includes vegetation of preset types and quantities to be selected; The image preprocessing module is used to receive the original image, slice the original image according to the type of vegetation to be selected to obtain a slice image set, and send the slice image set to the image analysis module; The image analysis module is used to receive the slice image set, analyze the slice image set by optimizing fast fuzzy C-means clustering through a particle swarm algorithm to obtain first data, and send the first data to the data processing module; the first data includes preset growth parameter data of all vegetation to be selected; The data processing module is used to receive the first data, and evaluate the health of all candidate vegetation according to the first data to obtain second data, and select the candidate vegetation with the highest health as the slope protection vegetation of the target slope according to the second data.

2. The machine vision-based slope protection vegetation optimization system according to claim 1 is characterized in that: The image acquisition module includes a lighting unit, a power supply unit, an image acquisition unit and a support unit; The power supply unit is used to provide power to the lighting unit and the image acquisition unit; the lighting unit is used to provide a light source; the support unit is used to fix the lighting unit, the power supply unit and the image acquisition unit; The image acquisition unit is used to acquire the original image of the target slope at a preset frequency, and send the original image to the image preprocessing module; the original image includes time information.

3. The machine vision-based slope protection vegetation optimization system according to claim 2 is characterized in that: The image preprocessing module includes an image reading unit, an image slicing unit and a brightness adaptation unit; The image reading unit is used to receive the original image; the image slicing unit is used to slice the original image according to the type of vegetation to be selected to obtain a sub-image set; the images in the sub-image set include type information; The brightness adaptation unit is used to process the influence of uneven illumination of the images in the sub-image set, obtain the slice image set, and send the slice image set to the image analysis module.

4. The machine vision-based slope protection vegetation optimization system according to claim 3 is characterized in that: The analyzing the slice image set by optimizing fast fuzzy C-means clustering by particle swarm algorithm includes: Step 1: Obtain the resolution of a single slice image in the slice image set, convert the slice image from the RGB color space to the Lab space, and obtain a Lab pixel matrix; extract the data in the a channel and the b channel of the Lab space respectively, flatten the data of the a channel and the b channel, and then merge the flattened a channel and b channel data in the horizontal direction to obtain a first matrix x[n]; convert the data of the first matrix x[n] to the frequency domain by fast Fourier transform to obtain a second matrix X[k]: Where x[n] represents the value of the original discrete-time signal at sample index n; k represents the frequency index variable in the frequency domain; N represents the total number of sample points; n represents the sample index variable; Step 2: Set the parameters of the particle swarm optimization fast fuzzy C-means algorithm, initialize the particle position and velocity, and the position of each particle represents a group of cluster centers; use the objective function of the fast fuzzy C-means algorithm as the fitness function; the objective function calculates the objective function value according to the given cluster centers; Step 3: Iteratively optimize the fast fuzzy C-means algorithm through the PSO algorithm, including: use Update the particle's speed and position, calculate the new fitness value, if the new fitness value is less than the individual's best fitness value, then update the individual's best position and fitness value, include: in, is the velocity vector of the ith particle at the t+1th time; w is the inertia weight; is the velocity vector of the ith particle at the tth time; c1 and c2 are learning factors, usually non-negative constants; rand() is a random number between (0, 1); pbest i is the best individual position found by the i-th particle so far; is the position vector of the ith particle at the ith iteration; gbest is the global best position found for the entire particle; The position vector of the i-th particle at the i-th iteration. Extract the cluster center from the optimized particle position, and initialize the difference matrix between the sample and the cluster center in the frequency domain to calculate the similarity distance between the sample and the cluster center, including: Among them, d ij represents the similarity distance between the i-th sample and the j-th cluster center in the frequency domain; A represents the sample data matrix after fast Fourier transformation; C represents the cluster center matrix; A ik represents the element in the i-th row and k-th column of matrix A; C jk represents the element in the jth row and the kth column in the matrix C; m represents the frequency domain feature dimension; Update the membership matrix, which can be expressed by the following relationship: Among them, c represents the clustering category; m represents the fuzzy index; d ij Represents the similarity distance from data point i to cluster center j; d ik Represents the similarity distance from data point i to cluster center k; u ij Indicates the degree of membership of the i-th data to the j-th cluster center; Check whether it converges, which can be expressed by the following relationship: ||In new -U||<ε Among them, U new represents the new membership matrix obtained in the current iteration; U represents the membership matrix of the previous iteration; ε represents the convergence threshold; If it does not converge, iterate again; if it converges, the loop ends, and the average value of the green category membership is used as the threshold, and a mask is generated according to the threshold to obtain the pixel points belonging to the green category; Step 4: Calculate the preset growth parameter data of all vegetation to be selected based on the pixel points of the green category, including: Calculate vegetation coverage F: Wherein, N represents the number of green pixels, and M represents the total pixels of the target slope; Connected region analysis is performed to calculate the seed germination rate GR, which can be expressed by the following relationship: Among them, n represents the number of connected domains of the slice image, and s represents the number of seeds of the slope protection vegetation; Get the number of pixels in each connected area and multiply it by the actual area represented by each pixel to calculate the vegetation growth uniformity S, which is used to measure the discreteness of the vegetation area dataset, including: in, represents the average vegetation area, A i represents the area of ​​the i-th plant in the slice image; Obtaining first sub-data according to the vegetation coverage F, the seed germination rate GR and the vegetation growth uniformity S; All slice images in the slice image set are processed to obtain first sub-data of all slice images, and the first data is obtained according to the first sub-data of all slice images.

5. The machine vision-based slope protection vegetation optimization system according to claim 4 is characterized in that: The health of all the selected vegetation is evaluated according to the first data, and the second data obtained includes: According to the first data, the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of each type of vegetation to be selected over time are obtained; According to the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of various types of vegetation to be selected over time, the fuzzy comprehensive evaluation method is used to evaluate the vegetation to be selected, and the second data G is obtained: M=V·T G=V'·S T Among them, M is the mathematical model of fuzzy comprehensive evaluation; V is the weight vector; T is the evaluation matrix; G is the comprehensive evaluation result, that is, the second data; V' is the normalized weight vector; S is the median obtained according to the comment level.

6. A method for optimizing slope protection vegetation based on machine vision, based on the system of claim 5, characterized in that: The method comprises: The image acquisition module acquires an original image of the target slope at a preset frequency, and sends the original image to the image preprocessing module; the target slope includes vegetation of preset types and quantities to be selected; The image preprocessing module receives the original image, slices the original image according to the type of vegetation to be selected to obtain a slice image set, and sends the slice image set to the image analysis module; The image analysis module receives the slice image set, analyzes the slice image set by optimizing fast fuzzy C-means clustering through a particle swarm algorithm to obtain first data, and sends the first data to the data processing module; the first data includes preset growth parameter data of all vegetation to be selected; The first data is received by the data processing module, and the health of all candidate vegetation is evaluated according to the first data to obtain second data, and the candidate vegetation with the highest health is selected as the slope protection vegetation of the target slope according to the second data.

7. The method for optimizing slope protection vegetation based on machine vision according to claim 6, characterized in that: The image acquisition module acquires the original image of the target slope at a preset frequency, and sends the original image to the image preprocessing module, including: The power supply unit is used to provide power to the lighting unit and the image acquisition unit; the lighting unit is used to provide a light source; and the lighting unit, the power supply unit and the image acquisition unit are fixed by the support unit; The image acquisition unit acquires an original image of the target slope at a preset frequency, and sends the original image to the image preprocessing module; the original image includes time information.

8. The method for optimizing slope protection vegetation based on machine vision according to claim 7, characterized in that: Receiving the original image through the image preprocessing module, slicing the original image according to the type of vegetation to be selected to obtain a slice image set, and sending the slice image set to the image analysis module includes: The original image is received by the image reading unit; the image slicing unit slices the original image according to the type of vegetation to be selected to obtain a sub-image set; the images in the sub-image set include type information; The brightness adaptation unit processes the influence of uneven illumination of the images in the sub-image set to obtain the slice image set, and sends the slice image set to the image analysis module.

9. The method for optimizing slope protection vegetation based on machine vision according to claim 8, characterized in that: The analyzing the slice image set by optimizing fast fuzzy C-means clustering by particle swarm algorithm includes: Step 1: Obtain the resolution of a single slice image in the slice image set, convert the slice image from the RGB color space to the Lab space, and obtain a Lab pixel matrix; extract the data in the a channel and the b channel of the Lab space respectively, flatten the data of the a channel and the b channel, and then merge the flattened a channel and b channel data in the horizontal direction to obtain a first matrix x[n]; convert the data of the first matrix x[n] to the frequency domain by fast Fourier transform to obtain a second matrix X[k]: Where x[n] represents the value of the original discrete-time signal at sample index n; k represents the frequency index variable in the frequency domain; N represents the total number of sample points; n represents the sample index variable; Step 2: Set the parameters of the particle swarm optimization fast fuzzy C-means algorithm, initialize the particle position and velocity, and the position of each particle represents a group of cluster centers; use the objective function of the fast fuzzy C-means algorithm as the fitness function; the objective function calculates the objective function value according to the given cluster centers; Step 3: Iteratively optimize the fast fuzzy C-means algorithm through the PSO algorithm, including: use Update the particle's speed and position, calculate the new fitness value, if the new fitness value is less than the individual's best fitness value, then update the individual's best position and fitness value, include: in, is the velocity vector of the ith particle at the t+1th time; w is the inertia weight; is the velocity vector of the ith particle at the tth time; c1 and c2 are learning factors, usually non-negative constants; rand() is a random number between (0, 1); pbest i is the best individual position found by the i-th particle so far; is the position vector of the ith particle at the ith iteration; gbest is the global best position found for the entire particle; The position vector of the i-th particle at the i-th iteration. Extract the cluster center from the optimized particle position, and initialize the difference matrix between the sample and the cluster center in the frequency domain to calculate the similarity distance between the sample and the cluster center, including: Among them, d ij represents the similarity distance between the i-th sample and the j-th cluster center in the frequency domain; A represents the sample data matrix after fast Fourier transformation; C represents the cluster center matrix; A ik represents the element in the i-th row and k-th column of matrix A; C jk represents the element in the jth row and the kth column in the matrix C; m represents the frequency domain feature dimension; Update the membership matrix, which can be expressed by the following relationship: Among them, c represents the clustering category; m represents the fuzzy index; d ij Represents the similarity distance from data point i to cluster center j; d ik Represents the similarity distance from data point i to cluster center k; u ij Indicates the degree of membership of the i-th data to the j-th cluster center; Check whether it converges, which can be expressed by the following relationship: ||In new -U||<ε Among them, U new represents the new membership matrix obtained in the current iteration; U represents the membership matrix of the previous iteration; ε represents the convergence threshold; If it does not converge, iterate again; if it converges, the loop ends, and the average value of the green category membership is used as the threshold, and a mask is generated according to the threshold to obtain the pixel points belonging to the green category; Step 4: Calculate the preset growth parameter data of all vegetation to be selected based on the pixel points of the green category, including: Calculate vegetation coverage F: Wherein, N represents the number of green pixels, and M represents the total pixels of the target slope; Connected region analysis is performed to calculate the seed germination rate GR, which can be expressed by the following relationship: Among them, n represents the number of connected domains of the slice image, and s represents the number of seeds of the slope protection vegetation; Get the number of pixels in each connected area and multiply it by the actual area represented by each pixel to calculate the vegetation growth uniformity S, which is used to measure the discreteness of the vegetation area dataset, including: in, represents the average vegetation area, A i represents the area of ​​the i-th plant in the slice image; Obtaining first sub-data according to the vegetation coverage F, the seed germination rate GR and the vegetation growth uniformity S; All slice images in the slice image set are processed to obtain first sub-data of all slice images, and the first data is obtained according to the first sub-data of all slice images.

10. The method for optimizing slope protection vegetation based on machine vision according to claim 9, characterized in that: The health of all the selected vegetation is evaluated according to the first data, and the second data obtained includes: According to the first data, the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of each type of vegetation to be selected over time are obtained; According to the change rules of vegetation coverage F, seed germination rate GR and vegetation growth uniformity S of various types of vegetation to be selected over time, the fuzzy comprehensive evaluation method is used to evaluate the vegetation to be selected, and the second data G is obtained: M=V·T G=V'·S T Among them, M is the mathematical model of fuzzy comprehensive evaluation; V is the weight vector; T is the evaluation matrix; G is the comprehensive evaluation result, that is, the second data; V' is the normalized weight vector; S is the median obtained according to the comment level.

Citation Information

Cited By

  • Aerial image slope vegetation coverage state assessment method and system

    CN120766170A