Real-time detection method and system for fruit maturity

By analyzing the brightness and edge features of consecutive image frames in fruit ripeness detection, a trend of reflective brightness change is constructed, which solves the problem of misidentification caused by environmental changes in traditional methods and achieves stable and accurate detection of fruit ripeness.

CN121640448AActive Publication Date: 2026-03-10CHINA AGRI UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing real-time fruit ripeness detection methods are prone to misidentification of fruit surface brightness fluctuations as state changes due to isolated frame judgments when faced with time-varying environments or non-uniform lighting conditions. They lack the basis for recognizing structural continuity and optical response synchronization, resulting in unstable recognition and inaccurate state classification.

Method used

By acquiring continuous image frames of strawberry fruit surface, the gray-scale change trend of channel brightness region is extracted, the drift direction consistency of edge coordinate sequence is tracked, time extension characteristics are analyzed, and the degree of regional symmetry shift is measured by combining the distribution of gray-scale jump points. The trend of reflective brightness change is constructed, and the image frame sequence intervals in which structural stability and brightness increase occur simultaneously are selected to complete the segmented response and feature summarization of the mature state.

Benefits of technology

It achieves stable and accurate detection of fruit ripeness in dynamic tracking scenarios, improves the reliability and adaptability of detection, and overcomes the problem of misidentification caused by environmental changes in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121640448A_ABST
    Figure CN121640448A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fruit detection, in particular to a fruit maturity real-time detection method and system, and the method comprises the following steps: obtaining a channel image signal, extracting a gray level change trend, judging a region enhancement condition, tracking an edge drift direction, analyzing time extension characteristics, comparing gray level jump synchronism, and recognizing a brightness change trend. And screening a structure coordination and brightness rising section, and outputting a mature state sequence. According to the method, the channel brightness enhancement trend in the image frame is tracked, the edge contour drift direction and the time extension feature are combined, the continuous expression of the structure change is extracted, the symmetry offset degree of the region is measured according to the gray level jump point distribution, and the reflection change trend is constructed according to the brightness change direction of the gray level mean value. And screening an image frame sequence interval in which structure stability and brightness rise synchronously appear, extracting paragraphs with time continuity and regional attribute coordination, and completing segmented response and feature induction of a fruit surface maturity state change process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fruit testing technology, and in particular to a method and system for real-time detection of fruit ripeness. Background Technology

[0002] The field of fruit testing technology involves the identification and analysis of fruit quality status. Core aspects include acquiring and judging physical and chemical indicators such as fruit appearance color, texture firmness, internal sugar and acid content, and odor components. This technology primarily utilizes methods such as spectral reflectance analysis, multi-source image acquisition, gas sensor detection, and non-contact resistance measurement to extract and digitize fruit quality information. This data supports applications such as sorting control, origin pretreatment, and storage quality assessment, offering real-time and non-destructive testing capabilities. Traditional real-time fruit maturity detection methods refer to methods that continuously assess maturity without damaging the fruit's structure. This primarily addresses the identification of maturity status corresponding to changes in strawberry skin color and texture. Traditional methods typically rely on human observation of strawberry color changes as a basis for judgment, or use wearable surface hardness probes to measure strawberry indentation response. Other methods utilize refractometers to analyze the soluble solids content in strawberry juice to estimate maturity. These methods generally employ optical image acquisition, tactile feedback analysis, or light refractive index measurement to complete the data acquisition process.

[0003] Existing technologies do not establish inter-frame communication mechanisms between image sequences during actual recognition. In the face of time-varying environments or non-uniform lighting conditions, the brightness fluctuations of the fruit surface are easily misidentified as state changes due to the judgment of isolated frames. In cases where regional change trends cannot be used to support the judgment, the analysis results of the maturity state are one-sided. Especially when dealing with samples with continuous light reflection or structural disturbances, the single-point value method is easily affected by instantaneous contrast interference and lacks the basis for recognizing structural continuity and optical response synchronization. This can easily lead to problems such as unstable recognition, inaccurate state classification, and ambiguous stage division, which limits its adaptability and detection reliability in dynamic tracking scenarios. Summary of the Invention

[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a method for real-time detection of fruit ripeness;

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for real-time detection of fruit ripeness, comprising the following steps:

[0006] S1: Obtain the continuous image frame channel image signal of strawberry fruit surface, call the channel brightness area, extract the gray value change trend of reflective area, compare the brightness direction change, determine whether the same area is enhanced, filter the continuous response channel, and obtain the channel continuous response identifier.

[0007] S2: Based on the channel continuous response identifier, extract the strawberry edge coordinate sequence, track the frame sequence line segment position change, determine the consistency of the drift direction, analyze the time extension characteristics, filter the continuous displacement region, and obtain the edge contour change indicator.

[0008] S3: Based on the edge contour change indication, divide the regions on both sides of the image center line, extract gray-level jump points, compare position differences, determine whether the jumps occur synchronously, and obtain the region symmetry offset index.

[0009] S4: Based on the regional symmetry offset index, compare the reflective areas of the channel continuous response marker, extract the grayscale average trend of the numbered frames, compare the brightness change direction, identify continuous and alternating segments, divide the bright and dark process, and obtain the reflective brightness change sequence.

[0010] S5: Based on the reflected brightness change sequence, compare the frame sequence intersection, filter the brightness increase segment and the structural coordination segment, extract the start and end frame positions, compare the image response continuity, and obtain the mature state output sequence.

[0011] As a further aspect of the present invention, the channel continuous response identifier includes channel grayscale change trend, brightness direction change, judgment of continuous enhancement phenomenon in the same area, and judgment of channel response continuity; the edge contour change indicator includes edge drift direction consistency, coordinate line segment time extension, continuous change area identification, and edge drift behavior extraction; the regional symmetry offset index includes the distribution of jump points on both sides of the image center line, grayscale difference trend, jump behavior synchronization, and inconsistent distribution range; the reflective brightness change sequence includes brightness mean change trend, brightness direction difference, brightness change segment division, and brightness-darkness change process; and the mature state output sequence includes the starting frame of the brightness rise segment, the ending frame of the structural coordination segment, image response continuity, and regional attribute consistency.

[0012] As a further aspect of the present invention, the continuous response channel refers to the set of regions in which the brightness of the region corresponding to the image channel continuously increases in consecutive image frames, and exhibits continuous and consistent changes in time and space.

[0013] The consistency of drift direction refers to the consistency of the displacement trend of edge coordinate line segments in the horizontal and vertical directions in consecutive image frames, reflecting the behavior of edge drift over time.

[0014] As a further aspect of the present invention, the time extension feature refers to the continuous existence of edge segments or image regions in consecutive image frames, with a coherent change path, exhibiting temporal continuity and continuity.

[0015] Image response continuity refers to the response state in which the brightness distribution, shape contour and structural properties of an image region remain consistent on the time axis in consecutive frames.

[0016] As a further aspect of the present invention, the specific steps of S1 are as follows:

[0017] S101: Acquire the red and green channel image signals of the strawberry surface in consecutive image frames, extract the pixel brightness value of the peel area in each frame, monitor the grayscale change direction of the same image position in multiple frames, determine whether it continues to change upward, filter the areas with continuous increase features, and obtain a set of channel brightness enhancement segments.

[0018] S102: Based on the frame sequence position in the set of channel brightness enhancement segments, extract the frame sequence distribution of the brightness enhancement region within the segment, analyze whether the temporal order between adjacent frames is continuous, and select the frame sequence without interruption as a continuous temporal segment to obtain a continuous enhancement sequence number set.

[0019] S103: Based on the spatial coordinates in the frame image corresponding to the continuous enhancement sequence number set, extract the horizontal and vertical distribution trajectories of the enhancement region, analyze whether the coordinate continuity direction between enhancement segments is consistent, filter the response regions with continuous spatial extension characteristics, and obtain the channel continuous response identifier.

[0020] As a further aspect of the present invention, the specific steps of S2 are as follows:

[0021] S201: Based on the image region in the corresponding frame of the continuous response identifier of the channel, extract the fruit surface edge coordinate point data of the corresponding numbered frame in the strawberry image, analyze the gray-scale change region of the edge pixels in the continuous frames, filter the edge coordinate points in the change region, and arrange the spatial positions according to the frame order to obtain the strawberry edge coordinate sequence.

[0022] S202: Based on the strawberry edge coordinate sequence, determine the direction of position change of the same coordinate point in consecutive frames, extract the movement trajectory of the edge line segment in the horizontal and vertical directions, filter the edge line segment areas with consistent movement directions, and obtain the edge drift direction distribution set;

[0023] S203: Based on the edge drift direction distribution set, track the continuous state of the drift line segment in consecutive frames, extract the region with continuous time span and trajectory, filter the edge line segment region with continuous spatial and frame sequence characteristics, and obtain the edge contour change indication.

[0024] As a further aspect of the present invention, the specific steps of S3 are as follows:

[0025] S301: Based on the edge contour change indication, divide the regions on both sides of the image center line, extract the set of jump points along the gray distribution direction of the region, retrieve the continuous occurrence positions of jump points in the same region in each frame, filter the continuously changing display regions, and obtain the continuous jump point distribution matrix.

[0026] S302: Based on the continuous jump point distribution matrix, compare the corresponding positional relationship of the jump points in the frame on both sides, match the trend of the horizontal distance change between the jump point pairs in the frame, determine whether the jump behavior on both sides is in a synchronous state, and obtain the regional grayscale behavior synchronization structure set.

[0027] S303: Based on the aforementioned regional grayscale behavior synchronization structure set, extract the vertical coordinate offset amplitude of the jump point in each frame, track the change amplitude of the aggregation density of jump points on both sides, and obtain the regional symmetry offset index according to the extension distance of the grayscale abrupt change between frames.

[0028] As a further aspect of the present invention, the specific steps of S4 are as follows:

[0029] S401: Based on the regional symmetry offset index, compare the reflective area in the corresponding frame with the channel continuous response identifier, extract the grayscale pixel set of the corresponding reflective area in the numbered frame, monitor the average grayscale value of pixels in each frame, organize the average grayscale of each frame in numerical order, and obtain the grayscale average trend sequence.

[0030] S402: Based on the gray-scale mean trend sequence, compare the gray-scale mean direction relationship between adjacent frames, extract continuous segments where the gray-scale value continues to rise and continue to fall, and split the segment range where the direction changes alternately to obtain the brightness direction structure sequence.

[0031] S403: Based on the brightness direction structure sequence, extract the start and end position indices of the continuous direction segments and the alternating direction segments, sort and connect them according to the indices, match the brightness stages of the bright and dark areas according to the time sequence, and split the continuous change process according to the time span to obtain the reflection brightness change sequence.

[0032] As a further aspect of the present invention, the specific steps of S5 are as follows:

[0033] S501: Based on the reflected brightness change sequence, compare the frame sequence of the brightness rise segment with the frame sequence of the structural coordination segment in the regional symmetry offset index, extract the time segment corresponding to the intersection of frame numbers, filter the region where brightness enhancement and structural response occur simultaneously, and obtain the brightness-structure intersection sequence.

[0034] S502: Based on the brightness structure intersection sequence, extract the starting frame sequence of the brightness rising segment and the ending frame sequence of the structure coordination segment, compare the sequential positions in the time order, and index the image frame sequence by number to divide the region feature connection range in the image to obtain the frame set corresponding to the structure brightness.

[0035] S503: Based on the set of frames corresponding to the structure brightness, track the channel brightness distribution and image region contour in each set of frame images, analyze the inter-frame region response continuity and feature extension path, filter frame sequence segments with associated features, and obtain the mature state output sequence.

[0036] A real-time fruit ripeness detection system includes:

[0037] The channel response extraction module acquires channel image signals from continuous image frames of strawberry fruit surface, calls the channel brightness region, extracts the grayscale change trend of reflective region, compares the brightness direction change, determines whether the same region is enhanced, filters continuous response channels, and obtains channel continuous response identifiers.

[0038] The edge behavior judgment module extracts the strawberry edge coordinate sequence based on the channel continuous response identifier, tracks the frame sequence line segment position change, judges the consistency of drift direction, analyzes time extension characteristics, filters continuous displacement regions, and obtains edge contour change indication.

[0039] Based on the edge contour change indication, the symmetry feature recognition module divides the regions on both sides of the image center line, extracts gray-level jump points, compares positional differences, determines whether the jumps occur synchronously, and obtains the regional symmetry offset index.

[0040] The brightness change analysis module, based on the regional symmetry offset index, compares the reflective areas corresponding to the channel continuous response identifier, extracts the grayscale mean change trend in the numbered frames, compares the brightness direction differences, filters continuous segments and alternating segments, divides the brightness change process, and obtains the reflective brightness change sequence.

[0041] The mature state output module, based on the reflected brightness change sequence, compares the frame sequence intersection, filters the brightness increase segment and the structural coordination segment, extracts the start frame and end frame positions, compares the image response continuity, and obtains the mature state output sequence.

[0042] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0043] In this invention, by tracking the channel brightness enhancement trend in image frames, combining the edge contour drift direction and time extension features, the continuous performance of structural changes is extracted. The degree of regional symmetry shift is measured based on the distribution of gray-level jump points. The reflection change trend is constructed by combining the brightness change direction of the gray-level mean. The image frame sequence intervals where structural stability and brightness increase occur simultaneously are selected. Segments with temporal continuity and regional attribute coordination are extracted to complete the segmented response and feature summarization of the fruit surface ripening state change process. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a schematic diagram of the steps of the present invention;

[0046] Figure 2 This is a detailed schematic diagram of S1 of the present invention;

[0047] Figure 3 This is a detailed schematic diagram of S2 of the present invention;

[0048] Figure 4 This is a detailed schematic diagram of S3 of the present invention;

[0049] Figure 5 This is a detailed schematic diagram of S4 of the present invention;

[0050] Figure 6 This is a detailed schematic diagram of S5 of the present invention;

[0051] Figure 7 This is a system module diagram of the present invention. Detailed Implementation

[0052] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0053] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0054] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent.

[0055] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0056] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0057] Please see Figure 1 This invention provides a method for real-time detection of fruit ripeness, comprising the following steps:

[0058] S1: Obtain the channel image signal of the strawberry surface in consecutive image frames, call the channel brightness area in the image frame, extract the channel grayscale change trend in the reflective area, compare the brightness direction change of the sequential channel, determine whether the same area in consecutive frames shows a continuous enhancement phenomenon, filter the continuous response channel, and obtain the channel continuous response identifier.

[0059] S2: Based on the image region in the corresponding frame of the channel continuous response identifier, extract the fruit surface edge coordinate point sequence of the corresponding numbered frame in the strawberry image, track the position change of the coordinate line segment under the frame sequence index, determine whether the edge drift direction is consistent, analyze the time extension of the drift line segment in each coordinate trend, select the continuous change area as the drift behavior line segment, and obtain the edge contour change indicator.

[0060] S3: Based on edge contour change indicators, divide the regions on both sides of the image center line, extract the number of consecutive jump points in the gray-level distribution direction, compare the gray-level difference trend with the intra-frame position, determine whether the jump behavior occurs simultaneously in the corresponding region, and obtain the regional symmetry offset index based on the degree of inconsistency in the distribution range of jump points.

[0061] S4: Based on the regional symmetry offset index, compare the reflective areas corresponding to the channel continuous response identifier, extract the gray value change trend of the reflective areas in the numbered frames, arrange the mean change sequence according to the time order, compare the brightness direction difference between consecutive frames, filter the segments with continuous direction and the segments with alternating direction, divide the brightness change process according to the time sequence, and obtain the reflective brightness change sequence.

[0062] S5: Based on the reflectance brightness change sequence, compare the intersection of the brightness change sequence and the frame number in the region offset index, filter the time interval where the brightness rise segment and the structure coordination segment occur simultaneously, extract the corresponding frame sequence of the starting frame of the brightness rise segment and the ending frame of the structure coordination segment, compare their relationship on the time axis, analyze the continuity of image response and the consistency of regional attributes between the two frames, and obtain the mature state output sequence.

[0063] Channel continuous response indicators include channel grayscale change trends, brightness direction changes, judgment of continuous enhancement phenomena in the same area, and judgment of channel response continuity. Edge contour change indicators include edge drift direction consistency, coordinate line segment time extension, continuous change area identification, and edge drift behavior extraction. Regional symmetry offset indicators include the distribution of jump points on both sides of the image center line, grayscale difference trends, jump behavior synchronization, and inconsistent distribution range. Reflection brightness change sequence includes brightness mean change trends, brightness direction differences, brightness change segment division, and brightness-darkness change process. Mature state output sequence includes the starting frame of the brightness rise segment, the ending frame of the structural coordination segment, image response continuity, and regional attribute consistency.

[0064] Please see Figure 2 The specific steps of S1 are as follows:

[0065] S101: Acquire the red and green channel image signals of the strawberry surface in consecutive image frames, extract the pixel brightness value of the peel area in each frame, monitor the grayscale change direction of the same image position in multiple frames, determine whether it continues to change upward, filter the areas with continuous increase features, and obtain a set of channel brightness enhancement segments.

[0066] First, the pixel matrix information of each channel is extracted line by line for each frame of the image. The target extraction region is located based on the strawberry surface area. By defining the color distribution pattern in the strawberry image, a set of red-dominated peel pixels is extracted. Based on this, green channel data is used to define the boundary of the region, filtering out bright pixels outside the peel area. Next, the pixel brightness information of the target region is obtained from each frame, forming a brightness value sequence corresponding to the frame order. For this pixel brightness value sequence, the grayscale value of pixels at the same position in the image is used as a benchmark. Comparisons are made across all frames to categorize the direction of grayscale value change between frames into three states: positive, negative, or unchanged. A positive change indicates that the grayscale value in the later frame is greater than that in the earlier frame. The direction of grayscale increase can be determined by pixel-by-pixel comparison. The method is executed in a specific way, and the positions of the same gray-level enhancement direction in consecutive frames are aggregated to obtain the channel response region with a continuous enhancement trend. Then, based on the length of consecutive frames with positive changes in the response region, the position pixels with fewer than three frames of changes are filtered out, and the multi-frame continuous enhancement feature region is retained as a reference. By setting the standard that the gray-level difference range between adjacent frames in this region is not less than 5, the set of positions with obvious brightness increase is identified. If the above features are detected in both the red channel and the green channel, it is regarded as a channel response consistent region. The amplified frame segments in the intersection region of the two channels are compared, and the frame number range with stable increase in gray-level mean is extracted. The pixel position information of all segments is extracted and organized into a segment set. The multiple segment sets are numbered and labeled in sequence with the frame sequence index as the numbering order to obtain the channel brightness enhancement segment set.

[0067] S102: Based on the frame sequence position in the set of channel brightness enhancement segments, extract the frame sequence distribution of the brightness enhancement region within the segment, analyze whether the temporal order between adjacent frames is continuous, select the frame sequence without interruption as continuous temporal segments, and obtain the continuous enhancement sequence number set.

[0068] First, extract the image frame number corresponding to each segment in the set and record the start and end frame positions of that number within the segment. For multiple segments formed by the continuous enhancement of pixel grayscale values ​​in the strawberry surface image frame, read the frame sequence table of each segment one by one, arrange them according to the order of the frame numbers, and obtain the temporal evolution trajectory of the brightness enhancement behavior of a single channel in a continuous image sequence. Based on this, read the frame numbers of adjacent pairs one by one. For example, if the frame sequence in the segment is 12, 13, 14, 16, 17, take the difference between the two numbers and determine whether it is equal to 1. If the difference is 1, it is considered that the two frames are uninterrupted in time sequence. If the difference is greater than 1, it is considered that the segment has a time jump behavior at that point. Traverse the entire frame sequence set in this way to determine whether they are all continuous. If all adjacent frame numbers in the entire segment are... If the difference is 1, the segment is considered a continuous segment with complete timing. In actual implementation, the judgment criteria can be set in conjunction with threshold settings. For example, if the maximum allowed number of skipped frames is set to 1, then segments with frame skips of no more than 1 can also be treated as continuous segments. In the implementation scenario, if a data frame number in the channel brightness enhancement segment set is 21, 22, 23, 25, 26, then skipping 24 between numbers 23 and 25 results in a skipped frame number of 1, which is within the set range, and segments 21 to 26 are considered continuous. Conversely, if the numbers are 21, 22, 23, 26, 27, then skipping two frames is judged as an interruption, and the segment needs to be split or removed. Finally, the segment is judged segment by segment in all segments, and the numbers of all segments that meet the continuous timing conditions are extracted and organized into an index number sequence of continuous channel enhancement segments to obtain a continuous enhancement sequence number set.

[0069] S103: Based on the spatial coordinates in the corresponding frame images of the continuous enhancement sequence number set, extract the horizontal and vertical distribution trajectories of the enhancement region, analyze whether the coordinate continuity direction between enhancement segments is consistent, filter the response regions with continuous spatial extension characteristics, and obtain the channel continuous response identifier.

[0070] First, the pixel enhancement locations appearing in each numbered segment are extracted. The horizontal and vertical coordinates of each pixel in the image coordinate system are recorded frame by frame, forming a coordinate trajectory table indexed by frame order. During extraction, the scope must be limited to the strawberry surface area to eliminate interference from the background. Then, based on the relative displacement direction of coordinate points between consecutive frames, the horizontal and vertical change trends are classified and judged. If the horizontal change of coordinate points in two adjacent frames is within ±3 pixels and the vertical displacement direction remains consistent, it is determined to be a continuation in the same direction. If the displacement direction changes in opposite directions on both the horizontal and vertical axes, it is determined to be a discontinuous extension area. To ensure accuracy, a center pixel within the grayscale enhancement segment can be selected as a reference, and its offset path in adjacent frames can be compared. If the overall direction offset angle of the path is less than 15 degrees, the direction is considered consistent. For example, in three consecutive frames, if the coordinates of the same enhancement point change from (120, 80) to (122, 82) and then... The offset angle at (123, 84) is approximately 11 degrees, which falls within the range for consistent direction and can be retained as a continuous extended segment. Based on this, the coordinate trajectory of all numbered segments is checked for consistent direction. Segments with the same displacement direction are aggregated, and their spatial extension is determined based on the number of frames covered by the continuous displacement direction. If the continuous direction extends for more than three frames, it is classified as a stable spatial extension segment. Segments with less than two frames of extension are discarded. At the same time, the presence of intersections or abrupt changes in direction is detected in both the horizontal and vertical directions. If the trajectory of a certain region is continuous in both the horizontal and vertical directions without abrupt changes, it is considered a spatially continuous and complete region. For example, if the continuous frame enhancement point in the upper left region of the strawberry surface moves from coordinates (100, 60) to (105, 65) and continues to spread, the enhancement behavior of this region is identified as a spatial extension response region. Finally, the regions with continuous spatial extension characteristics are numbered and summarized to obtain the channel continuous response identifier.

[0071] Please see Figure 3 The specific steps of S2 are as follows:

[0072] S201: Based on the image region in the corresponding frame of the channel continuous response identifier, extract the fruit surface edge coordinate point data of the corresponding numbered frame in the strawberry image, analyze the gray-scale change region of edge pixels in the continuous frames, filter the edge coordinate points in the change region, and arrange the spatial positions in the frame order to obtain the strawberry edge coordinate sequence.

[0073] First, the image portion corresponding to the response number is locked from consecutive frames, and edge extraction is performed on the strawberry fruit surface area. During this process, the enhanced segment region determined in the channel continuous response identifier is used as a reference, limiting the edge detection range to the boundary between the fruit peel and the background brightness, excluding the influence of non-target areas such as the stem and petiole. Then, edge coordinate point data is extracted for each frame. Abrupt changes in pixel grayscale are monitored by scanning the brightness gradient changes in rows and columns. Pixels with grayscale changes exceeding a set baseline value are identified as candidate edge points. The baseline value can be set according to the overall brightness range of the image; for example, in the grayscale range of 0 to 255, if the grayscale difference between adjacent pixels is greater than 20, it is considered an abrupt change point. Isolated points are further removed from the candidate point set, retaining only a continuous set of linearly distributed pixels to ensure that the extraction results form a coherent fruit outline in space. Finally, the edge points extracted from each frame are organized based on the frame sequence position, and the edges along the same frame are further refined. The coordinate points distributed on the outer edge of the fruit surface are sorted according to the scanning order from left to right, and their two-dimensional coordinate values ​​are recorded to form an intra-frame coordinate sequence. Then, the edge coordinate data of consecutive frames are called to match the coordinate points of similar positions in adjacent frames. The correspondence is determined by comparing the displacement direction and distance of the coordinate points in adjacent frames. For example, if a point has coordinates (150, 120) in the previous frame and (151, 122) in the next frame, and the displacement change is within 2 pixels, then the point is considered to appear continuously in space and can be retained as a continuous edge point. If the difference exceeds this range, it is considered a non-continuous point and is removed. After the matching is completed, the edge point sequence of each frame is arranged according to the frame number to form a continuous coordinate distribution data table from the start frame to the end frame. At the same time, the gray-scale change position of each coordinate point is marked in the table to distinguish the edge change area at different stages. Finally, by integrating the edge coordinate distribution data under all frame sequences, the strawberry edge coordinate sequence is obtained.

[0074] S202: Based on the strawberry edge coordinate sequence, determine the direction of position change of the same coordinate point in consecutive frames, extract the movement trajectory of edge line segments in the horizontal and vertical directions, filter the edge line segment areas with consistent movement directions, and obtain the edge drift direction distribution set;

[0075] First, the position of each coordinate point in the consecutive frames of the image is retrieved and compared. The coordinate values ​​at the same index are read point by point in each frame, and their coordinate values ​​on the horizontal and vertical axes are extracted as references for change. The difference in the horizontal or vertical values ​​between two consecutive frames is compared to mark the displacement trend in that direction. For example, if a point's coordinates are (100, 200) in frame 1, (101, 200) in frame 2, and (102, 199) in frame 3, it is determined that this point has a continuous rightward movement along the horizontal axis and a slight downward drift along the vertical axis. The displacement directions of this point in both directions are recorded as positive and negative. This process is repeated for all coordinate points, and the direction sequences of each point are aggregated to form a set of direction trajectories. Then, a unified direction recognition operation is performed on these trajectories to determine the direction of each... Whether the displacement trend of edge segments formed by adjacent frames in the horizontal or vertical direction shows the same extension, that is, whether the direction identifier is consistent in multiple consecutive frames. If an edge segment has a continuous displacement direction of horizontal to the right or vertical to the up for more than 3 frames, it is determined to be an edge segment with consistent direction. Otherwise, it is discarded. Further screening of all edge segments that meet this criterion is used as a reference area for subsequent region drift judgment. To facilitate subsequent inter-frame region association processing, the screened edge segments can be numbered, and a direction extension description table can be constructed based on their spatial position change sequence. By comparing the distribution position, direction trend and continuous duration of each edge segment in the numbered frames, boundary segments with continuous direction extension characteristics are identified. Finally, using each edge segment with consistent direction as a unit, a cross-frame direction change sequence mapping is established to obtain the edge drift direction distribution set.

[0076] S203: Based on the edge drift direction distribution set, track the continuous state of drifting line segments in consecutive frames, extract the time span and trajectory coherent region, filter the edge line segment region that maintains continuous features in space and frame order, and obtain the edge contour change indication.

[0077] First, the start and end coordinates of each edge line segment are located in the continuous frame sequence. The coordinate changes of the same line segment in adjacent frames are tracked. The displacement path of the line segment between consecutive frames is retrieved and its horizontal and vertical offset directions are recorded. The drift continuity is determined by comparing the relative positions of the start and end coordinates of the line segment in adjacent frames. For example, if the endpoint coordinates of a line segment in the previous frame are (180, 120) - (220, 130), and the corresponding line segment coordinates in the next frame are (182, 122) - (222, 132), it is considered a continuous drift state and the trajectory of the segment is retained. If the difference in endpoint displacement between two frames exceeds 5 pixels of the set offset reference interval, it is determined to be an interruption and the tracking is terminated. Among all line segments that meet the continuous drift criteria, a set of line segments with a longer time span is extracted and numbered. The spatial position information of the numbered line segments is mapped to the frame sequence index table to check their occurrence range in consecutive frames. If a line segment is detected in more than 5 frames and has the same direction, it is recorded as a continuous line segment, and the spatial coordinate sequence of the line segment is extracted into a time span dataset. Then, the trajectory continuity of each continuous line segment is judged by comparing the stability of the distance between endpoints in consecutive frames. If the displacement of the endpoints in consecutive frames fluctuates within the range of 1 to 3 pixels and the direction does not reverse, the trajectory is considered continuous. For example, if the right edge line segment on the surface of a strawberry moves from bottom to top in multiple frames, with an average displacement of 2 pixels per frame, it can be determined that the spatial drift in this area is continuous. Then, the temporal relationship of all line segments is filtered in combination with the frame sequence number, and only the line segment regions that are continuous in both spatial position and frame sequence distribution are retained. These continuously extended regions with stable time spans are extracted into a set that can reflect the dynamic changes of the edge. Finally, all drift line segment regions that meet the continuity criteria are integrated to obtain the edge contour change indicator.

[0078] Please see Figure 4 The specific steps of S3 are as follows:

[0079] S301: Based on edge contour change indicators, divide the regions on both sides of the image center line, extract the set of jump points along the gray-scale distribution direction of the region, retrieve the continuous occurrence positions of jump points in the same region in each frame, filter the continuously changing display areas, and obtain the continuous jump point distribution matrix.

[0080] First, the strawberry surface area is divided into two symmetrical partitions, left and right, along the center line in the input continuous image frames. Within each partition, the pixel column is scanned row by row along the direction of grayscale change, and the pixel positions with obvious grayscale changes are extracted as jump points. The jump point positions obtained from each row scan are recorded under the corresponding frame index, forming an intra-frame jump point set. For example, in the 120th row of the left side area of ​​a certain frame, the point where the pixel brightness drops from 160 to 120 can be identified as a jump point. Its position is numbered and added to the row set. Continue to extract jump points in the rows below it according to the same rules to obtain the jump point distribution data of the entire frame. Then, the jump point sets of all frames are compared. The positions of jump points in the same row or near rows of adjacent frames are compared. If the position change is less than 3 pixels and appears continuously in 3 or more frames, it is determined that the point has maintained a continuous appearance in the time dimension and is classified as a continuous change candidate. Select a region, and then perform a spatial correlation test on the distribution of jump points in the candidate region. Calculate the pixel spacing between adjacent jump points in the same region. When the spacing is within a preset continuous range (e.g., 1 to 5 pixels), it indicates that these jump points are spatially continuous and are recorded as continuously changing display regions. For example, if the jump point positions of 10 consecutive frames in the right region are distributed vertically and the spacing is 2 pixels, it is considered a continuously display region. Then perform this operation on the left and right regions to confirm the continuous change distribution in each region. Summarize the set of jump points that are continuous in both space and frame order, arrange them according to frame number and region number, and construct a cross-frame continuous jump point index table. Add the grayscale change direction information of all continuously display regions to this index table for subsequent region symmetry judgment. Finally, based on the comprehensive result output by this index table, obtain the continuous jump point distribution matrix.

[0081] S302: Based on the continuous jump point distribution matrix, compare the corresponding positional relationship of the jump points in the frame on both sides, match the trend of the horizontal distance change between the jump point pairs in the frame, determine whether the jump behavior on both sides is in a synchronous state, and obtain the regional grayscale behavior synchronization structure set.

[0082] First, locate the transition points on both sides of the image center line in the same frame. Extract the position values ​​of the gray-level transition points in the row and column coordinates of the left and right regions. Match the transition points according to their row and column numbers to establish a one-to-one correspondence between the transition points in the i-th row of the left region and the i-th row of the right region. Then, measure the horizontal distance between the matched transition point pairs, i.e., calculate the horizontal pixel interval between the two points in the same row. For example, in row 150, if the column coordinate of the left transition point is 60 and the column coordinate of the right transition point is 240, the horizontal distance is 180 pixels, which is recorded as the intra-frame distance value for that row. Then, for multiple consecutive frames, compare the horizontal distance of the transition points in each frame to determine the direction of change of this distance under frame order changes. If the distance value continuously increases in adjacent frames, it indicates that the transition points on both sides are expanding outward; if it continuously decreases, it indicates that the regions on both sides are tending to shrink. This inter-frame comparison... After determining the spatial trend of grayscale behavior, the trend results of all rows are summarized and compared with the overall change direction of the left and right regions. If the change direction of the left and right sides is the same in most frames, that is, both are in an expansion or contraction state, then the grayscale jump behavior of the two sides is determined to be synchronous. Otherwise, it is considered as a asynchronous region. In order to facilitate the verification of synchronicity, multiple representative scan lines can be extracted from each frame for comparison. For example, three horizontal scan lines from the upper, middle and lower parts of the strawberry surface are selected for synchronization judgment. If the consistency rate of the jump direction of the three exceeds the set ratio threshold, such as 0.8, then the overall performance of the frame is determined to be synchronous. Then, the indexes of all frames showing synchronous characteristics are collected and their corresponding jump point position information is organized to form a cross-frame synchronization structure description table. Finally, the set of regions in all frames that are determined to be synchronous through comparison is output to obtain the regional grayscale behavior synchronization structure set.

[0083] S303: Based on the regional grayscale behavior synchronization structure set, extract the vertical coordinate offset amplitude of the jump point in each frame, track the change amplitude of the aggregation density of jump points on both sides, and obtain the regional symmetry offset index according to the extension distance of the grayscale change between frames.

[0084] First, the positional data of the jump point pairs in the two sides are obtained in consecutive image frames. The vertical coordinates of each jump point pair are extracted, and the change in the coordinate value in adjacent frames is calculated. By comparing the difference in the vertical coordinates of the same jump point in the previous and next frames, the direction and magnitude of the shift are determined. For example, if the vertical coordinate of a jump point in a row in the left area changes from 120 to 124, while the corresponding jump point in the right area changes from 118 to 122, it indicates that the gray-level change boundary in both sides has moved downwards, and the shift magnitudes are similar, so it is recorded as a coordinated shift. If the shift difference exceeds 4 pixels, it is classified as a non-coordinated state. Based on this, the vertical shift values ​​of all jump point pairs are summarized between frames to establish an intra-frame vertical shift trend table. Then, for the distribution of jump points within the same frame, the aggregation density of jump points in the vertical direction is analyzed. The concentration of gray-level changes is determined by statistically analyzing the change in the number of jump points per unit row spacing in each region. For example, in the upper region of the fruit surface, the distribution spacing of jump points in the previous frame is 6 pixels. The next frame contains 3 pixels, indicating that the gray-level abrupt change points in that area are converging towards the center. This change is recorded as the aggregation density variation value. Then, the difference in aggregation density variation between the left and right areas under the same frame sequence is compared. If the difference is lower than the preset aggregation consistency range (e.g., 3 pixels), it is determined that the two sides show a similar gray-level concentration trend. Otherwise, it is recorded as an inconsistent change. Further, the gray-level abrupt change extension distance of the jump points on both sides is compared between frames. The gray-level extension range is determined by measuring the maximum span of the vertical distribution of the abrupt change points in the left and right areas. For example, if the distribution range of the abrupt change points on the left side increases from 20 pixels to 28 pixels in consecutive frames, and on the right side from 22 pixels to 30 pixels, then the extension trends on both sides are similar, and they are recorded as synchronous extended frames. Finally, a set of regions in the consecutive frame sequence that maintain coordination in terms of vertical coordinate offset, aggregation density variation, and extension distance variation is extracted. Based on the spatial distribution of these regions and the inter-frame correspondence, the regional symmetry offset index is obtained.

[0085] Please see Figure 5 The specific steps of S4 are as follows:

[0086] S401: Based on the regional symmetry offset index, the reflective area in the corresponding frame is identified by the continuous response of the channel. The grayscale pixel set of the corresponding reflective area in the numbered frame is extracted. The average grayscale value of the pixels in each frame is monitored. The average grayscale value of each frame is organized in numerical order to obtain the grayscale average value trend sequence.

[0087] First, select the frame index corresponding to the channel continuous response identifier to locate the spatial range of the reflective area from these frames. In strawberry fruit surface images, this area is usually located in the middle of the fruit or at a position with a small incident angle of light. Then, extract the pixel set of the reflective area in each frame, and store the gray values ​​of all pixels belonging to the reflective area separately in the region gray value array. Organize the pixel distribution according to row and column order. For example, in frame number f10, the reflective area contains 1200 pixels, and its gray value is distributed between 130 and 190. Then, extract and summarize the data in this range. Next, traverse the gray value pixel set of each frame to monitor the overall change trend of pixel gray value in each frame. In specific operation, divide the sum of the gray values ​​of all reflective pixels in each frame by the number of pixels to obtain the average gray value of a single frame, and store it in the frame order as a numbered gray value record table. For example, in continuous frame f10 In frame f20, the average gray levels are 145, 148, 151, and 153, respectively, indicating a continuous upward trend in brightness. These average gray levels within frames are then numbered and sorted in ascending order of frame index to form a gray level change sequence over time. During the sorting process, the continuity of the data is checked. If the difference in average gray levels between adjacent frames exceeds a certain limit (e.g., more than 10 gray levels), it is marked as an abnormal frame and skipped to ensure sequence stability. Subsequently, the direction of change of average gray levels between adjacent frames is statistically analyzed. If multiple consecutive frames show an increase, it is marked as a brightness enhancement segment; if they show a continuous decrease, it is marked as a brightness reduction segment. The gray level change information of all frames is then integrated into a complete brightness sequence trajectory for subsequent temporal feature comparison analysis. Finally, based on the frame order arrangement of these continuous average gray levels, a gray level trend sequence is obtained.

[0088] S402: Based on the gray-scale mean trend sequence, compare the gray-scale mean direction relationship between adjacent frames, extract continuous segments where the gray-scale value is continuously rising and continuously falling, and split the segment range where the direction changes alternately to obtain the brightness direction structure sequence.

[0089] First, extract the image frame number corresponding to the channel continuous response identifier and pair it with its grayscale mean value. Compare the difference between the grayscale mean values ​​of the current frame and the previous frame, and obtain the direction change flag value through direct subtraction. If the grayscale mean value of the current frame is higher than that of the previous frame, it is marked as "+", and otherwise marked as "-". Segments with consecutively appearing the same symbol are classified into segments. Continuous areas marked with "+" are classified as grayscale increasing segments, and continuous areas marked with "-" are classified as grayscale decreasing segments. For example, if a segment of grayscale mean values ​​is in the sequence 125, 129, 133, 132, 131, 128, 127, then 125 to 133 is classified as an increasing segment, and 133 to 127 is classified as a decreasing segment. During the processing, if the absolute value of the difference between the grayscale mean values ​​of two adjacent frames is... 0. If the state continues the direction marker of the previous frame, it will not cause a direction switch and will continue to be included in the current segment. After determining the continuous segment, the frame segment where the gray value alternates at the direction switch point is split. The position where the rising turns into the falling or the falling turns into the rising is taken as the breakpoint. The entire sequence is divided into multiple sub-segments, each with a single direction and an unchanged sign. Repeating the above process can perform a global traversal of the entire trend sequence and process the gray value direction change of all numbered frames frame by frame. During the traversal, the start and end frame number range and direction marker of each segment are recorded. For example, frames 5 to 11 are falling segments, frames 12 to 19 are rising segments, and frames 20 to 22 are falling segments. Each sub-segment is assigned a direction code to obtain the brightness direction structure sequence.

[0090] S403: Based on the brightness direction structure sequence, extract the start and end position indices of continuous direction segments and alternating direction segments, sort and connect them according to the indices, match the brightness stages of bright and dark areas according to the time sequence, and split the continuous change process according to the time span to obtain the reflective brightness change sequence.

[0091] First, the starting and ending frame numbers of each continuously changing segment are extracted as index point sets. For each segment, the brightness direction identifier is sequentially read and classified based on the starting and ending numbers. Segments with consistent direction identifiers are grouped into continuous segments, while those with inconsistent direction identifiers are grouped into alternating segments. The frame number range is recorded in each segment structure. Then, all frame segment structures are uniformly connected according to ascending order of the numbers, placing the segment structure with the smallest starting and ending numbers at the beginning of the sequence. Subsequent segments are then pieced together sequentially according to their numbers to obtain a complete directional structure stream arranged chronologically. Next, the reflected area numbers of the frame images located in the channel continuous response identifiers are read. The segment affiliation of the corresponding frame in the directional structure stream is then determined from this set of numbers to identify whether the segment containing the frame is continuous. If the number of frames in a continuous segment exceeds the threshold of 25 frames, the segment is treated as a brightness change stage. The average gray value of each frame can be obtained by dividing the sum of the gray values ​​of pixels in the image area by the number of pixels in the area. For example, if a frame contains 6400 pixels and the total gray value is 416000, the average gray value is 65. The average gray values ​​in each segment are arranged in the frame order to form the brightness trend curve of that segment. Segments with a time span of more than 50 frames are further divided into subsequences of 10 frames each. Each subsequence retains the original direction identifier, forming multiple independent brightness stage groups. Each stage group is accompanied by its segment number, direction symbol and average gray value change list, resulting in a reflective brightness change sequence.

[0092] Please see Figure 6 The specific steps of S5 are as follows:

[0093] S501: Based on the reflectance brightness change sequence, by comparing the frame sequence of the brightness rise segment with the frame sequence of the structural coordination segment in the regional symmetry offset index, the time segment corresponding to the intersection of frame numbers is extracted, and the region where brightness enhancement and structural response occur simultaneously is screened to obtain the brightness-structure intersection sequence.

[0094] First, extract the frame number groups for the brightness-increasing segment. Compare each number with the frame number groups for the structural coordination segment in the regional symmetry offset index, performing a matching operation based on the number value. If the same number exists in both sets, record it in the intersection set. During the operation, use the frame number as the core index to perform item-by-item comparison and retrieval of the number sequence. For example, when the number group for the brightness-increasing segment is [12, 13, 14, 15, 16] and the number group for the structural coordination segment is [14, 15, 16, 17], the intersection number is [14, 15, 16]. Record this number range as a time segment region. Then, expand the search for the continuity of numbers between adjacent segments according to the number order. If the difference between the end number of an adjacent segment and the start number of the next segment is 1, the search continues. The two segments are then merged into a longer time segment. This process is repeated for all time segments until the numbered intervals are completely separated. For each time segment, the mean gray value and direction identifier in the reflective brightness change sequence are read. Frame segments with an upward gray value change direction and a stable coordinate region in the corresponding region in the symmetry offset index are identified as brightness enhancement regions. Within the same region, it is checked whether the reflective region number overlaps with the number in the continuous response identifier. If they overlap, the region number is retained as a region with both brightness and structural response. By integrating all time segment numbers and corresponding region indices that meet the conditions, a set of regions where brightness enhancement and structural response occur simultaneously can be obtained. This set is connected sequentially according to the frame number to form a continuous data sequence, resulting in a brightness-structure intersection sequence.

[0095] S502: Based on the intersection sequence of brightness structure, extract the starting frame order of the brightness rising segment and the ending frame order of the structure coordination segment, compare the sequential positions in the time order, index the image frame sequence by number, divide the region feature connection range in the image, and obtain the frame set corresponding to the structure brightness.

[0096] First, extract the starting frame number of the brightness increase segment and the ending frame number of the structural coordination segment. Pair them on the same time axis according to their order. For each starting frame number of the brightness increase segment, find the structural coordination ending frame number that is closest in number and later in time within the intersection. These two numbers form a set of start-end frame index pairs. For example, if the starting frame of the brightness increase segment is number 45 and the corresponding ending frame of the structural coordination segment is number 52, then this set of frame pairs is defined as [45, 52]. Then, search all frames within this number range in the reflective brightness change sequence, read the corresponding frame image index position and reflective area coordinate information, arrange consecutively numbered frames in time order and label them with their corresponding number values. Perform a linear comparison of the spatial grayscale distribution between adjacent frames. When the rate of change of the average grayscale value between adjacent frames is less than a set baseline value of 0.1, the interval is considered continuous. Continuing, if the boundary is exceeded, it is determined to be an interruption boundary, and the two sides are stored separately. Then, for the pixel set of each continuous segment, the range of horizontal and vertical coordinate changes is extracted. The pixel positions at the edge of the region are scanned by traversal to confirm the spatial coverage boundary of the continuous response region. For example, if the minimum horizontal coordinate of a region is 80, the maximum horizontal coordinate is 240, and the vertical coordinate range is 120 to 280, then this interval is defined as a connected range region. The pixel grayscale distribution overlap ratio is calculated within the same number range. When the ratio exceeds 0.7, the region is included in the stable response region set. The same operation is performed on all frame pairs in sequence. Finally, the number range, region coordinates and brightness change direction are integrated to form a list of region feature connected ranges. The corresponding frame number set of the image is output according to the number index method to obtain the frame set corresponding to the structure brightness.

[0097] S503: Based on the frame set corresponding to structural brightness, track the channel brightness distribution and image region contour in each frame image, analyze the inter-frame region response continuity and feature extension path, filter frame sequence segments with related features, and obtain mature state output sequence.

[0098] First, the image data of each frame is retrieved, and the channel brightness distribution information and the set of region edge coordinates are extracted for each frame. The grayscale distribution of pixels in the same region between adjacent frames is compared to determine whether the grayscale difference is continuously increasing or decreasing. When the continuous change range is within a preset range, it is determined that the region maintains response continuity between frames, thus forming a continuous change linked list in the entire frame set. During this process, the center point coordinates of the brightness distribution of each region are tracked. For example, if the center point coordinates of a certain response region shift from (210, 135) to (226, 138) in frames 48 to 55, the movement path is recorded as the region extension trajectory. At the same time, the fluctuation range of its channel brightness distribution is monitored. The relative change trend of the two is determined by extracting the grayscale mean sequence of the red and green channels. When the grayscale of the red channel increases by more than 10%, the relative change trend of the red channel is determined. When the mean difference of the green channel is 3 gray units, the segment is recorded as the brightness advantage segment. The morphological extension direction is detected by combining the changes in the regional contour points. If the outer edge contour point shifts by more than 2 units in the vertical extension direction for 5 consecutive frames, the region is marked as an active extension region. Then, the regions with brightness advantage and spatial extension characteristics in the same time period are grouped into the same frame sequence segment. All segments are sorted in order of frame number and the consistency of regional attributes between the first and last frames is compared. When the brightness trend and morphological characteristics of the continuous segments are consistent, they are aggregated into a set of feature links. The entire set is traversed to form a feature extension path matrix. Finally, the set of segments that are continuous in frame sequence, continuously enhanced in brightness direction, and consistent in spatial structure are selected to obtain the mature state output sequence.

[0099] Please see Figure 7 A real-time fruit ripeness detection system, comprising:

[0100] The channel response extraction module acquires channel image signals from continuous image frames of strawberry fruit surface, calls the channel brightness region, extracts the grayscale change trend of reflective region, compares the brightness direction change, determines whether the same region is enhanced, filters continuous response channels, and obtains channel continuous response identifiers.

[0101] The edge behavior judgment module extracts the strawberry edge coordinate sequence based on the channel continuous response identifier, tracks the frame sequence line segment position change, judges the consistency of drift direction, analyzes the time extension characteristics, filters continuous displacement areas, and obtains the edge contour change indication.

[0102] The symmetry feature recognition module divides the regions on both sides of the image center line based on edge contour change indicators, extracts gray-level jump points, compares positional differences, determines whether the jumps occur synchronously, and obtains the regional symmetry offset index.

[0103] The brightness change analysis module is based on the regional symmetry offset index. It compares the reflective areas corresponding to the continuous response markers of the channels, extracts the grayscale mean change trend in the numbered frames, compares the brightness direction differences, filters continuous segments and alternating segments, divides the brightness change process, and obtains the reflective brightness change sequence.

[0104] The mature state output module is based on the reflectance brightness change sequence, compares the frame sequence intersection, filters the brightness increase segment and the structural coordination segment, extracts the start frame and end frame positions, compares the image response continuity, and obtains the mature state output sequence.

[0105] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for real-time detection of fruit ripeness, characterized in that, The method comprises the following steps: S1: acquiring a continuous image frame channel image signal of a strawberry fruit surface, calling a channel brightness area, extracting a reflection area gray scale change trend, comparing a brightness direction change, judging whether a same area is enhanced, screening a continuous response channel, and obtaining a channel continuous response identifier; S2: based on the channel continuous response identifier, extracting a strawberry edge coordinate sequence, tracking a frame sequence line segment position change, judging a drift direction consistency, analyzing a time extension feature, screening a continuous displacement area, and obtaining an edge contour change indication; S3: based on the edge contour change indication, dividing an image center line two-side area, extracting a gray scale jump point, comparing a position difference, judging whether the jump appears synchronously, and obtaining a region symmetry offset index; S4: based on the region symmetry offset index, comparing a reflection area of the channel continuous response identifier, extracting a numbered frame gray scale mean value trend, comparing a brightness change direction, identifying a continuous and alternating segment, dividing a bright and dark process, and obtaining a reflection brightness change sequence; S5: based on the reflection brightness change sequence, comparing a frame sequence intersection, screening a brightness rising segment and a structure coordination segment, extracting a start and end frame position, comparing an image response continuity, and obtaining a mature state output sequence.

2. The method for real-time detection of fruit ripeness according to claim 1, characterized in that, The channel continuous response identifier comprises a channel gray scale change trend, a brightness direction change, a same area continuous enhancement phenomenon judgment, and a channel response continuity judgment; the edge contour change indication comprises an edge drift direction consistency, a coordinate line segment time extension, a change continuous area identification, and an edge drift behavior extraction; the region symmetry offset index comprises an image center line two-side jump point distribution, a gray scale difference trend, a jump behavior synchronicity, and an inconsistent distribution range; the reflection brightness change sequence comprises a brightness mean value change trend, a brightness direction difference, a brightness change paragraph division, and a bright and dark change process; and the mature state output sequence comprises a brightness rising segment start frame, a structure coordination segment end frame, an image response continuity, and a region attribute consistency.

3. The method of real-time detection of fruit ripeness according to claim 1, characterized in that, The continuous response channel refers to a region in which an image channel corresponding area is continuously enhanced in brightness and presents a continuous and consistent change in time and space in a continuous image frame; The drift direction consistency refers to a drift trend of an edge coordinate line segment in a horizontal direction and a vertical direction in a continuous image frame, reflecting an edge direction drift behavior over time.

4. The method for real-time detection of fruit ripeness according to claim 1, characterized in that, The time extension feature refers to a continuous existence of an edge line segment or an image area in a continuous image frame, a coherent change path, a time coherence, and a continuity feature; The image response continuity refers to a response state in which a brightness distribution, a shape contour, and a structure attribute of an image area remain consistent on a time axis in a continuous frame.

5. The method for real-time detection of fruit ripeness according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: acquiring a red channel and a green channel image signal of a strawberry fruit surface in a continuous image frame, extracting a pixel brightness value of a fruit skin area in each frame, monitoring a gray scale change direction of a same image position in multiple frames, judging whether the same image position continuously changes upwards, screening a region with a continuous amplitude feature, and obtaining a channel brightness enhancement segment set. S102: Based on the frame sequence position in the channel brightness enhancement segment set, the frame sequence distribution of the in-segment brightness enhancement region is extracted, whether the time sequence between adjacent frames is continuous is analyzed, the frame sequence without interruption is screened as a continuous time sequence segment, and a continuous enhancement sequence number set is obtained; S103: Based on the spatial coordinates in the frame image corresponding to the continuous enhancement sequence number set, the horizontal and vertical distribution trajectories of the enhancement region are extracted, whether the coordinate continuation direction between the enhancement segments is consistent is analyzed, the response region with continuous spatial extension characteristics is screened, and a channel continuous response identifier is obtained.

6. The method for real-time detection of fruit ripeness according to claim 1, wherein, The specific steps of S2 are: S201: Based on the image region in the frame corresponding to the channel continuous response identifier, the fruit surface edge coordinate point data of the corresponding numbered frame in the strawberry image is extracted, the gray mutation region of the edge pixels in the continuous frame is analyzed, the edge coordinate points in the mutation region are screened, and the spatial positions are arranged in sequence according to the frame sequence, to obtain a strawberry edge coordinate sequence; S202: Based on the strawberry edge coordinate sequence, the position change direction of the same coordinate point in the continuous frame is judged, the moving trajectory of the edge line segment in the horizontal and vertical directions is extracted, the edge line segment region with consistent moving direction is screened, and an edge drift direction distribution set is obtained; S203: Based on the edge drift direction distribution set, the continuous state of the drift line segment in the continuous frame is tracked, the time span and trajectory coherent region are extracted, the edge line segment region with continuous characteristics in space and frame sequence is screened, and an edge contour change indicator is obtained.

7. The method for real-time detection of fruit ripeness according to claim 1, wherein, The specific steps of S3 are: S301: Based on the edge contour change indicator, the region on both sides of the image center line is divided, a set of jump point collections along the gray distribution direction of the region is extracted, the continuous appearance positions of the jump points in the same region in each frame are searched, the continuously changing display region is screened, and a continuous jump point distribution matrix is obtained; S302: Based on the continuous jump point distribution matrix, the corresponding position relationship of the jump points in the frame between the two regions is compared, the horizontal distance change trend between the jump point pairs is matched, whether the jump behaviors on both sides are in a synchronous state is judged, and a region gray behavior synchronization structure set is obtained; S303: Based on the region gray behavior synchronization structure set, the vertical coordinate offset amplitude of the jump point pair in each frame is extracted, the change amplitude of the jump point aggregation density of the two regions is tracked, and the propagation distance of the gray mutation between the frames is compared, to obtain a region symmetry offset indicator.

8. The method for real-time detection of fruit ripeness according to claim 1, wherein, The specific steps of S4 are: S401: Based on the region symmetry offset indicator, the reflection region in the frame corresponding to the channel continuous response identifier is compared, the gray pixel set of the corresponding reflection region in the numbered frame is extracted, the average value of the pixel gray scale in each frame region is monitored, the average gray scale of each frame is organized in sequence, and a gray mean value trend sequence is obtained; S402: Based on the gray mean value trend sequence, the gray mean value direction relationship between adjacent frames is compared, the continuous paragraphs with continuously rising and continuously falling gray values are extracted, and the paragraph range with alternating changes in direction is split, to obtain a brightness direction structure sequence; S403: Based on the brightness direction structure sequence, the start and end position indexes of the direction continuous segment and the direction alternating segment are extracted, the indexes are sorted and connected, the brightness stages of the light and dark regions are matched in time sequence, the continuous change process is split according to the time span, and the reflection brightness change sequence is obtained.

9. The method for real-time detection of fruit ripeness according to claim 1, wherein, The specific steps of S5 are: S501: Based on the reflection brightness change sequence, the frame sequence of the brightness rising segment is compared with the frame sequence of the structure coordination segment in the region symmetry deviation index, the time segment corresponding to the intersection of the frame numbers is extracted, the region where the brightness enhancement and the structure response appear at the same time are screened, and the brightness structure intersection sequence is obtained; S502: Based on the brightness structure intersection sequence, the start frame sequence of the brightness rising segment and the end frame sequence of the structure coordination segment are extracted, the positions in time sequence are compared, and the image frame sequence is indexed according to the number, the connection range of the region features in the image is divided, and the structure brightness corresponding frame set is obtained; S503: Based on the structure brightness corresponding frame set, the channel brightness distribution and the image region contour in each group of frame images are tracked, the inter-frame region response continuity and the feature extension path are analyzed, the frame sequence segment with associated features is screened, and the mature state output sequence is obtained.

10. A real-time fruit ripeness detection system, characterized by, The system is used to realize the fruit maturity real-time detection method of any one of claims 1-9, and the system comprises: The channel response extraction module obtains the channel image signal in the continuous image frame of the strawberry fruit surface, calls the channel brightness region, extracts the gray scale change trend of the reflection region, compares the brightness direction change, judges whether the same region is enhanced, screens the continuous response channel, and obtains the channel continuous response identifier; The edge behavior judgment module extracts the strawberry edge coordinate sequence based on the channel continuous response identifier, tracks the position change of the frame sequence line segment, judges the consistency of the drift direction, analyzes the time extension feature, screens the continuous displacement region, and obtains the edge contour change indication; The symmetric feature recognition module divides the regions on both sides of the image center line based on the edge contour change indication, extracts the gray scale jump point, compares the position difference, judges whether the jump appears synchronously, and obtains the region symmetry deviation index; The brightness change analysis module extracts the gray scale mean value change trend in the numbered frame based on the region symmetry deviation index, compares the brightness direction difference, screens the continuous segment and the alternating segment, divides the light and dark change process, and obtains the reflection brightness change sequence; The mature state output module extracts the start frame and the end frame position based on the reflection brightness change sequence, compares the image response continuity, and obtains the mature state output sequence.

Citation Information

Patent Citations

  • Three-dimensional image detection system used for indoor quick seed test of maize ears

    CN105806401A

  • Method and system for detecting maturity of waxberries

    CN114549363A

  • Coke maturity detection method based on gray level detection

    CN118443595A

  • Method and system for detecting maturity of waxberries

    CN120655651A

  • Method, apparatus for processing moving image, electronic device and medium

    JP2024150410A