Impurity identification system and method for edible mushroom processing production line

By using X-ray detection and vibration devices on the edible fungus processing production line to identify filamentous foreign objects, combined with image segmentation algorithms, the problem that existing technology cannot detect filamentous foreign objects that are close to the background color of edible fungi is solved, and the detection of these filamentous foreign objects is realized. The accurate identification and removal of foreign matter prevents defective products from entering the market.

CN118858331APending Publication Date: 2024-10-29SICHUAN YIBIN SANXIN FOOD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410845912.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing X-ray inspection systems cannot effectively detect filamentous foreign objects that are close to the background color of edible fungi, such as hair and plastic films. As a result, these foreign objects are blocked and missed, causing the problem of defective products entering the market.

Method used

An X-ray detection device is used to initially screen for non-filamentous foreign matter, and a vibration device and a fine air generating device are used to cause the filamentary foreign matter in the transparent packaging bottle to tumble and float, combined with a digital camera to obtain image information of the liquid surface, and use grayscale significant The characteristic and color saliency features identify filamentous foreign objects through image segmentation algorithms, ensuring accurate identification even if the impurity color is close to the background.

Benefits of technology

It effectively suppresses the background of edible fungi and highlights the image of foreign matter, ensuring the immediate detection of foreign matter and impurities during the tumbling process, preventing defective products from flowing into the market, and improving the detection accuracy and efficiency of the edible fungus processing production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118858331A_ABST
    Figure CN118858331A_ABST
Patent Text Reader

Abstract

According to the impurity identification system and method for the edible mushroom processing production line, a conveying belt conveys transparent packaging bottles containing edible mushrooms to the position under a filling opening, the filling opening injects edible mushroom storage liquid into the transparent packaging bottles, and the transparent packaging bottles obtained after filling are conveyed to a detection platform through the conveying belt; according to the detection platform, firstly, non-filamentous foreign matters are preliminarily screened through the X-ray detection device, and the filamentous foreign matters in a transparent packaging bottle roll and float upwards through the vibration device and the fine air generation device, so that the filamentous foreign matters adhered to the surfaces of edible mushrooms are detected, and the problem that defective products are missed due to the fact that the filamentous foreign matters are shielded is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural products, and in particular to an impurity identification system and method for an edible fungus processing production line. Background Art

[0002] The production of edible fungi is highly seasonal, and companies need to process a large amount of raw materials in a timely manner during the season when agricultural products are on the market. In order to improve product quality, one of the key technologies for the automation of edible fungi processing production lines is the detection of foreign matter in semi-finished edible fungi products. The commonly used non-destructive detection method for foreign matter is the X-ray foreign matter detection system, which can be used to detect high-density foreign matter such as metal, glass, and stone. However, the X-ray detection system cannot distinguish foreign matter that is close to the background color of agricultural products, such as hair and plastic film. Hair and plastic film will adhere to the surface of agricultural products and are easily blocked, making detection more difficult. Existing vision-based foreign matter detection methods cannot detect foreign matter such as hair and plastic film adhered to the surface of agricultural products, resulting in missed defective products entering the market.

[0003] Therefore, in order to solve the problem of image detection of foreign matter in the edible fungus processing production line, it is of great economic value to develop an impurity identification system and method. Summary of the invention

[0004] The purpose of the present invention is to provide an impurity identification system and method for an edible fungus processing production line. The invention can perform real-time monitoring in the automated processing and production process of edible fungi, preliminarily screen non-filamentous foreign matter through an X-ray detection device, and make the filamentous foreign matter in the transparent packaging bottle roll up through a vibration device and a fine air generating device, thereby detecting the filamentous foreign matter adhering to the surface of the edible fungi and avoiding the problem of missing defective products due to obstruction.

[0005] The present invention is achieved through the following technical solutions:

[0006] A method for identifying impurities in an edible fungus processing production line comprises the following steps:

[0007] S1. The conveyor belt transports the transparent packaging bottle containing edible fungi to the bottom of the filling port, and the filling port injects the edible fungi storage liquid into the transparent packaging bottle;

[0008] S2. The conveyor belt continues to transport the filled transparent packaging bottle to the detection platform, and the detection platform obtains the X-ray image in the transparent packaging bottle through the X-ray detection device, and sends the X-ray image to the information processing device. When the information processing device detects non-filamentous foreign matter, the transparent packaging bottle is pushed to the pending conveyor belt through the rejection mechanism, otherwise, it proceeds to the next step;

[0009] S3. The detection platform transmits ultrasonic waves to the transparent packaging bottle through a vibration device, and then inserts the outlet of the fine air generating device into the bottom of the bottle to form bubbles of different sizes and cause the liquid to roll from bottom to top, and the digital camera continuously obtains image information of the liquid surface when the liquid in the transparent packaging bottle rolls;

[0010] S4. The digital camera sends the acquired image information to the information processing device, and the information processing device performs image preprocessing on the image information. The information processing device obtains the grayscale significant features and the color significant features of the image based on the image information after the image preprocessing, and segments the foreign matter area in the edible mushroom image through an image segmentation algorithm in combination with the grayscale significant features and the color significant features, so as to obtain the outline of the filamentous foreign matter;

[0011] S5. When the information processing device detects the filamentous foreign matter in the transparent packaging bottle, the transparent packaging bottle is pushed to the pending conveyor belt through the rejection mechanism;

[0012] S6. Repeat the above steps S1-S5.

[0013] In this scheme, the conveyor belt transports the transparent packaging bottle containing edible fungi to the bottom of the filling port, and the filling port injects edible fungi storage liquid into the transparent packaging bottle. The filled transparent packaging bottle is transported to the detection platform by the conveyor belt. The detection platform first detects the non-filamentous foreign matter in the transparent packaging bottle through an X-ray detection device, and then sends ultrasonic waves to the transparent packaging bottle through a vibration device, which will vibrate the liquid in the transparent packaging bottle, which can not only shake the edible fungi in the bottle but also loosen the adhered impurities. At this time, the air outlet of the fine air generating device is inserted into the bottom of the bottle to form bubbles of different sizes and make the liquid roll from bottom to top. Since the density of the filamentous foreign matter is relatively small, it will be The edible fungus floats up and down to the liquid surface, and the digital camera continuously obtains image information of the liquid surface when the liquid in the transparent packaging bottle rolls, and sends the image information to the information processing device. The information processing device obtains the grayscale saliency features and color saliency features at different times based on the image information after image preprocessing, and segments the foreign matter area in the edible fungus image through the image segmentation algorithm based on the grayscale saliency features and the color saliency features to obtain the outline of the filamentous foreign matter. This method can effectively suppress the edible fungus background and highlight the foreign matter image. Even if the color of the impurity is close to the background color of the agricultural product, it can still accurately identify the impurity, thereby timely discovering the foreign matter impurities in the tumbling process and avoiding defective products from entering the market.

[0014] As a further technical solution of the impurity identification method, the color saliency feature detects foreign matter with a color different from that of edible fungi based on the method of reverse projection of the L*a*b* color space in two-dimensional space. The a and b components of the L*a*b* color space are descriptions of the color range. Its color space is larger than the RGB color space and can map all color information that can be described by the RGB color space, thus overcoming the shortcomings of the traditional color segmentation method and having good real-time and robustness.

[0015] The probability of the pixel value of the reverse projection output image is:

[0016]

[0017] Among them, b(x i ) means at position x i The histogram corresponding to the pixel on the bth (x i ) bins, the histogram has m bins, q n represents the value of the nth bin, α(x i ) represents the probability of the area in the histogram of the tested image that meets the characteristics; the obtained probability value is back-projected into the given image. If the probability value of a certain area is much lower than the main probability value, it is determined that the area corresponds to a foreign object.

[0018] As a further technical solution of the impurity identification method, an 8-bit RGB original image is read in, mapped to the L*a*b* color space, the L channel is taken, and zero-averaged and normalized to obtain an adaptive threshold. The a component and the b component in the L*a*b* color space are then back-projected respectively, and binarized images are obtained by passing the adaptive threshold respectively. The two are "ORed" to obtain a color feature image.

[0019] As a further technical solution of the impurity identification method, the grayscale significant feature acquisition process is:

[0020] S31. Traverse all pixels of the image information, if the gray level of the current pixel is less than the threshold a and is not marked, mark the pixel as a suspicious pixel and execute the next step;

[0021] S32. Detect the direction and width of the line structure where the suspicious pixel is located. If the width of the line structure is less than the set threshold, mark the pixel as a possible impurity pixel, otherwise mark the pixel as a background pixel. When the entire image is traversed, execute the next step;

[0022] S33. Traverse all pixels, if the current pixel is marked as a possible impurity pixel and the pixel is not marked, execute the next step;

[0023] S34. Detect the direction of the line structure of the adjacent possible impurity pixel points along the line structure direction of the pixel point. If the direction deviation of the line structure of the pixel point and the adjacent pixel point does not exceed 45°, the pixel point is recorded as the final impurity pixel point, otherwise the pixel point is a background pixel point;

[0024] S35. After all the image information at different filling times are traversed in sequence, a final impurity extraction image is obtained.

[0025] As a further technical solution of the impurity identification method, the directions of the line structure are divided into 0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135° and 157.5°.

[0026] In this scheme, the line structure detection algorithm that combines grayscale value and line direction continuity is used to extract line structure features under complex backgrounds. It is particularly sensitive to line structures of a certain width, has a certain anti-noise ability, and can also improve the processing speed.

[0027] As a further technical solution of the impurity identification method, in order to further improve the identification accuracy and efficiency, the information processing device denoises and refines the line structure of the final impurity extraction image through the method of regional pixel statistics, and then uses the traditional morphological refinement iterative method to extract the impurity skeleton of the processing result.

[0028] As a further technical solution of the impurity identification method, the impurity skeleton is extracted and the number of pixels of the impurity skeleton is counted, and then the presence or absence of impurities in the image is judged by comparing the number of pixels with the number of skeleton pixels of the minimum length of the impurity to be detected.

[0029] An impurity identification system for an edible fungus processing production line, comprising a filling port, a digital camera, a conveyor belt and a detection platform;

[0030] The conveyor belt transports the transparent packaging bottle containing edible fungi to just below the filling port, and the filling port injects edible fungi storage liquid into the transparent packaging bottle. The transparent packaging bottle enters the detection platform via the conveyor belt, and the detection platform detects non-filamentary foreign matter in the transparent packaging bottle through an X-ray detection device, and then makes the filamentary foreign matter in the transparent packaging bottle roll up through a vibration device and a fine air generating device, and obtains image information of the entire rolling process through the digital camera, and the image information is transmitted to the information processing device, and the information processing device detects the filamentary foreign matter in the transparent packaging bottle. The light source is an LED light source, and the gas introduced into the transparent packaging bottle by the fine air generating device is nitrogen.

[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0032] 1. The present invention first detects non-filamentous foreign matter in a transparent packaging bottle through an X-ray detection device, and then sends ultrasonic waves to the transparent packaging bottle through a vibration device to vibrate the liquid in the transparent packaging bottle, which not only shakes the edible fungi in the bottle but also loosens the adhered impurities. The air outlet of the fine air generating device is inserted into the bottom of the bottle to form bubbles of different sizes and make the liquid roll from bottom to top. Since the density of the filamentous foreign matter is relatively small, it will float to the liquid surface under the action of bubbles and rolling force. The digital camera continuously obtains image information of the liquid surface when the liquid in the transparent packaging bottle rolls, thereby detecting the filamentous foreign matter.

[0033] 2. During the second detection, the present invention segments the foreign matter area in the edible fungus image based on the grayscale significant features and the color significant features through the image segmentation algorithm to obtain the outline of the filamentous foreign matter. This method can effectively suppress the edible fungus background and highlight the foreign matter image. Even if the color of the impurity is close to the background color of the agricultural product, it can still accurately identify the impurity, thereby timely discovering foreign matter impurities in the tumbling process, and further avoiding defective products from entering the market. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0035] Figure 1 It is a schematic diagram of the system structure of the present invention.

[0036] Marks and corresponding parts names in the attached drawings:

[0037] 1-filling port, 2-laser sensor, 3-digital camera, 4-transparent packaging bottle, 5-edible fungus storage liquid, 6-conveyor belt, 7-light source, 8-fine air generating device, 9-vibration device, 10-X-ray detection device, 11-conveyor belt to be determined. DETAILED DESCRIPTION

[0038] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0039] Example 1

[0040] This embodiment 1 provides an impurity identification system for an edible fungus processing production line, such as Figure 1 As shown, it includes a filling port 1, a digital camera 3, a conveyor belt 6 and a light source 7.

[0041] The conveyor belt 6 is an automatic production line for processing edible fungi, which is used to transport the transparent packaging bottle 4 containing edible fungi to just below the filling port 1. When the laser sensor 2 on the filling port 1 detects that the transparent packaging bottle 4 reaches the filling position, the filling port 1 injects edible fungi storage liquid 5 into the transparent packaging bottle 4. The transparent packaging bottle 4 enters the detection platform via the conveyor belt 6. The detection platform obtains the X-ray image of the transparent packaging bottle 4 through the X-ray detection device 10, and sends the X-ray image to the information processing device. Since the density of filamentous foreign matter is relatively small, it cannot be detected by the X-ray detection device 10. Therefore, the information processing device can only detect non-filamentous foreign matter through the X-ray image. When the information processing device detects non-filamentous foreign matter, the information processing device sends information to the rejection mechanism, and the transparent packaging bottle 4 is pushed to the pending conveyor belt 11 through the rejection mechanism.

[0042] After the transparent packaging bottle 4 passes through the non-filamentary foreign matter, the vibration device 9 arranged in the detection platform sends ultrasonic waves to the transparent packaging bottle 4, so that the liquid in the transparent packaging bottle 4 starts to vibrate. Due to the vibration of the liquid, the filamentary foreign matter adhering to the surface of the edible fungus will fall off, and then the air outlet of the fine air generating device 8 is inserted into the bottom of the bottle to form bubbles of different sizes and make the liquid roll from bottom to top. In this embodiment, during the rolling of the liquid from bottom to top, the filamentary foreign matter will follow the rolling, and the bubbles will wrap the filamentary foreign matter so that it floats on the liquid surface to maintain relative balance and will not settle immediately. Therefore, the digital camera 3 continuously obtains image information of the liquid surface when the liquid in the transparent packaging bottle rolls, and the image information is transmitted to the information processing device. When the information processing device detects the filamentary foreign matter in the transparent packaging bottle, the information processing device sends information to the rejection mechanism, and the transparent packaging bottle 4 is pushed to the pending conveyor belt 11 through the rejection mechanism, thereby avoiding the problem of defective products entering the market due to the missed detection of filamentary foreign matter close to the background color of agricultural products.

[0043] In some embodiments, in order to obtain a clearer image, the detection platform is also provided with a light source 7 to provide fill light to the digital camera 3 during the process. However, general light sources will increase background interference, thereby increasing the difficulty of subsequent detection of low-contrast impurities and bringing difficulties to the detection work. Therefore, the above-mentioned light source 7 can be selected as an LED light source.

[0044] In some embodiments, the fine air generating device 8 introduces nitrogen gas into the transparent packaging bottle 4 to increase the preservation time of the packaged edible fungi.

[0045] Specifically, Figure 1 As shown, the impurity identification steps in the production process of the above-mentioned edible fungus processing production line are as follows:

[0046] S1. The conveyor belt 6 transports the transparent packaging bottle 4 containing edible fungi to the bottom of the filling port 1, and the filling port 1 injects the edible fungi storage liquid 5 into the transparent packaging bottle 4;

[0047] S2. The conveyor belt 6 continues to convey the filled transparent packaging bottle 4 to the detection platform. The detection platform obtains the X-ray image in the transparent packaging bottle 4 through the X-ray detection device 10, and sends the X-ray image to the information processing device. When the information processing device detects non-filamentous foreign matter, the transparent packaging bottle 4 is pushed to the pending conveyor belt 11 through the rejection mechanism, otherwise, it proceeds to the next step;

[0048] S3. The detection platform transmits ultrasonic waves to the transparent packaging bottle 4 through the vibration device 9, and then inserts the outlet of the fine air generating device 8 into the bottom of the bottle to form bubbles of different sizes and cause the liquid to roll from bottom to top. The digital camera 3 continuously obtains image information of the liquid surface when the liquid in the transparent packaging bottle 4 rolls;

[0049] S4. The digital camera 3 sends the acquired image information to the information processing device, which performs image preprocessing on the image information. The information processing device obtains the grayscale significant features and color significant features of the image based on the image information after the image preprocessing, and segments the foreign body area in the edible mushroom image through an image segmentation algorithm by combining the grayscale significant features and the color significant features to obtain the outline of the filamentous foreign body;

[0050] S5. When the information processing device detects the filamentous foreign matter in the transparent packaging bottle 4, the transparent packaging bottle 4 is pushed to the pending conveyor belt 11 through the rejection mechanism;

[0051] S6. Repeat the above steps S1-S5.

[0052] In this embodiment, the information processing device first performs contourlet transformation on the acquired X-ray image, and then extracts the tamura texture features after contourlet transformation. According to the extracted features, a random forest classifier is used to classify and judge the foreign body images respectively, and corresponding foreign body treatment measures are taken.

[0053] Specifically, the acquired X-ray image is subjected to contourlet transformation to obtain a high-frequency coefficient map, and then the tamura texture features are extracted through the high-frequency coefficient map. Tamura texture features include roughness, directionality, straightness, contrast, and regularity. Texture directionality reflects the overall texture characteristics, including the direction and sorting characteristics of the overall texture. Roughness reflects the statistical characteristics of the grain size in the texture. The larger the grain size, the rougher the image, and vice versa. Contrast reflects the brightness characteristics of the image.

[0054] In this embodiment, the direction degree needs to be calculated by calculating the gradient vector at each pixel. The magnitude and direction of the gradient vector are defined as:

[0055]

[0056] Where: Δx and Δy are the horizontal and vertical gradient values ​​obtained by convolving the image with two 3×3 templates.

[0057] After calculating the gradient vectors of all pixels, the histogram H can be used D To express the value of θ, first use the histogram H D Discretize the range of θ, and then count the number of pixels in each discrete region whose corresponding ΔG is greater than a given threshold. The resulting histogram will have a peak for images with obvious directionality, and will be relatively flat for images without obvious directionality. The overall directionality of the image can be obtained by calculating the sharpness of the histogram peak:

[0058]

[0059] Where: p represents the peak number in the histogram, n p is the number of peaks in the histogram. For a peak value p, W p represents all discrete areas contained in the peak, θ p is the discrete region with the highest value.

[0060] In order to calculate the roughness, we need to first calculate the size of 2 in the image k ×2 k The average gray value of the pixels in the active window of pixels, that is:

[0061]

[0062] Where: k = 0, ..., 5, g(i, j) is the grayscale value of the pixel at (i, j). Then, for each pixel, the average grayscale difference between its non-overlapping windows in the horizontal and vertical directions is calculated.

[0063]

[0064] For each pixel, the k value that maximizes the E value (regardless of direction) is used to set the optimal size S best (x, y) = 2 k The roughness is calculated by calculating the S best The average value of is obtained, expressed as:

[0065]

[0066] Where M×N is the image resolution.

[0067] The contrast is obtained by the statistics of pixel intensity distribution. It is obtained by α4=μ4 / σ 4 Definition, where μ4 is the fourth moment and σ 2is the variance. Add the fourth moment and variance formula:

[0068]

[0069] This value gives a global measure of contrast across the image or region.

[0070] Finally, the tamura texture features extracted above are fed into the random forest model {h(X, θ k ), k=1, …} for identification.

[0071] For grayscale significant features, this method detects filamentous foreign bodies with colors similar to those of edible fungi. The acquisition process is as follows:

[0072] S31. Traverse all pixels of the image information. If the gray level of the current pixel is less than the set threshold a and is not marked, mark the pixel as a suspicious pixel and execute the next step;

[0073] S32. Detect the direction (directions are divided into 0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135° and 157.5°) and width of the line structure where the suspicious pixel is located. If the width of the line structure is less than the set threshold b, the pixel is marked as a possible impurity pixel, otherwise the pixel is marked as a background pixel. When the entire image is traversed, the next step is executed;

[0074] S33. Traverse all pixels, if the current pixel is marked as a possible impurity pixel and the pixel is not marked, execute the next step;

[0075] S34. Detect the direction of the line structure of the adjacent possible impurity pixel points along the line structure direction of the pixel point. If the direction deviation of the line structure of the pixel point and the adjacent pixel point does not exceed 45°, the pixel point is recorded as the final impurity pixel point, otherwise the pixel point is a background pixel point;

[0076] S35. After all the image information at different filling times are traversed in sequence, a final impurity extraction image is obtained.

[0077] This line structure detection algorithm that combines grayscale value and line direction continuity uses the grayscale threshold method to determine whether the pixel is an impurity pixel at each pixel. For possible impurity pixels, the direction of the line structure where the pixel is located is detected, all pixels of the image are traversed, and the directions of the line structures where all possible impurity pixels are located are counted. Finally, the information of all possible impurity pixels and the directions of the line structures where these pixels are located is obtained. Finally, the line structure continuity is judged for the adjacent pixel values ​​along the line direction of all possible impurity pixels. The pixel points that meet the requirements of a certain continuity of the line structure direction are recorded as the final impurity pixel points, otherwise they are recorded as background points. This method is particularly sensitive to line structures of a certain width, and has noise resistance and high processing speed.

[0078] For the color saliency feature, the color saliency feature is based on the method of back-projection of L*a*b* color space in two-dimensional space to detect free-shaped foreign objects with different colors from edible fungi. The a and b components of L*a*b* color space describe the color range. Its color space is larger than RGB color space and can reflect all color information that can be described by RGB color space. It overcomes the shortcomings of traditional color segmentation methods and has good real-time and robustness.

[0079] The specific acquisition process is as follows: first, read in all 8-bit RGB original images (i.e., the above-mentioned image information) at different filling times in turn, map them to the L*a*b* color space, take the L channel, perform zero averaging and normalization processing through the SIFT algorithm to obtain the adaptive threshold, then reversely project the a component and b component in the L*a*b* color space respectively, and obtain the binary image through the adaptive threshold respectively, and take the "OR" of the two to obtain the color feature image.

[0080] The grayscale impurity extraction image and the L*a*b* color space color feature image obtained above are integrated, and a logical "OR" operation is performed. As long as impurities are found in a certain area of ​​the image at a certain moment, the information processing device sends a warning signal.

[0081] In this embodiment, back projection is a way to record how the pixels in a given image fit into the pixel distribution of the histogram model. In this way, the histogram model of a feature can be calculated, and then the model can be used to find the feature in the image. The back projection of the image is to replace the pixel value (multidimensional or grayscale) at a certain position of the input image with the value corresponding to a sub-area of ​​the histogram (called a bin), so the back projection obtained is a single pass, that is, the value of the pixel point of the output image is the probability of the observed array under a certain distribution (histogram):

[0082]

[0083] Among them, b(xi ) means at position x i The histogram corresponding to the pixel on the bth (x i ) bins, the histogram has m bins, q n Indicates the value of the nth bin. α(x i ) represents the probability of the area in the histogram that meets the feature in the tested image. The obtained probability value is back-projected into the given image. If the probability value of a certain area is much lower than the main probability value, it is determined that the area corresponds to a foreign object.

[0084] Example 2

[0085] This embodiment further improves the recognition accuracy and efficiency based on the impurity recognition method in Embodiment 1. Specifically, the information processing device performs denoising and line structure refinement processing on the final impurity extraction image by using the method of regional pixel statistics, and then uses the traditional morphological refinement iteration method to extract the impurity skeleton of the processing result. The main idea of ​​this method based on regional pixel statistics is to traverse the impurity pixel points and count the number k of impurity pixel points in a 5×5 area centered on the point. When k is greater than the set threshold c, the point is determined to be an impurity skeleton pixel point after refinement and denoising.

[0086] After the grayscale significant features have been refined and denoised, the impurity skeleton is extracted and the number of pixels in the impurity skeleton is counted. Then, the number of pixels is compared with the number of pixels in the skeleton with the minimum length of impurities to be detected to determine whether there are impurities in the image.

[0087] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for identifying impurities in an edible fungus processing production line, It is characterized in that The steps include: S1. The conveyor belt (6) transports the transparent packaging bottle (4) containing edible fungi to the bottom of the filling port (1), and the filling port (1) injects the edible fungi storage liquid (5) into the transparent packaging bottle (4); S2. The conveyor belt (6) continues to transport the filled transparent packaging bottle (4) to the detection platform. The detection platform obtains an X-ray image of the transparent packaging bottle (4) through the X-ray detection device (10), and sends the X-ray image to the information processing device. When the information processing device detects non-filamentous foreign matter, the transparent packaging bottle (4) is pushed to the pending conveyor belt (11) through the rejection mechanism. Otherwise, the next step is entered; S3. The detection platform transmits ultrasonic waves to the transparent packaging bottle (4) through the vibration device (9), and then inserts the air outlet of the fine air generating device (8) into the bottom of the bottle to form bubbles of different sizes and cause the liquid to roll from bottom to top, and the digital camera (3) continuously obtains image information of the liquid surface when the liquid in the transparent packaging bottle (4) rolls; S4. The digital camera (3) sends the acquired image information to an information processing device, and the information processing device performs image preprocessing on the image information. The information processing device obtains the grayscale significant features and the color significant features of the image based on the image information after image preprocessing, and segments the foreign matter area in the edible mushroom image by an image segmentation algorithm in combination with the grayscale significant features and the color significant features, so as to obtain the outline of the filamentous foreign matter; S5. When the information processing device detects the filamentous foreign matter in the transparent packaging bottle (4), the transparent packaging bottle (4) is pushed to the pending conveyor belt (11) through the rejection mechanism; S6. Repeat the above steps S1-S5.

2. The impurity identification method for an edible fungus processing production line according to claim 1, It is characterized in that The color saliency feature detects foreign matter that is different in color from the edible fungi based on a method of back-projecting the L*a*b* color space in a two-dimensional space; The probability of the pixel value of the reverse projection output image is: Among them, b(x i ) means at position x i The histogram corresponding to the pixel on the b(x i ) bins, the histogram has m bins, q n represents the value of the nth bin, α(x i ) represents the probability of the area in the histogram of the tested image that meets the characteristics; the obtained probability value is back-projected into the given image. If the probability value of a certain area is much lower than the main probability value, it is determined that the area corresponds to a foreign object.

3. The impurity identification method for an edible fungus processing production line according to claim 2, It is characterized in that The information processing device first performs contourlet transformation on the acquired X-ray image, then extracts the Tamura texture features after the contourlet transformation, and uses a random forest classifier to classify and judge the foreign body images according to the extracted features, and performs corresponding foreign body processing measures.

4. The impurity identification method for an edible fungus processing production line according to claim 2, It is characterized in that The grayscale salient feature acquisition process is as follows: S31. Traverse all pixels of the image information, if the gray level of the current pixel is less than the threshold a and is not marked, mark the pixel as a suspicious pixel and execute the next step; S32. Detect the direction and width of the line structure where the suspicious pixel is located. If the width of the line structure is less than the set threshold, mark the pixel as a possible impurity pixel, otherwise mark the pixel as a background pixel. When the entire image is traversed, execute the next step; S33. Traverse all pixels, if the current pixel is marked as a possible impurity pixel and the pixel is not marked, execute the next step; S34. Detect the direction of the line structure of the adjacent possible impurity pixel points along the line structure direction of the pixel point. If the direction deviation of the line structure of the pixel point and the adjacent pixel point does not exceed 45°, the pixel point is recorded as the final impurity pixel point, otherwise the pixel point is a background pixel point; S35. After all the image information at different filling times are traversed in sequence, a final impurity extraction image is obtained.

5. The impurity identification method for an edible fungus processing production line according to claim 4, It is characterized in that The directions of the line structures are divided into 0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135° and 157.5°.

6. The impurity identification method for an edible fungus processing production line according to claim 5, It is characterized in that The information processing device performs denoising and line structure thinning processing on the final impurity extraction image by using a regional pixel statistics method, and then extracts the impurity skeleton of the processing result by using a traditional morphological thinning iterative method.

7. The impurity identification method for an edible fungus processing production line according to claim 6, It is characterized in that The impurity skeleton is extracted and the number of pixels of the impurity skeleton is counted, and then the presence or absence of impurities in the image is judged by comparing the number of pixels with the number of pixels of the skeleton with the minimum length of impurities to be detected.

8. A system for identifying impurities in an edible fungus processing production line according to any one of claims 1 to 7, It is characterized in that It comprises a filling port (1), a digital camera (3), a conveyor belt (6) and a detection platform; The conveyor belt (6) conveys the transparent packaging bottle (4) containing edible fungi to the bottom of the filling port (1), and the filling port (1) injects edible fungi storage liquid (5) into the transparent packaging bottle (4). The transparent packaging bottle (4) enters the detection platform through the conveyor belt (6). The detection platform detects non-filamentary foreign matter in the transparent packaging bottle (4) through an X-ray detection device (10), and then causes the filamentary foreign matter in the transparent packaging bottle (4) to roll and float up through a vibration device (9) and a fine air generating device (8), and obtains image information of the entire rolling process through the digital camera (3). The image information is transmitted to an information processing device, and the information processing device detects the filamentary foreign matter in the transparent packaging bottle (4).

9. The impurity identification system for an edible fungus processing production line according to claim 8, It is characterized in that The gas introduced into the transparent packaging bottle (4) by the fine air generating device (8) is nitrogen.

10. The impurity identification system for an edible fungus processing production line according to claim 8, It is characterized in that The system further comprises a light source (7), wherein the light source (7) is an LED light source, and the light source (7) provides adjustable light when the digital camera (3) acquires image information.