Silkworm cocoon quality detecting and sorting system and method based on active projection and X-ray

By adopting active projection and X-ray detection system in cocoon quality detection, and using X-ray imaging and SVM discrimination model, automated detection of cocoon quality is achieved, solving the problems of low manual detection efficiency and high misjudgment rate, and improving detection efficiency and accuracy.

CN119608614APending Publication Date: 2025-03-14南宁海关技术中心 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411987686.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing cocoon quality inspection mainly relies on manual sorting, which is inefficient and prone to misjudgment, especially for cocoons with larger cocoon thickness.

Method used

The cocoon quality detection and sorting system based on active projection and X-ray is adopted to obtain the cocoon internal images through the X-ray detection imaging device, and combined with the image acquisition module and computer module, the SVM method is used to establish a discriminant model of the cocoon quality characteristic parameters and cocoon quality to achieve automated detection.

Benefits of technology

It greatly reduces the demand for manual testing, improves detection efficiency and accuracy, and can make internal quality judgments without destroying the surface of the silk cocoon, and outputs the results together with surface quality testing, which significantly improves the automation level of the entire inspection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119608614A_ABST
    Figure CN119608614A_ABST
Patent Text Reader

Abstract

The invention discloses a silkworm cocoon quality detecting and sorting system and method based on active projection and X-rays, and belongs to the field of textile industry, silk production and quality detection. Comprising a feeding device, a baffle tiling device, a silkworm cocoon carrier container, an X-ray device, an image acquisition module, an auxiliary sorting spot projector, a conveying module and a computer module. According to the silkworm cocoon sorting device, quality detection is conducted on the surfaces and the interiors of silkworm cocoons, prompting is conducted through the projection device, and the manual sorting efficiency and the quality detection accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of textile industry, silk production and quality detection, and in particular relates to a silkworm cocoon quality detection and sorting system and method based on active projection and X-ray. Background Art

[0002] At present, the classification of cocoons in my country is mainly based on the cocoon quality. That is, the cocoons are divided into two categories: "pre-cocoons" and "low-cocoons". Pre-cocoons: refers to the cocoons that can be put on the silk reeling machine to reel genuine raw silk, including normal pre-cocoons and low-cocoons. Pre-cocoons refer to cocoons with normal cocoon shape, cocoon color, cocoon layer thickness and shrinkage without defects, low-cocoons refer to cocoons with defects but not low-cocoons. Low-cocoons refer to cocoons with serious defects that cannot or are difficult to reel genuine raw silk.

[0003] The main quality indicators of fresh cocoons are: dry shell quantity, whole cocoon quantity, cocoon layer rate, cocoon layer quantity, fresh cocoon loading rate, uniformity, color, moisture content, good pupa rate, etc. Among them, the uniformity and loading rate of cocoons need to be manually sorted and weighed; the good pupa rate needs to be counted by cutting the cocoons; the color index needs to be manually evaluated. The industry urgently needs to promote the development of an intelligent, comprehensive and collaborative cocoon evaluation system. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a silkworm cocoon quality detection and sorting system based on active projection and X-ray, comprising:

[0005] Feeding device, baffle paving device, X-ray detection imaging device, image acquisition module, computer module and auxiliary sorting spot projector;

[0006] The feeding device is located above the initial position of the baffle-type conveyor belt and is used to perform preliminary sorting on the poured cocoons to obtain preliminary sorted cocoons;

[0007] The baffle plate laying device is located on the right side of the baffle plate conveyor belt and is used to soak and lay the initially sorted silk cocoons and fill them into the silk cocoon carrier;

[0008] The X-ray detection imaging device is located on the right side of the conveyor belt supporting and conveying the carrier, and is used to perform X-ray penetration imaging on the cocoons filled into the cocoon carrier container to obtain an image of the inside of the cocoons;

[0009] The image acquisition module is fixed on the right conveyor belt of the X-ray detection imaging device and is used to collect the surface image of the cocoon;

[0010] The computer module is used to establish a discrimination model of cocoon quality characteristic parameters and cocoon quality using a SVM method according to a pre-established artificial discrimination model, and process the cocoon surface image and the cocoon internal image based on the discrimination model to obtain a detection result;

[0011] The auxiliary sorting spot projector is fixed on the right conveyor belt of the X-ray detection imaging device and is used to mark the defective cocoons and display them on the computer monitor.

[0012] Preferably, the feeding device is a trapezoidal shape that is wide at the top and narrow at the bottom, with a feeding port at the top and a discharging port at the bottom.

[0013] Preferably, the flat baffle and the baffle conveyor belt together limit the size of the cocoons passing through the gap between the two baffles, and the initially sorted cocoons are soaked, flattened and filled into the cocoon carrier for loading.

[0014] Preferably, the X-ray detection imaging device comprises an X-ray penetration imaging module and a common smooth conveyor belt, and shielding radiation layers are arranged on both sides of the X-ray detection imaging module, which are divided into an inlet shielding radiation layer and an outlet shielding radiation layer.

[0015] Preferably, the cocoon carrier is located at the rightmost side of the baffle conveyor belt and borders the baffle conveyor belt. The cocoon carrier is placed on an ordinary smooth conveyor belt, waiting for the cocoons to be flatly conveyed to be sent into the carrier for loading. The cocoon carrier structure has a high base on the left and a low base on the right, forming an inclination.

[0016] On the other hand, the present invention also provides a method for detecting and sorting silkworm cocoon quality based on active projection and X-ray, comprising the following steps:

[0017] Pour silk cocoons from a feed port, and preliminarily trim the silk cocoons based on a feed device to obtain preliminarily trimmed silk cocoons;

[0018] The stepper motor is started and rotated based on a fixed number of pulses, driving the baffle conveyor belt to convey a certain distance so that the cocoons are quantitatively loaded into the cocoon carrier, and the cocoons filled into the cocoon carrier are obtained;

[0019] Performing penetration imaging on the cocoons filled into the cocoon carrier by an X-ray detection imaging device to obtain an internal image of the cocoons;

[0020] Preprocessing the internal image of the silk cocoon to obtain Fourier features and gradient enhanced LBP features of the silk cocoon image;

[0021] Establishing a discrimination model of cocoon quality characteristic parameters and cocoon quality based on the SVM method, synthesizing the Fourier features and gradient enhanced LBP features of the cocoon image into a single feature vector, normalizing the vector, and then inputting the vector into the discrimination model for discrimination to obtain a discrimination result;

[0022] The discrimination result is displayed based on an auxiliary sorting spot projector and defective cocoons are removed manually.

[0023] Preferably, the process of preprocessing the internal image of the silkworm cocoon to obtain the Fourier features and gradient enhanced LBP features of the silkworm cocoon image comprises:

[0024] Cutting a corresponding image area from the image of the interior of the silk cocoon and converting it into a grayscale image;

[0025] Binarizing the grayscale image to obtain an edge contour image, calculating the area of ​​the connected domain of the edge contour image and performing area size screening to obtain a cocoon mask image;

[0026] Calculating the grayscale image and the cocoon mask image to obtain a cocoon region of interest image;

[0027] The cocoon region of interest image is processed based on a gradient enhanced LBP feature descriptor and a Fourier descriptor to obtain a frequency domain information feature vector and a gradient enhanced LBP feature.

[0028] Preferably, the process of obtaining the discrimination result includes:

[0029] Combining the frequency domain information feature vector and the gradient enhanced LBP feature into a single feature vector and performing normalization processing to obtain normalized data;

[0030] Based on the SVM method, a discriminant model of cocoon quality characteristic parameters and cocoon quality is established, the Fourier feature and the gradient enhanced LBP feature of the cocoon image are synthesized into a single feature vector and normalized, and then input into the discriminant model for discrimination to obtain a puncture discrimination result, and at the same time, based on the image acquisition module, the cocoon part with surface defects is obtained by using threshold segmentation, and the image coordinate position of the defective cocoon is converted into the position in the actual world coordinate system, and the projector transmission image is changed through the proportional relationship to obtain the surface quality detection result;

[0031] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a silkworm cocoon quality detection and sorting method based on active projection and X-rays when executing the computer program.

[0032] On the other hand, the present invention also provides a computer-readable storage medium, which stores a computer program, characterized in that when the computer program is executed by a processor, a method for detecting and sorting silkworm cocoon quality based on active projection and X-rays is implemented.

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

[0034] The present invention reduces most of the manual labor requirements through a cocoon quality detection and sorting device based on active projection and X-rays, and solves the problems of high misjudgment rate and low efficiency of manual eye detection. This not only reduces the physical burden of the operator, but also improves the efficiency of the detection process. The existing manual detection of the inside of the cocoon is to roughly determine the type of cocoon by strong light penetration. Since the thickness of the cocoon layer of the cocoon is different, this method is only suitable for cocoons with smaller thickness, and cocoons with thicker thickness cannot be judged by this method. Therefore, the present invention can judge the internal quality of the cocoon without destroying the surface of the cocoon, and output the results together with the surface quality detection, and use auxiliary spot projection to prompt the problem cocoon, which greatly improves the detection efficiency.

[0035] The present invention uses a baffle conveyor belt in conjunction with a baffle of considerable height to limit the size of the cocoons passing through, thereby achieving the tiling and loading of a single layer of cocoons, so that a large number of cocoons can be detected at one time, which significantly improves the efficiency of detection compared to the traditional single-by-one identification. The internal quality image processing of the present invention starts after X-ray penetration imaging, and at the same time, the carrier transmits the X-ray detection imaging device and sends it to the surface detection station, saving the computing time of image processing, and using the artificial cocoon discrimination model trained in advance for discrimination, further reducing the time for detection and discrimination, providing a more fluent and efficient working method for the detection process. This not only improves work efficiency, but also helps to improve the level of automation of the entire detection process. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 A schematic diagram of a sorting system according to an embodiment of the present invention;

[0038] Figure 2 Another schematic diagram of a sorting system according to an embodiment of the present invention.

[0039] Figure 3 The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0041] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0042] Embodiment 1

[0043] This embodiment provides a silkworm cocoon quality detection and sorting system based on active projection and X-ray, including:

[0044] The purpose of this embodiment is to establish a cocoon sorting system for computer vision evaluation of cocoon consistency by combining X-ray imaging technology, active variable illumination projection technology, and digital image processing technology without destroying the cocoons, so as to replace a large number of manual eye inspections, provide auxiliary detection means for manual sorting, and realize on-site rapid detection and sorting of cocoons. In order to solve the problem that the color difference of cocoons is small and the recognition is difficult, this embodiment draws on the bionic perception mechanism of the human eye for color and innovatively adds an active variable illumination projection solution. Active light sources with variable intensity are used for projection to reduce the interference of industrial ambient light changes on the detection results. Active light sources with variable three primary colors are used for projection to artificially enhance color difference, improve the accuracy and stability of cocoon appearance defect detection, and enhance the objectivity and quantifiability of cocoon defect characterization.

[0045] To achieve the above-mentioned purpose, the present embodiment provides a cocoon quality detection and sorting device based on active projection and X-ray, comprising: a feeding device 1, an industrial aluminum profile, a baffle conveyor belt 5, a flat baffle, a cocoon carrier 7, a stepper motor 6, an ordinary smooth conveyor belt 9, an X-ray detection imaging device 8, an image acquisition module, an auxiliary sorting spot projector and a computer host 3;

[0046] Among them, the industrial aluminum profile is used to build a conveyor belt support, a motor support, a camera support and an auxiliary sorting spot projector support;

[0047] The feeding device 1 is located above the initial position of the baffle conveyor belt 5 and is fixed by an aluminum profile. The feeding device 1 is a trapezoidal feeding device 1, which is wide at the top and narrow at the bottom. The lower end outlet is at a certain height from the conveyor belt to control the silkworm cocoons to flow into the baffle conveyor belt 5 in an orderly and quantitative manner.

[0048] The flat baffle is located on the right side of the baffle conveyor belt 5. There are two baffles with a certain height. Together with the baffles on the baffle conveyor belt 5, only cocoons of a certain height are allowed to pass through, so as to realize the flat conveyance of a large number of disordered cocoons.

[0049] The cocoon carrier 7 is located at the rightmost side of the baffle conveyor belt 5 and is adjacent to the baffle conveyor belt 5. The carrier is stationary on the ordinary smooth conveyor belt, waiting for the cocoons to be flatly conveyed to be sent to the carrier for loading. Its structure has a high base on the left and a low base on the right, forming an inclination to facilitate the loading of cocoons.

[0050] The X-ray detection imaging device 8 is located on the right side of the conveyor belt supporting and conveying the carrier, and contains an X-ray penetration imaging module and a common smooth conveyor belt 9. X-ray imaging device shielding layers 10 are arranged on both sides of the X-ray detection imaging device 8, which are divided into an entrance shielding radiation layer and an exit shielding radiation layer. The X-ray detection imaging device 8 is used to perform X-ray penetration imaging on the cocoons on the carrier;

[0051] The image acquisition module is an industrial CCD camera, which is fixed on the right conveyor belt of the X-ray detection imaging device 8;

[0052] The auxiliary sorting spot projector is fixed together with the industrial CCD camera on the right conveyor belt of the X-ray detection imaging device 8, and the auxiliary sorting spot projector is installed and fixed next to the camera;

[0053] The computer host 3 is used to receive the image of the X-ray detection imaging device 8 and the image of the surface detection and perform image processing respectively to complete the quality detection and judgment of the inside and surface of the cocoon.

[0054] This embodiment also discloses a method for detecting and sorting silkworm cocoon quality based on active projection and X-rays, which is applied to a silkworm cocoon quality detection and sorting device based on active projection and X-rays. The method comprises the following steps:

[0055] The trapezoidal feeding device 1 is wide at the top and narrow at the bottom, with a feeding port at the top and a discharging port at the bottom, and workers pour the cocoons into the feeding port;

[0056] The stepper motor 6 is started and rotates a certain number of times based on a fixed number of pulses to drive the baffle conveyor belt 5 to convey a certain distance so that the cocoons are quantitatively loaded onto the carrier, wherein the flat baffle and the baffle conveyor belt 5 together limit the size of the cocoons passing through the gap between the two baffles, thereby realizing the flat conveyance of the cocoons to the cocoon carrier 7 for loading;

[0057] The X-ray detection imaging device 8 performs X-ray penetration imaging on the delivered silkworm cocoons, and the image is transmitted to the computer host 3;

[0058] Preprocess the penetration image. Since the vehicle stops at a fixed position for penetration imaging, the corresponding image area is cropped and converted into a grayscale image.

[0059] Binarizing the grayscale image to obtain an edge contour image. Since the cocoon is an ellipse in the image, the area of ​​the connected domain is calculated for the binary edge contour image and the area size is screened to obtain a cocoon mask image.

[0060] Performing a bitwise AND operation on the cocoon mask image and the cocoon grayscale image to obtain an image of a cocoon region of interest;

[0061] The image of the cocoon region of interest is processed using a gradient enhanced LBP feature descriptor and a Fourier descriptor respectively;

[0062] The Fourier descriptor transforms the spatial domain of the contour feature to extract the frequency domain information feature vector;

[0063] The gradient enhanced LBP feature descriptor generates feature values ​​for the image according to its encoding method, generates 16-bit feature values, the level is 65536, and describes the texture features of the target area in the form of a histogram. The LBP code obtained thereby contains texture information such as edges and spots of the local modulus of the cocoon image, and each LBP code is called a micro-pattern. In this way, the vector composed of 65536 LBP codes in a cocoon image can be regarded as an LBP texture feature;

[0064] The Fourier features and the gradient enhanced LBP features of the cocoon image are combined into a single feature vector and normalized, and a cocoon quality feature parameter and a cocoon quality discrimination model are established using a support vector machine (SVM) method according to a pre-established artificial discrimination model, and the model is imported into a cocoon quality discrimination software to discriminate and detect the quality of the cocoon;

[0065] After the identification and detection of the penetration imaging is completed, the problem cocoon will be marked in the image and the position of the corresponding cocoon in the image will be recorded;

[0066] The position of the problem cocoon in the image refers to its position relative to the first cocoon in the upper left corner of the image, and its position relative to the first cocoon in the row and column. The whole cocoon is stored in the form of a two-dimensional array, and the problem cocoon is marked with a Boolean value of 1. The normal cocoon is marked with a Boolean value of 0;

[0067] The image processing scheme for surface detection is to first calibrate the camera to obtain the camera internal parameters, scale parameters and relative position with the projector, use threshold segmentation to obtain the cocoon part with surface defects, and convert the image coordinate position of the defective cocoon into the position in the actual world coordinate system, and change the projector transmission image through the proportional relationship to realize the projection red spot prompt of surface quality detection;

[0068] The problem cocoon of the penetrating imaging is also indicated by the projector, which reads the position of the problem cocoon of the penetrating imaging and indicates it with a projected red spot;

[0069] Embodiment 2

[0070] like Figure 1-Figure 3 As shown, in order to address the shortcomings of the current cocoon quality detection, which is labor-intensive and has low detection efficiency, this embodiment proposes a cocoon quality detection and sorting device based on active projection and X-ray, comprising: a feeding device 1, an industrial aluminum profile, a cocoon paving module, a cocoon carrier 7, an image acquisition module, a driving module and an image processing module;

[0071] Wherein, the feeding device 1 is fixed on the baffle conveyor belt 5 with aluminum profile;

[0072] The industrial aluminum profile is used to support the height limit baffle 4 and the baffle conveyor belt 5, and provide support and base for the drive module and the image acquisition module;

[0073] The image acquisition module is used to acquire the surface image of the cocoon at the upper surface detection station of the ordinary smooth conveyor belt 9 on the right side of the X-ray detection imaging device 8;

[0074] The driving module is used to drive the baffle conveyor belt 5 and the ordinary smooth conveyor belt 9 to feed and discharge materials;

[0075] The image processing module is used to process and splice the surface images of the cocoons based on the computer host 3 to obtain surface defect images, and to perform active light source projection based on the defect images in cooperation with the auxiliary projector 12 to enhance the color difference and improve the difference from normal cocoons, so as to facilitate the manual and rapid removal of problem cocoons.

[0076] Furthermore, as a preferred solution of the present embodiment, the baffle-type conveyor belt 5 has evenly distributed baffles of a certain height compared to the ordinary smooth conveyor belt 9. The even distribution can ensure that a certain amount of cocoons fall into the area between every two baffles of the conveyor belt for transportation, and cooperate with the height-limiting baffle 4 to achieve height-limited transportation, ensuring that only a single layer of cocoons can pass through, thereby synergistically achieving single-layer paving of the cocoons.

[0077] like Figure 2 As shown, the cocoon carrier 7 resting on the ordinary smooth conveyor belt 9 has a structural design with one end higher than the other end, and the relatively high end is adjacent to the baffle-type conveyor belt 5, and except for the junction where there is no baffle, the other three sides have baffles to prevent the cocoons from flowing out of the carrier during loading. The design of one end higher than the other end can ensure that the cocoons can flow into the cocoon carrier 7 in a directional manner for loading.

[0078] The computer host 3 is connected to the industrial camera 11, the electrical control cabinet 2, and the X-ray detection imaging device 8 through a network cable. The shooting frame rate and shooting time are set through a set shooting program to take photos that meet the detection requirements; real-time communication is carried out with the electrical control cabinet 2 through the Modbus-TCP communication protocol, and the corresponding limit signal is read and the corresponding electrical control cabinet 2 coil is controlled to realize the action. The controller of the electrical control cabinet 2 is connected to the stepper motor 6 and the limit switch through a cable to control the movement direction, movement speed and movement distance of the baffle conveyor belt 5 and the ordinary smooth conveyor belt 9 to complete the corresponding quantitative transmission and positioning transmission detection requirements.

[0079] Further, as a preferred solution of this embodiment, the driving module mainly includes a motor control console for supporting a stepper motor 6, and the stepper motor 6 drives the baffle conveyor belt 5 and the ordinary smooth conveyor belt 9 to move; the image acquisition module includes an industrial camera 11, an X-ray detection imaging device 8, an auxiliary projector 12 and a computer host 3, etc., to collect images of the inside and surface of the cocoon; the image processing module mainly includes a computer host 3 and a computer display 13, pre-processes the penetration image, crops the corresponding image area and converts it into a grayscale image, uses binarization to obtain an edge contour image for the grayscale image, and because the cocoon is an elliptical shape in the image, the area of ​​the connected domain of the binary edge contour image is calculated and the area size is screened to obtain a cocoon mask image, and the cocoon mask image and the cocoon grayscale image are used to perform a bitwise AND operation to obtain a cocoon region of interest image; the cocoon region of interest image is processed using a gradient enhanced LBP feature descriptor and a Fourier descriptor respectively;

[0080] The frequency domain information feature vector and LBP texture feature are extracted, combined into a single feature vector and normalized. According to the pre-established artificial discrimination model, the SVM method is used for discrimination detection, and the problem cocoons are marked in the image and the position of the corresponding cocoons in the image is recorded; the surface detection image is segmented by threshold value to obtain the cocoon part with surface defects and the image coordinate position of the defective cocoon is converted into the position in the actual world coordinate system and the projector transmission image is changed through the proportional relationship to realize the projection red spot prompt of surface quality detection; the problem cocoon of the penetration imaging is also prompted by the projector, and the position of the problem cocoon of the penetration imaging is read and prompted with a projection red spot. The collaboration of these components enables the device to efficiently complete the surface and internal image acquisition and image processing of the cocoon, and perform quality detection, thereby realizing the rapid and accurate evaluation of the quality of the cocoon and the rapid manual elimination.

[0081] Among them, the driving module stepper motor 6 will drive the baffle conveyor belt 5 to achieve quantitative transmission in accordance with the programmed logic, and cooperate with the limit switch to drive the ordinary smooth conveyor belt 9 to achieve positioning transmission, ensuring that the transition between each workstation can be coordinated in an orderly manner and ensuring the stability of the overall system.

[0082] The use of this device is as follows:

[0083] 1. The worker pours the cocoons to be tested into the trapezoidal conveying mechanism station to fill the cocoons to be tested, waits for transmission, and clicks the start button to start the system for transmission.

[0084] 2. The motor starts to drive the baffle conveyor belt 5 to run. The baffle conveyor belt 5 cooperates with the height limiting baffle to lay the cocoons flatly, so as to achieve single-layer laying of the cocoons, provide good shooting conditions for the subsequent image detection process, and prevent the image recognition errors of X-ray imaging and surface imaging caused by the stacking of cocoons.

[0085] 3. The flattened cocoons are fed into the cocoon carrier 7 through the conveyor belt. The feeding motor starts and reaches a certain number of turns, that is, the conveyor belt stops conveying after a certain number of cocoons are reached. The number threshold is determined by the conveying capacity of each baffle of the conveyor belt, which is set through actual working condition experiments. When the baffle is flattened and the conveyor belt stops conveying, the carrier begins to be conveyed to the penetration detection station by the rear conveyor belt. The penetration detection station has a limit switch to detect whether it has reached the accurate detection station. After arriving, the X-ray equipment is used to penetrate the inside of the cocoon to obtain the morphological image of the silkworm pupa inside the cocoon. Combined with image processing algorithms and machine learning methods, the internal state of the cocoon is analyzed to identify problems such as bad cocoons, pupated cocoons, and double-palace cocoons, and the location of the problem cocoons (a few rows and columns) is recorded and displayed on the upper computer interface so that workers can take out the corresponding problem cocoons.

[0086] 4. After the penetration test is completed, the carrier is transported out and enters the surface visual inspection station. The limit switch at the surface visual inspection station determines whether it has reached the accurate inspection station. After arriving, the surface spot defects are detected by the auxiliary sorting spot projector and the industrial camera 11. The penetration defects and surface defect positions are indicated by red spots to indicate the problem cocoons. At the same time, the workers remove the problem cocoons obtained by the penetration test and the problem cocoons detected by the surface test according to the position of the problem cocoons displayed on the upper computer interface, and finally realize the rapid sorting of the whole silk cocoon. In summary, the entire specific implementation process of this device needs to set various parameters such as the lighting environment, the number of pulses required for the corresponding number of motor rotations, the camera internal parameters, the relative external parameters of the camera and the projector before the initial detection. After the cocoons to be tested are poured into the feeding device 1, the device can be started to automatically complete the entire detection process, output the final results, and realize the intelligent detection process. It not only simplifies the operation process, but also ensures the detection efficiency and accuracy.

[0087] The present embodiment relates to a method for selecting cocoons with the aid of a projector, which draws on the human eye's bionic perception mechanism of color and innovatively incorporates an active variable illumination projection solution. Active light sources with variable intensity are used for projection to reduce the interference of industrial ambient light changes on the detection results. Active light sources with variable three primary colors are used for projection to artificially enhance color differences, improve the accuracy and stability of detecting defects in the appearance of cocoons, and enhance the objectivity and quantifiability of the characterization of cocoon defects. This method is different from the traditional method of manually selecting cocoons under strong light. Instead, it uses threshold segmentation to obtain the cocoon part with surface defects based on the camera calibration to obtain the camera's intrinsic parameters, proportional parameters, and relative posture with the projector, and then converts the image coordinate position of the defective cocoon into the position in the actual world coordinate system, and changes the projector transmission image through the proportional relationship, so as to achieve projection erythema prompts for surface quality detection.

[0088] This embodiment can not only reduce the workers' eye fatigue, but also effectively improve the workers' accuracy in picking up defective cocoons, which helps to improve the technical level and product quality in the production process.

[0089] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A silkworm cocoon quality detection and sorting system based on active projection and X-ray, characterized in that: include: Feeding device, baffle paving device, X-ray detection imaging device, image acquisition module, computer module and auxiliary sorting spot projector; The feeding device is located above the initial position of the baffle-type conveyor belt and is used to perform preliminary sorting on the poured cocoons to obtain preliminary sorted cocoons; The baffle plate laying device is located on the right side of the baffle plate conveyor belt and is used to soak and lay the initially sorted silk cocoons and fill them into the silk cocoon carrier; The X-ray detection imaging device is located on the right side of the conveyor belt supporting and conveying the carrier, and is used to perform X-ray penetration imaging on the cocoons filled into the cocoon carrier container to obtain an image of the inside of the cocoons; The image acquisition module is fixed on the right conveyor belt of the X-ray detection imaging device and is used to collect the surface image of the cocoon; The computer module is used to establish a discrimination model of cocoon quality characteristic parameters and cocoon quality using a SVM method according to a pre-established artificial discrimination model, and process the cocoon surface image and the cocoon internal image based on the discrimination model to obtain a detection result; The auxiliary sorting spot projector is fixed on the right conveyor belt of the X-ray detection imaging device and is used to mark the defective cocoons and display them on the computer monitor.

2. The system according to claim 1, characterized in that The feeding device is in the shape of a trapezoid that is wide at the top and narrow at the bottom, with a feeding port at the top and a discharging port at the bottom.

3. The system according to claim 1, characterized in that The flattening baffle and the baffle conveyor belt together limit the size of the cocoons passing through the gap between the two baffles. The initially arranged cocoons are soaked, laid flat and filled into the cocoon carrier for loading.

4. The system according to claim 1, characterized in that The X-ray detection imaging device comprises an X-ray penetration imaging module and a common smooth conveyor belt. Both sides of the X-ray detection imaging module are provided with shielding radiation layers, which are divided into an inlet shielding radiation layer and an outlet shielding radiation layer.

5. The system according to claim 1, characterized in that The cocoon carrier is located at the rightmost side of the baffle conveyor belt and borders the baffle conveyor belt. The cocoon carrier is placed on an ordinary smooth conveyor belt, waiting for the cocoons to be flatly conveyed to be sent into the carrier for loading. The cocoon carrier structure has a high base on the left and a low base on the right, forming an inclined shape.

6. A method for detecting and sorting silkworm cocoon quality based on active projection and X-ray, characterized in that: The following steps are involved: Pour silk cocoons from a feed port, and preliminarily trim the silk cocoons based on a feed device to obtain preliminarily trimmed silk cocoons; The stepper motor is started and rotated based on a fixed number of pulses, driving the baffle conveyor belt to convey a certain distance so that the cocoons are quantitatively loaded into the cocoon carrier, and the cocoons filled into the cocoon carrier are obtained; Performing penetration imaging on the cocoons filled into the cocoon carrier by an X-ray detection imaging device to obtain an internal image of the cocoons; Preprocessing the internal image of the silk cocoon to obtain Fourier features and gradient enhanced LBP features of the silk cocoon image; Based on the SVM method, a discriminant model of cocoon quality characteristic parameters and cocoon quality is established, the Fourier feature and the gradient enhanced LBP feature of the cocoon image are synthesized into a single feature vector and normalized, and then input into the discriminant model for discrimination to obtain a puncture discrimination result, and at the same time, based on the image acquisition module, the cocoon part with surface defects is obtained by using threshold segmentation, and the image coordinate position of the defective cocoon is converted into the position in the actual world coordinate system, and the projector transmission image is changed through the proportional relationship to obtain the surface quality detection result; The puncture identification result and the surface quality detection result are displayed based on an auxiliary sorting spot projector, and defective cocoons are manually removed.

7. The method according to claim 6, characterized in that The process of preprocessing the internal image of the silk cocoon to obtain the Fourier features and the gradient enhanced LBP features of the silk cocoon image includes: Cutting a corresponding image area from the image of the interior of the silk cocoon and converting it into a grayscale image; Binarizing the grayscale image to obtain an edge contour image, calculating the area of ​​the connected domain of the edge contour image and performing area size screening to obtain a cocoon mask image; Calculating the grayscale image and the cocoon mask image to obtain a cocoon region of interest image; The cocoon region of interest image is processed based on a gradient enhanced LBP feature descriptor and a Fourier descriptor to obtain a frequency domain information feature vector and a gradient enhanced LBP feature.

8. The method according to claim 7, characterized in that The process of obtaining the discrimination result comprises: Combining the frequency domain information feature vector and the gradient enhanced LBP feature into a single feature vector and performing normalization processing to obtain normalized data; A discrimination model of cocoon quality characteristic parameters and cocoon quality is established based on the SVM method, and the normalized data is input into the discrimination model for calculation to obtain the discrimination result.

9. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method described in any one of claims 6 to 8 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 6 to 8 is implemented.