A salted duck egg production detection method and device based on image recognition
Through the image recognition method, the pickling process of salted duck eggs is monitored in real time, which solves the problem of difficulty in accurately controlling the pickling cycle in the existing technology, and achieves efficient detection and production efficiency of salted duck eggs.
Patent Information
- Application Number
- CN202410737128.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The existing salted duck egg production and testing methods lack real-time intelligent testing, making it difficult to accurately control the pickling cycle, resulting in serious over-peeling, affecting product quality and production efficiency.
Using an image recognition-based method, by obtaining and processing the egg yolk images of salted duck eggs, real-time taste and taste difference values are calculated, the pickling process is monitored in real time, and the pickling cycle is adjusted to avoid over-piping.
Real-time monitoring of the salted duck egg pickling process is achieved, precise control of the pickling cycle, reducing over-graining, and improving product quality and production efficiency.
Smart Images

Figure CN118644451B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a salted duck egg production detection method based on image recognition. Background Art
[0002] In the production process of salted duck eggs, fresh duck eggs must be selected first, and the eggshells must be free of cracks to prevent salt water from penetrating into the eggs and affecting the food quality. The intact fresh duck eggs are then pickled into mature salted duck eggs. However, due to different pickling conditions, pickling techniques, equipment and operations, the time it takes to pickle fresh duck eggs into salted duck eggs is different, and the speed of maturation and salt content are different, which makes the quality of the salted duck eggs after pickling different. There are salted duck eggs that mature quickly, which cause a poor taste due to over-pickled, and even enter the corruption period to produce a large amount of toxic substances. Therefore, the products need to be tested and graded during the pickling process and before they are packaged. Nowadays, most of the egg grading is done manually, which is slow, inefficient and has poor grading accuracy. There is an urgent need for a production detection method for salted duck eggs. If the internal quality state of the salted duck eggs during the pickling production process can be monitored in real time, the pickling cycle for the salted duck eggs to reach the target maturity can be accurately determined, thereby reducing the occurrence of over-pickled phenomena, thereby improving yield and production efficiency and reducing waste.
[0003] Chinese Patent Publication No.: CN111136027A discloses a salted duck egg quality inspection device and method based on a convolutional neural network. The salted duck egg quality inspection device detects the gas components in the gas emitted by the salted duck eggs to preferentially exclude the smelly salted duck eggs, and detects the remaining salted duck eggs using a pre-trained convolutional neural network model for detecting the quality of salted duck eggs, and classifies the inferior salted duck eggs from the high-quality salted duck eggs, thereby replacing the traditional manual detection method, saving labor and improving production efficiency; however, the existing salted duck egg production and detection method lacks real-time monitoring during the duck egg pickling process, that is, it is impossible to detect the quality of the salted duck eggs in real time to analyze the maturity, and control the pickling cycle according to the maturity, so that a large number of salted duck eggs are over-pickled or even corrupt, which leads to low product yield and low production efficiency. Summary of the invention
[0004] To this end, the present invention provides a salted duck egg production detection method based on image recognition, which is used to overcome the problem that in the duck egg pickling process in the prior art, due to the lack of real-time intelligent detection and analysis of the salted duck egg pickling process, it is difficult to accurately control the pickling cycle, resulting in a large amount of over-pickled duck eggs and low product yield.
[0005] To achieve the above object, the present invention provides a salted duck egg production device based on ultrasonic detection, comprising:
[0006] Raw material pretreatment: screening, soaking, cleaning and drying fresh duck eggs for use as raw materials;
[0007] Soaking, using edible vinegar to soak the prepared raw materials, and classifying the soaked raw materials into several categories of raw materials;
[0008] Pickling, placing various types of raw materials in salt water for pickling. For any type of raw materials, the pickling process is divided into two stages. The first pickling stage is pickling with saturated salt water for a first preset period, and the second pickling stage is pickling with a preset salt water concentration and a second preset period;
[0009] In the second pickling stage, the pickling process of the raw material to be detected is detected to determine whether to update the second preset cycle to the real-time pickling cycle;
[0010] The process of detecting the pickling process of the raw material to be detected includes: obtaining an initial yolk image of the raw material to be detected, smoothing the initial yolk image to obtain a real-time yolk image of the detection period, calculating the real-time flavor and the real-time flavor difference according to the real-time yolk image, comparing the standard flavor difference with the real-time flavor difference, and when it is determined that the real-time flavor difference is greater than the standard flavor difference, comparing the real-time flavor with the standard flavor to analyze the pickling state of the raw material;
[0011] Product preparation: the pickled raw materials are seasoned with spices, and then packaged and sorted to obtain the salted duck egg products.
[0012] Furthermore, in the second pickling stage, any raw material to be tested is randomly selected with a preset detection cycle to perform pickling progress detection in each detection cycle. For any detection cycle, a raw material pickling image of the raw material to be tested is obtained, and a corresponding initial yolk image is obtained based on the raw material pickling image. After smoothing the initial yolk image, a real-time yolk image of the detection cycle is obtained, and a real-time flavor difference is calculated based on the real-time yolk image. The standard flavor difference is compared with the real-time flavor difference to analyze the progress of the second pickling stage of the raw material.
[0013] Furthermore, the raw material to be tested is placed on a loading platform, and after being irradiated with a light beam and photographed, a pickled raw material image of the raw material to be tested is obtained, each pixel in the pickled raw material image is scanned in turn, and a real-time brightness difference between two adjacent pixels is calculated, and the real-time brightness difference is scanned and determined according to a preset brightness difference.
[0014] If the real-time brightness difference is less than the preset brightness difference, no contour edge marking is performed on the two adjacent pixel points;
[0015] If the real-time brightness difference is greater than or equal to the preset brightness difference, the contour edge of the two adjacent pixels is marked;
[0016] Until the scanning and determination of each pixel point in the raw material pickling image is completed, each pixel point with a completed contour edge mark is obtained and recorded as a contour edge pixel point.
[0017] Furthermore, after completing the scanning and determination of each pixel point in the raw material pickled image, a contour line segment formed by the contour edge pixel points is obtained, the raw material pickled image is divided into an inner contour area and an outer contour area, and the brightness data of a number of pixel points in the inner contour area and the outer contour area are respectively subjected to weighted average processing, so that the inner contour area is used as an initial egg yolk image, and the initial egg yolk image is smoothed to obtain a real-time egg yolk image;
[0018] The weighted average processing process includes obtaining the brightness value of each pixel point in the inner area of the contour and recording it as the initial brightness value, calculating the average value of each initial brightness value and recording it as the average foreground brightness, obtaining the brightness value of each pixel point in the outer area of the contour and calculating the average background brightness, subtracting the average foreground brightness from the average background brightness to obtain the real-time brightness value, adding each initial brightness value to the real-time brightness difference value in turn to obtain the corresponding corrected brightness value, correcting the real-time brightness value in the raw material pickling image to the corrected brightness value, and correcting the brightness value of the pixel point at the edge of the contour to the average background brightness.
[0019] Furthermore, the smoothing process includes weighted smoothing and gradual smoothing, obtaining the central pixel point of the initial yolk image, passing through any contour edge pixel point and extending in this direction to form an initial ray, rotating the initial ray in a clockwise direction by a preset center angle, and connecting the contour edge pixel points passed through to form a simulated fan-shaped area, performing weighted smoothing on the simulated arc in the simulated fan-shaped area to form a unit fan-shaped area and a unit arc segment, until the initial ray ends passing through each contour edge pixel point, performing gradual smoothing on each unit arc segment in the clockwise direction of any unit arc segment to obtain a real-time yolk image;
[0020] The weighted smoothing process includes calculating the average value of the distance between each contour edge pixel point and the central pixel point in the simulated arc to obtain a unit radius, correcting the distance between each contour edge pixel point and the central pixel point in the simulated arc to the unit radius to obtain a unit sector area, and obtaining an arc segment in the unit sector area as a unit arc segment;
[0021] The gradual smoothing process includes calculating the average value of the unit radii of adjacent unit fan-shaped areas as the real-time radius, and correcting each unit radius in the adjacent unit fan-shaped areas to the real-time radius until the gradual smoothing process of each unit arc segment is completed.
[0022] Further, for the raw material to be detected, the percentage of the area of the real-time egg yolk image to the total raw material contour area is calculated, recorded as the real-time flavorfulness, the absolute value of the difference between the real-time flavorfulness and the standard flavorfulness is calculated to obtain the real-time flavorfulness difference, and the real-time flavorfulness difference is compared with the standard flavorfulness difference.
[0023] If the real-time flavor difference is less than the standard flavor difference, it is determined that the second pickling stage is finished, the real-time pickling time of the second pickling stage is obtained, and the second preset period is updated with the real-time pickling time;
[0024] If the real-time flavor penetration difference is greater than the standard flavor penetration difference, the real-time flavor penetration is compared with the standard flavor penetration to analyze the pickling state of the raw materials.
[0025] Further, when it is determined that the real-time flavor difference is greater than the standard flavor difference, the real-time flavor is compared with the standard flavor.
[0026] If the real-time flavor penetration is less than the standard flavor penetration, a flavor penetration change rate curve is drawn to analyze whether the second pickling stage is over;
[0027] If the real-time flavorfulness is greater than the standard flavorfulness, a new raw material to be tested is selected and the pickling process is tested. If it is again determined that the real-time flavorfulness is greater than the standard flavorfulness, the second pickling stage is determined to be over.
[0028] Furthermore, when it is determined that the real-time flavorfulness is less than the standard flavorfulness, a curve showing the change of the real-time flavorfulness with the detection interval is generated, the real-time flavorfulness change rate corresponding to the detection interval of the change curve is obtained, and the real-time flavorfulness change rate is plotted against time to obtain a flavorfulness change rate curve.
[0029] Further, the flavor change rate curve is obtained and judged.
[0030] If the flavor degree change rate curve has a peak value, it is determined that the second pickling stage is over, and the real-time pickling time of the second pickling stage is obtained. The second preset period is updated with the real-time pickling time, and the standard flavor degree is corrected to Qb'=Qb×[1-(Tb2-Ts) / Ts];
[0031] If the flavor change rate curve does not show a peak, the raw material to be tested is marked for detection and then put into a pickling mechanism to continue preparation in the second pickling stage;
[0032] Wherein, Qb' is the corrected standard flavor degree, Qb is the set standard flavor degree, Tb2 is the set second preset period, and Ts is the obtained real-time marinating time.
[0033] On the other hand, the present invention also provides a salted duck egg production detection device based on image recognition, the device comprising:
[0034] A pickling mechanism, used to contain raw materials and pickles for the pickling process;
[0035] The production inspection mechanism includes a light source emitter, a loading platform, an inspection box and a camera, wherein:
[0036] The light source emitter is used to emit a light beam;
[0037] The loading platform is used to support the raw material to be tested;
[0038] The detection box is used to provide a light-enclosed space;
[0039] The camera is used to take pictures of the raw material to be tested when the light source emitter emits a light beam, so as to obtain a pickled raw material image;
[0040] A control mechanism is connected to the camera and the light source transmitter, and is used to control the light source transmitter to emit a light beam, and the camera to capture an image of the raw material being marinated. The control mechanism can also obtain an initial yolk image based on the raw material being marinated, and obtain a real-time yolk image of the detection period after smoothing the initial yolk image. The real-time flavorfulness and the real-time flavorfulness difference are calculated based on the real-time yolk image, and the standard flavorfulness difference is compared with the real-time flavorfulness difference. When it is determined that the real-time flavorfulness difference is greater than the standard flavorfulness difference, the real-time flavorfulness is compared with the standard flavorfulness to analyze the marinating state of the raw material.
[0041] Compared with the prior art, the beneficial effects of the present invention are that fresh and flawless duck eggs are selected, and the eggs are soaked and washed to remove dirt and impurities to ensure that the surface of the duck eggs is clean; the washed duck eggs are placed in a ventilated and dry place to dry to ensure that the surface of the duck eggs is completely dry, which is convenient for the next step of processing; the duck eggs are soaked in edible vinegar to improve the product quality; the soaked duck eggs are classified into several categories according to the size and origin of the duck eggs to ensure that the pickling methods and pickling times of various types of duck eggs are the same, so that the maturity speeds of various types of duck eggs are consistent, and the pickling process detection is effective; and the pickling process is divided into In two stages, duck eggs are pickled with brine of different concentrations, and real-time detection is only performed on the salted duck eggs in the later stage of pickling, which reduces the detection cycle while ensuring the quality of the salted duck egg products. That is, by performing pickling process detection on the salted duck eggs that are close to completing the pickling process, it is avoided that over-pickling leads to a low product qualification rate, which makes the salted duck egg production efficiency low and causes waste. By performing pickling process detection on the salted duck eggs, its internal quality is accurately analyzed without damaging the eggshell. That is, by using the salted egg yolk area to characterize the pickling maturity period and the maturity reached of the salted duck eggs, the pickling time can be accurately controlled to avoid over-pickling caused by a low product qualification rate and serious waste.
[0042] Furthermore, by setting a preset brightness difference value to determine the edge of the yolk area image according to the degree of brightness change, by calculating the brightness difference between each pixel and the adjacent pixel points, the pixel points with obvious brightness changes are marked with contour edges to ultimately form the boundary of the yolk. The method is simple and effective.
[0043] Furthermore, by performing weighted average calculation on the brightness values of the pixels, the data can be analyzed accurately and reliably, the contrast between the area inside the contour and the area outside the contour can be enhanced, the yolk area and the egg white area can be effectively separated, the accuracy of identifying the yolk area can be increased, and the area can be calculated more easily.
[0044] Furthermore, after enhancing the contrast between the area inside the contour and the area outside the contour, burrs will appear on the edge of the contour. In this case, the edge image is smoothed to reduce the burrs, which facilitates the calculation of the area. That is, the yolk area is first divided into a number of unit sector areas at the same center angle, and then the pixel points on the non-radius curve of the unit sector area are weighted to form a standard sector. Each pixel point on its arc length is used as the pixel point of the contour edge until the correction of each unit sector area is completed, and the actual radius of adjacent unit sector areas is corrected to make the adjacent unit sector areas transition naturally, forming a real-time yolk image, which is convenient for the calculation of the area. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The present invention is a schematic diagram of a method for detecting salted duck egg production based on image recognition according to an embodiment of the present invention;
[0046] Figure 2 A logic flow chart for obtaining a real-time egg yolk image according to an embodiment of the present invention;
[0047] Figure 3 The figure is a logic determination diagram of the real-time flavor degree according to an embodiment of the present invention;
[0048] Figure 4 It is a structural schematic diagram of a salted duck egg production detection device based on image recognition according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0050] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0051] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0052] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0053] See also Figure 1 As shown, it is a flow chart of a salted duck egg production detection method based on image recognition according to an embodiment of the present invention. The present invention provides a flow chart of a salted duck egg production detection method based on image recognition, comprising:
[0054] Step S1, raw material pretreatment, screening, soaking, cleaning and drying fresh duck eggs for use as raw materials;
[0055] Step S2, soaking, using edible vinegar to soak the prepared raw materials, and classifying the soaked raw materials into several categories of raw materials;
[0056] Step S3, pickling, placing each type of raw material in salt water for pickling. For any type of raw material, the pickling process is divided into two stages. The first pickling stage is pickling with saturated salt water for a first preset period, and the second pickling stage is pickling with a preset salt water concentration and a second preset period;
[0057] In the second pickling stage, the pickling process of the raw material to be detected is detected to determine whether to update the second preset cycle to the real-time pickling cycle;
[0058] The process of detecting the pickling process of the raw material to be detected includes: obtaining an initial yolk image of the raw material to be detected, smoothing the initial yolk image to obtain a real-time yolk image of the detection period, calculating the real-time flavor and the real-time flavor difference according to the real-time yolk image, comparing the standard flavor difference with the real-time flavor difference, and when it is determined that the real-time flavor difference is greater than the standard flavor difference, comparing the real-time flavor with the standard flavor to analyze the pickling state of the raw material;
[0059] Step S4, product preparation, the pickled raw materials are seasoned with spices, and then packaged and sorted to obtain salted duck egg products.
[0060] In this embodiment, fresh and flawless duck eggs are selected, soaked and washed to remove dirt and impurities to ensure that the surface of the duck eggs is clean. The washed duck eggs are placed in a ventilated and dry place to dry to ensure that the surface of the duck eggs is completely dry, which is convenient for the next step of processing. The duck eggs are soaked in edible vinegar to improve the product quality. The soaked duck eggs are classified into several categories according to the size and origin of the duck eggs to ensure that the pickling methods and pickling times of various duck eggs are the same, so that the maturity speed of various duck eggs is consistent, and the pickling process detection is effective. The pickling process is divided into two stages. The duck eggs are pickled in brine of different concentrations, and the salted duck eggs are only tested in real time in the later stage of pickling, so as to reduce the testing cycle and ensure the quality of the salted duck egg products. That is, the pickling process of the salted duck eggs that are close to completing the pickling process can be tested to avoid over-pickling resulting in low product qualification rate, low salted duck egg production efficiency and waste. The pickling process of the salted duck eggs can be tested to accurately analyze their internal quality without damaging the eggshell. That is, the salted egg yolk area is used to characterize the pickling period and maturity of the salted duck eggs, so as to accurately control the pickling time and avoid over-pickling resulting in low product qualification rate and serious waste.
[0061] The soaking time in step S2 can be adjusted according to the size of the duck eggs, the concentration of the edible vinegar and the product requirements;
[0062] In this embodiment, the first preset period is set within the range of 10-12 days, and the second preset period is set within the range of 25-40 days. The first preset period and the second preset period constitute a total pickling period. The setting value is related to environmental factors such as geographical climate and is affected by actual temperature conditions. The higher the temperature, the smaller the first preset period is set. The setting value is also related to the size of the duck eggs. The larger the duck eggs are, the larger the first preset period is set. The second preset period is the late stage of the total pickling period. In the second preset period, with the infiltration of salt water, the yolk area changes significantly. The preset salt water concentration is 10%;
[0063] Specifically, in the second pickling stage, any raw material to be tested is randomly selected in a preset detection cycle to perform pickling progress detection in each detection cycle. For any detection cycle, the raw material pickling image of the raw material to be tested is obtained, and the corresponding initial yolk image is obtained based on the raw material pickling image. After smoothing the initial yolk image, the real-time yolk image of the detection cycle is obtained, and the real-time flavor difference is calculated based on the real-time yolk image. The standard flavor difference is compared with the real-time flavor difference to analyze the progress of the second pickling stage of the raw material.
[0064] The preset detection cycle set in the present embodiment is 3 days to 7 days, and the set value is related to the total pickling period and is selected according to the actual salted duck egg type; the raw material to be detected is the salted duck eggs in the pickling mechanism. Since the salted duck eggs are classified before pickling, a salted duck egg is randomly selected, the moisture on its surface is wiped off, and it is placed on the loading platform, and its placement position is adjusted so that the yolk size is complete, in the middle position of the image, and the image quality is clear, and the pickling process detection is performed. After the detection is completed, the shooting is marked to continue to perform the pickling process detection on the salted duck egg in the next detection cycle;
[0065] See also Figure 2 As shown, it is a logic flow chart of obtaining a real-time egg yolk image according to an embodiment of the present invention;
[0066] Specifically, in step S3, a preset brightness difference is set, the raw material to be detected is placed on the loading platform, and after light beam irradiation and picture taking, a pickled raw material image of the raw material to be detected is obtained, each pixel point in the pickled raw material image is scanned in turn, and the real-time brightness difference between two adjacent pixels is calculated, and the real-time brightness difference is scanned and determined according to the preset brightness difference.
[0067] If the real-time brightness difference is less than the preset brightness difference, no contour edge marking is performed on the two adjacent pixel points;
[0068] If the real-time brightness difference is greater than or equal to the preset brightness difference, the contour edge of the two adjacent pixels is marked;
[0069] Until the scanning and determination of each pixel point in the raw material pickling image is completed, each pixel point with a completed contour edge mark is obtained and recorded as a contour edge pixel point.
[0070] The preset brightness difference value set in the present embodiment is the brightness difference threshold value of the yolk and the egg white in the salted duck egg image. The set value is related to the light source conditions, the camera 4 settings, etc., and can be set to between 15-20, and is selected according to the actual shooting situation;
[0071] By setting a preset brightness difference value, the edge of the yolk area image is determined according to the degree of brightness change. By calculating the brightness difference between each pixel and the adjacent pixel points, the pixel points with obvious brightness changes are marked with contour edges to ultimately form the boundary of the yolk. The method is simple and effective.
[0072] Specifically, after completing the scanning and determination of each pixel point in the raw material pickled image, the contour line segment formed by the contour edge pixel points is obtained, the raw material pickled image is divided into an inner contour area and an outer contour area, and the brightness data of a number of pixel points in the inner contour area and the outer contour area are respectively subjected to weighted average processing, so that the inner contour area is used as an initial egg yolk image, and the initial egg yolk image is smoothed to obtain a real-time egg yolk image;
[0073] The weighted average processing process includes obtaining the brightness value of each pixel point in the inner area of the contour and recording it as the initial brightness value, calculating the average value of each initial brightness value and recording it as the average foreground brightness, obtaining the brightness value of each pixel point in the outer area of the contour and calculating the average background brightness, subtracting the average foreground brightness from the average background brightness to obtain the real-time brightness value, adding each initial brightness value to the real-time brightness difference value in turn to obtain the corresponding corrected brightness value, correcting the real-time brightness value in the raw material pickling image to the corrected brightness value, and correcting the brightness value of the pixel point at the edge of the contour to the average background brightness.
[0074] By performing weighted average calculation on the brightness values of the pixels, the data can be analyzed accurately and reliably, and the brightness values of the pixels in the area within the contour can be increased to enhance the contrast between the area within the contour and the area outside the contour, effectively separate the yolk area from the egg white area, increase the accuracy of identifying the yolk area, and facilitate the calculation of the area.
[0075] Specifically, the smoothing process includes weighted smoothing and gradual smoothing, obtaining the central pixel point of the initial yolk image, passing through any contour edge pixel point and extending in this direction to form an initial ray, rotating the initial ray in a clockwise direction by a preset center angle, and connecting the contour edge pixel points passed through to form a simulated fan-shaped area, performing weighted smoothing on the simulated arc in the simulated fan-shaped area to form a unit fan-shaped area and a unit arc segment, until the initial ray ends passing through each contour edge pixel point, performing gradual smoothing on each unit arc segment in the clockwise direction of any unit arc segment to obtain a real-time yolk image;
[0076] The weighted smoothing process includes calculating the average value of the distance between each contour edge pixel point and the central pixel point in the simulated arc to obtain a unit radius, correcting the distance between each contour edge pixel point and the central pixel point in the simulated arc to the unit radius to obtain a unit sector area, and obtaining an arc segment in the unit sector area as a unit arc segment;
[0077] The gradual smoothing process includes calculating the average value of the unit radii of adjacent unit fan-shaped areas as the real-time radius, and correcting each unit radius in the adjacent unit fan-shaped areas to the real-time radius until the gradual smoothing process of each unit arc segment is completed.
[0078] The preset center angle set in this embodiment is the center angle corresponding to the unit sector, and is generally set between 2°-10°, and is selected according to the quality of the initial yolk image actually obtained. For example, if there are more burrs in the image, the preset center angle is set smaller to ensure the accuracy of the extracted yolk area.
[0079] After enhancing the contrast between the area inside the contour and the area outside the contour, burrs will appear on the edge of the contour. The edge image is smoothed to reduce the burrs and facilitate area calculation. That is, the yolk area is first divided into a number of unit sector areas at the same center angle, and then the pixel points on the non-radius curve of the unit sector area are weighted to form a standard sector. Each pixel point on its arc length is used as the pixel point of the contour edge until the correction of each unit sector area is completed. The actual radius of adjacent unit sector areas is corrected to make the adjacent unit sector areas transition naturally, forming a real-time yolk image, which is convenient for area calculation.
[0080] See also Figure 3 As shown, it is a logical determination diagram of the real-time flavor degree according to an embodiment of the present invention;
[0081] Specifically, a standard flavor difference is set, and for the raw material to be detected, the percentage of the area of the real-time egg yolk image to the total raw material contour area is calculated, recorded as the real-time flavor, the absolute value of the difference between the real-time flavor and the standard flavor is calculated to obtain the real-time flavor difference, and the real-time flavor difference is compared with the standard flavor difference.
[0082] If the real-time flavor difference is less than the standard flavor difference, it is determined that the second pickling stage is finished, the real-time pickling time of the second pickling stage is obtained, and the second preset period is updated with the real-time pickling time;
[0083] If the real-time flavor penetration difference is greater than the standard flavor penetration difference, the real-time flavor penetration is compared with the standard flavor penetration to analyze the pickling state of the raw materials.
[0084] The standard flavorfulness set in the present embodiment is the percentage of the yolk area to the total egg area when the salted duck egg is in a mature state. The set value is affected by the type and size of the duck eggs. Generally, it can be set between 53% and 60%, and is selected according to the actual characteristics of the duck egg types. The standard flavorfulness difference is the allowable error range. Generally, it is set between 3% and 5% of the standard flavorfulness. If the calculated real-time flavorfulness difference is within the standard range, it means that the real-time flavorfulness tends to remain unchanged. This is because as the salting time accumulates, salt penetrates into the yolk, and the flow of water in the yolk is restricted, so that the yolk area does not change significantly. At this time, it means that the salted duck egg is pickled and mature.
[0085] Specifically, a standard flavor degree is set, and when it is determined that the real-time flavor degree difference is greater than the standard flavor degree difference, the real-time flavor degree is compared with the standard flavor degree.
[0086] If the real-time flavor penetration is less than the standard flavor penetration, a flavor penetration change rate curve is drawn to analyze whether the second pickling stage is over;
[0087] If the real-time flavorfulness is greater than the standard flavorfulness, a new raw material to be tested is selected and the pickling process is tested. If it is again determined that the real-time flavorfulness is greater than the standard flavorfulness, the second pickling stage is determined to be over.
[0088] Specifically, when it is determined that the real-time flavorfulness is less than the standard flavorfulness, a curve of the real-time flavorfulness changing with the detection interval is generated, the real-time flavorfulness changing rate corresponding to the detection interval of the changing curve is obtained, and the real-time flavorfulness changing rate is plotted against time to obtain a flavorfulness changing rate curve.
[0089] Specifically, the flavor change rate curve is obtained and judged.
[0090] If the flavor degree change rate curve has a peak value, it is determined that the second pickling stage is over, and the real-time pickling time of the second pickling stage is obtained. The second preset period is updated with the real-time pickling time, and the standard flavor degree is corrected to Qb'=Qb×[1-(Tb2-Ts) / Ts];
[0091] If the flavor change rate curve does not show a peak, the raw material to be tested is marked for detection and then put into a pickling mechanism to continue preparation in the second pickling stage;
[0092] Wherein, Qb' is the corrected standard flavor degree, Qb is the set standard flavor degree, Tb2 is the set second preset period, and Ts is the obtained real-time marinating time.
[0093] See also Figure 4 As shown, it is a structural schematic diagram of a salted duck egg production detection device based on image recognition according to an embodiment of the present invention. The present invention also provides a device for a salted duck egg production detection method based on image recognition, the device comprising a light source transmitter 1, a loading platform 2, a detection box 33, a camera 4 and a control mechanism 5, wherein:
[0094] A pickling mechanism, used to contain raw materials and pickles for the pickling process;
[0095] The production inspection mechanism includes a light source emitter 1, a loading platform 2, an inspection box 3 and a camera 4, wherein:
[0096] The light source emitter 1 is used to emit a light beam and provide a light source;
[0097] The loading platform 2 is used to support the raw material to be tested;
[0098] The detection box 3 is used to provide a light-enclosed space;
[0099] The camera 4 is used to take pictures of the raw material to be tested when the light source emitter 1 emits a light beam, so as to obtain a pickled raw material image;
[0100] The control mechanism 5 is connected to the camera 4 and the light source transmitter 1, and is used to control the light source transmitter 1 to emit a light beam, and the camera 4 to capture the raw material pickling image. The control mechanism 5 can also obtain an initial yolk image based on the raw material pickling image, and obtain a real-time yolk image of the detection period after smoothing the initial yolk image, calculate the real-time flavorfulness and the real-time flavorfulness difference based on the real-time yolk image, compare the standard flavorfulness difference with the real-time flavorfulness difference, and when it is determined that the real-time flavorfulness difference is greater than the standard flavorfulness difference, compare the real-time flavorfulness with the standard flavorfulness to analyze the raw material pickling state.
[0101] In this embodiment, a light beam emitted by a light source transmitter is used to pass through the salted duck eggs to illuminate the salted duck eggs, thereby ensuring that the image quality captured by the camera is clear and effective. Light-absorbing materials are used inside the pickling box to prevent light reflection, avoid unnecessary reflections or interference in the image, and ensure that the captured image is clear and true.
[0102] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A salted duck egg production detection method based on image recognition, characterized in that, include, Raw material pretreatment: screening, soaking, cleaning and drying fresh duck eggs for use as raw materials; Soaking, using edible vinegar to soak the prepared raw materials, and classifying the soaked raw materials into several categories of raw materials; Pickling, placing various types of raw materials in salt water for pickling. For any type of raw materials, the pickling process is divided into two stages. The first pickling stage is pickling with saturated salt water for a first preset period, and the second pickling stage is pickling with a preset salt water concentration and a second preset period; In the second pickling stage, the pickling process of the raw material to be detected is detected to determine whether to update the second preset cycle to the real-time pickling cycle; The process of detecting the pickling process of the raw material to be detected includes: obtaining a raw material pickling image of the raw material to be detected, scanning each pixel point in the raw material pickling image to construct a contour line segment, using the area surrounded by the contour line segment as an initial egg yolk image, smoothing the initial egg yolk image to obtain a real-time egg yolk image of the current detection cycle, calculating the percentage of the area of the real-time egg yolk image to the total raw material contour area, recording it as the real-time flavor, calculating the absolute value of the difference between the real-time flavor and the standard flavor to obtain the real-time flavor difference, comparing the real-time flavor difference with the standard flavor difference, If the real-time flavor difference is less than the standard flavor difference, it is determined that the second pickling stage is finished, the real-time pickling time of the second pickling stage is obtained, and the second preset period is updated with the real-time pickling time; If the real-time flavor difference is greater than the standard flavor difference, the real-time flavor is compared with the standard flavor to analyze the pickling state of the raw material; Product preparation: the pickled raw materials are seasoned with spices, and then packaged and sorted to obtain the salted duck egg products.
2. The salted duck egg production detection method based on image recognition according to claim 1, characterized in that, The raw material to be tested is placed on a loading platform, and after being irradiated with a light beam and photographed, a pickled raw material image of the raw material to be tested is obtained. Each pixel in the pickled raw material image is scanned in turn, and the real-time brightness difference between two adjacent pixels is calculated. The real-time brightness difference is scanned and determined according to a preset brightness difference. If the real-time brightness difference is less than the preset brightness difference, no contour edge marking is performed on the two adjacent pixel points; If the real-time brightness difference is greater than or equal to the preset brightness difference, the contour edge of the two adjacent pixels is marked; Until the scanning and determination of each pixel point in the raw material pickling image is completed, each pixel point with a completed contour edge mark is obtained and recorded as a contour edge pixel point.
3. The salted duck egg production detection method based on image recognition according to claim 2, characterized in that, After completing the scanning and determination of each pixel point in the raw material pickled image, a contour line segment formed by the contour edge pixel points is obtained, the raw material pickled image is divided into an inner contour area and an outer contour area, and the brightness data of a number of pixel points in the inner contour area and the outer contour area are respectively subjected to weighted average processing, so that the inner contour area is used as an initial egg yolk image, and the initial egg yolk image is smoothed to obtain a real-time egg yolk image; The weighted average processing process includes obtaining the brightness value of each pixel point in the inner area of the contour and recording it as the initial brightness value, calculating the average value of each initial brightness value and recording it as the average foreground brightness, obtaining the brightness value of each pixel point in the outer area of the contour and calculating the average background brightness, subtracting the average foreground brightness from the average background brightness to obtain the real-time brightness value, adding each initial brightness value to the real-time brightness difference value in turn to obtain the corresponding corrected brightness value, correcting the real-time brightness value in the raw material pickling image to the corrected brightness value, and correcting the brightness value of the pixel point at the edge of the contour to the average background brightness.
4. The salted duck egg production detection method based on image recognition according to claim 3, characterized in that, The smoothing process includes weighted smoothing and gradual smoothing. The central pixel point of the initial yolk image is obtained, and the central pixel point is passed through any contour edge pixel point and extended in this direction to form an initial ray. The initial ray is rotated in a clockwise direction by a preset circle center angle in sequence, and the contour edge pixel points along the path are connected to form a simulated fan-shaped area. The simulated arc in the simulated fan-shaped area is subjected to weighted smoothing to form a unit fan-shaped area and a unit arc segment, until the initial ray ends passing through each contour edge pixel point, and the unit arc segment is subjected to gradual smoothing along the clockwise direction of any unit arc segment to obtain a real-time yolk image. The weighted smoothing process includes calculating the average value of the distance between each contour edge pixel point and the central pixel point in the simulated arc to obtain a unit radius, correcting the distance between each contour edge pixel point and the central pixel point in the simulated arc to the unit radius to obtain a unit sector area, and obtaining an arc segment in the unit sector area as a unit arc segment; The gradual smoothing process includes calculating the average value of the unit radii of adjacent unit fan-shaped areas as the real-time radius, and correcting each unit radius in the adjacent unit fan-shaped areas to the real-time radius until the gradual smoothing process of each unit arc segment is completed.
5. The salted duck egg production detection method based on image recognition according to claim 4, characterized in that, In the second pickling stage, any raw material to be tested is randomly selected in a preset detection cycle to perform pickling progress detection in each detection cycle. For any detection cycle, the raw material pickling image of the raw material to be tested is obtained, and the corresponding initial yolk image is obtained based on the raw material pickling image. After smoothing the initial yolk image, a real-time yolk image of the detection cycle is obtained, and the real-time flavor difference is calculated based on the real-time yolk image. The standard flavor difference is compared with the real-time flavor difference to analyze the progress of the second pickling stage of the raw material.
6. The salted duck egg production detection method based on image recognition according to claim 5, characterized in that, When it is determined that the real-time flavor difference is greater than the standard flavor difference, the real-time flavor is compared with the standard flavor. If the real-time flavor penetration is less than the standard flavor penetration, a flavor penetration change rate curve is drawn to analyze whether the second pickling stage is over; If the real-time flavorfulness is greater than the standard flavorfulness, a new raw material to be tested is selected and the pickling process is tested. If it is again determined that the real-time flavorfulness is greater than the standard flavorfulness, the second pickling stage is determined to be over.
7. The salted duck egg production detection method based on image recognition according to claim 6, characterized in that, When it is determined that the real-time flavorfulness is less than the standard flavorfulness, a curve of the real-time flavorfulness changing with the detection interval is generated, the real-time flavorfulness changing rate corresponding to the detection interval of the changing curve is obtained, and the real-time flavorfulness changing rate is plotted against time to obtain a flavorfulness changing rate curve.
8. The salted duck egg production detection method based on image recognition according to claim 7, characterized in that, Obtain the flavor change rate curve and make a judgment. If the flavor degree change rate curve has a peak value, it is determined that the second pickling stage is over, and the real-time pickling time of the second pickling stage is obtained. The second preset period is updated with the real-time pickling time, and the standard flavor degree is corrected to Qb'=Qb×[1-(Tb2-Ts) / Ts]; If the flavor change rate curve does not show a peak, the raw material to be tested is marked for detection and then put into a pickling mechanism to continue preparation in the second pickling stage; Wherein, Qb' is the corrected standard flavor degree, Qb is the set standard flavor degree, Tb2 is the set second preset period, and Ts is the obtained real-time marinating time.
9. The device of the salted duck egg production detection method based on image recognition according to any one of claims 1 to 8, characterized in that: The device includes, A pickling mechanism, used to contain raw materials and pickles for the pickling process; The production inspection mechanism includes a light source emitter, a loading platform, an inspection box and a camera, wherein: The light source emitter is used to emit a light beam; The loading platform is used to support the raw material to be tested; The detection box is used to provide a light-enclosed space; The camera is used to take pictures of the raw material to be tested when the light source emitter emits a light beam, so as to obtain a pickled raw material image; A control mechanism is connected to the camera and the light source transmitter, and is used to control the light source transmitter to emit a light beam, and the camera to capture an image of the raw material being marinated. The control mechanism can also obtain an initial yolk image based on the raw material being marinated, and after smoothing the initial yolk image, obtain a real-time yolk image of the current detection cycle, calculate the real-time flavorfulness and the real-time flavorfulness difference based on the real-time yolk image, compare the standard flavorfulness difference with the real-time flavorfulness difference, and when it is determined that the real-time flavorfulness difference is greater than the standard flavorfulness difference, compare the real-time flavorfulness with the standard flavorfulness to analyze the marinating state of the raw material.
Citation Information
Patent Citations
Convolutional neural network-based for salted duck egg quality sorting device and method
CN111136027A
Online visual inspection apparatus and method of internal quality of salted egg
CN106370668A
Quality detection method for salted duck eggs
CN110967459A