A dynamic management method for fresh food

Through dynamic management methods, image processing technology is used to monitor the storage images of fresh vegetables, which solves the problem of being unable to perceive the freshness of vegetables in real time in existing distribution solutions, and achieves timely monitoring and protection of the quality of fresh vegetables.

CN118506359BActive Publication Date: 2024-09-17四川参盘供应链科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410970010.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-09-17
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

The existing fresh vegetable delivery solution lacks a monitoring system, which results in the inability to sense the freshness of vegetables in real time, affecting quality. It also relies on manual experience for inspection, making spoilage difficult to detect and increasing losses.

Method used

A dynamic management method is used to collect and compare real-time storage images of fresh food, extract line operators and gradient values ​​​​of pixels, generate existence curves, and calculate similarities to judge the storage results of vegetables and monitor their freshness.

Benefits of technology

It is possible to timely monitor the color abnormalities of fresh vegetables during the delivery process, sense freshness, reduce losses, and ensure quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118506359B
    Figure CN118506359B
Patent Text Reader

Abstract

The present invention discloses a method for dynamic management of fresh food, which belongs to the field of dynamic monitoring technology, and comprises the following steps: S1, collecting real-time storage images of fresh food, and extracting line operators of each pixel point in the real-time storage image; S2, determining the existence curve in the real-time storage image according to the line operators of each pixel point; S3, obtaining a qualified storage image; S4, based on the existence curve, comparing the real-time storage image with the qualified storage image, and determining the storage result of the fresh food. The present invention can timely monitor the color abnormality of fresh vegetables after the distribution and storage are completed, timely perceive the freshness of vegetables, and ensure the quality of fresh vegetables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of dynamic monitoring, and in particular relates to a method for dynamic management of fresh food. Background Art

[0002] With the development of the economy and society, people's consumption level continues to improve, consumption demand continues to upgrade, and the consumption structure has also undergone great changes. Fresh agricultural products are becoming more and more popular among consumers and are gradually becoming a necessity in daily life, especially fresh vegetables. Therefore, the quality requirements for fresh vegetables are gradually increasing.

[0003] In the existing fresh vegetable delivery solution, ordinary foam boxes with ice cubes are generally used. Due to the lack of a monitoring system, there is no intuitive visual monitoring of the delivered fresh vegetables. In addition, the high ambient temperature will accelerate the loss of fresh vegetables. During the delivery process of fresh vegetables, the freshness of the fresh vegetables cannot be perceived, which affects the quality of the fresh vegetables.

[0004] However, the existing inspection of fresh vegetables after delivery and transportation only relies on manual experience to judge the storage time, which makes it difficult to detect the deterioration of fresh agricultural products and increases the loss of fresh products. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a fresh food dynamic management method.

[0006] The technical solution of the present invention is: a method for dynamic management of fresh food comprises the following steps:

[0007] S1, collecting real-time stored images of fresh food, and extracting line operators of each pixel point in the real-time stored images;

[0008] S2. Determine the existence of a curve in the real-time stored image according to the line operator of each pixel point;

[0009] S3, obtaining a qualified storage image;

[0010] S4. Based on the existence curve, the real-time storage image is compared with the qualified storage image to determine the storage result of the fresh food.

[0011] The qualified storage image is a normal presentation image of vegetables, which can reflect the color that vegetables should present under normal conditions. The image contained in the existence curve is similar to the qualified storage image, such as Hamming distance and Euclidean distance, and the calculated similarity is compared with the pre-set similarity threshold. If it is greater than the similarity threshold, the surface of the vegetables has no abnormality after distribution and storage, and it has been monitored. Otherwise, it means that the surface of the vegetables has deteriorated after distribution and storage, and it is different from the normal color. It should be noted that the qualified storage image has been processed to remove background noise.

[0012] Furthermore, S1 includes the following sub-steps:

[0013] S11, collecting real-time stored images of fresh food, calculating the difference weight of each pixel in the real-time stored images, and forming a difference weight sequence;

[0014] S12. Determine the line operator of each pixel point according to the difference weight sequence.

[0015] The beneficial effect of the above further scheme is: in the present invention, the real-time storage image undergoing distribution storage is usually composed of three color intensity values. The red and blue channels are used as a way to describe the pixel color of the real-time storage image and determine the line operator of the pixel, which can increase the richness of the operator and avoid inaccurate extracted existence curves.

[0016] Furthermore, in S11, the calculation formula of the difference weight σ of the pixel point is:

[0017] ; In the formula, Z R Represents the red channel of the pixel, Z G Represents the green channel of the pixel, Z B represents the blue channel of the pixel, exp(·) represents the exponential function, and max(·) represents the maximum value function.

[0018] Furthermore, in S12, the calculation formula of the line operator S of the pixel point is:

[0019] ; Where P represents the probability of the difference weight of the pixel point appearing in the difference weight sequence, P0 represents the probability of the mode of the difference weight sequence appearing in the difference weight sequence, σ represents the difference weight of the pixel point, ln(·) represents the logarithmic function, and ε represents the minimum value of the difference weight sequence.

[0020] Furthermore, S2 includes the following sub-steps:

[0021] S21, extracting the gradient value of each pixel point in the x direction and the gradient value in the y direction;

[0022] S22, extracting a first comparison data set of the real-time stored image according to the gradient value of each pixel point in the x direction and the gradient value in the y direction;

[0023] S23, extracting a second comparison data set of the real-time stored image according to the line operator of each pixel point;

[0024] S24 , extracting the intersection of the first comparison data set and the second comparison data set, connecting the pixel points where the intersection is located, and generating an existence curve.

[0025] The beneficial effect of the above further scheme is: in the present invention, the collected real-time storage image may contain the background color when the vegetable storage is photographed, so the present invention extracts the vegetable proportion area of ​​the real-time storage image, that is, the pixel points in the existence curve (closed curve). In order to achieve accurate extraction of the existence curve, the present invention extracts two data sets based on the gradient value and line operator of the pixel point respectively, and takes the pixel point where the intersection of the data sets is located as the existence curve, thereby determining the vegetable existence area.

[0026] Further, S22 includes the following sub-steps:

[0027] S221, taking the gradient values ​​of all pixels in the x direction as a lateral change set;

[0028] S222, taking the gradient values ​​of all pixels in the y direction as a vertical change set;

[0029] S223, determining a pixel change amount according to the horizontal change set and the vertical change set;

[0030] S224, determining the gradient change of each pixel point;

[0031] S225. Pixel points whose gradient variation is greater than the pixel variation are taken as the first comparison data set.

[0032] Furthermore, in S223, the calculation formula of the pixel change amount C is:

[0033] ; In the formula, M represents the number of elements in the horizontal change set, N represents the number of elements in the vertical change set, and f x Indicates the gradient value of the pixel point in the x direction in the lateral change set, f y Indicates the gradient value of the pixel in the vertical change set in the y direction.

[0034] Furthermore, in S224, the calculation formula of the gradient change F of the pixel point is:

[0035] ; In the formula, f xIndicates the gradient value of the pixel point in the x direction in the lateral change set, f y Indicates the gradient value of the pixel in the vertical change set in the y direction.

[0036] Furthermore, in S23, the method for extracting the second comparison data set of the real-time stored image is: taking the pixel points corresponding to the line operators that are greater than the mean value of all line operators as the second comparison data set.

[0037] The beneficial effects of the present invention are as follows: the present invention extracts the real-time storage image of the fresh food after distribution and storage, and determines the actual vegetable existence area, that is, the pixel points contained in the existence curve; in the extraction process, based on the gradient value and RGB value of the pixel point, a first comparison data set and a second comparison data set are generated, and the existence curve is determined according to the two data sets, thereby completing the comparison between the real-time storage image and the qualified storage image; the present invention can timely monitor the color abnormality of the fresh vegetables after distribution and storage, timely perceive the freshness of the vegetables, and ensure the quality of the fresh vegetables. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The figure is a flow chart of the dynamic management method of fresh food. DETAILED DESCRIPTION

[0039] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

[0040] like Figure 1 As shown, the present invention provides a method for dynamic management of fresh food, comprising the following steps:

[0041] S1, collecting real-time stored images of fresh food, and extracting line operators of each pixel point in the real-time stored images;

[0042] S2. Determine the existence of a curve in the real-time stored image according to the line operator of each pixel point;

[0043] S3, obtaining a qualified storage image;

[0044] S4. Based on the existence curve, the real-time storage image is compared with the qualified storage image to determine the storage result of the fresh food.

[0045] The qualified storage image is a normal presentation image of vegetables, which can reflect the color that vegetables should present under normal conditions. The image contained in the existence curve is similar to the qualified storage image, such as Hamming distance and Euclidean distance, and the calculated similarity is compared with the pre-set similarity threshold. If it is greater than the similarity threshold, the surface of the vegetables has no abnormality after distribution and storage, and it has been monitored. Otherwise, it means that the surface of the vegetables has deteriorated after distribution and storage, and it is different from the normal color. It should be noted that the qualified storage image has been processed to remove background noise.

[0046] In this embodiment of the present invention, S1 includes the following sub-steps:

[0047] S11, collecting real-time stored images of fresh food, calculating the difference weight of each pixel in the real-time stored images, and forming a difference weight sequence;

[0048] S12. Determine the line operator of each pixel point according to the difference weight sequence.

[0049] In the present invention, the real-time storage image undergoing distribution storage is usually composed of three color intensity values. The red and blue channels are used as a method to describe the pixel color of the real-time storage image and determine the line operator of the pixel, which can increase the richness of the operator and avoid inaccurate extraction of the existence curve.

[0050] In the embodiment of the present invention, in S11, the calculation formula of the difference weight σ of the pixel point is:

[0051] ; In the formula, Z R Represents the red channel of the pixel, Z G Represents the green channel of the pixel, Z B represents the blue channel of the pixel, exp(·) represents the exponential function, and max(·) represents the maximum value function.

[0052] In the embodiment of the present invention, in S12, the calculation formula of the line operator S of the pixel point is:

[0053] ; Where P represents the probability of the difference weight of the pixel point appearing in the difference weight sequence, P0 represents the probability of the mode of the difference weight sequence appearing in the difference weight sequence, σ represents the difference weight of the pixel point, ln(·) represents the logarithmic function, and ε represents the minimum value of the difference weight sequence.

[0054] In this embodiment of the present invention, S2 includes the following sub-steps:

[0055] S21, extracting the gradient value of each pixel point in the x direction and the gradient value in the y direction;

[0056] S22, extracting a first comparison data set of the real-time stored image according to the gradient value of each pixel point in the x direction and the gradient value in the y direction;

[0057] S23, extracting a second comparison data set of the real-time stored image according to the line operator of each pixel point;

[0058] S24 , extracting the intersection of the first comparison data set and the second comparison data set, connecting the pixel points where the intersection is located, and generating an existence curve.

[0059] In the present invention, the collected real-time storage image may contain the background color when the vegetable storage is photographed, so the present invention extracts the vegetable proportion area of ​​the real-time storage image, that is, the pixel points in the existence curve (closed curve). In order to achieve accurate extraction of the existence curve, the present invention extracts two data sets based on the gradient value and line operator of the pixel point respectively, and takes the pixel point where the intersection of the data sets is located as the existence curve, thereby determining the vegetable existence area.

[0060] In this embodiment of the present invention, S22 includes the following sub-steps:

[0061] S221, taking the gradient values ​​of all pixels in the x direction as a lateral change set;

[0062] S222, taking the gradient values ​​of all pixels in the y direction as a vertical change set;

[0063] S223, determining a pixel change amount according to the horizontal change set and the vertical change set;

[0064] S224, determining the gradient change of each pixel point;

[0065] S225. Pixel points whose gradient variation is greater than the pixel variation are taken as the first comparison data set.

[0066] In the embodiment of the present invention, in S223, the calculation formula of the pixel change amount C is:

[0067] ; In the formula, M represents the number of elements in the horizontal change set, N represents the number of elements in the vertical change set, and f x Indicates the gradient value of the pixel point in the x direction in the lateral change set, f y Indicates the gradient value of the pixel in the vertical change set in the y direction.

[0068] In the embodiment of the present invention, in S224, the calculation formula of the gradient change F of the pixel point is:

[0069] ; In the formula, f xIndicates the gradient value of the pixel point in the x direction in the lateral change set, f y Indicates the gradient value of the pixel in the vertical change set in the y direction.

[0070] In the embodiment of the present invention, in S23, the method for extracting the second comparison data set of the real-time stored image is: taking the pixel points corresponding to the line operators greater than the mean value of all line operators as the second comparison data set.

[0071] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for dynamic management of fresh food, characterized in that: The following steps are involved: S1, collecting real-time stored images of fresh food, and extracting line operators of each pixel point in the real-time stored images; S2. Determine the existence of a curve in the real-time stored image according to the line operator of each pixel point; S3, obtaining a qualified storage image; S4. Based on the existence curve, the real-time storage image is compared with the qualified storage image to determine the storage result of the fresh food; The S1 comprises the following sub-steps: S11, collecting real-time stored images of fresh food, calculating the difference weight of each pixel in the real-time stored images, and forming a difference weight sequence; S12, determining the line operator of each pixel point according to the difference weight sequence; In S11, the calculation formula of the difference weight σ of the pixel point is: Where Z R Represents the red channel of the pixel, Z G Represents the green channel of the pixel, Z B represents the blue channel of the pixel, exp(·) represents the exponential function, and max(·) represents the maximum value function; In S12, the calculation formula of the line operator S of the pixel point is: ; In the formula, P represents the probability of the difference weight of the pixel point appearing in the difference weight sequence, P0 represents the probability of the mode of the difference weight sequence appearing in the difference weight sequence, σ represents the difference weight of the pixel point, ln(·) represents the logarithmic function, and ε represents the minimum value of the difference weight sequence; The S2 comprises the following sub-steps: S21, extracting the gradient value of each pixel point in the x direction and the gradient value in the y direction; S22, extracting a first comparison data set of the real-time storage image according to the gradient value of each pixel point in the x direction and the gradient value in the y direction; S23, extracting a second comparison data set of the real-time stored image according to the line operator of each pixel point; S24, extracting the intersection of the first comparison data set and the second comparison data set, connecting the pixel points where the intersection is located, and generating an existence curve; The S22 comprises the following sub-steps: S221, taking the gradient values ​​of all pixels in the x direction as a lateral change set; S222, taking the gradient values ​​of all pixels in the y direction as a vertical change set; S223, determining a pixel change amount according to the horizontal change set and the vertical change set; S224, determining the gradient change of each pixel point; S225, taking the pixel points where the gradient change amount is greater than the pixel change amount as the first comparison data set; In S223, the calculation formula of the pixel change amount C is: ; In the formula, M represents the number of elements in the horizontal change set, N represents the number of elements in the vertical change set, and f x Indicates the gradient value of the pixel point in the x direction in the lateral change set, f y Represents the gradient value of the pixel point in the y direction in the vertical change set; In S224, the calculation formula of the gradient change F of the pixel point is: Where, f x Indicates the gradient value of the pixel point in the x direction in the lateral change set, f y Represents the gradient value of the pixel point in the y direction in the vertical change set; In the above S23, the method for extracting the second comparison data set of the real-time stored image is: taking the pixel points corresponding to the line operators that are greater than the mean value of all line operators as the second comparison data set.