A method for detecting harmful invasive plants combined with image enhancement technology

By performing edge line analysis and gray value correction on UAV aerial images, combined with the rectangular coordinate system and segmentation neural network, the problem of inaccurate detection of invasive plants caused by image blur in UAV aerial photography is solved, and the detection of Solanum niger is realized. Technical support for efficient monitoring and ecological protection.

CN118628518BActive Publication Date: 2024-10-25CHANGCHUN NORMAL UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411103848.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-10-25
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

During drone aerial photography, motion blur caused by rapid movement and vibration makes the edges and details of some images unclear, making it impossible to accurately detect invasive plants, especially Solanum niger.

Method used

By obtaining the edge line of the image of the area to be detected, dividing it into areas to be detected, calculating the gray value and gradient value of each area, determining the dark area, constructing a rectangular coordinate system, and analyzing the edge line and adjacent angle sequence, Calculate the degree of key information of Solanum vulgaris, assign correction weights to pixels, and improve image clarity by correcting gray values, and finally use segmentation neural networks to detect hazardous plants.

Benefits of technology

It improves the accuracy and image clarity of invasive plant detection, ensures accurate monitoring of Solanum niger, reduces labor costs, and improves technical support for ecological protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628518B_ABST
    Figure CN118628518B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method for detecting harmful invasive plants combined with image enhancement technology, comprising: obtaining an image of an area to be detected and its edge lines to obtain a plurality of areas to be detected. The possibility that the area to be detected belongs to a dark area is obtained through the grayscale value and gradient value of the pixel point, and then the dark area of ​​the image of the area to be detected is determined. A rectangular coordinate system is established to obtain a sequence of adjacent angles of the dark area, and further the degree of the presence of key information of Solanum luteum in the dark area is obtained. According to the degree of the presence of key information of Solanum luteum in the dark area, a correction weight of each pixel point in the dark area is obtained. Combining the correction weight and grayscale value of each pixel point in the dark area, a corrected grayscale value of each pixel point in the dark area is obtained, and then a corrected image of the area to be detected and a harmful plant detection result are obtained. The present invention improves the accuracy of detecting invasive plants by analyzing the pixel points of each image of the area to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for detecting harmful invasive plants combined with image enhancement technology. Background Art

[0002] Alien invasive plants often pose a serious threat to local ecosystems due to their strong adaptability and reproductive capacity. For example, Solanum serratum often competes with local plants for resources such as light, water and nutrients, directly leading to a decrease in the number of local species or even extinction. Therefore, it is necessary to detect harmful invasive plants and inhibit their growth or eradicate them before Solanum serratum has a significant impact on the current ecological environment.

[0003] When obtaining images of areas where Solanum serrata exists, aerial photography using high-resolution cameras carried by drones is often used to obtain image data of the target area. However, during the shooting process, the rapid movement and vibration of the drone may cause motion blur in some images, making some edges and details unclear and making it impossible to accurately detect invasive plants. Summary of the invention

[0004] The invention provides a harmful invasive plant detection method combined with image enhancement technology to solve the existing problems.

[0005] The present invention provides a method for detecting harmful invasive plants by combining image enhancement technology, which adopts the following technical solutions:

[0006] An embodiment of the present invention provides a method for detecting harmful invasive plants in combination with image enhancement technology, the method comprising the following steps:

[0007] Obtain several images of the area to be detected;

[0008] Acquire several edge lines of each image of the area to be detected; divide each image of the area to be detected into several areas to be detected; obtain the possibility that each area to be detected of each image of the area to be detected belongs to a dark area according to the grayscale values ​​and gradient values ​​of all pixels of each area to be detected of each image of the area to be detected; obtain several dark areas and normal areas of each image of the area to be detected according to the possibility that each area to be detected of each image of the area to be detected belongs to a dark area;

[0009] Constructing a rectangular coordinate system for each image of the area to be detected; obtaining a sequence of adjacent angles of each dark area of ​​each image of the area to be detected according to the position of the pixel points on the edge line of each dark area of ​​the rectangular coordinate system of each image of the area to be detected; obtaining a degree of presence of key information of Solanum serrata in each dark area of ​​each image of the area to be detected according to the number of pixel points on the edge line of each dark area of ​​each image of the area to be detected and the sequence of adjacent angles;

[0010] According to the degree of the presence of key information of Solanum truncatum in each dark area of ​​the rectangular coordinate system of each image of the area to be detected, the gray value and coordinates of each pixel point, and the gray value and coordinates of the pixel point of the normal area closest to each pixel point of each dark area, a correction weight of each pixel point of each dark area of ​​each image of the area to be detected is obtained;

[0011] According to the correction weight and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected, the corrected grayscale value of each pixel point in each dark area of ​​each image of the area to be detected is obtained; according to the corrected grayscale values ​​of all pixel points in each dark area of ​​each image of the area to be detected, several corrected images of the area to be detected are obtained; according to each corrected image of the area to be detected, the harmful plant detection result of each corrected image of the area to be detected is obtained.

[0012] Furthermore, the specific calculation formula corresponding to the possibility that each area to be detected in each area to be detected image belongs to a dark area is obtained according to the grayscale values ​​and gradient values ​​of all pixels of each area to be detected in each area to be detected image:

[0013]

[0014] in, Indicates The image of the area to be detected The possibility that the area to be detected belongs to the dark area; Indicates The image of the area to be detected The number of adjacent areas to be detected; Indicates The image of the area to be detected The average gray value of all pixels in the area to be detected; Indicates The image of the area to be detected The adjacent area to be detected The average gray value of all pixels in the area to be detected; Indicates The average gray value of all pixels in the image of the area to be detected; Indicates The image of the area to be detected The variance of the grayscale values ​​of all pixels in the area to be detected; No. The image of the area to be detected The average value of the gradient values ​​of all pixels in the area to be detected; represents the linear normalization function.

[0015] Furthermore, the method of obtaining a plurality of dark areas and normal areas of each image of the area to be detected according to the possibility that each area to be detected of each image of the area to be detected belongs to a dark area comprises the following specific steps:

[0016] like is greater than the preset first threshold, then The image of the area to be detected The area to be detected is recorded as the dark area; if is less than or equal to the preset first threshold, then The image of the area to be detected The area to be detected is recorded as the normal area.

[0017] Furthermore, the step of obtaining the adjacent angle sequence of each dark area of ​​each image of the area to be detected according to the position of the pixel points on the edge line of each dark area of ​​the rectangular coordinate system of each image of the area to be detected includes the following specific steps:

[0018] In the In the rectangular coordinate system of the image of the area to be detected, Take any end point of the longest edge line in the dark area as the starting point, and measure the minimum angle between the straight line connecting the pixel points on all adjacent edge lines and the horizontal axis in turn to obtain the The sequence of adjacent angles of dark areas.

[0019] Furthermore, according to the number of pixel points on the edge line of each dark area of ​​each image of the area to be detected and the sequence of adjacent angles, the specific calculation formula corresponding to the degree of the presence of key information of Solanum truncatum in each dark area of ​​each image of the area to be detected is obtained as follows:

[0020]

[0021] in, Indicates The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area; No. The image of the area to be detected The number of edge pixels in the dark area; Indicates The image of the area to be detected The number of angle data of adjacent angle sequences of dark areas; Indicates The image of the area to be detected Dark Area Angle data; Indicates The image of the area to be detected Dark Area Angle data.

[0022] Furthermore, the method of obtaining the correction weight of each pixel in each dark area of ​​each image of the area to be detected according to the degree of the presence of the key information of Solanum serrata in each dark area of ​​the rectangular coordinate system of each image of the area to be detected, the gray value and coordinates of each pixel, and the gray value and coordinates of the pixel in the normal area closest to each pixel in each dark area, comprises the following specific steps:

[0023] According to the degree of the presence of key information of Solanum truncatum in each dark area of ​​the rectangular coordinate system of each image of the area to be detected and the gray value of each pixel, the correction degree of each pixel in each dark area of ​​each image of the area to be detected is obtained;

[0024] According to the correction degree and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected, and the grayscale value and coordinates of the pixel point in the normal area closest to each pixel point in each dark area, the correction weight of each pixel point in each dark area of ​​each image of the area to be detected is obtained.

[0025] Furthermore, according to the correction degree and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected, and the grayscale value and coordinates of the pixel point in the normal area closest to each pixel point in each dark area, the specific calculation formula corresponding to the correction weight of each pixel point in each dark area of ​​each image of the area to be detected is obtained as follows:

[0026]

[0027] in, Indicates The image of the area to be detected The dark area The correction weight of each pixel; Indicates The image of the area to be detected The dark area The gray value of each pixel; Indicates The image of the area to be detected The average gray value of all pixels in the dark area; Indicates the distance The image of the area to be detected The dark area The gray value of the pixel in the normal area closest to the pixel; Indicates The image of the area to be detected The dark area The horizontal coordinate of the pixel point; Indicates The image of the area to be detected The dark area The vertical coordinate of the pixel; Indicates the distance The image of the area to be detected The dark area The horizontal coordinate of the pixel point in the normal area closest to the pixel point; Indicates the distance The image of the area to be detected The dark area The vertical coordinate of the pixel point in the normal area closest to the pixel point, Indicates The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area; represents the linear normalization function; Indicates The image of the area to be detected The dark area The degree of correction of each pixel.

[0028] Furthermore, the method of obtaining the corrected grayscale value of each pixel in each dark area of ​​each image of the area to be detected according to the corrected weight and grayscale value of each pixel in each dark area of ​​each image of the area to be detected includes the following specific steps:

[0029] Calculate 1 and The image of the area to be detected The dark area The sum of the linearly normalized values ​​of the correction weights of the pixels is added to The image of the area to be detected The dark area The product of the grayscale values ​​of pixels is rounded up to an integer value, which is recorded as The image of the area to be detected The dark area Corrected gray value of each pixel.

[0030] Furthermore, the method of obtaining a plurality of corrected images of the area to be detected based on the corrected gray values ​​of all pixels in each dark area of ​​each image of the area to be detected includes the following specific steps:

[0031] The grayscale values ​​of all pixels in all dark areas of each image of the area to be detected are replaced with their corresponding corrected grayscale values ​​to obtain several corrected images of the area to be detected.

[0032] Furthermore, the method of obtaining the harmful plant detection result of each corrected image of the area to be detected according to each corrected image of the area to be detected includes the following specific steps:

[0033] The trained segmentation neural network is used to segment the Solanum eryngii area and the normal plant area in each corrected image of the area to be detected.

[0034] The beneficial effects of the technical solution of the present invention are:

[0035] Acquire several images of the area to be detected; acquire several edge lines of each image of the area to be detected, and divide each image of the area to be detected into several areas to be detected, so as to ensure that the details of each area to be detected are analyzed independently. According to the grayscale values ​​and gradient values ​​of all pixels of each area to be detected of each image of the area to be detected, obtain the possibility that each area to be detected of each image of the area to be detected belongs to a dark area, thereby improving the accuracy of dark area screening. According to the possibility that each area to be detected of each image of the area to be detected belongs to a dark area, obtain several dark areas and normal areas of each image of the area to be detected, and accurately screen out several dark areas and normal areas. Construct a rectangular coordinate system of each image of the area to be detected; according to the position of the pixel points on the edge line of each dark area of ​​the rectangular coordinate system of each image of the area to be detected, obtain the adjacent angle sequence of each dark area of ​​each image of the area to be detected, thereby improving the accuracy of subsequent calculation of the degree of key information of Solanum luteum existing in each dark area. According to the number of pixels on the edge line of each dark area of ​​each image of the area to be detected and the sequence of adjacent angles, the degree of the key information of the presence of Solanum serratum in each dark area of ​​each image of the area to be detected is obtained, which improves the monitoring accuracy of invasive plants and provides a solid foundation for subsequent analysis. According to the degree of the key information of Solanum serratum in each dark area of ​​the rectangular coordinate system of each image of the area to be detected, the gray value and coordinates of each pixel, and the gray value and coordinates of the pixel of the normal area closest to each pixel of each dark area, the correction weight of each pixel of each dark area of ​​each image of the area to be detected is obtained, which improves the accuracy of the subsequent calculation of the corrected gray value of each pixel of each dark area. According to the correction weight and gray value of each pixel of each dark area of ​​each image of the area to be detected, the corrected gray value of each pixel of each dark area of ​​each image of the area to be detected is obtained, which ensures the fine correction of the gray value of each pixel of each dark area, and improves the clarity and reliability of the image. According to the corrected gray values ​​of all pixels of each dark area of ​​each image of the area to be detected, several corrected images of the area to be detected are obtained, which improves the accuracy of the subsequent detection results of harmful plants. According to each corrected image of the area to be detected, the harmful plant detection result of each corrected image of the area to be detected is obtained. The invention improves the accuracy of detecting invasive plants by analyzing the pixel points of each image of the area to be detected. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 The present invention is a flowchart of the steps of a method for detecting harmful invasive plants combined with image enhancement technology. DETAILED DESCRIPTION

[0038] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation, structure, features and effects of a harmful invasive plant detection method combined with image enhancement technology proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0039] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0040] The following is a detailed description of a method for detecting harmful invasive plants in combination with image enhancement technology provided by the present invention with reference to the accompanying drawings.

[0041] See also Figure 1 , which shows a flowchart of a method for detecting harmful invasive plants combined with image enhancement technology provided by an embodiment of the present invention, the method comprising the following steps:

[0042] Step S001: Acquire several images of the area to be detected.

[0043] The high-resolution camera carried by the drone is used to continuously take pictures of the area to be inspected, and all images are denoised using mean filtering to obtain several images of the area to be inspected. Mean filtering is a well-known technology, and the specific method is not introduced here.

[0044] It should be noted that since the area to be inspected is relatively wide, one photo may not cover all details and specific areas. Therefore, by taking photos continuously, you can ensure that the entire area is covered to avoid missing important details in key areas or specific angles.

[0045] Step S002: Acquire several edge lines of each image of the area to be detected; divide each image of the area to be detected into several areas to be detected; obtain the possibility that each area to be detected of each image of the area to be detected belongs to a dark area according to the grayscale values ​​and gradient values ​​of all pixels of each area to be detected of each image of the area to be detected; obtain several dark areas and normal areas of each image of the area to be detected according to the possibility that each area to be detected of each image of the area to be detected belongs to a dark area.

[0046] It should be noted that during the aerial photography process, the high-resolution camera carried by the drone may cause motion blur in some of the images of the area to be detected due to the rapid movement and vibration of the drone, making the edges and details of some areas of the image of the area to be detected unclear. This will make the subsequent detection of invasive plants inaccurate.

[0047] It is further necessary to explain that such blurred areas are referred to as "dark areas" in this embodiment. Compared with other normal areas in the image of the area to be detected, the dark areas have poor clarity and low detail. Based on this, the grayscale value performance between different areas in the image of the area to be detected can be analyzed in combination with the difference between the grayscale value performance of each area and the grayscale value performance of the entire image of the area to be detected, so as to complete the judgment that all areas in the image of the area to be detected belong to dark areas.

[0048] According to the grayscale value of the pixel points in each image of the area to be detected, the Sobel edge detection algorithm is used to perform edge detection on each image of the area to be detected, and several edge lines and the gradient value of each pixel point in the grayscale image of the cut part are obtained.

[0049] use * The window divides each image of the area to be detected into several equal areas, which are recorded as the area to be detected. is the preset window threshold. The preset window threshold in this embodiment is The value is 5, and this is used as an example for description.

[0050] It should be noted that if the number of pixels in the area to be detected is less than * If , no operation is performed.

[0051] First Take the image of the area to be detected as an example, then The image of the area to be detected The specific calculation formula corresponding to the possibility that the detected area belongs to the dark area is:

[0052]

[0053] in, Indicates The image of the area to be detected The possibility that the area to be detected belongs to the dark area; Indicates The image of the area to be detected The number of adjacent areas to be detected; Indicates The image of the area to be detected The average gray value of all pixels in the area to be detected; Indicates The image of the area to be detected The adjacent area to be detected The average gray value of all pixels in the area to be detected; Indicates The average gray value of all pixels in the image of the area to be detected; Indicates The image of the area to be detected The variance of the grayscale values ​​of all pixels in the area to be detected; No. The image of the area to be detected The average value of the gradient values ​​of all pixels in the area to be detected; represents the linear normalization function.

[0054] What needs to be explained is: and Proportional, The larger the value of The image of the area to be detected The greater the possibility that the area to be detected belongs to the dark area; and Inversely proportional, The larger the value of The image of the area to be detected The smaller the probability that the area to be detected belongs to the dark area.

[0055] Through the above process, we obtain The image of the area to be detected The possibility that the area to be detected belongs to the dark area.

[0056] Each to-be-detected region of each to-be-detected region image is operated according to the above process to obtain the possibility that each to-be-detected region of each to-be-detected region image belongs to a dark region.

[0057] like is greater than the preset first threshold, then The image of the area to be detected The area to be detected is recorded as the dark area; if is less than or equal to the preset first threshold, then The image of the area to be detected The area to be detected is recorded as a normal area. In this embodiment, the first threshold value preset is 0.7, which is used as an example for description.

[0058] Through the above process, several dark areas and normal areas of each image of the area to be detected are obtained.

[0059] Step S003: construct a rectangular coordinate system for each image of the area to be detected; obtain the adjacent angle sequence of each dark area of ​​each image of the area to be detected according to the position of the pixel points on the edge line of each dark area of ​​the rectangular coordinate system of each image of the area to be detected; obtain the degree of existence of key information of Solanum quinquefolium in each dark area of ​​each image of the area to be detected according to the number of pixel points on the edge line of each dark area of ​​each image of the area to be detected and the adjacent angle sequence.

[0060] It should be noted that several dark areas are obtained through the above process. For the dark areas, the difference between them and the normal areas in the image of the area to be detected is that the dark areas appear to be more blurred and have a lower level of detail. This situation may cause the detection results obtained in the subsequent detection process of harmful invasive plants in the image of the area to be detected to be somewhat different from the actual results, so further analysis is needed, and for the dark areas on the image of the area to be detected, they may carry key information such as dangerous invasive plants.

[0061] It is further explained that the key information of analyzing whether the dark area carries the dangerous invasive plant "Yellow Flower Solanum" is carried. Yellow Flower Solanum shows obvious differences from the leaves around it. The flower shape of Yellow Flower Solanum is relatively regular, the edge of the flower is almost round, and the color of the flower of Yellow Flower Solanum is different from the color of the surrounding leaves to a certain extent.

[0062] A rectangular coordinate system is constructed with the vertex of the lower left corner of each image of the area to be detected as the origin, horizontally to the right as the positive direction of the horizontal axis, and vertically upward as the positive direction of the vertical axis, to obtain the rectangular coordinate system of each image of the area to be detected.

[0063] In the In the rectangular coordinate system of the image of the area to be detected, Take any end point of the longest edge line in the dark area as the starting point, and measure the minimum angle between the straight line connecting the pixel points on all adjacent edge lines and the horizontal axis in turn to obtain the The sequence of adjacent angles of dark areas.

[0064] What needs to be explained is: If there is no edge line in the dark area, no operation is performed. The gray value of the pixel in the dark area remains unchanged. When there is a bifurcation line on the longest edge line in the dark area, each bifurcation line is traversed in turn.

[0065] Through the above process, a sequence of adjacent angles of each dark area in each image of the area to be detected is obtained.

[0066] The first The image of the area to be detected The specific calculation formula corresponding to the degree of key information of Solanum truncatum in dark areas is:

[0067]

[0068] in, Indicates The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area; No. The image of the area to be detected The number of pixels on the edge line of a dark area; Indicates The image of the area to be detected The number of angle data of adjacent angle sequences of dark areas; Indicates The image of the area to be detected Dark Area Angle data; Indicates The image of the area to be detected Dark Area Angle data, represents the absolute value function.

[0069] What needs to be explained is: and Proportional, The larger the value, the The image of the area to be detected The larger the number of edge pixels in the dark area, the The image of the area to be detected The more main information of Solanum eryngii plant there may be in a dark area, the more key information it has; and Inversely proportional, The smaller the value of The image of the area to be detected The angle change difference between adjacent edge pixels in the dark area is small, so The image of the area to be detected The closer the edge pixels of the dark area are to the flower part of Solanum serrata, the more they carry key information.

[0070] Through the above process, we obtain The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area;

[0071] Each dark area of ​​each image of the area to be detected is operated according to the above process to obtain the degree of the presence of key information of Solanum spicatum in each dark area of ​​each image of the area to be detected.

[0072] Step S004: According to the degree of existence of key information of Solanum quinquefolium in each dark area of ​​the rectangular coordinate system of each image of the area to be detected, the grayscale value and coordinates of each pixel, and the grayscale value and coordinates of the pixel in the normal area closest to each pixel in each dark area, obtain the correction weight of each pixel in each dark area of ​​each image of the area to be detected.

[0073] It should be noted that for dark areas with different key information of Solanum serrata, the degree of clarity correction is also different. In order to make the overall image clearer, the specific performance of the pixels in each dark area should be analyzed to obtain the correction weight of each pixel in each dark area.

[0074] First The rectangular coordinate system of the image of the area to be detected The dark area For example, the first The image of the area to be detected The dark area The specific calculation formula corresponding to the correction weight of each pixel is:

[0075]

[0076] in, Indicates The image of the area to be detected The dark area The correction weight of each pixel; Indicates The image of the area to be detected The dark area The gray value of each pixel; Indicates The image of the area to be detected The average gray value of all pixels in the dark area; Indicates the distance The image of the area to be detected The dark area The gray value of the pixel in the normal area closest to the pixel; Indicates The image of the area to be detected The dark area The horizontal coordinate of the pixel point; Indicates The image of the area to be detected The dark area The vertical coordinate of the pixel; Indicates the distance The image of the area to be detected The dark area The horizontal coordinate of the pixel point in the normal area closest to the pixel point; Indicates the distance The image of the area to be detected The dark area The vertical coordinate of the pixel point in the normal area closest to the pixel point, Indicates The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area; represents the linear normalization function.

[0077] What needs to be explained is: Indicates The image of the area to be detected In the dark area The gray value of the pixel is The difference between the average gray values ​​of all pixels in the dark area; Indicates The image of the area to be detected The dark area The degree of correction of each pixel.

[0078] Through the above process, we obtain The image of the area to be detected The dark area The correction weight of each pixel.

[0079] The correction weight of each pixel point in each dark area of ​​each image of the area to be detected is calculated according to the above process to obtain the correction weight of each pixel point in each dark area of ​​each image of the area to be detected.

[0080] Step S005: According to the correction weight and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected, the corrected grayscale value of each pixel point in each dark area of ​​each image of the area to be detected is obtained; according to the corrected grayscale values ​​of all pixel points in each dark area of ​​each image of the area to be detected, several corrected images of the area to be detected are obtained; according to each corrected image of the area to be detected, the harmful plant detection result of each corrected image of the area to be detected is obtained.

[0081] It should be noted that: in the above process, the correction weight of each pixel point in each dark area of ​​each image of the area to be detected is obtained, and image processing is performed on the weights in different dark areas on each image of the area to be detected, so that each image of the area to be detected appears clearer and has more details.

[0082] First The image of the area to be detected The dark area For example, the first The image of the area to be detected The dark area The specific calculation formula corresponding to the corrected grayscale value of each pixel is:

[0083]

[0084] in, Indicates The image of the area to be detected The dark area Corrected gray value of pixels; Indicates The image of the area to be detected The dark area The correction weight of each pixel; Indicates The image of the area to be detected The dark area The gray value of each pixel; represents the linear normalization function, Represents the ceiling function.

[0085] What needs to be explained is: and Proportional, if The larger the value of The image of the area to be detected The dark area The larger the corrected gray value of each pixel.

[0086] Through the above process, we obtain The image of the area to be detected The dark area Corrected gray value of each pixel.

[0087] Each pixel point in each dark area of ​​each image of the area to be detected is operated according to the above process to obtain a corrected grayscale value of each pixel point in each dark area of ​​each image of the area to be detected.

[0088] The grayscale values ​​of all pixels in all dark areas of each image of the area to be detected are replaced with their corresponding corrected grayscale values ​​to obtain several corrected images of the area to be detected.

[0089] It should be noted that: in this embodiment, when the denominator in the formula is 0, the denominator is set to 1 to ensure that the formula is valid, and this example is used for description.

[0090] The embodiment of the present invention adopts a segmentation neural network to identify, segment and correct the Solanum truncatum region and the normal plant region in the image of the region to be detected.

[0091] The relevant content of the segmentation neural network is as follows:

[0092] The segmentation neural network used in this embodiment is the Mask R-CNN neural network; the data set used is the modified image data set of the area to be detected. Mask R-CNN is a well-known technology, and the specific method is not introduced here. The full name of Mask R-CNN in Chinese is "Mask Region-based Convolutional Neural Network", and the full name in English is "Mask Region-based Convolutional Neural Network".

[0093] The pixels that need to be segmented are divided into two categories, that is, the labeling process of the training set is: single-channel semantic label, the corresponding position pixel belongs to the Solanum luteum area is labeled as 0, and the corresponding position pixel belongs to the normal plant area is labeled as 1.

[0094] The task of the network is classification, so the loss function used is the cross entropy loss function.

[0095] The Solanum serrata region and the normal plant region in the image of the region to be detected are corrected by segmenting the neural network. This process is a well-known technology and the specific method will not be introduced here.

[0096] Through the above process, the harmful plant detection result of each corrected image of the area to be detected is obtained.

[0097] It should be noted that the detection of harmful invasive plants is achieved in this way, which not only reduces labor costs, but also improves the accuracy of monitoring data, providing strong technical support for ecological protection and plant management.

[0098] So far, the present invention is completed.

[0099] In summary, in an embodiment of the present invention, an image of an area to be detected and its edge lines are obtained to obtain a plurality of areas to be detected. The possibility that the area to be detected belongs to a dark area is obtained through the grayscale value and gradient value of the pixel point, and then the dark area of ​​the image of the area to be detected is determined. A rectangular coordinate system is established to obtain a sequence of adjacent angles of the dark area, and further obtain the degree of the presence of key information of Solanum luteum in the dark area. According to the degree of the presence of key information of Solanum luteum in the dark area, a correction weight of each pixel point in the dark area is obtained. Combining the correction weight and grayscale value of each pixel point in the dark area, a corrected grayscale value of each pixel point in the dark area is obtained, and then a corrected image of the area to be detected and a detection result of harmful plants are obtained. The present invention improves the accuracy of detecting invasive plants by analyzing the pixels of each image of the area to be detected.

[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting harmful invasive plants using image enhancement technology, characterized in that: The method comprises the following steps: Obtain several images of the area to be detected; Acquire several edge lines of each image of the area to be detected; divide each image of the area to be detected into several areas to be detected; obtain the possibility that each area to be detected of each image of the area to be detected belongs to a dark area according to the grayscale values ​​and gradient values ​​of all pixels of each area to be detected of each image of the area to be detected; obtain several dark areas and normal areas of each image of the area to be detected according to the possibility that each area to be detected of each image of the area to be detected belongs to a dark area; Constructing a rectangular coordinate system for each image of the area to be detected; obtaining a sequence of adjacent angles of each dark area of ​​each image of the area to be detected according to the position of the pixel points on the edge line of each dark area of ​​the rectangular coordinate system of each image of the area to be detected; obtaining a degree of presence of key information of Solanum serrata in each dark area of ​​each image of the area to be detected according to the number of pixel points on the edge line of each dark area of ​​each image of the area to be detected and the sequence of adjacent angles; According to the degree of the presence of key information of Solanum truncatum in each dark area of ​​the rectangular coordinate system of each image of the area to be detected, the gray value and coordinates of each pixel point, and the gray value and coordinates of the pixel point of the normal area closest to each pixel point of each dark area, a correction weight of each pixel point of each dark area of ​​each image of the area to be detected is obtained; According to the correction weight and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected, the corrected grayscale value of each pixel point in each dark area of ​​each image of the area to be detected is obtained; according to the corrected grayscale values ​​of all pixels points in each dark area of ​​each image of the area to be detected, a plurality of corrected images of the area to be detected are obtained; according to each corrected image of the area to be detected, the harmful plant detection result of each corrected image of the area to be detected is obtained; The specific calculation formula corresponding to the possibility that each to-be-detected area of ​​each to-be-detected area image belongs to a dark area is obtained according to the grayscale values ​​and gradient values ​​of all pixels of each to-be-detected area of ​​each to-be-detected area image: in, Indicates The image of the area to be detected The possibility that the area to be detected belongs to the dark area; Indicates The image of the area to be detected The number of adjacent areas to be detected; Indicates The image of the area to be detected The average gray value of all pixels in the area to be detected; Indicates The image of the area to be detected The adjacent area to be detected The average gray value of all pixels in the area to be detected; Indicates The average gray value of all pixels in the image of the area to be detected; Indicates The image of the area to be detected The variance of the grayscale values ​​of all pixels in the area to be detected; No. The image of the area to be detected The average value of the gradient values ​​of all pixels in the area to be detected; represents the linear normalization function; According to the number of pixel points on the edge line of each dark area of ​​each image of the area to be detected and the sequence of adjacent angles, the specific calculation formula corresponding to the degree of the presence of key information of Solanum truncatum in each dark area of ​​each image of the area to be detected is obtained as follows: in, Indicates The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area; No. The image of the area to be detected The number of edge pixels in the dark area; Indicates The image of the area to be detected The number of angle data of adjacent angle sequences of dark areas; Indicates The image of the area to be detected Dark Area Angle data; Indicates The image of the area to be detected Dark Area Angle data; The method of obtaining the correction weight of each pixel point in each dark area of ​​each image of the area to be detected according to the degree of the presence of the key information of Solanum truncatum in each dark area of ​​the rectangular coordinate system of each image of the area to be detected, the gray value and coordinates of each pixel point, and the gray value and coordinates of the pixel point in the normal area closest to each pixel point in each dark area, includes the following specific steps: According to the degree of the presence of key information of Solanum truncatum in each dark area of ​​the rectangular coordinate system of each image of the area to be detected and the gray value of each pixel, the correction degree of each pixel in each dark area of ​​each image of the area to be detected is obtained; According to the correction degree and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected, and the grayscale value and coordinates of the pixel point in the normal area closest to each pixel point in each dark area, the specific calculation formula corresponding to the correction weight of each pixel point in each dark area of ​​each image of the area to be detected is obtained as follows: in, Indicates The image of the area to be detected The dark area The correction weight of each pixel; Indicates The image of the area to be detected The dark area The gray value of each pixel; Indicates The image of the area to be detected The average gray value of all pixels in the dark area; Indicates the distance The image of the area to be detected The dark area The gray value of the pixel in the normal area closest to the pixel; Indicates The image of the area to be detected The dark area The horizontal coordinate of the pixel point; Indicates The image of the area to be detected The dark area The vertical coordinate of the pixel; Indicates the distance The image of the area to be detected The dark area The horizontal coordinate of the pixel point in the normal area closest to the pixel point; Indicates the distance The image of the area to be detected The dark area The vertical coordinate of the pixel point in the normal area closest to the pixel point, Indicates The image of the area to be detected The degree to which the key information of Solanum serrata exists in each dark area; represents the linear normalization function; Indicates The image of the area to be detected The dark area The degree of correction of each pixel.

2. According to claim 1, a method for detecting harmful invasive plants combined with image enhancement technology is characterized in that: The method of obtaining a plurality of dark areas and normal areas of each image of the area to be detected according to the possibility that each area to be detected of each image of the area to be detected belongs to a dark area comprises the following specific steps: like is greater than the preset first threshold, then The image of the area to be detected The area to be detected is recorded as the dark area; if is less than or equal to the preset first threshold, then The image of the area to be detected The area to be detected is recorded as the normal area.

3. According to claim 1, a method for detecting harmful invasive plants in combination with image enhancement technology is characterized in that: The step of obtaining the adjacent angle sequence of each dark area of ​​each image of the area to be detected according to the position of the pixel points on the edge line of each dark area of ​​the rectangular coordinate system of each image of the area to be detected includes the following specific steps: In the In the rectangular coordinate system of the image of the area to be detected, Take any end point of the longest edge line in the dark area as the starting point, and measure the minimum angle between the straight line connecting the pixel points on all adjacent edge lines and the horizontal axis in turn to obtain the The sequence of adjacent angles of dark areas.

4. The method for detecting harmful invasive plants in combination with image enhancement technology according to claim 1, characterized in that: The specific steps of obtaining the corrected grayscale value of each pixel point in each dark area of ​​each image of the area to be detected according to the corrected weight and grayscale value of each pixel point in each dark area of ​​each image of the area to be detected are as follows: Calculate 1 and The image of the area to be detected The dark area The sum of the linearly normalized values ​​of the correction weights of the pixels is added to The image of the area to be detected The dark area The product of the grayscale values ​​of pixels is rounded up to an integer value, which is recorded as The image of the area to be detected The dark area Corrected gray value of each pixel.

5. The method for detecting harmful invasive plants in combination with image enhancement technology according to claim 1, characterized in that: The specific steps of obtaining a plurality of corrected images of the area to be detected according to the corrected gray values ​​of all pixels in each dark area of ​​each image of the area to be detected are as follows: The grayscale values ​​of all pixels in all dark areas of each image of the area to be detected are replaced with their corresponding corrected grayscale values ​​to obtain several corrected images of the area to be detected.

6. The method for detecting harmful invasive plants in combination with image enhancement technology according to claim 1, characterized in that: The method of obtaining the harmful plant detection result of each corrected image of the area to be detected according to each corrected image of the area to be detected includes the following specific steps: The trained segmentation neural network is used to segment the Solanum eryngii area and the normal plant area in each corrected image of the area to be detected.

Citation Information

Patent Citations

  • Mechanical component defect detection method based on image processing

    CN115018853A

  • Method for detecting invasive plant seeds in imported soybeans

    CN116310549A

  • Image recognition system for detecting invasive plant seeds

    CN117788829A