CN114170260A - Real-time image blade segmentation system and method based on vegetation index - Google Patents
Real-time image blade segmentation system and method based on vegetation index Download PDFInfo
- Publication number
- CN114170260A CN114170260A CN202111477950.XA CN202111477950A CN114170260A CN 114170260 A CN114170260 A CN 114170260A CN 202111477950 A CN202111477950 A CN 202111477950A CN 114170260 A CN114170260 A CN 114170260A
- Authority
- CN
- China
- Prior art keywords
- vegetation index
- image
- vegetation
- module
- kernel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000011218 segmentation Effects 0.000 title claims abstract description 48
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000004364 calculation method Methods 0.000 claims abstract description 40
- 238000012545 processing Methods 0.000 claims description 54
- 238000001914 filtration Methods 0.000 claims description 18
- 101100129500 Caenorhabditis elegans max-2 gene Proteins 0.000 claims description 9
- 239000011159 matrix material Substances 0.000 claims description 9
- 230000006854 communication Effects 0.000 claims description 5
- 238000004891 communication Methods 0.000 claims description 5
- 101100083446 Danio rerio plekhh1 gene Proteins 0.000 claims description 3
- 101150044148 MID1 gene Proteins 0.000 claims description 3
- 238000003709 image segmentation Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 238000005315 distribution function Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000003595 spectral effect Effects 0.000 description 2
- 230000007175 bidirectional communication Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0007—Image acquisition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a real-time image blade segmentation system based on vegetation indexes and a method thereof, wherein the system comprises: the vegetation index calculation module comprises a kernel control module, a vegetation index calculation module, a VDMA module and a threshold segmentation module; the method comprises the following steps: receiving a control instruction, a video stream and a scaling factor parameter, calculating all vegetation indexes according to the control instruction and the scaling factor parameter, dividing all the vegetation indexes into a group of three, respectively writing the three groups into three channels of red R, green G and blue B, and generating RGB color video streams as vegetation index images to be output; receiving the vegetation index image and caching the vegetation index image according to a control instruction; and carrying out blade segmentation on the vegetation index image according to a preset judgment threshold value. The blade segmentation system and the method thereof provided by the invention have the advantages of low cost, low efficiency and high practicability, and do not need to train a model in advance.
Description
Technical Field
The invention relates to the technical field of image segmentation, in particular to a real-time image blade segmentation system and method based on vegetation indexes.
Background
Image segmentation is a technique and process for dividing an image into specific regions with unique properties and extracting an object of interest, and is a key step from image processing to image analysis. The current commonly used image segmentation methods include non-neural network methods such as a threshold image segmentation method, an edge segmentation method and a clustering segmentation method, and neural network methods such as an encoding and decoding method and a multi-scale information integration method. However, the conventional decoding method and the multi-scale information integration method require huge neural networks, require a large amount of computational resources, require pre-training, and have high cost for preparing training sets and artificially labeling data.
Spectral bands are combined to form a vegetation index according to the spectral characteristics of vegetation, which is a simple and effective measure of the condition of surface vegetation and is widely used in global and regional land cover, vegetation classification and environmental change. The current vegetation index is synthesized by visible light wave band and near infrared wave band, and expensive near infrared camera is additionally added for obtaining the near infrared, thereby increasing the cost. At present, no plant leaf segmentation method utilizing visible light vegetation indexes exists.
Therefore, how to provide a cost-effective real-time image blade segmentation system based on vegetation indexes and a method thereof are problems to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above, the invention provides a real-time image blade segmentation system based on vegetation index and a method thereof
In order to achieve the purpose, the invention adopts the following technical scheme:
a real-time image leaf segmentation system based on vegetation index, comprising: the vegetation index calculation module comprises a kernel control module, a vegetation index calculation module, a VDMA module and a threshold segmentation module;
the kernel control module is used for receiving a control instruction and controlling the kernel to control other modules according to the control instruction;
the vegetation index calculation module is connected with the kernel and the VDMA module and used for receiving video streams and scaling factor parameters, calculating all vegetation indexes according to the scaling factor parameters, dividing all the vegetation indexes into a group, writing the group into three channels of red R, green G and blue B respectively, and generating RGB color video streams as vegetation index image output;
the VDMA module is connected with the kernel and used for receiving the vegetation index image and realizing caching of the vegetation index image according to a control instruction received by the kernel;
the threshold segmentation module is connected with the kernel and the vegetation index calculation module, and carries out blade segmentation on the vegetation index image according to a preset decision threshold.
Preferably, the kernel control module includes a DDR3 controller, a memory card management unit, and a serial port unit;
the DDR3 controller is respectively connected with a DDR3 running memory, is connected with the vegetation index calculation module through the VDMA module, and is used for receiving the vegetation index image, caching the vegetation index image on the DDR3 running memory in real time in a direct memory access mode through the VDMA module, and notifying the kernel that the cache is finished after the cache is finished;
the memory card management unit is respectively connected with the VDMA module and the kernel, is connected with an external memory card, and is used for storing the obtained vegetation index image into the external memory card through the VDMA module and informing the completion of the storage of the kernel after the storage is completed;
and the serial port unit is used for realizing communication between the kernel and the external equipment in a serial port mode and receiving a control instruction and a scaling factor parameter.
Preferably, the vegetation index calculation module comprises a fan-out processing unit, a vegetation index calculator, a fan-in processing unit and a multiplexer;
the fan-out processing unit is used for receiving the video stream and carrying out fan-out processing on the video stream to obtain three independent RGB color channels;
the vegetation index calculator is used for receiving the scaling factor parameter and calculating the value of the vegetation index by combining the scaling factor parameter;
the fan-in processing unit is used for dividing each three vegetation indexes into a group and respectively writing the vegetation indexes into three channels of red R, green G and blue B to obtain N paths of RGB color video streams;
and the multiplexer is used for selecting one path from the N paths of RGB color video streams to be output as the vegetation index image.
Preferably, the VDMA module comprises an S2MM channel and an MM2S channel;
the S2MM channel is used for providing a channel for directly accessing the memory to cache the real-time processing result;
the MM2S channel is used to provide a path for storing the cached processing result to an external memory card.
Preferably, the device also comprises an HDMI decoder and an HDMI encoder;
the HDMI decoder is respectively connected with an external image acquisition device and the vegetation index calculation module, and is used for receiving the real-time video stream acquired by the external image acquisition device through an HDMI interface, converting the real-time video stream into a VESA standard video stream, and sending the converted video stream to the vegetation index calculation module according to a control instruction of the kernel control module;
the HDMI encoder is respectively used for outputting the processed vegetation index image to the downlink equipment through an HDMI interface.
Preferably, the threshold segmentation module sets decision thresholds for the RGB three color channels, and performs a logical and operation on regions within the three color channel thresholds to obtain a mask of a position where a leaf is located in the input image, thereby implementing segmentation of the leaf image.
Preferably, the vegetation index image processing device further comprises a filtering module, configured to perform histogram equalization and median filtering on the vegetation index image;
the specific processing procedure of the histogram equalization is as follows:
wherein HinThe frequency histogram for representing one color channel in one input frame image is obtained by counting the gray frequency of the corresponding color channel in one frame image; l ismaxRepresents the maximum luminance value; size indicates how many pixels there are in a frame of image; l isinThe gray value of a pixel point in the input image is obtained; l isoutIndicating the pixel value of the processing result of the corresponding pixel after the histogram equalization processing;
performing histogram equalization on the three RGB channels of each frame of image respectively, and combining the processing results of the three channels at an output end to form the histogram equalization of the vegetation index group;
the specific processing procedure of the median filtering processing is as follows:
wherein, P1, P2, … and P9 are adjacent 3-by-3 pixel matrixes; max1, Max2, Max3 refer to the maximum of the first, second, and third rows, respectively, of the 3 × 3 pixel matrix; mid1, Mid2, Mid3 refer to the middle values of the first, second, and third rows, respectively, of the 3 x3 pixel matrix; min1, Min2, Min3 refer to the minimum of the first, second, and third rows, respectively, of the 3 x3 pixel matrix; max _ min is the minimum value among Max1, Max2 and Max 3; max _ Mid is the intermediate value among Mid1, Mid2 and Mid 3; min _ Max is the minimum value among Max1, Max2, Max3 described above; the median filtering result is the median of Max _ Min, Mid _ Mid, and Min _ Max.
A real-time image blade segmentation method based on vegetation indexes comprises the following steps:
receiving a control instruction, a video stream and a scaling factor parameter, calculating all vegetation indexes according to the control instruction and the scaling factor parameter, dividing all three vegetation indexes into a group, respectively writing the group into three channels of red R, green G and blue B, and generating an RGB color video stream as an vegetation index image to be output;
receiving the vegetation index image and caching the vegetation index image according to the control instruction;
and carrying out blade segmentation on the vegetation index image according to a preset judgment threshold value.
According to the technical scheme, compared with the prior art, the vegetation index-based real-time image blade segmentation system and the method thereof are disclosed, firstly, the vegetation index is used as the basis for image segmentation, the real-time performance is high, the occupied resource is low, and the system can be used without pre-training, and secondly, the output image can be stored in a memory card, so that the control of equipment and the derivation of a processing result are facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of an overall structure of a real-time image blade segmentation system based on vegetation indexes according to the present invention;
FIG. 2 is a schematic diagram of a vegetation index calculation module in a real-time image leaf segmentation system based on a vegetation index according to the present invention;
FIG. 3 is a schematic diagram of a filter in a real-time image leaf segmentation system based on vegetation indexes according to the present invention;
FIG. 4 is a schematic diagram of a kernel module in a real-time image leaf segmentation system based on a vegetation index according to the present invention;
FIG. 5 is a flowchart illustrating a single image caching process in a vegetation index-based real-time image leaf segmentation system according to the present invention;
fig. 6 is a schematic flow chart of a histogram equalization process in the vegetation index-based real-time image leaf segmentation system provided by the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a real-time image blade segmentation system based on vegetation indexes, which comprises the following components in percentage by weight as shown in figure 1: the vegetation index calculation module comprises a kernel control module, a vegetation index calculation module, a VDMA module and a threshold segmentation module;
the kernel control module is used for receiving the control instruction and controlling the kernel to control other modules according to the control instruction;
the vegetation index calculation module is connected with the kernel and the VDMA module and used for receiving the video stream and the scaling factor parameters, calculating all vegetation indexes according to the scaling factor parameters, dividing all the vegetation indexes into a group every three, respectively writing the vegetation indexes into three channels of red R, green G and blue B, and generating RGB color video stream as vegetation index image output;
the VDMA module is connected with the kernel and used for receiving the vegetation index image and realizing the caching of the vegetation index image according to the control instruction received by the kernel;
the threshold segmentation module is connected with the kernel and the vegetation index calculation module, and carries out blade segmentation on the vegetation index image according to a preset judgment threshold.
In order to further implement the above technical solution, the kernel control module includes a DDR3 controller, a memory card management unit, and a serial port unit;
the DDR3 controller is respectively connected with the DDR3 running memory, is connected with the vegetation index calculation module through the VDMA module, and is used for receiving the vegetation index image, caching the vegetation index image on the DDR3 running memory in real time in a direct memory access mode through the VDMA module, and informing the kernel of the completion of the cache after the cache is completed;
the memory card management unit is respectively connected with the VDMA module and the kernel, is connected with an external memory card, and is used for storing the obtained vegetation index image into the external memory card through the VDMA module and informing the completion of the storage of the kernel after the storage is finished;
and the serial port unit is used for realizing communication between the kernel and the external equipment in a serial port mode and receiving a control instruction and a scaling factor parameter.
In order to further implement the technical scheme, the vegetation index calculation module comprises a fan-out processing unit, a vegetation index calculator, a fan-in processing unit and a multiplexer;
the fan-out processing unit is used for receiving the video stream and carrying out fan-out processing on the video stream to obtain three independent RGB color channels;
the vegetation index calculator is used for receiving the scaling factor parameters and calculating the value of the vegetation index by combining the scaling factor parameters;
the system comprises a fan-in processing unit, a data processing unit and a data processing unit, wherein the fan-in processing unit is used for dividing each three vegetation indexes into a group and respectively writing the group into three channels of red R, green G and blue B to obtain N paths of RGB color video streams;
and the multiplexer is used for selecting one path from the N paths of RGB color video streams to be output as the vegetation index image.
In this embodiment, as shown in fig. 2, a vegetation index calculation module principle is specifically explained, and the vegetation index calculation module firstly fans out an incoming RGB video stream of the VESA video stream to obtain three separate RGB color channels. The vegetation index calculator obtains scaling factor parameters required by calculation through an AXI4-Lite control bus, calculates six vegetation indexes of NPCI, NGBDI, NGRDI, RGBHI, MGRVI and VDVI by combining the parameters, takes NPCI, NGBDI and NGRDI as a group, and takes RGBHI, MGRVI and VDVI as a group, and obtains two paths of RGB color images by using an RGB fan-in module. The alternative multiplexer selects one path to output in a VESA video stream mode under the control of an AXI4-Lite bus.
The working principle of each part of the vegetation index calculation module in the embodiment is as follows:
the vegetation index is used as a core basis for image segmentation, and the calculation formula is as follows:
vegetation index set 1:
r, G, B are the red, green and blue channels of the input video stream, respectively; alpha is a scaling factor of the vegetation index group 1; out _ R, out _ G, out _ B are the red, green and blue channels of the video output of the processing result, respectively.
For the vegetation index group 1, in order to realize the calculation, the following two steps are needed:
1)C1=α*R C2=α*G C3=R+B C4=G+B C5=G+R
2)E1=C1/C3 E2=C2/C4 E3=C2/C5
wherein, C and D are both intermediate results, and E is the final vegetation index group 1 calculation result.
Vegetation index group 2:
r, G, B are the red, green and blue channels of the input video stream, respectively; beta is a scaling factor of the vegetation index group 2; out _ R, out _ G, out _ B are the red, green and blue channels of the video output of the processing result, respectively.
For the vegetation index group 2, the calculation needs to be carried out by the following three steps:
1)C1=G2 C2=R2 C3=R*B C4=2*β*G C5=R+B C6=2*G
2)D1=β*C1 D2=C1+C3 D3=C1+C2 D4=C5+C6 D5=C4
3)E1=D1/D2 E2=D1/D3 E3=D5/D4
wherein, C and D are both intermediate calculation results, and E is the final vegetation index group 2 calculation result.
In order to further implement the technical scheme, the VDMA module comprises an S2MM channel and an MM2S channel;
the S2MM channel is used for providing a channel for directly accessing the memory to cache the real-time processing result;
and the MM2S channel is used for providing a path for storing the cached processing result to an external memory card.
In order to further implement the technical scheme, the device also comprises an HDMI decoder and an HDMI encoder;
the HDMI decoder is respectively connected with the external image acquisition equipment and the vegetation index calculation module, and is used for receiving the real-time video stream acquired by the external image acquisition equipment through an HDMI interface, converting the real-time video stream into a VESA standard video stream, and sending the converted video stream to the vegetation index calculation module according to a control instruction of the kernel control module;
the HDMI encoder is respectively used for calculating the vegetation index and used for outputting the processed vegetation index image to downlink equipment through an HDMI interface.
In order to further implement the technical scheme, the threshold segmentation module respectively sets decision thresholds for the three RGB color channels, and performs logical AND operation on areas in the three color channel thresholds to obtain a mask of the position of the leaf in the input image, so as to realize segmentation of the leaf image.
In order to further implement the technical scheme, the vegetation index image processing device further comprises a filtering module, a calculating module and a calculating module, wherein the filtering module is used for carrying out histogram equalization and median filtering processing on the vegetation index image;
the specific processing procedure of histogram equalization is as follows:
wherein HinThe frequency histogram for representing one color channel in one input frame image is obtained by counting the gray frequency of the corresponding color channel in one frame image; l ismaxRepresents the maximum luminance value; size indicates how many pixels there are in a frame of image; l isinThe gray value of a pixel point in the input image is obtained; l isoutIndicating the pixel value of the processing result of the corresponding pixel after the histogram equalization processing;
as shown in fig. 3, the specific process of the median filtering process is as follows:
wherein, P1, P2, … and P9 are adjacent 3-by-3 pixel matrixes; max1, Max2, Max3 refer to the maximum of the first, second, and third rows, respectively, of the 3 × 3 pixel matrix; mid1, Mid2, Mid3 refer to the middle values of the first, second, and third rows, respectively, of the 3 x3 pixel matrix; min1, Min2, Min3 refer to the minimum of the first, second, and third rows, respectively, of the 3 x3 pixel matrix; max _ min is the minimum value among Max1, Max2 and Max 3; max _ Mid is the intermediate value among Mid1, Mid2 and Mid 3; min _ Max is the minimum value among Max1, Max2, Max3 described above; the median filtering result is the median of Max _ Min, Mid _ Mid, and Min _ Max.
In this embodiment, as shown in FIG. 4, Contex-A9 is selected as the kernel; wherein:
the Contex-A9 kernel is in serial port communication with external control equipment (such as a computer-side upper computer) through a serial port unit, a user can send control instructions through the serial port, and the control instructions comprise vegetation index calculation scaling factors, vegetation calculation output group selection, filter output group selection and photographing instructions; in addition, the current working state of the system can be read through a serial port.
The Contex-A9 kernel is in bidirectional communication with the serial port unit, the VDMA module, the memory card management unit, the filter module and the vegetation index calculation module through the AXI4-Lite bus, and when the equipment is powered on, the Contex-A9 kernel initializes each module by using the bus.
Referring to fig. 5, in the process of caching a single image, when the system is powered on, the VDMA module and the memory card management module are initialized, and after the initialization is completed, an initialization completion notification is sent to the Cortex-a9 kernel, and the kernel enters a photographing instruction waiting state. And after receiving the external photographing instruction, the kernel informs the VDMA module to perform image caching, and the VDMA module starts waiting for the field synchronization signal. After the field synchronization signal is finished, a new frame of image starts, the VDMA module caches the frame of image in a DDR3 memory through a DDR3 controller, and after the caching is finished, the kernel image is notified that the caching is finished. After receiving the image cache completion notification, the kernel commands the memory card control module to write the image into the memory card, and simultaneously the VDMA module sends the image data stream to the memory card control module. And after the memory card finishes storing the image, informing the kernel of finishing storing the image, and finishing the photographing state. And after the VDMA module and the memory card control module finish receiving, informing the kernel, and finishing the one-time photographing process.
In this embodiment, histogram equalization is a method for adjusting contrast using an image histogram in the field of image processing, so that brightness can be better distributed on the histogram, thereby enhancing local contrast without affecting overall contrast. In terms of hardware implementation, for each channel of three channels of RGB, a frequency histogram is obtained by counting the 256-level gray frequency of a frame of picture of the corresponding channel, and during field synchronization after one frame of picture is finished, the frequency histogram is summed up to obtain a cumulative distribution function, and the formula of the process is as follows:
wherein h [ k ] represents the frequency of occurrence of the kth gray of the gray frequency histogram; h [ t ] represents the accumulated value of the t-th gray scale of the accumulated distribution map.
After field synchronization, a new frame of image comes, and each pixel point of the image is processed as follows:
wherein H [ L ]]An accumulated value representing the L-th gradation of the accumulated profile; l ismaxIs the maximum gray value; size is the number of pixels of a frame of image; and f (L) is the output of the algorithm when the gray value of the corresponding pixel point is L.
And after each pixel point is processed, the output image is the histogram equalization result. And when outputting, counting the frequency histogram of the current frame image for histogram equalization of the next frame image, and repeating the steps so as to realize histogram equalization filtering of the video stream.
Before processing, firstly, counting the gray frequency of an image to obtain a frequency histogram before processing, accumulating the frequency histogram to obtain a cumulative distribution function H, obtaining a conversion function f aiming at the image through a formula, and performing histogram equalization filtering on each pixel point of the image by using the conversion function to obtain a processed image. The image after the processing is more obvious in light and shade distribution compared with the image before the processing, the histogram equalization filtering algorithm plays a 'divergence' role in the frequency histogram, and the frequency histogram after the processing is full of the whole color level. As shown in fig. 6.
And respectively carrying out histogram equalization on the three RGB channels of each frame of image, and combining the processing results of the three channels at an output end to form the histogram equalization of the vegetation index group.
A real-time image blade segmentation method based on vegetation indexes comprises the following steps:
receiving a control instruction, a video stream and a scaling factor parameter, calculating all vegetation indexes according to the control instruction and the scaling factor parameter, dividing all the vegetation indexes into a group of three, respectively writing the three groups into three channels of red R, green G and blue B, and generating RGB color video streams as vegetation index images to be output;
receiving the vegetation index image and caching the vegetation index image according to a control instruction;
and carrying out blade segmentation on the vegetation index image according to a preset judgment threshold value.
The method utilizes the vegetation index as the basis of image segmentation, has high real-time performance and low occupied resource, and can be used without pre-training. And secondly, an image filtering processing method of histogram equalization filtering and median filtering is designed, so that the image can be further processed according to requirements before being output. And the output image can be stored in the memory card through serial port communication with external control equipment, so that the equipment is conveniently controlled and the processing result is conveniently exported.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (8)
1. A real-time image blade segmentation system based on vegetation indexes is characterized by comprising: the vegetation index calculation module comprises a kernel control module, a vegetation index calculation module, a VDMA module and a threshold segmentation module;
the kernel control module is used for receiving a control instruction and controlling the kernel to control other modules according to the control instruction;
the vegetation index calculation module is connected with the kernel and the VDMA module and used for receiving video streams and scaling factor parameters, calculating all vegetation indexes according to the scaling factor parameters, dividing all the vegetation indexes into a group, writing the group into three channels of red R, green G and blue B respectively, and generating RGB color video streams as vegetation index image output;
the VDMA module is connected with the kernel and used for receiving the vegetation index image and realizing caching of the vegetation index image according to a control instruction received by the kernel;
the threshold segmentation module is connected with the kernel and the vegetation index calculation module, and carries out blade segmentation on the vegetation index image according to a preset decision threshold.
2. The vegetation index-based real-time image leaf segmentation system according to claim 1, wherein the kernel control module comprises a DDR3 controller, a memory card management unit and a serial port unit;
the DDR3 controller is respectively connected with a DDR3 running memory, is connected with the vegetation index calculation module through the VDMA module, and is used for receiving the vegetation index image, caching the vegetation index image on the DDR3 running memory in real time in a direct memory access mode through the VDMA module, and notifying the kernel that the cache is finished after the cache is finished;
the memory card management unit is respectively connected with the VDMA module and the kernel, is connected with an external memory card, and is used for storing the obtained vegetation index image into the external memory card through the VDMA module and informing the completion of the storage of the kernel after the storage is completed;
and the serial port unit is used for realizing communication between the kernel and the external equipment in a serial port mode and receiving a control instruction and a scaling factor parameter.
3. The vegetation index-based real-time image blade segmentation system according to claim 1, wherein the vegetation index calculation module comprises a fan-out processing unit, a vegetation index calculator, a fan-in processing unit and a multiplexer;
the fan-out processing unit is used for receiving the video stream and carrying out fan-out processing on the video stream to obtain three independent RGB color channels;
the vegetation index calculator is used for receiving the scaling factor parameter and calculating the value of the vegetation index by combining the scaling factor parameter;
the fan-in processing unit is used for dividing each three vegetation indexes into a group and respectively writing the vegetation indexes into three channels of red R, green G and blue B to obtain N paths of RGB color video streams;
and the multiplexer is used for selecting one path from the N paths of RGB color video streams to be output as the vegetation index image.
4. The vegetation index-based real-time image leaf segmentation system of claim 1, wherein the VDMA module comprises an S2MM channel and an MM2S channel;
the S2MM channel is used for providing a channel for directly accessing the memory to cache the real-time processing result;
the MM2S channel is used to provide a path for storing the cached processing result to an external memory card.
5. The vegetation index-based real-time image leaf segmentation system according to claim 1, further comprising an HDMI decoder and an HDMI encoder;
the HDMI decoder is respectively connected with an external image acquisition device and the vegetation index calculation module, and is used for receiving the real-time video stream acquired by the external image acquisition device through an HDMI interface, converting the real-time video stream into a VESA standard video stream, and sending the converted video stream to the vegetation index calculation module according to a control instruction of the kernel control module;
the HDMI encoder is respectively used for outputting the processed vegetation index image to the downlink equipment through an HDMI interface.
6. The vegetation index-based real-time image leaf segmentation system according to claim 1, wherein the threshold segmentation module sets decision thresholds for three RGB color channels, respectively, and performs logical AND operation on regions within the three color channel thresholds to obtain a mask of a position where a leaf is located in an input image, thereby realizing segmentation of the leaf image.
7. The system of claim 1, further comprising a filter module configured to perform histogram equalization and median filtering on the vegetation index image;
the specific processing procedure of the histogram equalization is as follows:
wherein HinThe frequency histogram for representing one color channel in one input frame image is obtained by counting the gray frequency of the corresponding color channel in one frame image; l ismaxRepresents the maximum luminance value; size represents oneHow many pixels there are in the frame image; l isinThe gray value of a pixel point in the input image is obtained; l isoutIndicating the pixel value of the processing result of the corresponding pixel after the histogram equalization processing;
performing histogram equalization on the three RGB channels of each frame of image respectively, and combining the processing results of the three channels at an output end to form the histogram equalization of the vegetation index group;
the specific processing procedure of the median filtering processing is as follows:
wherein, P1, P2, … and P9 are adjacent 3-by-3 pixel matrixes; max1, Max2, Max3 refer to the maximum of the first, second, and third rows, respectively, of the 3 × 3 pixel matrix; mid1, Mid2, Mid3 refer to the middle values of the first, second, and third rows, respectively, of the 3 x3 pixel matrix; min1, Min2, Min3 refer to the minimum of the first, second, and third rows, respectively, of the 3 x3 pixel matrix; max _ min is the minimum value among Max1, Max2 and Max 3; max _ Mid is the intermediate value among Mid1, Mid2 and Mid 3; min _ Max is the minimum value among Max1, Max2, Max3 described above; the median filtering result is the median of Max _ Min, Mid _ Mid, and Min _ Max.
8. A real-time image blade segmentation method based on vegetation indexes is characterized by comprising the following steps:
receiving a control instruction, a video stream and a scaling factor parameter, calculating all vegetation indexes according to the control instruction and the scaling factor parameter, dividing all three vegetation indexes into a group, respectively writing the group into three channels of red R, green G and blue B, and generating an RGB color video stream as an vegetation index image to be output;
receiving the vegetation index image and caching the vegetation index image according to the control instruction;
and carrying out blade segmentation on the vegetation index image according to a preset judgment threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111477950.XA CN114170260B (en) | 2021-12-06 | 2021-12-06 | Real-time image blade segmentation system and method based on vegetation index |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111477950.XA CN114170260B (en) | 2021-12-06 | 2021-12-06 | Real-time image blade segmentation system and method based on vegetation index |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114170260A true CN114170260A (en) | 2022-03-11 |
CN114170260B CN114170260B (en) | 2024-05-31 |
Family
ID=80483311
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111477950.XA Active CN114170260B (en) | 2021-12-06 | 2021-12-06 | Real-time image blade segmentation system and method based on vegetation index |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114170260B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109583378A (en) * | 2018-11-30 | 2019-04-05 | 东北大学 | A kind of vegetation coverage extracting method and system |
CN110717852A (en) * | 2019-06-13 | 2020-01-21 | 内蒙古大学 | FPGA-based field video image real-time segmentation system and method |
CN110889394A (en) * | 2019-12-11 | 2020-03-17 | 安徽大学 | Rice lodging recognition method based on deep learning UNet network |
AU2020100917A4 (en) * | 2020-06-02 | 2020-07-09 | Guizhou Institute Of Pratacultural | A Method For Extracting Vegetation Information From Aerial Photographs Of Synergistic Remote Sensing Images |
-
2021
- 2021-12-06 CN CN202111477950.XA patent/CN114170260B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109583378A (en) * | 2018-11-30 | 2019-04-05 | 东北大学 | A kind of vegetation coverage extracting method and system |
CN110717852A (en) * | 2019-06-13 | 2020-01-21 | 内蒙古大学 | FPGA-based field video image real-time segmentation system and method |
CN110889394A (en) * | 2019-12-11 | 2020-03-17 | 安徽大学 | Rice lodging recognition method based on deep learning UNet network |
AU2020100917A4 (en) * | 2020-06-02 | 2020-07-09 | Guizhou Institute Of Pratacultural | A Method For Extracting Vegetation Information From Aerial Photographs Of Synergistic Remote Sensing Images |
Non-Patent Citations (1)
Title |
---|
卞雪等: "基于低空可见光谱的植被覆盖率计算", 《水土保持通报》, no. 05, 15 October 2017 (2017-10-15) * |
Also Published As
Publication number | Publication date |
---|---|
CN114170260B (en) | 2024-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111709351B (en) | Three-tributary network behavior identification method based on multipath space-time characteristic reinforcement fusion | |
CN107424198A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN110505472B (en) | Quality evaluation method for H.265 ultra-high-definition video | |
CN109389569B (en) | Monitoring video real-time defogging method based on improved DehazeNet | |
CN108875619A (en) | Method for processing video frequency and device, electronic equipment, computer readable storage medium | |
CN110148093B (en) | Image defogging improvement method based on dark channel prior | |
Zuo et al. | Screen content image quality assessment via convolutional neural network | |
Zheng et al. | Infrared traffic image enhancement algorithm based on dark channel prior and gamma correction | |
CN107657619A (en) | A kind of low-light (level) Forest fire image dividing method | |
CN108154492B (en) | A kind of image based on non-local mean filtering goes haze method | |
CN108093175B (en) | A kind of adaptive defogging method of real-time high-definition video and device | |
CN107317967A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN107194901A (en) | Image processing method, device, computer equipment and computer-readable recording medium | |
CN104794726B (en) | A kind of underwater picture Parallel segmentation method and device | |
CN108711160A (en) | A kind of Target Segmentation method based on HSI enhancement models | |
CN111192213A (en) | Image defogging adaptive parameter calculation method, image defogging method and system | |
CN107341782A (en) | Image processing method, device, computer equipment and computer-readable recording medium | |
CN112489144B (en) | Image processing method, image processing device, terminal device and storage medium | |
CN108765337B (en) | Single color image defogging processing method based on dark channel prior and non-local MTV model | |
CN110189262A (en) | Image defogging algorithm based on neural network and Histogram Matching | |
Tang et al. | Curvature-based real-time brightness adjustment for ultra hd video | |
CN116258653B (en) | Low-light level image enhancement method and system based on deep learning | |
CN107424134A (en) | Image processing method, device, computer-readable recording medium and computer equipment | |
CN114170260B (en) | Real-time image blade segmentation system and method based on vegetation index | |
CN111754412B (en) | Method and device for constructing data pair and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |