CN-121982027-A - Grafting quality detection method and system for synchronization of RGB and near infrared of dual camera
Abstract
The invention discloses a grafting quality detection method and system for synchronization of RGB and near infrared of a dual camera, and belongs to the technical field of machine vision and facility agriculture. The method comprises the steps of acquiring a heterogeneous image at the same time by synchronously triggering and controlling an RGB camera and a near infrared camera, achieving pixel-level registration and positioning of a target region of interest by utilizing external parameter reprojection, extracting multidimensional geometry and communication characteristics to generate initial gap cavity scores, eliminating shadow interference by combining registration near infrared image reflection consistency to obtain scores G, further extracting RGB color differences and near infrared reflection differences, constructing a necrosis water loss index Z to inhibit false yellow brown misjudgment, calculating a yellow brown score Y, and finally logically outputting grafting opening abnormal types and risk grades according to double scoring threshold values, and driving equipment to sort. The invention effectively overcomes the misjudgment of illumination shadows, realizes objective quantification, early warning and rapid grading of the abnormal gap and lesion necrosis, and is perfectly suitable for a large-scale seedling raising production line.
Inventors
- CHEN NAN
- WAN JUN
- LI BIN
- SONG YUANHUI
- Wang guantian
- WU JIAN
Assignees
- 华东交通大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260407
Claims (10)
- 1. The grafting quality detection method for the synchronization of the RGB and the near infrared of the double camera is characterized by comprising the following steps of: triggering an RGB camera and a near infrared camera to synchronously expose, and collecting RGB images and corresponding near infrared images of watermelon grafted seedlings at the current moment; Invoking a pre-established projection mapping model, calculating a mapping relation from the near infrared image to the RGB image coordinate system, carrying out reprojection transformation on the near infrared image to carry out pixel level registration, and outputting a registration near infrared image; Extracting boundary morphological characteristics of a stock and a scion from the RGB image, positioning and intercepting a target region of interest according to the boundary morphological characteristics, and carrying out scale normalization and illumination correction on the target region of interest; The method comprises the steps of obtaining a target interested region, extracting contact band continuity features, dark region connected region features and notch geometric features, carrying out weighted calculation to obtain initial gap hole scores, locating suspected dark regions in the target interested region, extracting near infrared reflection features at corresponding positions in the registered near infrared images, carrying out reflection consistency test, carrying out shadow elimination, correcting the initial gap hole scores based on shadow elimination results, and outputting final gap hole scores G; In the target region of interest, extracting color features based on the RGB image, constructing a necrosis water loss index Z by combining the near infrared reflection features of the registered near infrared image, carrying out normalization weighted fusion based on the color features, the near infrared reflection features and the necrosis water loss index Z, and outputting a yellow brown score Y; And receiving the gap hole score G and the yellow brown score Y, performing fusion judgment by comparing a preset first threshold value with a second threshold value, outputting the abnormal type and risk level of the watermelon grafted seedling, and sorting according to the abnormal type and risk level.
- 2. The method according to claim 1, wherein invoking a pre-established projection mapping model, calculating a mapping relationship of the near-infrared image to the RGB image coordinate system, performing a reprojection transformation on the near-infrared image for pixel-level registration, and outputting a registered near-infrared image, specifically comprising: Acquiring an internal reference matrix of the RGB camera and the near infrared camera and a relative translational rotation external reference matrix between the RGB camera and the near infrared camera, and constructing a projection mapping model from a space three-dimensional point to a two-dimensional image plane; and based on the projection mapping model, re-projecting each pixel point in the near-infrared image into a coordinate system of the RGB image through a sub-pixel level interpolation algorithm, and generating the registered near-infrared image with strict spatial pixel alignment relation.
- 3. The method according to claim 1, wherein the step of extracting the continuous feature of the contact band, the feature of the connected region of the dark area and the notch geometric feature and performing weighted calculation to obtain the initial gap cavity score comprises the following steps: The contact strip continuity feature comprises at least one of a contact strip edge break rate, a continuous length ratio, and a closure; the dark region connected domain features comprise at least one of the maximum connected domain area, the thin length and the penetration degree obtained after threshold segmentation and connected domain analysis are carried out on the suspected gap dark region; the notch geometry includes at least one of a notch width, zhou Xiangzhan ratio, and shape irregularity; and carrying out normalization processing on the extracted contact band continuity features, the dark area connected region features and the notch geometric features, then carrying out linear weighting according to a preset first feature weight vector, and outputting the initial gap cavity score.
- 4. The method of claim 1, wherein locating suspected dark regions within the target region of interest and extracting near infrared reflection features at corresponding locations in the registered near infrared image for reflection consistency verification to perform shadow elimination, correcting the initial gap hole score based on shadow elimination results, and outputting a final gap hole score G, comprising: Acquiring a first coordinate set of the suspected dark area in the RGB image, and extracting a near infrared reflection value of an area corresponding to the first coordinate set in the registration near infrared image; Calculating the reflection difference between the suspected dark area and the adjacent healthy tissue area, and judging that the suspected dark area of the corresponding area is a shadow artifact caused by uneven illumination or surface reflection when the reflection difference is lower than a preset reflection threshold value; And reducing the contribution weight of the suspected dark area which is judged to be shadow artifact in the initial gap hole score according to a preset attenuation coefficient or eliminating the regional characteristic data, thereby obtaining the final gap hole score G, wherein the score G is used for representing the gap or hole abnormality degree caused by the non-formation or insufficient formation of the callus.
- 5. The method according to claim 1, characterized in that, within the target region of interest, color features are extracted based on the RGB image and a necrotic water loss index Z is constructed in combination with the near infrared reflection features of the registered near infrared image, comprising in particular: Converting the RGB image of the target region of interest into a preset color space, and counting the proportion of pixels which are in yellow brown in the preset color space as one of the color features, and marking the proportion as yellow brown proportion P; Obtaining a reference color of healthy tissue or white callus, calculating the chromaticity shift of pixels in the target region of interest relative to the reference color as one of the color features, and marking as delta E; extracting at least one of an average reflection value of a region of interest, a normalized difference index constructed by near infrared reflection and a reflection difference with a neighborhood healthy region from a corresponding region of the registered near infrared image as the near infrared reflection characteristic, wherein the reflection difference is denoted as delta R; And combining the extracted chromaticity offset delta E with the reflection difference delta R to construct a non-linear mapped necrosis water loss index, wherein an expression formula is marked as Z=f (delta E, delta R), and the necrosis water loss index Z is used for distinguishing true pathogen infection water loss from false yellow brown caused by illumination shadow.
- 6. The method of claim 5, wherein the outputting of the tan score Y is based on normalized weighted fusion of the color signature, the near infrared reflectance signature, and the necrotic water loss index Z, and specifically comprises: establishing a dynamic mapping relation between the necrosis water loss index Z and the color characteristic weight, and dynamically adjusting the weight distribution of the yellow-brown proportion P and the chromaticity shift delta E in fusion calculation by using the necrosis water loss index Z as a confidence coefficient adjusting factor; When the necrosis water loss index Z is lower than a preset true-false judging threshold value, judging that the yellow brown color in the target region of interest is changed into the false image caused by soil contamination on the surface or light supplementing color temperature deviation, and attenuating the weight distribution of the yellow brown proportion P and the chromaticity shift delta E according to the dynamic mapping relation so as to inhibit misjudgment; Based on the yellow brown proportion P and the chromaticity shift delta E after weight distribution is adjusted, a multi-mode fusion evaluation function is constructed to perform normalization processing by combining the near infrared reflection characteristic and the necrosis water loss index Z, and the yellow brown score Y representing the real infection and water loss necrosis degree is output.
- 7. The method of claim 1, wherein receiving the gap hole score G and the tan score Y, and comparing a preset first threshold value with a second threshold value to perform fusion discrimination, and outputting an abnormal type and a risk level of the watermelon grafted seedling, comprises: the preset abnormality types at least comprise normal, gap hole abnormality, yellow brown abnormality and compound abnormality; When the score G exceeds the first threshold and the score Y does not exceed the second threshold, determining that the gap hole is abnormal; determining that the yellow-brown color is abnormal when the score Y exceeds the second threshold and the score G does not exceed the first threshold; determining that the composite anomaly is present when the score G exceeds the first threshold and the score Y simultaneously exceeds the second threshold; Different risk levels are given for different types of the anomalies, and the highest risk level is output when the composite anomaly is determined.
- 8. A grafting quality detection system with dual-camera RGB and near infrared synchronization is characterized by comprising: The synchronous image acquisition module is used for triggering the RGB camera and the near infrared camera to synchronously expose and acquiring the RGB image and the corresponding near infrared image of the watermelon grafted seedling at the current moment; the image reprojection registration module is used for calling a pre-established projection mapping model, calculating the mapping relation between the near infrared image and the RGB image coordinate system, carrying out reprojection transformation on the near infrared image to carry out pixel-level registration, and outputting a registered near infrared image; The target region positioning and preprocessing module is used for extracting boundary morphological characteristics of the stock and the scion from the RGB image, positioning and intercepting a target region of interest according to the boundary morphological characteristics, and carrying out scale normalization and illumination correction on the target region of interest; The gap cavity evaluation module is used for extracting continuity features of a contact zone, communication region features of a dark region and gap geometric features in the target region of interest, carrying out weighted calculation to obtain an initial gap cavity score, locating a suspected dark region in the target region of interest, extracting near infrared reflection features at corresponding positions in the registration near infrared image, carrying out reflection consistency check, carrying out shadow elimination, correcting the initial gap cavity score based on a shadow elimination result, and outputting a final gap cavity score G; the necrosis water loss evaluation module is used for extracting color features based on the RGB image in the target region of interest, constructing a necrosis water loss index Z by combining the near infrared reflection features of the registration near infrared image, carrying out normalized weighted fusion based on the color features, the near infrared reflection features and the necrosis water loss index Z, and outputting a yellow brown score Y; and the judging and sorting module is used for receiving the gap cavity score G and the yellow brown score Y, carrying out fusion judgment by comparing a preset first threshold value with a second threshold value, outputting the abnormal type and the risk level of the grafted watermelon seedling, and sorting according to the abnormal type and the risk level.
- 9. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, which when executed by the processor, implement the steps of a dual camera RGB and near infrared synchronized grafting quality detection method according to any one of claims 1-7.
- 10. A readable storage medium, wherein a program or instructions is stored on the readable storage medium, which when executed by a processor, implements the steps of a dual camera RGB and near infrared synchronized grafting quality detection method according to any one of claims 1-7.
Description
Grafting quality detection method and system for synchronization of RGB and near infrared of dual camera Technical Field The invention belongs to the technical field of facility agriculture seedling quality detection, machine vision and near infrared imaging intersection, and particularly relates to a grafting quality detection method and system with synchronous RGB and near infrared of a dual camera. Background The survival rate and the subsequent growth potential of the grafted watermelon seedlings are closely related to the healing quality of the grafting ports. In large-scale seedling production, two typical abnormal conditions of grafting ports may occur, namely, the first type is that callus is not formed or is formed insufficiently, so that the combination of the stock and the tangential plane of the scion is not tight, the grafting ports are shown to have gaps or holes in appearance, the second type is that the grafting ports are infected by pathogenic bacteria or are subjected to serious desiccation necrosis, and the second type is that the grafting ports are shown to have abnormal phenomena such as yellow brown, dry shrinkage or necrotic spots in appearance. The existing detection means depend on manual visual inspection, the mode is greatly interfered by environmental illumination, observation angles and experience differences of workers, objective quantification is difficult to achieve, detection efficiency is low, and omission and false detection are extremely easy to cause. When machine vision detection is carried out by adopting single RGB vision, structural shadows or surface reflection in an image are easily misjudged as gaps, and identification of slight color change in early stage of pathogen infection or water loss is extremely unstable. Although the near infrared imaging technology is more sensitive to the water content and structural change of plant tissues, how to solve the synchronous acquisition of RGB and near infrared dual cameras on a seedling raising production line moving at high speed, the accurate registration of heterologous images and how to deeply fuse the two modal characteristics to eliminate interference and accurately grade is a technical problem to be solved in the present field. In summary, the existing grafting opening detection technology has the problems of easy light interference, high misjudgment rate and difficult accurate quantitative classification of the gap cavity and the early-stage yellow brown necrosis. What is needed is an intelligent detection scheme capable of synchronously fusing RGB morphological color features and near infrared physicochemical features, effectively eliminating shadow artifacts and realizing rapid and accurate detection and classification. Disclosure of Invention The invention aims to solve the technical problems that the conventional grafting opening detection technology is easy to be interfered by light and shadow on a seedling production line, so that the misjudgment rate is high, and the gap cavity abnormality and the yellow brown necrosis abnormality cannot be accurately quantified, and provides a grafting quality detection method for synchronization of a dual-camera RGB and near infrared. According to the method, a multi-dimensional scoring mechanism and a shadow elimination strategy are constructed through dual-source synchronous imaging and registration, so that objective quantification, rapid grading and online sorting of grafting port quality are realized. In a first aspect, the invention provides a grafting quality detection method for synchronization of RGB and near infrared of a dual camera, which comprises the following steps: triggering an RGB camera and a near infrared camera to synchronously expose, and collecting RGB images and corresponding near infrared images of watermelon grafted seedlings at the current moment; Invoking a pre-established projection mapping model, calculating a mapping relation from the near infrared image to the RGB image coordinate system, carrying out reprojection transformation on the near infrared image to carry out pixel level registration, and outputting a registration near infrared image; Extracting boundary morphological characteristics of a stock and a scion from the RGB image, positioning and intercepting a target region of interest according to the boundary morphological characteristics, and carrying out scale normalization and illumination correction on the target region of interest; The method comprises the steps of obtaining a target interested region, extracting contact band continuity features, dark region connected region features and notch geometric features, carrying out weighted calculation to obtain initial gap hole scores, locating suspected dark regions in the target interested region, extracting near infrared reflection features at corresponding positions in the registered near infrared images, carrying out reflection consistency test, carrying out shadow elimination, c