A fish freshness identification method and system

CN122737992APending Publication Date: 2026-09-11SHANGHAI URBAN CONSTR VOCATIONAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610905027.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

现有图像识别方法若直接将鱼眼亮度、鱼体光泽或纹理清晰度作为新鲜度判断依据,容易把由残留水分造成的反射误认为鱼眼清澈或鱼体光泽良好,也可能因反射遮挡鱼体纹理而降低纹理识别准确性,从而导致新鲜度识别结果偏离真实状态

Benefits of technology

[0009]1、本发明通过获取待识别鱼类的鱼体图像并进行区域识别处理,得到鱼眼区域、鱼体表面区域和高亮反射区域,基于高亮反射区域分别与鱼眼区域和鱼体表面区域进行关联分析,得到反光表征数据集,并基于反光表征数据集进行反光来源判定,从而能够区分高亮反射区域对应的自然光泽结果和水膜干扰结果,进而实现了在鱼体湿润反射场景下对新鲜度参数进行准确判断和补偿识别,有效解决了现有技术中由于鱼体湿润反射影响导致眼部参数和纹理参数被误判,进而降低鱼类新鲜度识别准确性的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122737992A_ABST
    Figure CN122737992A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for fish freshness identification, relating to the field of image processing technology. The method includes acquiring an image of the fish to be identified and performing region recognition processing to obtain the fish eye region, the fish body surface region, and the high-brightness reflection region; performing correlation analysis between the high-brightness reflection region and the fish eye region and the fish body surface region respectively to obtain a reflective characterization dataset; determining the source of reflectivity based on the reflective characterization dataset to obtain a natural luster result or a water film interference result; acquiring eye parameters and texture parameters and combining them as a freshness parameter; obtaining the fish freshness when the result is natural luster, and determining a water film interference compensation parameter when the result is water film interference, compensating for the freshness parameter, and re-performing the freshness identification analysis to obtain the fish freshness. This method reduces the impact of water film interference on fish freshness identification and improves the accuracy of fish freshness identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to a method and system for identifying the freshness of fish. Background Technology

[0002] Fish freshness identification is a crucial step in aquatic product sorting, cold chain distribution, supermarket sales, and food safety testing. Current technologies typically rely on manual observation of fish appearance, such as eye clarity, surface luster, scale texture, and gill color, to determine freshness. Some methods, however, use image acquisition devices to obtain fish images and then automatically identify freshness through color analysis, grayscale analysis, edge extraction, texture recognition, or neural network classification models. This reduces the subjectivity of manual judgment and improves detection efficiency.

[0003] In real-world testing scenarios, fish surfaces often retain residual ice water, washing water, or preservative solutions, leading to strong localized reflections from the fish's eyes and body surface under illumination. Existing image recognition methods that directly use eye brightness, body luster, or texture clarity as criteria for freshness assessment can easily misinterpret reflections caused by residual moisture as clear eyes or a glossy body. Furthermore, reflections can obscure body texture, reducing texture recognition accuracy and causing freshness assessment results to deviate from the true state. Therefore, it is urgent to address the problem of misjudging fish eye parameters and surface texture parameters due to the influence of fish moisture reflections, thus affecting the accuracy of fish freshness assessment. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method and system for identifying the freshness of fish.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] Firstly, a method for fish freshness identification involves acquiring an image of the fish to be identified and performing region identification processing to obtain target regions, including the fish eye region, the fish body surface region, and a high-brightness reflection region. Correlation analysis is performed between the high-brightness reflection region and the fish eye region and the fish body surface region to obtain a reflective characterization dataset, which characterizes the influence of the high-brightness reflection region on the images of the fish eye region and the fish body surface region. The source of reflective light is determined based on the reflective characterization dataset, yielding a result including natural gloss and water film interference. Eye parameters of the fish eye region and texture parameters of the fish body surface region are acquired and combined as a freshness parameter. When the reflective source determination result is natural gloss, freshness identification analysis is performed based on the freshness parameter to obtain the fish freshness. When the reflective source determination result is water film interference, a water film interference compensation parameter is determined based on the reflective characterization dataset. The freshness parameter is then compensated based on the water film interference compensation parameter to obtain a compensated freshness parameter. The freshness identification analysis is then re-executed based on the compensated freshness parameter to obtain the fish freshness.

[0007] Secondly, this invention discloses a system for fish freshness identification, comprising the following modules: a region identification module, used to acquire images of the fish to be identified and perform region identification processing to obtain target regions, each target region including the fish eye region, the fish body surface region, and a high-brightness reflection region; a reflectivity analysis module, used to perform correlation analysis between the high-brightness reflection region and the fish eye region and the fish body surface region respectively, to obtain a reflectivity characterization dataset, which is used to characterize the degree of influence of the high-brightness reflection region on the images of the fish eye region and the fish body surface region; and an interference determination module, used to determine the source of reflectivity based on the reflectivity characterization dataset, to obtain a reflectivity source determination result. The results include natural gloss results and water film interference results; the freshness analysis module is used to obtain eye parameters in the fish eye area and texture parameters in the fish body surface area, and combine them as freshness parameters; the reflection source determination module is used to perform freshness identification analysis based on the freshness parameters to obtain the fish freshness when the reflection source determination result is natural gloss results; the freshness compensation module is used to determine water film interference compensation parameters based on the reflection characterization dataset when the reflection source determination result is water film interference results, to compensate the freshness parameters based on the water film interference compensation parameters to obtain compensated freshness parameters, and to re-execute the freshness identification analysis based on the compensated freshness parameters to obtain the fish freshness.

[0008] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0009] 1. This invention acquires images of fish bodies and performs region recognition processing to obtain the fish eye region, fish body surface region, and high-brightness reflection region. Based on the high-brightness reflection region, correlation analysis is performed with the fish eye region and fish body surface region to obtain a reflective characterization dataset. Based on the reflective characterization dataset, the source of reflectivity is determined, thereby distinguishing between the natural luster result and the water film interference result corresponding to the high-brightness reflection region. This enables accurate judgment and compensation recognition of freshness parameters in the case of fish body wet reflection, effectively solving the problem in the prior art where the influence of fish body wet reflection leads to misjudgment of eye parameters and texture parameters, thus reducing the accuracy of fish freshness recognition.

[0010] 2. This invention performs fish body contour recognition processing on the fish body images of each image frame, and obtains fish head position data, fish eye region and fish body surface region based on the fish body contour data. Thus, the eye parameters and texture parameters are respectively derived from the corresponding effective target regions, thereby realizing the partition recognition of the fish eye region and fish body surface region, reducing the impact of non-target fish body regions and region positioning errors on the acquisition of freshness parameters.

[0011] 3. By analyzing the reflective characterization dataset, the influence of bright reflective areas can be characterized from multiple aspects such as coverage relationship, area relationship, inter-frame variation, grayscale variation and texture response variation. This enables a comprehensive judgment of natural gloss results and water film interference results, reducing the possibility of misjudgment caused by relying solely on brightness features for reflective judgment.

[0012] 4. By determining the target water film interference type identifier based on the water film interference results, and determining the water film interference compensation parameters based on the target water film interference type identifier, it is possible to perform corresponding compensation processing on the eye parameters and / or texture parameters in the freshness parameters. This enables the generation of compensated freshness parameters and the re-execution of freshness recognition analysis based on the compensated freshness parameters, thereby improving the reliability of fish freshness in water film interference scenarios. Attached Figure Description

[0013] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:

[0014] Figure 1 This is a flowchart illustrating the overall process of the fish freshness identification method of the present invention.

[0015] Figure 2 This is a flowchart of the process for acquiring the reflectivity characterization dataset and determining the reflectivity source in this invention.

[0016] Figure 3 This is a flowchart of the water film interference compensation process of the present invention;

[0017] Figure 4 This is a system architecture diagram of the present invention. Detailed Implementation

[0018] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0019] Current technologies for fish freshness identification typically rely on visual characteristics such as the clarity of the fish's eyes, the luster of its surface, and the texture of its body. Existing automatic identification methods mostly determine fish freshness through image acquisition, color analysis, grayscale analysis, edge extraction, or texture recognition. However, in scenarios such as supermarket displays, cold chain sorting, and seafood market inspections, a water film often remains on the surface of the fish, and the areas around the eyes and body are prone to high-brightness reflections. This causes existing methods to mistake the reflections from the water film for natural luster, or to distort texture parameters due to reflection obscuring the surface, thus affecting the accuracy of fish freshness identification.

[0020] The technical problem this application aims to solve is that the accuracy of fish freshness identification is reduced due to misjudgment of eye parameters and texture parameters caused by the influence of fish body wetness reflection. To address this problem, this application acquires an image of the fish to be identified and performs region recognition processing to obtain the fish eye region, fish body surface region, and high-brightness reflection region. Based on the high-brightness reflection region, correlation analysis is performed with the fish eye region and fish body surface region respectively to obtain a reflective characterization dataset. The source of reflective light is determined based on the reflective characterization dataset to obtain either a natural luster result or a water film interference result. The eye parameters of the fish eye region and the texture parameters of the fish body surface region are acquired and combined as a freshness parameter. When the reflective source determination result is a natural luster result, freshness identification analysis is performed based on the freshness parameter to obtain the fish freshness. When the reflective source determination result is a water film interference result, a water film interference compensation parameter is determined based on the reflective characterization dataset. The freshness parameter is then compensated based on the water film interference compensation parameter to obtain a compensated freshness parameter, and the freshness identification analysis is re-executed to obtain the fish freshness.

[0021] Through the above methods, this application can distinguish between natural luster results and water film interference results in the wet reflection scene of fish body, and perform compensation processing on the water film interference results to reduce the impact of water film reflection on eye parameters and texture parameters, thereby improving the accuracy and stability of fish freshness identification.

[0022] A method for fish freshness identification includes the following steps: acquiring images of the fish to be identified and performing region identification processing to obtain target regions, each target region including the fish eye region, the fish body surface region, and a high-brightness reflection region; performing correlation analysis between the high-brightness reflection region and the fish eye region and the fish body surface region respectively to obtain a reflective characterization dataset, which is used to characterize the degree of influence of the high-brightness reflection region on the images of the fish eye region and the fish body surface region; determining the source of reflection based on the reflective characterization dataset to obtain a reflection source determination result, which includes a natural gloss result and a water film interference result; acquiring eye parameters of the fish eye region and texture parameters of the fish body surface region, and combining them as a freshness parameter; when the reflection source determination result is a natural gloss result, performing freshness identification analysis based on the freshness parameter to obtain the fish freshness; when the reflection source determination result is a water film interference result, determining a water film interference compensation parameter based on the reflective characterization dataset, performing compensation processing on the freshness parameter based on the water film interference compensation parameter to obtain a compensated freshness parameter, and re-performing the freshness identification analysis based on the compensated freshness parameter to obtain the fish freshness.

[0023] In this embodiment, as Figure 1 As shown, Figure 1 The overall flowchart of the fish freshness identification method of the present invention includes the following steps: after acquiring a fish image, performing region identification processing to obtain each target region; obtaining a reflective characterization dataset based on the correlation analysis between the high-brightness reflective region, the fish eye region, and the fish surface region; obtaining a reflective source determination result based on the reflective characterization dataset; acquiring eye parameters and texture parameters and combining them as freshness parameters; directly obtaining the fish freshness under the natural luster result, determining the water film interference compensation parameter under the water film interference result, obtaining the compensated freshness parameter, and re-performing the freshness identification analysis to obtain the fish freshness.

[0024] Fish images can be acquired by the image acquisition module of a high-definition camera device. In practice, this can be done by calling the camera's video interface through the open-source computer vision library OpenCV or by reading a local video file, and then extracting image frames from the video stream as the fish image.

[0025] High-brightness reflective areas refer to connected pixel regions in a fish image that are significantly brighter than their surrounding areas. These areas may originate from the fish's natural sheen or from reflections from a water film on the fish's surface. Therefore, high-brightness reflective areas are used to determine the source of reflection and whether compensation is needed.

[0026] The result of reflection source determination refers to determining whether the bright reflection area belongs to the natural gloss result or the water film interference result based on the reflection characterization dataset. The natural gloss result is usually characterized by stable reflection position, small grayscale fluctuation, and no significant decrease in texture readability; the water film interference result is usually characterized by reflection area moving with frame, significant grayscale fluctuation, or causing fisheye and texture area occlusion.

[0027] The method for obtaining the pixel brightness threshold is as follows: Multiple historical fish images are acquired under the same image acquisition device, shooting distance, and detection lighting conditions. The actual bright reflection areas are manually marked in each historical fish image. The processor calculates the pixel brightness value of each pixel in the fish eye area and the fish surface area according to the pixel brightness value calculation method in this scheme. Multiple candidate brightness thresholds are set between 0 and 255 with a preset step size, for example, values ​​are sequentially selected with a step size of 1. For each candidate brightness threshold, pixels with a brightness value greater than the threshold are identified as bright pixels, and pixels with a brightness value less than or equal to the threshold are identified as non-bright pixels. The determination result is compared pixel-by-pixel with the manually marked actual bright reflection areas. The number of pixels whose determination result matches the manually marked result is counted, and the proportion of the number of matching pixels to the total number of pixels compared is calculated. The candidate brightness threshold corresponding to the largest proportion is selected as the pixel brightness threshold. If multiple candidate brightness thresholds have the same proportion, the candidate brightness threshold with the smaller value is selected as the pixel brightness threshold to reduce the omission of bright pixels. The resulting pixel brightness threshold can be used to filter bright pixels from fish images and obtain bright reflection regions through connected component analysis.

[0028] By establishing a correlation between bright reflective areas and the fish eye area and fish body surface area, fish freshness identification no longer relies solely on fish eye brightness or fish body surface luster. Instead, it first determines the source of the bright reflective areas and then decides whether to perform compensation identification. This avoids mistaking bright spots caused by water film for clear fish eyes or good fish body luster, thus improving the overall stability of fish freshness identification. Furthermore, this step processes natural luster results and water film interference results separately. Under natural luster conditions, identification can be performed directly, avoiding unnecessary compensation processing; under water film interference conditions, compensation can be performed before identification, thereby reducing the interference of water film reflection on eye and texture parameters and improving the accuracy of freshness identification in complex and humid environments.

[0029] Furthermore, the target regions are obtained through the following methods: A video stream of the fish to be identified is acquired within a preset time period, and image frames are extracted to obtain fish body images for each frame; fish body contour recognition is performed on the fish body images of each frame to obtain fish body contour data corresponding to each frame; fish head position is identified based on the fish body contour data to obtain fish head position data; fish eye positioning is performed based on the fish head position data to obtain the fish eye region; the fish body surface region is cropped based on the fish body contour data to obtain the fish body surface region; the brightness values ​​of each pixel in the fish body image are acquired and compared with a preset pixel brightness threshold, and pixel brightness values ​​above the pixel brightness threshold are taken as bright pixels, thus obtaining each bright pixel; connected component analysis is performed on each bright pixel in the fish eye region and the fish body surface region to obtain the bright reflection region.

[0030] In this embodiment, the video stream refers to the image data continuously acquired by the image acquisition device within a preset time period, and the continuous image frames can be called through the camera acquisition interface.

[0031] Fish body contour recognition processing is performed on the fish body images of each image frame to obtain the fish body contour data corresponding to each image frame. The specific method is as follows: the fish body image of each image frame is uniformly processed, the fish body image is scaled to a preset input size, and then input into a pre-trained U-Net semantic segmentation model for fish body region segmentation to obtain a fish body region probability map; where the U-Net semantic segmentation model is a U-shaped convolutional neural network semantic segmentation model, which is used to output the probability value of each pixel in the input image belonging to the fish body region.

[0032] Pixels in the fish body region probability map that exceed a preset fish body segmentation probability threshold are marked as fish body pixels, and the remaining pixels are marked as background pixels, resulting in a binary mask image of the fish body. Hole filling and morphological closing operations are performed on the binary mask image to remove small holes and edge breaks within the fish body region. Then, connected component analysis is used to select the connected region with the largest area as the fish body region. The `findContours` function from the OpenCV image processing library is called to extract the contour of the outer boundary of the fish body region, obtaining the fish body contour data.

[0033] Fish outline data refers to the data corresponding to the outer boundary of the fish, including the set of pixel coordinates of the fish outline, the area of ​​the fish outline, the bounding rectangle of the fish outline, and the direction of the major axis of the fish outline. The set of pixel coordinates of the fish outline, the area of ​​the fish outline, and the bounding rectangle of the fish outline can all be obtained by analysis using functions in OpenCV. The direction of the major axis of the fish outline can be determined by the direction of the long side of the minimum bounding rectangle.

[0034] Fish head location data is obtained by identifying the fish head based on the fish body contour data. Specifically, the extension direction of the fish body in the image is determined based on the bounding rectangle of the fish body contour and the direction of the fish body's long axis. The fish body image is then input into a pre-trained YOLOv8 object detection model for fish head detection, resulting in candidate bounding boxes and their corresponding detection confidence scores. The YOLOv8 object detection model directly outputs the fish head location boxes from the entire fish body image. Candidate bounding boxes that overlap with the fish body contour region and have a detection confidence score greater than a preset fish head detection confidence threshold are selected as the fish head location data. If multiple candidate bounding boxes exist, the one with the highest detection confidence score and located at the end of the fish body contour's long axis is prioritized as the fish head location data.

[0035] It's important to note that the YOLOv8 object detection model can be trained by acquiring multiple images of fish bodies, labeling the fish head location in each image with a rectangular bounding box, and then using these labeled images as training samples. After training, the model takes the fish body image as input and outputs the coordinates of the fish head candidate bounding box and the detection confidence score. Therefore, the trained YOLOv8 model weights can be loaded into a Python environment, and the fish body images from each frame can be input into the model to obtain the fish head candidate bounding boxes. The fish head location data refers to the rectangular position range of the fish head within the fish body image, including the coordinates of the top-left and bottom-right corners of the bounding box, the area of ​​the bounding box, and the detection confidence score. This fish head location data is used to limit the search range for subsequent fish eye localization, avoiding misidentification of the fish eye in other parts of the fish body. Among them, the fish head location box represents the final determined fish head location data; the fish head candidate box represents the candidate rectangles output by the YOLOv8 object detection model; the candidate box set represents the set of fish head candidate boxes that meet the detection confidence threshold and overlap with the fish body contour region; and the detection confidence level represents the degree of confidence that the fish head candidate box belongs to the fish head region.

[0036] Fisheye localization is performed based on fish head position data to obtain the fisheye region. The specific process is as follows: A sub-image of the fish head corresponding to the fish head position bounding box is extracted from the fish body image. The sub-image of the fish head is then processed for grayscale conversion and contrast enhancement. The Canny edge detection algorithm is used to extract edge pixels from the sub-image of the fish head. After obtaining the edge pixels, Hough circle transform is used to detect near-circular regions in the sub-image of the fish head, obtaining candidate circles for the fisheye. The grayscale difference between the inner region and the surrounding background region of each candidate circle is calculated, and the candidate circle is then filtered based on its roundness. Candidate circles whose roundness meets a preset roundness threshold and whose grayscale difference between the inner region and the surrounding background region meets a preset grayscale difference threshold are determined as the fisheye region. If multiple candidate circles meet the conditions, the candidate circle with the highest roundness and the largest grayscale difference is selected as the fisheye region. The fisheye region refers to the circular image region containing the fish eye within the fish head position data. The fisheye region includes the coordinates of the fish eye center point, the fish eye radius, and the set of pixels in the fisheye region. Roundness is used to represent the degree to which the candidate region is close to a circle; the specific calculation method is as follows:

[0037] ;

[0038] In the formula, Indicates roundness, This represents the area of ​​the candidate region, which is the number of pixels contained within the fisheye candidate region. This represents the perimeter of the candidate region, which is the length of the boundary formed by the boundary pixels of the fisheye candidate region. It represents pi (π).

[0039] The grayscale difference can be obtained by dividing the absolute difference between the mean grayscale value inside the fisheye candidate region and the mean grayscale value of the surrounding neighborhood of the candidate region by 255.

[0040] The surface region of the fish is extracted based on the fish contour data. Specifically, a fish region mask is generated from the fish contour data. Pixels inside the fish contour are marked as fish region pixels, and pixels outside the fish contour are marked as background pixels. Pixels corresponding to the fish eye area are removed from the fish region mask, and edge pixels within a preset width inward from the edge of the fish contour are also removed as needed. The remaining fish region pixels after removing the fish eye area and edge interference areas are taken as the fish surface region.

[0041] By extracting frames from the video stream, recognizing the fish's outline, identifying the fish's head position, locating the fish's eyes, cropping the surface region of the fish, and performing connectivity analysis on bright pixels, the key regions required for subsequent freshness identification can be separated from the original fish image. The localization of the fish's eye region allows eye parameters to be calculated specifically for the eye itself, avoiding the influence of the background or other parts of the fish on eye identification. Cropping the surface region of the fish allows texture parameters to be analyzed specifically for the fish skin texture, preventing background textures from being included in the calculation. Connectivity analysis of the bright reflection region allows scattered bright pixels to form analyzable reflection areas, ensuring that subsequent determination of the source of reflection and calculation of freshness parameters are based on accurate target regions, thereby improving the reproducibility and stability of the entire fish freshness identification method.

[0042] Furthermore, a reflective characterization dataset is obtained using the following methods: regional overlap analysis is performed between the bright reflective region and the fisheye region to obtain the fisheye reflective coverage ratio; area ratio analysis is performed between the bright reflective region and the fish body surface region to obtain the fish body surface reflective area ratio; center position change analysis is performed on the bright reflective region in each adjacent frame of the fish body image to obtain the reflection region displacement with frame; grayscale mean change analysis is performed on the bright reflective region in adjacent frame of the fish body image to obtain the reflective grayscale fluctuation amplitude; texture response analysis is performed on the fish body surface region and the bright reflective region to obtain the texture readability reduction ratio; the fisheye reflective coverage ratio, fish body surface reflective area ratio, reflection region displacement with frame, reflective grayscale fluctuation amplitude, and texture readability reduction ratio are combined to form the reflective characterization dataset.

[0043] In this embodiment, the fisheye reflection coverage ratio is obtained by performing regional overlap analysis based on the bright reflection area and the fisheye area. The specific method is as follows: obtain the pixel set of the bright reflection area and the pixel set of the fisheye area in the same image frame, then count the number of pixels that belong to both the bright reflection area and the fisheye area as the number of overlapping pixels, then count the total number of pixels in the fisheye area, and divide the number of overlapping pixels by the total number of pixels in the fisheye area as the fisheye reflection coverage ratio.

[0044] The specific method to obtain the reflective area ratio of the fish surface is as follows: obtain the pixel set of the bright reflection area and the pixel set of the fish surface area in the same image frame, count the number of overlapping pixels, and count the total number of pixels in the fish surface area. Divide the number of overlapping pixels by the total number of pixels in the fish surface area to obtain the reflective area ratio of the fish surface.

[0045] The processor acquires the bright reflection region in each image frame and counts the coordinates and grayscale values ​​of each pixel within the bright reflection region. If there are multiple bright reflection connected regions in the same image frame, the pixels in each bright reflection connected region are merged into the pixel set of the bright reflection region corresponding to that frame.

[0046] The processor calculates the center point of the highlighted reflective region for each image frame based on the set of pixels representing the highlighted reflective region. The center point represents the overall position of the highlighted reflective region within that frame. The center point is calculated as the average coordinate of all pixels within the highlighted reflective region.

[0047] The formula for calculating the center point of the high-brightness reflection area is:

[0048] ;

[0049] ;

[0050] In the formula, Indicates the first The x-coordinate of the center point of the highlighted reflective area in the fish body image. Indicates the first The ordinate of the center point of the highlighted reflective area in the fish body image. Indicates the first The set of pixels representing the highlighted reflective region in a frame of fish image. Indicates the first The number of pixels in the highlighted reflective area of ​​a fish image. This represents any pixel in the set of pixels representing the highlighted reflection area. Represents pixels x-coordinate Represents pixels The ordinate, This represents the stability constant, used to avoid the denominator being zero.

[0051] Calculate the Euclidean distance between the center points of the bright reflection areas of two adjacent frames, and calculate the ratio of this Euclidean distance to the length of the diagonal of the circumscribed rectangle of the fish body outline to obtain the single-frame displacement value. Average the single-frame displacement values ​​corresponding to each adjacent frame to obtain the displacement of the reflection area with each frame.

[0052] The formula for calculating the displacement of the reflection area with frame is:

[0053] ;

[0054] In the formula, This indicates the amount of displacement of the reflected area as the frame changes. This represents the total number of image frames involved in the calculation. Indicates the image frame number. , Indicates the first The x-coordinate of the center point of the highlighted reflective area in the fish body image. Indicates the first The x-coordinate of the center point of the highlighted reflective area in the fish body image. Indicates the first The ordinate of the center point of the highlighted reflective area in the fish body image. Indicates the first The ordinate of the center point of the highlighted reflective area in the fish body image. This represents the length of the diagonal of the circumscribed rectangle of the fish's body outline. This represents the stability constant.

[0055] The greater the distance between the center points of the highlighted reflection areas in two adjacent frames, the greater the displacement of the reflection area with each frame. Conversely, the greater the diagonal length of the circumscribed rectangle of the fish's outline, the smaller the displacement of the reflection area with each frame for the same center point movement distance. By adjusting the diagonal length of the circumscribed rectangle of the fish's outline, the impact of differences in fish size and shooting distance on the displacement can be reduced.

[0056] The average grayscale value of the highlighted reflective regions in each image frame is calculated based on the set of pixels representing the highlighted reflective regions. The average grayscale value of the highlighted reflective regions represents the overall brightness level of these regions in that frame. The formula for calculating the average grayscale value of the highlighted reflective regions is as follows:

[0057] ;

[0058] In the formula, Indicates the first Mean grayscale value of the bright reflective area in a frame of fish image Indicates the first The set of pixels representing the highlighted reflective region in a frame of fish image. Indicates the first The number of pixels in the highlighted reflective area of ​​a fish image. This represents any pixel in the set of pixels representing the highlighted reflection area. Represents pixels grayscale value, This represents the stability constant.

[0059] Fluctuation analysis is performed based on the average grayscale value of the bright reflective regions corresponding to each image frame. The dispersion of the average grayscale value of each bright reflective region relative to the average grayscale value is calculated, and dimensionless processing is performed using the maximum grayscale value to obtain the amplitude of reflective grayscale fluctuation. The formula for calculating the amplitude of reflective grayscale fluctuation is as follows:

[0060] ;

[0061] ;

[0062] In the formula, This represents the average grayscale value of the highlighted reflective areas in each image frame. Indicates the amplitude of reflective grayscale fluctuation. This represents the total number of image frames involved in the calculation. Indicates the image frame number. Indicates the first The average grayscale value of the bright reflective area in the fish body image, where 255 represents the maximum grayscale value in the eight-bit grayscale image.

[0063] The greater the difference in the mean grayscale of the bright reflective areas across different image frames, the greater the amplitude of the reflected grayscale fluctuation; the closer the mean grayscale of the bright reflective areas across different image frames, the smaller the amplitude of the reflected grayscale fluctuation. A larger amplitude of reflected grayscale fluctuation indicates that the brightness change of the bright reflective areas is more obvious in consecutive image frames, making it easier to characterize dynamic reflections caused by water film interference; a smaller amplitude of reflected grayscale fluctuation indicates that the brightness of the bright reflective areas is more stable, and closer to natural gloss or reflection from a fixed light source.

[0064] By jointly analyzing the coverage relationship, area relationship, inter-frame positional changes, grayscale fluctuations, and texture response changes between the bright reflective area and the fish eye area and the fish body surface area, a reflective characterization dataset is obtained. This dataset can transform simple bright areas into quantifiable reflective influence data, which can be used to distinguish whether the bright reflective area originates from the fish's natural luster or from water film interference. This avoids misjudgments caused by directly judging freshness based on image brightness alone, and provides a data foundation for subsequent determination of reflective source and water film interference compensation parameters, thereby improving the accuracy and stability of fish freshness identification in humid and reflective scenes.

[0065] Furthermore, the percentage decrease in texture readability is obtained as follows: Based on the positional relationship between the fish surface area and the bright reflection area, the portion of the fish surface area that overlaps with the bright reflection area is marked as a bright coverage sub-region, and the portion of the fish surface area that does not overlap with the bright reflection area is marked as a non-bright sub-region; edge detection processing is performed on the non-bright sub-regions to obtain reference texture edge data, which includes each reference texture edge pixel and the gradient magnitude corresponding to each reference texture edge pixel; the gradient magnitude corresponding to each reference texture edge pixel is averaged to obtain the reference texture response value; the gradient magnitude of each pixel in the bright coverage sub-region is calculated to obtain the gradient magnitude corresponding to each pixel in the bright coverage sub-region. The gradient magnitude is calculated and averaged to obtain the texture response value of the highlighted area. When the reference texture response value is greater than the highlighted area texture response value, a difference analysis is performed between the highlighted area texture response value and the reference texture response value to obtain the difference response ratio, which is used as the texture response attenuation ratio. When the reference texture response value is lower than the highlighted area texture response value, a preset minimum attenuation ratio is used as the texture response attenuation ratio. The texture readability reduction ratio is calculated by multiplying the fish surface reflective area ratio and the texture response attenuation ratio. The texture readability reduction ratio is used to characterize the degree to which the texture gradient response of the fish surface decreases relative to the reference texture gradient response of the non-highlighted area after the highlighted reflective area covers the fish surface.

[0066] In this embodiment, edge detection processing is performed on the non-highlight sub-regions to obtain reference texture edge data. Specifically, the image corresponding to the non-highlight sub-region is converted to grayscale. The Canny edge detection algorithm is used to extract texture edge pixels in the non-highlight sub-regions. The reference texture edge data includes the reference texture edge pixels and the gradient magnitude corresponding to each reference texture edge pixel. The reference texture edge pixels represent the fish texture position within the area not covered by highlight reflection; the gradient magnitude represents the intensity of grayscale change at the texture edge position. The gradient magnitude calculation formula is:

[0067] ;

[0068] In the formula, Represents pixels gradient magnitude, Represents pixels The lateral gradient value, Represents pixels The longitudinal gradient value, This represents any pixel that participates in the calculation.

[0069] The larger the horizontal or vertical gradient value, the greater the gradient amplitude, indicating that the texture edge at that pixel is more obvious. The larger the gradient amplitude of the reference texture edge pixel, the larger the reference texture response value, indicating that the normal texture on the fish surface is clearer.

[0070] The texture response value of the highlighted area is obtained by: using the Sobel operator to calculate the gradient magnitude of each pixel in the highlighted sub-region, and averaging the gradient magnitudes of all pixels in the highlighted sub-region to obtain the texture response value of the highlighted area.

[0071] The texture response attenuation ratio is obtained as follows:

[0072] ;

[0073] In the formula, Indicates the texture response attenuation ratio. Indicates the reference texture response value. This represents the texture response value of the highlighted area. This indicates the preset minimum attenuation ratio. This represents the stability constant.

[0074] By dividing the fish surface area into a bright overlay sub-region and a non-bright sub-region, and comparing the differences in texture response between the two types of regions, it is possible to determine whether bright reflection truly causes the fish surface texture to be unreadable. By simultaneously considering the reflective coverage area and the intensity of texture response reduction, the proportion of texture readability reduction can more accurately reflect the impact of water film occlusion on the fish surface texture, providing a basis for the determination of the second water film interference result and subsequent texture occlusion correction.

[0075] Furthermore, the reflection source determination result is obtained through the following method: Preset fisheye coverage threshold, surface reflection threshold, displacement threshold, grayscale fluctuation threshold, and texture degradation threshold are acquired and compared with the corresponding reflection representation dataset to obtain the reflection source determination result. When the fisheye reflection coverage ratio is greater than the fisheye coverage threshold, and the reflection area displacement with frame is greater than the displacement threshold, a first water film interference result is generated. When the fish surface reflection area ratio is greater than the surface reflection threshold, and the texture readability degradation ratio is greater than the texture degradation threshold, a second water film interference result is generated. When the reflection grayscale fluctuation amplitude is greater than the grayscale fluctuation threshold, and the reflection area displacement with frame is greater than the displacement threshold, a third water film interference result is generated. When the reflection source determination result includes both the first and second water film interference results... When at least one of the interference results and the third water film interference result is generated, the reflection source determination result is the water film interference result; the target water film interference type identifier is determined based on the water film interference result, which includes the first water film interference type identifier, the second water film interference type identifier, and the third water film interference type identifier; when two or more water film interference results are generated simultaneously, the target water film interference type identifier is determined based on the proportion of the reflection characterization dataset corresponding to each water film interference result exceeding the corresponding threshold; when only one water film interference result is generated, the water film interference type identifier corresponding to that water film interference result is determined as the target water film interference type identifier; when no first water film interference result, second water film interference result, or third water film interference result is generated, the reflection source determination result is the natural gloss result.

[0076] In this embodiment, the methods for obtaining the fisheye coverage threshold, surface reflection threshold, displacement threshold, grayscale fluctuation threshold, and texture degradation threshold are as follows: Multiple sets of historical fish images or historical fish video samples are collected. These samples include natural gloss samples, samples where the fisheye area is affected by water film reflection, samples where the fish surface area is affected by water film reflection, and continuous frame dynamic reflection samples. The reflection type of each set of samples is manually labeled. According to the calculation method in this invention, the fisheye reflection coverage ratio, fish surface reflection area ratio, reflection area displacement with frame, reflection grayscale fluctuation amplitude, and texture readability degradation ratio corresponding to each set of samples are calculated. Within the historical value range of each parameter, candidate thresholds are set according to a preset step size. Different combinations of candidate thresholds are used to distinguish between natural gloss samples and water film interference samples. The classification accuracy, sensitivity, and specificity under each set of candidate threshold combinations are calculated. The threshold combination with the highest classification accuracy and the sensitivity and specificity meeting the preset requirements is selected as the fisheye coverage threshold, surface reflection threshold, displacement threshold, grayscale fluctuation threshold, and texture degradation threshold. The thresholds obtained can respectively characterize the critical degree when fisheye coverage, surface reflection, inter-frame displacement, grayscale fluctuation and texture degradation reach the water film interference judgment condition.

[0077] In addition to the thresholds mentioned above, the minimum attenuation ratio, fish body segmentation probability threshold, fish head detection confidence threshold, roundness threshold, grayscale difference threshold, pupil area range, and fracture search distance can all be obtained through historical sample calibration. Specifically, historical fish images or videos containing fish body regions, fish head positions, fish eye regions, pupil regions, fish body surface texture fracture regions, and different freshness states are collected. The corresponding regions or states are manually labeled, and the probability value, confidence, roundness, grayscale difference, area, texture fracture length, eye freshness, and texture freshness corresponding to each historical sample are calculated according to the calculation method of the corresponding parameters in this invention. Multiple candidate values ​​or candidate ranges are set within the historical value range of each parameter, and each candidate value or candidate range is used to filter or map the corresponding sample. The filtering results or mapping results are compared with the manually labeled results, and the candidate value or candidate range with the highest consistency ratio is selected as the corresponding threshold or range, which is then used for subsequent region recognition and texture fracture detection steps.

[0078] like Figure 2 As shown, Figure 2 This is a flowchart illustrating the process of acquiring the reflective characterization dataset and determining the reflective source of the present invention. The process involves acquiring the reflective characterization dataset and determining the reflective source. The fisheye region, the fish body surface region, and the high-brightness reflection region are used to calculate the fisheye reflective coverage ratio, the fish body surface reflective area ratio, the reflection region displacement with frame, the reflective grayscale fluctuation amplitude, and the texture readability reduction ratio, and are combined as the reflective characterization dataset. After comparing the reflective characterization dataset with a preset threshold, a first water film interference result, a second water film interference result, and a third water film interference result are generated. When at least one water film interference result is generated, the reflective source determination result is a water film interference result, and the target water film interference type identifier is determined. When no water film interference result is generated, the reflective source determination result is a natural gloss result.

[0079] The target water film interference type identifier is determined based on the generated water film interference results. If only one type of water film interference result is generated, the water film interference type identifier corresponding to that result is determined as the target water film interference type identifier. If two or more water film interference results are generated simultaneously, the threshold exceedance ratio corresponding to each water film interference result is calculated, and the water film interference type identifier corresponding to the water film interference result with the largest threshold exceedance ratio is determined as the target water film interference type identifier.

[0080] The target water film interference type identifier includes a first water film interference type identifier, a second water film interference type identifier, and a third water film interference type identifier. The first water film interference type identifier corresponds to the first water film interference result, the second water film interference type identifier corresponds to the second water film interference result, and the third water film interference type identifier corresponds to the third water film interference result.

[0081] The threshold exceedance ratio indicates the degree to which the corresponding reflectivity parameter exceeds a threshold. The larger the threshold exceedance ratio, the more pronounced the water film interference of this type, and the more suitable it is as the dominant water film interference type in the current image.

[0082] The formula for calculating the threshold exceeding the proportion corresponding to the first water film interference result is:

[0083] ;

[0084] The formula for calculating the threshold exceeding the proportion corresponding to the second water film interference result is:

[0085] ;

[0086] The formula for calculating the threshold exceeding the proportion corresponding to the third water film interference result is:

[0087] ;

[0088] In the formula, This indicates that the threshold corresponding to the first water film interference result exceeds the proportion. This indicates that the threshold corresponding to the second water film interference result exceeds the proportion. This indicates that the threshold corresponding to the interference result of the third water film exceeds the proportion.

[0089] The more the relevant reflectivity parameters exceed the corresponding threshold, the greater the proportion of the threshold exceeding the threshold. When multiple water film interference results are valid simultaneously, the water film interference result with a larger threshold exceeding proportion has a stronger impact on the current image. Therefore, its corresponding water film interference type identifier is determined as the target water film interference type identifier.

[0090] By comparing the fisheye reflection coverage ratio, the fish body surface reflection area ratio, the reflection area displacement with frame, the reflection grayscale fluctuation amplitude, and the texture readability reduction ratio with corresponding thresholds, it is possible to determine whether the bright reflection area belongs to water film interference, and to distinguish three types of interference: fisheye dynamic coverage, fish body surface texture occlusion, and dynamic reflection fluctuation. Therefore, the compensation direction is determined according to the dominant water film interference type, improving the targeting of water film interference compensation parameters and reducing the probability of natural gloss being misjudged as water film interference.

[0091] Furthermore, the freshness parameter is obtained as follows: Eyeball region segmentation and pupil region segmentation are performed based on the fisheye region to obtain the eyeball region and pupil region; the grayscale values ​​of each pixel in the eyeball region are obtained and grayscale analysis is performed to obtain the grayscale mean and standard deviation, and the grayscale dispersion ratio of the eyeball is generated based on the ratio between the grayscale standard deviation and the grayscale mean. The inverse normalized value of the grayscale dispersion ratio of the eyeball is used as the grayscale uniformity ratio of the eyeball; the pupil boundary pixels are extracted based on the pupil region, and the grayscale gradient values ​​between each pupil boundary pixel and its adjacent background pixels are calculated to obtain each grayscale gradient value. The average value of each grayscale gradient value is used as the pupil boundary gradient mean; boundary connectivity statistics are performed based on the pupil boundary pixels to obtain the pupil boundary continuity ratio; coupling analysis is performed based on the pupil boundary gradient mean and the pupil boundary continuity ratio to obtain the effective pupil boundary ratio; the eye... The uniformity of spherical grayscale and the effective proportion of pupil boundary are jointly labeled as eye parameters; texture edges are extracted from the surface region of the fish to obtain fish texture edge data, which includes fish texture edge pixels, the gradient magnitude corresponding to each fish texture edge pixel, and texture connected segments formed by adjacent fish texture edge pixels; the gradient magnitude corresponding to each fish texture edge pixel is averaged to obtain the fish texture gradient mean; breakage detection is performed based on texture connected segments, and the interval region between adjacent texture connected segments is marked as texture breakage region; the total length of texture breakage region is calculated, and the fish texture continuity ratio is obtained based on the analysis of the total length of texture breakage and the total length of fish texture edges; the fish texture gradient mean and the fish texture continuity ratio are jointly labeled as texture parameters; the eye parameters and texture parameters are jointly used as freshness parameters.

[0092] In this embodiment, the eyeball region and pupil region are obtained by: extracting the fisheye sub-image corresponding to the fisheye region from the fish body image. The entire fisheye region can be considered as the eyeball region. The fisheye sub-image is grayscaled, and the Otsu thresholding algorithm is used to segment the dark regions in the fisheye sub-image. The Otsu thresholding algorithm, also known as the "maximum inter-class variance thresholding algorithm," is used to automatically determine the segmentation thresholds for the foreground and background based on the grayscale histogram. Since the pupil region is usually grayscale lower than the surrounding eyeball region, connected regions below the segmentation threshold can be used as pupil candidate regions. The processor selects a region located inside the eyeball region, with an area satisfying a preset pupil area range and a roundness satisfying a preset roundness range from the pupil candidate regions as the pupil region. The eyeball region is used to calculate the uniformity of eyeball grayscale. The pupil region is used to calculate the effective proportion of the pupil boundary.

[0093] The formula for calculating the uniformity of grayscale in the eyeball is:

[0094] ;

[0095] The formula for calculating the standard deviation of grayscale in the eye region is:

[0096] ;

[0097] The formula for calculating the grayscale dispersion ratio of the eyeball is:

[0098] ;

[0099] The formula for calculating the uniformity of grayscale in the eyeball is:

[0100] ;

[0101] In the formula, This represents the average gray level of the eye region. Indicates the standard deviation of gray levels in the eye region. This represents the grayscale dispersion ratio of the eyeball. Indicates the uniformity of grayscale in the eyeball. Represents the set of pixels in the eye region. This indicates the number of pixels in the eye region. This represents the grayscale value of pixel p.

[0102] A larger standard deviation of grayscale in the eye region indicates a greater proportion of grayscale dispersion and a smaller proportion of grayscale uniformity. Conversely, a smaller standard deviation of grayscale in the eye region indicates a smaller proportion of grayscale dispersion and a greater proportion of grayscale uniformity. The grayscale uniformity of the eye is used to characterize whether the grayscale distribution in the eye region is uniform.

[0103] The mean gradient of the pupil boundary is calculated using the following method:

[0104] ;

[0105] ;

[0106] In the formula, This represents the grayscale gradient value corresponding to pixel b at the pupil boundary. This represents the grayscale value of pixel b at the pupil boundary. This represents the grayscale value of the background pixel adjacent to the pupil boundary pixel b. This represents the mean gradient of the pupil boundary. Represents the set of pixels at the pupil boundary. Indicates the number of pixels at the pupil boundary. 255 represents any pupil boundary pixel in the set of pupil boundary pixels, and 255 represents the maximum gray value in the eight-bit grayscale image.

[0107] The greater the grayscale difference between the pupil boundary pixel and the adjacent background pixel, the larger the grayscale gradient value and the larger the average gradient value of the pupil boundary, indicating that the pupil boundary is clearer.

[0108] The effective proportion of the pupil boundary is obtained by the following method:

[0109] ;

[0110] ;

[0111] In the formula, Indicates the continuous proportion of the pupil boundary. This represents the length of the longest connected line segment that marks the boundary of the pupil. This represents the total length of all connected line segments at the boundaries of the pupils. Indicates the effective proportion of the pupil boundary. This represents the mean gradient of the pupil boundary.

[0112] The greater the mean gradient of the pupil boundary, the greater the effective proportion of the pupil boundary; the greater the continuity of the pupil boundary, the greater the effective proportion of the pupil boundary. Only when the pupil boundary is both clear and continuous will the effective proportion of the pupil boundary be high.

[0113] The texture edges of the fish's surface region are extracted to obtain fish texture edge data. Specifically, the fish surface region is converted to grayscale, and the Canny edge detection algorithm is used to extract the texture edge pixels. The Sobel operator is then used to calculate the gradient magnitude of each texture edge pixel. The processor performs connected component analysis on adjacent texture edge pixels, connecting interconnected pixels to form texture connected segments. The fish texture edge data includes the texture edge pixels, the gradient magnitude of each pixel, and the texture connected segments formed by adjacent pixels. Texture edge pixels represent the position of the fish surface texture; gradient magnitudes represent the clarity of the texture; and texture connected segments represent the continuous structure of the texture.

[0114] Break detection is performed based on textured connected segments. The intervals between adjacent textured connected segments are marked as texture break regions. Specifically, the endpoint positions and extension directions of each textured connected segment are obtained. For two adjacent textured connected segments, if the distance between their endpoints is less than a preset break search distance, and the difference in their extension directions is less than a preset direction difference threshold, then the interval between their endpoints is marked as a texture break region. A texture break region refers to a region where there is an interval between adjacent textured connected segments, and this interval matches the extension direction of the textured segments on both sides. The more texture break regions there are, the worse the continuity of the fish's surface texture.

[0115] The fish texture continuity ratio can be obtained by dividing the total length of the fish texture edges by the sum of the total length of the fish texture edges and the total length of texture breaks. The fish texture continuity ratio is used to indicate the degree of continuity of the fish surface texture. The larger the ratio, the more complete the fish surface texture; the smaller the ratio, the more obvious the texture breaks.

[0116] By extracting the uniformity of eye grayscale and the effective proportion of pupil boundary from the fish eye region, and extracting the mean gradient of fish texture and the continuous proportion of fish texture from the fish body surface region, freshness recognition can utilize both the state of the fish eye and the state of fish body surface texture. Eye parameters reflect the uniformity of fish eye grayscale and the effectiveness of pupil boundary, while texture parameters reflect the clarity and continuity of fish body surface texture. Together, they constitute the freshness parameter, which can avoid the instability problem caused by judging by a single feature.

[0117] Furthermore, the freshness of fish is obtained by freshness identification analysis based on freshness parameters. The specific method is as follows: normalize the eye parameters to obtain eye freshness; normalize the texture parameters to obtain texture freshness; map the eye freshness and texture freshness using freshness normalization to obtain eye freshness mapping value and texture freshness mapping value; and perform weighted fusion analysis based on the eye freshness mapping value and texture freshness mapping value to obtain the fish freshness.

[0118] In this embodiment, the method for obtaining eye freshness is as follows:

[0119] ;

[0120] ;

[0121] In the formula, Indicates the freshness of the eyes. Indicates the uniformity of grayscale in the eyeball. Indicates the effective proportion of the pupil boundary. Indicates the grayscale weight of the eyeball. This represents the pupil boundary weight.

[0122] The methods for obtaining eyeball grayscale weights and pupil boundary weights are as follows: Collect multiple sets of fish image samples and manually label the freshness level of the samples; calculate the uniformity ratio of eyeball grayscale and the effective ratio of pupil boundary for each set of samples; select multiple sets of candidate weights from the candidate weight set, for example, generate weight combinations that satisfy the weight sum of one according to a preset step size; calculate the correlation between eye freshness and manually labeled freshness level under each candidate weight combination; select the weight combination with the highest correlation as the eyeball grayscale weight and pupil boundary weight.

[0123] The specific method for obtaining texture freshness is as follows:

[0124] ;

[0125] In the formula, Indicates texture freshness. This represents the mean gradient of the fish's body texture. Indicates the continuous proportion of fish body texture. Represents texture gradient weights. This indicates the continuous weight of the texture.

[0126] The specific methods for obtaining texture gradient weights and texture continuity weights are as follows: collect multiple sets of fish image samples, calculate the normalized fish texture gradient value and fish texture continuity ratio of each sample, and obtain the freshness level of manual annotation; test different weight combinations in the candidate weight set, and select the weight combination that makes the texture freshness most correlated with the manual annotation freshness level as the texture gradient weight and texture continuity weight.

[0127] The specific method for obtaining the eye freshness mapping value and the texture freshness mapping value is as follows:

[0128] ;

[0129] ;

[0130] In the formula, This represents the eye freshness mapping value. Represents the texture freshness mapping value. Indicates the freshness of the eyes. Indicates texture freshness. The minimum reference value representing the freshness of the eye in historical samples. This represents the maximum reference value for eye freshness in historical samples. The minimum reference value representing the freshness of textures in historical samples. This represents the maximum reference value for texture freshness in historical samples.

[0131] The specific method for determining the freshness of fish is as follows:

[0132] ;

[0133] In the formula, Indicates the freshness of the fish. This represents the eye freshness mapping value. Represents the texture freshness mapping value. Indicates the weight of eye fusion. This represents the texture mapping blending weight.

[0134] The eye fusion weight and texture mapping fusion weight are obtained as follows: multiple sets of fish image samples are collected, the corresponding eye freshness mapping value and texture freshness mapping value are calculated, and the freshness level is obtained by manual annotation; different weight combinations are tested in the candidate weight set, and the weight combination that minimizes the error between the fish freshness and the manual annotation result is selected as the eye fusion weight and texture mapping fusion weight.

[0135] By calculating eye freshness and texture freshness separately, the influence of different value ranges of eye and texture parameters on the final result can be avoided. This step enables fish freshness identification to utilize both the state of the fish's eyes and the texture state of the fish's surface, resulting in stable freshness identification results under natural luster conditions.

[0136] Furthermore, water film interference compensation parameters are determined based on the reflective characterization dataset. Specifically, when the target water film interference type is identified as the first water film interference type, a weighted fusion is performed based on the fish eye reflective coverage ratio and the reflection area with frame displacement to obtain the eye error correction coefficient; when the target water film interference type is identified as the second water film interference type, a weighted fusion is performed based on the fish body surface reflective area ratio and the texture readability reduction ratio to obtain the texture occlusion correction coefficient; when the target water film interference type is identified as the third water film interference type, a weighted fusion is performed based on the reflective grayscale fluctuation amplitude and the reflection area... The dynamic reflection suppression coefficient is obtained by weighted fusion of the domain with frame displacement. Based on the target water film interference type identifier, at least one of the eye error correction coefficient, texture occlusion correction coefficient and dynamic reflection suppression coefficient is used as the water film interference compensation parameter. The eye error correction coefficient is used to characterize the degree of weakening correction when water film reflection has an error increase effect on eye parameters. The texture occlusion correction coefficient is used to characterize the degree of readability recovery correction when water film reflection occludes the texture of the fish surface. The dynamic reflection suppression coefficient is used to characterize the degree of suppression of compensation processing by the position change and grayscale change of the bright reflection area in adjacent frames.

[0137] In this embodiment, the eye error correction coefficient is obtained, and the specific calculation method is as follows:

[0138] ;

[0139] ;

[0140] In the formula, This indicates the correction factor for eye-related errors. Indicates the proportion of fisheye reflection coverage. This indicates the amount of displacement of the reflected area as the frame changes. Indicates the weight of fisheye reflection coverage. This indicates an incorrectly increased weight due to reflection.

[0141] The method for obtaining the fisheye reflection coverage weight and reflection error increase weight is as follows: Collect multiple sets of historical fish images with water film reflection in the fisheye area, and collect images of the same fish after the water film in the fisheye area has been removed, using these as reference images; calculate the fisheye reflection coverage ratio and the reflection area displacement with frame in the water film reflection image, and calculate the difference between the eye parameters of the water film reflection image and the eye parameters of the reference image, using this difference as the reference value for eye error increase; set multiple candidate weight combinations according to a preset step size, so that the sum of the fisheye reflection coverage weight and the reflection error increase weight is one, for example, generating candidate weights between 0 and 1 with a step size of 0.05; substitute each candidate weight into the weighted fusion calculation of the fisheye reflection coverage ratio and the reflection area displacement with frame to obtain the candidate eye error increase correction coefficient; calculate the average error between each candidate eye error increase correction coefficient and the eye error increase reference value, and determine the candidate weight combination with the smallest average error as the fisheye reflection coverage weight and the reflection error increase weight.

[0142] Texture occlusion correction factor, calculated as follows:

[0143] ;

[0144] ;

[0145] In the formula, Indicates the texture occlusion correction factor. This indicates the proportion of the fish's surface area that reflects light. Indicates the percentage decrease in texture readability. Indicates the reflectivity of the fish's body surface. This indicates the weight of texture readability.

[0146] The method for obtaining the weights of fish surface reflectivity and texture readability is as follows: Multiple historical fish image samples with water film reflectivity on the fish surface are collected, and a reference image of the same fish after the water film is removed is also collected. The proportion of reflective area and the decrease in texture readability in the water film reflective image are calculated respectively, and the difference between the texture parameters of the water film reflective image and the texture parameters of the reference image is calculated. This difference is used as the texture occlusion reference value. Multiple candidate weight combinations are set according to a preset step size, so that the sum of the fish surface reflectivity weight and the texture readability influence weight is one. Each candidate weight is substituted into the weighted fusion calculation of the fish surface reflectivity area proportion and the decrease in texture readability to obtain the candidate texture occlusion correction coefficient. The average error between each candidate texture occlusion correction coefficient and the texture occlusion reference value is calculated, and the candidate weight combination with the smallest average error is determined as the fish surface reflectivity weight and the texture readability influence weight.

[0147] The dynamic reflection suppression coefficient is calculated as follows:

[0148] ;

[0149] ;

[0150] In the formula, Indicates the dynamic reflection suppression coefficient. Indicates the amplitude of reflective grayscale fluctuation. This indicates the amount of displacement of the reflected area as the frame changes. Indicates the reflective grayscale weight. This indicates the reflection weights based on the frame.

[0151] The specific methods for obtaining the reflective grayscale weight and the reflection frame-dependent weight are as follows: Collect multiple sets of historical fish video samples with continuous frames of dynamic reflection from water film, and collect reference video samples of the same fish after the water film has been removed; calculate the amplitude of reflective grayscale fluctuation and the displacement of the reflection area with each frame in the dynamic reflection video of water film, and calculate the difference between the fluctuation of the freshness parameter in the dynamic reflection video of water film between consecutive image frames and the fluctuation of the freshness parameter in the reference video, using this difference as the dynamic reflection reference value; set multiple candidate weight combinations according to a preset step size, so that the sum of the reflective grayscale weight and the reflection frame-dependent weight is one; substitute each candidate weight into the weighted fusion calculation of the amplitude of reflective grayscale fluctuation and the displacement of the reflection area with each frame to obtain the candidate dynamic reflection suppression coefficient; calculate the average error between each candidate dynamic reflection suppression coefficient and the dynamic reflection reference value, and determine the candidate weight combination with the smallest average error as the reflective grayscale weight and the reflection frame-dependent weight.

[0152] The corresponding correction coefficient is selected as the water film interference compensation parameter based on the target water film interference type identifier. When the target water film interference type identifier is the first water film interference type identifier, the water film interference compensation parameter includes the ocular error correction coefficient; when the target water film interference type identifier is the second water film interference type identifier, the water film interference compensation parameter includes the texture occlusion correction coefficient; when the target water film interference type identifier is the third water film interference type identifier, the water film interference compensation parameter includes the dynamic reflection suppression coefficient.

[0153] The eye-related erroneous correction coefficient characterizes the degree of reduction and correction when water film reflections cause erroneous increases in eye parameters. The texture occlusion correction coefficient characterizes the degree of readability restoration correction when water film reflections obscure the texture of the fish's surface. The dynamic reflection suppression coefficient characterizes the degree of suppression of compensation processing by changes in the position and grayscale of bright reflection areas in adjacent frames.

[0154] By generating eye-related error correction coefficients, texture occlusion correction coefficients, or dynamic reflection suppression coefficients based on the target water film interference type identifier, the water film interference compensation parameters can be matched with the actual interference source. The first water film interference type corresponds to eye-related error correction, the second water film interference type corresponds to texture occlusion correction, and the third water film interference type corresponds to dynamic reflection suppression. This avoids using the same compensation method for different water film interferences, improves the targeting of subsequent compensation freshness parameters, and makes the compensation processing more closely match the specific interference characteristics of the fish eye area, the fish body surface area, or the dynamic reflection of consecutive frames.

[0155] Furthermore, the compensated freshness parameter is obtained through the following methods: The eye parameters and / or texture parameters in the freshness parameter are compensated based on the water film interference compensation parameter to obtain the compensated freshness parameter; when the water film interference compensation parameter includes an eye error correction coefficient, the reflection reduction compensation is performed on the eyeball grayscale uniformity ratio and the effective pupil boundary ratio based on the eye error correction coefficient to obtain the compensated eye parameter; when the water film interference compensation parameter includes a texture occlusion correction coefficient, the readability restoration compensation is performed on the fish body texture gradient mean and the fish body texture continuity ratio based on the texture occlusion correction coefficient to obtain the compensated texture parameter; when the water film interference compensation parameter includes a dynamic reflection suppression coefficient, dynamic reflection suppression compensation is performed on the eye parameters and texture parameters based on the dynamic reflection suppression coefficient to obtain the compensated eye parameter and the compensated texture parameter; when no compensated eye parameter is obtained, the eye parameter is used as the compensated eye parameter; when no compensated texture parameter is obtained, the texture parameter is used as the compensated texture parameter; the compensated eye parameter and the compensated texture parameter are combined as the compensated freshness parameter.

[0156] In this embodiment, as Figure 3 As shown, Figure 3 The flowchart of the water film interference compensation process of the present invention is as follows: After obtaining the target water film interference type identifier, the first water film interference type identifier corresponds to the eye error correction coefficient, the second water film interference type identifier corresponds to the texture occlusion correction coefficient, and the third water film interference type identifier corresponds to the dynamic reflection suppression coefficient; the corresponding correction coefficients are used as water film interference compensation parameters to compensate the eye parameters and texture parameters, thereby obtaining compensated eye parameters and compensated texture parameters, which are then used together as compensated freshness parameters. After re-performing the freshness recognition analysis, the fish freshness is obtained.

[0157] The freshness parameters are obtained by compensating for the eye parameters and / or texture parameters based on the correction coefficients included in the water film interference compensation parameters. The freshness parameters include the uniformity of eye grayscale, the effective proportion of the pupil boundary, the mean gradient of fish texture, and the continuity of fish texture. The goal of the compensation process is to reduce the artificially high eye parameters caused by water film reflection, restore the texture parameters reduced by water film occlusion, and suppress parameter fluctuations caused by dynamic reflection.

[0158] When the water film interference compensation parameters include an eye-related error correction coefficient, it indicates that the primary source of interference is water film reflection in the fisheye region. Water film reflection can cause abnormal brightness or false enhancement at the boundaries of the fisheye region, leading to an error in the uniformity of eye grayscale and the effective proportion of the pupil boundary. Based on the eye-related error correction coefficient, the uniformity of eye grayscale and the effective proportion of the pupil boundary are weakened and corrected to obtain the compensated eye parameters.

[0159] The method for reducing and correcting the uniformity of grayscale in the eyeball is as follows:

[0160] ;

[0161] The effective proportion of the pupil boundary is weakened and corrected, and the specific method is as follows:

[0162] ;

[0163] In the formula, This represents the compensation value for the uniformity of grayscale in the eyeball. This indicates the effective proportional compensation value of the pupil boundary. This indicates the correction factor for eye-related errors.

[0164] The effective proportional compensation value of the pupil boundary and the proportional compensation value of the uniformity of eye gray are combined as the compensation parameters for the eye.

[0165] The readability restoration compensation is performed using the mean gradient of fish body texture. The specific method is as follows:

[0166] ;

[0167] The readability of the fish body texture is restored by compensating for the continuous proportions. The specific method is as follows:

[0168] ;

[0169] In the formula, This represents the mean compensation value for the fish body texture gradient. This indicates the compensation value for the continuous proportion of fish body texture. This represents the mean gradient of the fish's body texture. Indicates the continuous proportion of fish body texture. This represents the texture occlusion correction factor.

[0170] Dynamic reflection suppression compensation is performed on eye parameters and texture parameters based on the dynamic reflection suppression coefficient. Specifically, this includes dynamically compensating for the uniformity of eye grayscale, the effective proportion of pupil boundary, the mean gradient of fish texture, and the mean gradient of fish texture. The specific method for dynamically compensating for the uniformity of eye grayscale is as follows:

[0171] ;

[0172] Dynamic reflection suppression compensation is performed on the effective proportion of the pupil boundary, specifically using the following method:

[0173] ;

[0174] Dynamic reflection suppression compensation is performed on the mean gradient of fish body texture. The specific method is as follows:

[0175] ;

[0176] Dynamic reflection suppression compensation is applied to the continuous proportion of fish body texture. The specific method is as follows:

[0177] ;

[0178] In the formula, This represents the compensation value for reducing reflectivity based on the uniformity of grayscale in the eyeball. This indicates the effective proportional reflection suppression compensation value at the pupil boundary. This represents the compensation value for suppressing reflectivity in the fish's texture gradient. Indicates the continuous proportion of fish body texture. Indicates the uniformity of grayscale in the eyeball. Indicates the effective proportion of the pupil boundary. This represents the mean gradient of the fish's body texture. Indicates the continuous proportion of fish body texture. This represents the dynamic reflectivity suppression coefficient.

[0179] The eye grayscale uniformity ratio reflection suppression compensation value, the pupil boundary effective ratio reflection suppression compensation value, the fish body texture gradient reflection suppression compensation value, and the fish body texture continuity ratio are combined as the compensation eye parameter and the compensation texture parameter.

[0180] Determine whether the compensated eye parameters have been obtained. If the water film interference compensation parameters do not involve the eye error correction coefficient or the dynamic reflectivity suppression coefficient, it indicates that the current main interference is not directly affecting the eye parameters. In this case, the original eye parameters are used as the compensated eye parameters to avoid missing the eye dimension in the compensation freshness parameters.

[0181] The compensation parameters are: the compensation eyeball grayscale uniformity ratio and the compensation pupil boundary effective ratio. Similarly, the compensation fish body texture gradient mean and the compensation fish body texture continuity ratio are jointly labeled as compensation texture parameters. These compensation eye parameters and compensation texture parameters are then combined to form the compensation freshness parameter. The compensation freshness parameter includes the compensation eyeball grayscale uniformity ratio, the compensation pupil boundary effective ratio, the compensation fish body texture gradient mean, and the compensation fish body texture continuity ratio.

[0182] By compensating for eye and / or texture parameters based on water film interference compensation parameters, the interference of water film reflection on freshness parameters can be reduced. An eye overstatement correction coefficient is used to weaken the artificially high eye parameters caused by reflection in the fish's eye region; a texture occlusion correction coefficient is used to restore the texture parameter reduction caused by reflection occlusion on the fish's surface; and a dynamic reflection suppression coefficient is used to suppress parameter fluctuations caused by dynamic reflection in consecutive frames. Parameters unaffected by the corresponding interference are retained, ensuring that the compensated freshness parameters still retain complete eye and texture dimensions. Therefore, when performing freshness recognition analysis, judgments can be made based on parameters that more closely resemble the actual state of the fish, thereby improving the accuracy of fish freshness recognition in water film interference scenarios.

[0183] like Figure 4 The diagram shown is a system architecture diagram of a method for identifying fish freshness according to an embodiment of this application. It includes the following modules: a region identification module, used to acquire images of the fish to be identified and perform region identification processing to obtain target regions, each target region including the fish eye region, the fish body surface region, and a high-brightness reflection region; a reflection analysis module, used to perform correlation analysis between the high-brightness reflection region and the fish eye region and the fish body surface region respectively, to obtain a reflection characterization dataset, which characterizes the degree of influence of the high-brightness reflection region on the images of the fish eye region and the fish body surface region; and an interference determination module, used to determine the source of reflection based on the reflection characterization dataset, and obtain the reflection source determination result. The source determination results include natural luster results and water film interference results; the freshness analysis module is used to obtain eye parameters in the fish eye area and texture parameters in the fish body surface area, and combine them as freshness parameters; the reflective source determination module is used to perform freshness identification analysis based on the freshness parameters to obtain the fish freshness when the reflective source determination result is natural luster result; the freshness compensation module is used to determine the water film interference compensation parameter based on the reflective characterization dataset when the reflective source determination result is water film interference result, to compensate the freshness parameter based on the water film interference compensation parameter to obtain the compensated freshness parameter, and to re-execute the freshness identification analysis based on the compensated freshness parameter to obtain the fish freshness.

[0184] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A method for identifying the freshness of fish, characterized in that: Includes the following steps: The fish body image of the fish to be identified is acquired and region recognition processing is performed to obtain each target region, which includes the fish eye region, the fish body surface region and the high-brightness reflection region; Based on the correlation analysis between the bright reflection area and the fish eye area and the fish body surface area, a reflection characterization dataset is obtained. The reflection characterization dataset is used to characterize the degree of influence of the bright reflection area on the image of the fish eye area and the fish body surface area. The source of reflection is determined based on the reflection characterization dataset, and the result of the reflection source determination is obtained. The result of the reflection source determination includes the natural gloss result and the water film interference result. Obtain the eye parameters of the fish's eye region and the texture parameters of the fish's body surface region, and combine them as a freshness parameter; If the result of the reflection source determination is natural luster, then the freshness of the fish is obtained by freshness identification analysis based on the freshness parameter; When the source of reflection is determined to be water film interference, the water film interference compensation parameter is determined based on the reflection characterization dataset. The freshness parameter is then compensated based on the water film interference compensation parameter to obtain the compensated freshness parameter. Finally, the freshness identification analysis is re-executed based on the compensated freshness parameter to obtain the fish freshness.

2. The method for identifying fish freshness according to claim 1, characterized in that: The specific method for obtaining each target region is as follows: The video stream of the fish to be identified within a preset time period is acquired, and image frames are extracted to obtain fish images for each image frame; Fish body contour recognition processing is performed on the fish body images of each image frame to obtain the fish body contour data corresponding to each image frame; Fish head position data is obtained by identifying the fish head position based on the fish body outline data. Fish eye localization is performed based on fish head position data to obtain the fish eye region; The surface region of the fish is extracted based on the fish contour data to obtain the surface region of the fish. The brightness values ​​of each pixel in the fish image are obtained and compared with a preset pixel brightness threshold. Pixels with brightness values ​​above the pixel brightness threshold are identified as bright pixels, thus obtaining each bright pixel. Connectivity analysis is performed on each bright pixel in the fisheye region and the surface region of the fish body to obtain the bright reflection region.

3. The method for identifying fish freshness according to claim 1, characterized in that: The specific method for obtaining the reflective characterization dataset is as follows: Based on the region overlap analysis between the high-brightness reflection area and the fisheye area, the fisheye reflection coverage ratio is obtained. Based on the area ratio analysis of the high-brightness reflection area and the fish body surface area, the reflective area ratio of the fish body surface is obtained. Based on the analysis of the center position change of the bright reflection area in each adjacent frame of the fish body image, the displacement of the reflection area with the frame is obtained. The grayscale mean change was analyzed based on the bright reflective areas in adjacent frames of fish images to obtain the amplitude of reflective grayscale fluctuation. Texture response analysis was performed on the surface area and high-brightness reflection area of ​​the fish body to obtain the proportion of texture readability reduction. The proportion of fisheye reflection coverage, the proportion of fish body surface reflection area, the amount of reflection area displacement with frame, the amplitude of reflection grayscale fluctuation, and the proportion of texture readability decrease are combined into a reflection characterization dataset.

4. The method for identifying fish freshness according to claim 3, characterized in that: The specific method for obtaining the percentage decrease in texture readability is as follows: Based on the positional relationship between the fish surface area and the bright reflection area, the part of the fish surface area that overlaps with the bright reflection area is marked as the bright coverage sub-region, and the part of the fish surface area that does not overlap with the bright reflection area is marked as the non-bright sub-region. Edge detection processing is performed on non-highlight sub-regions to obtain reference texture edge data, which includes each reference texture edge pixel and the gradient magnitude corresponding to each reference texture edge pixel. The reference texture response value is obtained by averaging the gradient magnitudes corresponding to the edge pixels of each reference texture. The gradient magnitude of each pixel in the highlighted sub-region is calculated to obtain the gradient magnitude of each pixel in the highlighted sub-region, and then the average value is processed to obtain the texture response value of the highlighted region. When the reference texture response value is greater than the highlight area texture response value, the degree of difference between the highlight area texture response value and the reference texture response value is analyzed to obtain the difference response ratio value, and this difference response ratio value is used as the texture response attenuation ratio. When the reference texture response value is lower than the texture response value in the highlight area, the preset minimum attenuation ratio is used as the texture response attenuation ratio. The ratio of decreased texture readability is calculated by multiplying the ratio of reflective area on the fish surface with the ratio of texture response attenuation. The texture readability reduction ratio is used to characterize the degree to which the texture gradient response of the fish surface decreases relative to the baseline texture gradient response of the non-highlighted area after the bright reflective area covers the fish surface.

5. The method for identifying fish freshness according to claim 4, characterized in that: The specific method for obtaining the reflection source determination result is as follows: The preset fisheye coverage threshold, surface reflection threshold, displacement threshold, grayscale fluctuation threshold, and texture degradation threshold are obtained and compared with the corresponding reflection characterization datasets to obtain the reflection source determination results. When the fisheye reflection coverage ratio is greater than the fisheye coverage threshold, and the reflection area shifts with the frame by a greater than the shift threshold, the first water film interference result is generated. When the proportion of reflective area on the fish surface is greater than the surface reflective threshold, and the proportion of texture readability decrease is greater than the texture decrease threshold, a second water film interference result is generated. When the amplitude of the reflected grayscale fluctuation is greater than the grayscale fluctuation threshold, and the displacement of the reflected area with the frame is greater than the displacement threshold, a third water film interference result is generated. When the result of determining the source of reflection includes at least one of the first water film interference result, the second water film interference result, and the third water film interference result, the result of determining the source of reflection is the water film interference result. The target water film interference type identifier is determined based on the water film interference results. The target water film interference type identifier includes a first water film interference type identifier, a second water film interference type identifier, and a third water film interference type identifier. When two or more water film interference results are generated simultaneously, the target water film interference type identifier is determined based on the proportion of the reflective characterization dataset corresponding to each water film interference result that exceeds the corresponding threshold. When only one water film interference result is generated, the water film interference type identifier corresponding to that water film interference result is determined as the target water film interference type identifier. If no first, second, or third water film interference results are generated, the result for determining the source of reflection is the natural gloss result.

6. The method for identifying fish freshness according to claim 1, characterized in that: The freshness parameter is obtained using the following method: Based on the fisheye region, the eyeball region and pupil region are segmented to obtain the eyeball region and pupil region; The gray values ​​of each pixel in the eye region are obtained and gray value analysis is performed to obtain the gray mean and gray standard deviation. The gray dispersion ratio of the eye is generated based on the ratio between the gray standard deviation and the gray mean. The inverse normalized value of the gray dispersion ratio of the eye is used as the gray uniformity ratio of the eye. Based on the pupil region, extract the pupil boundary pixels and calculate the gray-level gradient value between each pupil boundary pixel and its adjacent background pixels. The average value of each gray-level gradient value is used as the average pupil boundary gradient value. Based on the boundary connectivity statistics of the pupil boundary pixels, the continuous ratio of the pupil boundary is obtained. Based on the mean gradient of the pupil boundary and the continuous ratio of the pupil boundary, a coupled analysis is performed to obtain the effective ratio of the pupil boundary. The uniformity of eyeball grayscale and the effective proportion of pupil boundary are jointly labeled as eye parameters; The surface region of the fish is subjected to texture edge extraction to obtain fish texture edge data. The fish texture edge data includes fish texture edge pixels, gradient magnitude corresponding to each fish texture edge pixel, and texture connected line segments formed by adjacent fish texture edge pixels. The average gradient value of the fish texture is obtained by averaging the gradient magnitudes of the edge pixels of each fish texture. Break detection is performed based on texture connected segments, and the interval region between adjacent texture connected segments is marked as texture break region. The total length of texture breaks in the texture breakage region is statistically analyzed, and the continuity ratio of the fish texture is obtained based on the analysis of the total length of texture breaks and the total length of the fish texture edge. The mean gradient of fish texture and the continuous ratio of fish texture are jointly labeled as texture parameters; The eye parameters and texture parameters are combined as a freshness parameter.

7. The method for identifying fish freshness according to claim 1, characterized in that: The method for obtaining fish freshness based on freshness parameters through freshness identification and analysis is as follows: The eye parameters were normalized to obtain the eye freshness. The texture parameters are normalized to obtain the texture freshness. The eye freshness and texture freshness are normalized and mapped to obtain the eye freshness mapping value and texture freshness mapping value. The freshness of fish is obtained by weighted fusion analysis based on the freshness mapping values ​​of the eyes and the freshness mapping values ​​of the texture.

8. The method for identifying fish freshness according to claim 5, characterized in that: The determination of water film interference compensation parameters based on the reflective characterization dataset specifically includes: When the target water film interference type is identified as the first water film interference type, the eye error correction coefficient is obtained by weighted fusion based on the fisheye reflection coverage ratio and the reflection area with frame displacement. When the target water film interference type is identified as the second water film interference type, a weighted fusion is performed based on the proportion of reflective area on the fish surface and the proportion of reduced texture readability to obtain the texture occlusion correction coefficient. When the target water film interference type is identified as the third water film interference type, the dynamic reflection suppression coefficient is obtained by weighted fusion based on the amplitude of reflective grayscale fluctuation and the amount of reflection area shifted with the frame. Based on the target water film interference type identification, at least one of the eye error correction coefficient, texture occlusion correction coefficient and dynamic reflection suppression coefficient is used as the water film interference compensation parameter. The ocular error correction coefficient is used to characterize the degree of weakening correction when water film reflection has an error-increasing effect on ocular parameters; The texture occlusion correction coefficient is used to characterize the degree of readability recovery correction when water film reflection occludes the texture of the fish surface; The dynamic reflection suppression coefficient is used to characterize the degree of suppression of compensation processing by changes in the position and grayscale of the bright reflection area in adjacent frames.

9. The method for identifying fish freshness according to claim 8, characterized in that: The method for obtaining the compensated freshness parameter is as follows: Based on the water film interference compensation parameter, the eye parameter and / or texture parameter in the freshness parameter are compensated to obtain the compensated freshness parameter; When the water film interference compensation parameters include the ocular error correction coefficient, the reflection reduction compensation is performed on the uniformity ratio of eyeball gray and the effective ratio of pupil boundary based on the ocular error correction coefficient to obtain the compensated ocular parameters. When the water film interference compensation parameter includes the texture occlusion correction coefficient, the readability restoration compensation is performed on the mean gradient of the fish texture and the continuous ratio of the fish texture based on the texture occlusion correction coefficient to obtain the compensated texture parameter. When the water film interference compensation parameter includes the dynamic reflection suppression coefficient, dynamic reflection suppression compensation is performed on the eye parameters and texture parameters based on the dynamic reflection suppression coefficient to obtain the compensated eye parameters and compensated texture parameters. When the compensated eye parameter is not obtained, the eye parameter is used as the compensated eye parameter; when the compensated texture parameter is not obtained, the texture parameter is used as the compensated texture parameter. The compensation parameters for eye appearance and texture are combined as the compensation parameters for freshness.

10. A system for identifying fish freshness using any one of claims 1-9, characterized in that: Includes the following modules: The region recognition module is used to acquire images of the fish body to be identified and perform region recognition processing to obtain target regions, including the fish eye region, the fish body surface region, and the high-brightness reflection region. The reflection analysis module is used to perform correlation analysis between the bright reflection area and the fish eye area and the fish body surface area respectively to obtain a reflection characterization dataset. The reflection characterization dataset is used to characterize the degree of influence of the bright reflection area on the image of the fish eye area and the fish body surface area. The interference determination module is used to determine the source of reflection based on the reflection characterization dataset and obtain the reflection source determination result, which includes the natural gloss result and the water film interference result. The freshness analysis module is used to obtain the eye parameters of the fish's eye area and the texture parameters of the fish's body surface area, and combine them as the freshness parameter. The reflectivity source determination module is used to determine the freshness of fish based on the freshness parameter when the reflectivity source determination result is natural luster. The freshness compensation module is used to determine the water film interference compensation parameter based on the reflective characterization dataset when the reflection source determination result is water film interference result. The freshness parameter is then compensated based on the water film interference compensation parameter to obtain the compensated freshness parameter. Finally, the freshness identification analysis is re-executed based on the compensated freshness parameter to obtain the fish freshness.