Counting device and counting method for cocoons discharged from thread

By using a combination of linear module, image acquisition device and line laser during the filament reeling process, combined with image processing algorithms, the problem of low efficiency of cocoon counting during the filament reeling process is solved, and efficient and accurate cocoon particles are achieved Number recognition.

CN119443144APending Publication Date: 2025-02-14CHINA JILIANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411442395.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art has low efficiency in counting the number of cocoon particles in the silk reeling process, and due to the light color of the cocoon silk and the low contrast with the water background, it is difficult to accurately identify.

Method used

Design a device for counting cocoon particles under the thread. Through a linear module and image acquisition device and a line laser, the image is collected after the cocoon wire is illuminated by laser. The image processing algorithm is used to identify the number of laser light bars to realize the number of cocoon particles under the thread. accurate count.

Benefits of technology

The efficiency and accuracy of cocoon counting under the thread are improved, the complexity of background segmentation caused by the color changes of cocoon silk is avoided, and the stability and efficiency of identification are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443144A_ABST
    Figure CN119443144A_ABST
Patent Text Reader

Abstract

The invention discloses a device and a method for counting cocoons under ends, and belongs to the field of silk reeling. The device for counting cocoons under ends comprises a linear module, an image acquisition device and a linear laser. The linear module is installed above a silk reeling groove, an image collecting device is fixedly installed on a sliding table on the linear module and comprises an industrial camera, a lens and a fixing plate, a supporting plate is fixedly installed above the fixing plate, a linear laser is installed on the supporting plate, and the image collecting device and the linear laser can move along with a sliding block. The line laser is used for emitting line laser light strips on the cocoon filaments, and the industrial camera is used for collecting images of the cocoon filaments illuminated by the laser. According to the invention, the number of cocoon silks can be effectively identified, the detection efficiency and accuracy of the cocoon grains under the end are obviously improved, and a reliable and advanced technical solution is provided for counting the cocoon grains under the end in the silk reeling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of silk reeling, and in particular relates to a device for counting cocoon particles under the thread and a counting method thereof. Background Art

[0002] In the silk reeling process, the management and control of the number of cocoon grains under the thread is involved. "Cocoon grains under the thread" refers to the number of cocoon grains in the reeling state corresponding to each raw silk in the silk reeling process. In silk reeling production, it is very important to maintain the stability of the number of cocoon grains under the thread, because the number of cocoon grains under the thread will directly affect the fineness (thickness) and quality of raw silk. Silk reeling workers need to monitor and adjust the number of cocoon grains under the thread according to production requirements and actual conditions.

[0003] In the unwinding test, the number of cocoon grains under the thread is an indicator used to calculate the "average number of grains". At present, the inspection institute's counting of the number of cocoon grains under the thread mainly relies on the visual records of inspectors, who need to record the number of cocoon grains per thread every 3 minutes. However, manual counting and counting methods have many problems such as heavy work, low efficiency, and high labor costs. In addition, frequent inspection work can easily lead to visual fatigue, thus affecting the accuracy of counting.

[0004] Chinese patent CN111798472A discloses a method for collecting images of silk cocoons in a reeling tank using an industrial camera. This solution uses an industrial camera to directly collect images of silk cocoons in water. During the reeling process, the silk fibers are extracted, causing the color of the cocoon shell to gradually become transparent and merge with the water, resulting in the omission of recognition of some silk cocoons, causing the number of recognized cocoon grains to be less than the actual number of cocoon grains.

[0005] In addition, the scheme directly uses industrial cameras to collect cocoon images and cannot distinguish between "under-thread cocoons" and "fallen cocoons", and the number of under-thread cocoons identified in the reeling trough deviates from the actual value, which cannot meet the need to calculate the average number of grains, an indicator of the unwinding test. The reasons are as follows. On the one hand, the diameter of the cocoon silk is relatively thin, usually at the micron level, which makes it occupy fewer pixels in the image. The cocoon silk in the captured image is likely to appear faint and inconspicuous, and it is easy to be submerged or confused by background noise, resulting in the industrial camera being unable to clearly identify it. On the other hand, the color of the cocoon silk is usually lighter and translucent in the water, which makes its color contrast with the water background low and often cannot be recognized by industrial cameras. Summary of the invention

[0006] The purpose of the present invention is to design a device and method for counting cocoon grains under the thread, wherein the counting device obtains the number of cocoon grains under the thread during the reeling process by identifying the number of laser light strips projected on the cocoon silk by a line laser.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is: A device for counting cocoon particles under the thread comprises a linear module, an image acquisition device and a line laser. The linear module is installed above a reeling groove. The slider on the linear module is fixedly installed with the image acquisition device. The image acquisition device comprises an industrial camera, a lens and a fixed plate. A support plate is fixedly installed above the fixed plate. The support plate is installed with a line laser. The image acquisition device and the line laser can move with the slider. The line laser is used to produce a line laser light strip on the cocoon silk. The industrial camera is used to acquire the image of the cocoon silk illuminated by the laser.

[0008] Furthermore, in the above technical solution, the upper part of the reeling groove is connected to the aluminum profile by bolts and nuts, and the upper part of the aluminum profile is connected to the linear module by bolts and nuts.

[0009] Furthermore, in the above technical solution, the linear module includes a stepper motor, a linear guide, a synchronous belt, a slider and a limiter. The slider is fixedly connected to the synchronous belt. The stepper motor is installed on one side of the synchronous belt and drives the synchronous belt on the linear guide to move to realize the movement of the slider. The movement of the slider is limited within a fixed range by the limiter. The limiter is installed on the linear guide and its position can be adjusted.

[0010] Furthermore, in the above technical solution, an image acquisition device is fixedly installed on the slider, a fixed plate in the image acquisition device fixes the industrial camera on the slider through bolts, the lens is connected to the industrial camera through threads, and the support plate is installed above the fixed plate through bolts.

[0011] Furthermore, in the above technical solution, the line laser includes a laser head, a circuit board and terminal posts, the laser head and the terminal posts are embedded in the circuit board, the terminal posts are connected to the power line, and the support plate is fixedly connected to the circuit board of the line laser by bolts and nuts, so that the line laser is fixed on the inclined surface of the support plate.

[0012] A method for counting cocoon particles under the thread is implemented by using a device for counting cocoon particles under the thread, comprising the following steps: The first step is to control the linear module to move the slider to the bottom of the thread connector so that the lens is accurately aligned with the cocoon silk; The second step is to activate the line laser to irradiate a uniform linear laser light strip on the aligned cocoon silk, making sure the light strip is clearly visible; In the third step, the industrial camera collects images of the cocoon silk under the connector being illuminated by the laser light strip of the line laser through the lens; The fourth step is that the industrial camera uploads the collected image data to the host computer in real time through the data interface for subsequent processing; Step 5: The host computer runs the image processing software and imports the received image data into the software for analysis and processing; Step 6: Use image processing algorithms to process and analyze the imported images, highlight the results of the laser light strips, and generate visually marked cocoon silk images for subsequent counting; A: Image Preprocessing Preprocess the input image, set the coordinates of the region of interest (ROI), and draw the region on the original image.

[0013] B: ROI segmentation The ROI image of the region of interest is obtained from the original image. The OTSU threshold method is used to segment the ROI image, and then the morphological opening operation is used to remove image noise.

[0014] C: Apply the watershed algorithm Select low-density areas in the image as starting points, which are usually regarded as local minima, and mark these areas as different starting points. Starting from the lowest starting point, the "water level" is gradually increased to simulate the process of water flooding the image from low to high. During the flooding process, when the water reaches different local minima, "dams" will be formed between these areas, and these dams are the final segmentation lines. As the water level rises, new areas are continuously updated and marked. When all areas are separated by the watershed line, the image segmentation is complete. D: Post-processing The segmentation results are post-processed using Gaussian blur to remove small noise and smooth the image edges.

[0015] E: Connected region analysis and counting Set the maximum and minimum areas of connected bodies, mark the connected bodies that meet the threshold, and traverse the connected bodies to count the number of cocoon silk threads.

[0016] Step 7: Through the control system of the host computer, the linear module slider is instructed to move to the position of the next thread of cocoon silk to ensure continuous processing; Step 8, looping through Step 2 to Step 7, performing laser irradiation, image acquisition, data uploading and image processing on each cocoon silk, thereby achieving accurate counting of all cocoon silks; Step 9: After all the silk cocoons are counted, the linear module is instructed to reset the slider to the initial position to prepare for the next counting cycle; Furthermore, in the above method, when collecting images, the small motor rotates to make the cocoons on the silk cocoons in the water of the reeling tank be twisted into a strand of raw silk through the thread splicer, so as to keep the cocoons in a straightened state.

[0017] Furthermore, in the above method, when the laser light bar of the line laser hits the cocoon silk, a light spot will appear on the cocoon silk. The number of light spots represents the number of cocoon silks, which also corresponds to the number of cocoons. The industrial camera collects these light spots, obtains the number of light spots, and then obtains the number of cocoons.

[0018] Furthermore, in the above method, the distance between the threads on the reeling trough is the same, and the upper computer software controls the slider to move a fixed distance, which can enable the image acquisition device to accurately move from the current thread to the next thread to capture the cocoon silk image.

[0019] Furthermore, in the above method, the position of the stopper is adjusted to the linear guide corresponding to the last cocoon thread. When the slider moves to the stopper and completes the image acquisition of the image acquisition device, the upper computer software controls the slider to automatically reset.

[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention changes the existing counting method of cocoon particles under the thread, and uses image acquisition technology and computer image processing software real-time counting method to detect the number of cocoon silk under the thread device in real time. After the industrial camera collects the cocoon silk image, it does not need to stay for too much time. The algorithm can immediately process the image and display it, and then move to the next thread through the slider to collect the image. It can realize the counting of cocoon particles under each thread on the silk reeling machine, thereby improving the counting efficiency.

[0021] 2. The present invention obtains the number of cocoon grains in the reeling process by identifying the number of laser light strips on the cocoon silk by a line laser, rather than directly collecting the cocoon image in the water of the reeling tank, thus avoiding the problem that the background and the target cannot be separated because the cocoon silk is extracted and the color tends to be transparent and merges with the water during the reeling process. Because the color of the cocoon silk will not change, the present invention greatly reduces the complexity of the algorithm for segmenting the image background and improves the stability and efficiency of recognition.

[0022] 3. During the silk reeling process, the cocoons in the reeling trough are suspended in the water. The cocoon silk is connected to the thread connector. The cocoon silk is in a straightened state. When the line laser is irradiated onto the cocoon silk, a light spot will be formed on the irradiated small section. Then the industrial camera collects these light spots, obtains the number of light spots, and obtains the number of cocoons under the thread. When the cocoon silk breaks, due to the effect of gravity, the cocoon silk will fall off from the thread connector, and the cocoon silk originally irradiated will be out of the field of view of the lens. The line laser cannot irradiate the cocoon silk and no light spot will be formed, so the number of light spots corresponds to the number of cocoons under the thread. When the cocoon under the thread becomes a fallen cocoon, the industrial camera can identify it. The present invention improves the accuracy of identifying the number of cocoon grains under the thread. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0024] Figure 1 This is a flow chart of silk identification of the present invention; Figure 2 It is a schematic diagram of the structure of the present invention; Figure 3 It is a schematic diagram of the structure of the frequency image acquisition device and the line laser of the present invention; Figure 4 It is a schematic diagram of the structure of the frequency image acquisition device and the line laser of the present invention (side view); Figure 5 This is a schematic diagram of the structure of the line laser of the present invention; Figure 6 is a flow chart of the image processing algorithm of the device of the present invention; Figure 7a The ROI image of the cocoon silk collected by the present invention; Figure 7b is the image preprocessed by the present invention; Figure 7c The image is processed by the water-neighbor segmentation algorithm of the present invention; Figure 7d This is the cocoon silk image after the connected body identification of the present invention.

[0025] Description of the numbers in the figure: 1. Raw silk; 10. Line laser; 101. Terminal; 102. Circuit board; 103. Laser head; 2. Connector; 3. Silk; 4. Cocoon; 5. Water; 6. Silk reeling trough; 7. Linear module; 71. Stepper motor; 72. Linear guide; 73. Synchronous belt; 74. Slider; 75. Limiter; 8. Image acquisition device; 81. Lens; 82. Industrial camera; 83. Fixing plate; 9. Support plate. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Please note that the described implementation modes are only part of the specific implementation modes of the present invention, not all of them. According to the implementation modes of the present invention, all other implementation modes obtained by ordinary technicians in the field without creative work belong to the protection scope of the present invention. Therefore, the detailed description provided below is not intended to limit the protection scope claimed by the present invention, but only to show a specific implementation mode of the present invention.

[0027] It is worth noting that: in the present application, when certain known technologies or conventional technical means need to be applied in the field, the applicant may not explain in detail in the text what kind of technical means the known technologies and / or conventional technical means are. However, it cannot be considered that the technical solution of the present application is unclear because the technical means are not specifically disclosed in the text.

[0028] Example 1 like Figures 2~5 As shown, a device for counting cocoon grains under the thread, which obtains the number of cocoon grains under the thread in the reeling process by identifying the number of laser light strips hit by a line laser on the cocoon silk; the device includes a linear module 7, an image acquisition device 8 and a line laser 10, the linear module 7 is installed above the reeling groove 6, the slider 74 on the linear module 7 is fixedly installed with the image acquisition device 8, the image acquisition device 8 includes an industrial camera 82, a lens 81 and a fixed plate 83, a support plate 9 is fixedly installed above the fixed plate 83, the support plate 9 is installed with a line laser 10, the image acquisition device 8 and the line laser 10 can move with the slider 74, the line laser 10 is used to hit the line laser light strip on the cocoon silk 3, and the industrial camera 82 is used to collect the image of the cocoon silk 3 illuminated by the laser.

[0029] As a preferred setting scheme, the device for counting cocoon grains under the thread is installed on the reeling trough 6, and the water 5 in the reeling trough 6 suspends the silk cocoons 4, and the cocoon silk 3 of the silk cocoons 4 forms the raw silk 1 through the thread connector 2; when setting, the upper surface of the reeling trough 6 is fixedly installed with an aluminum profile, and the linear module 7 is fixedly installed on the aluminum profile, and the slider 74 on the linear module 7 is fixedly installed with the image acquisition device 8, which includes an industrial camera 82, a lens 81 and a fixed plate 83, and a support plate 9 is fixedly installed above the fixed plate 83, and a linear laser 10 is installed on the support plate 9; during the setting process, the reel rotates to drive the raw silk 1 to move upward, and pulls the cocoon silk 3 to keep it in a straightened state, and the linear laser 10 is used to shoot a linear laser light strip on the cocoon silk 3, and the industrial camera 82 is used to collect the spot image of the cocoon silk 3 of the cocoon under the thread illuminated by the laser.

[0030] Example 2 The present embodiment is further optimized on the basis of any of the above embodiments, and the parts identical to the above technical solutions will not be repeated here. Further, in order to better realize the device for counting cocoon grains under the thread described in the present invention, the following setting method is particularly adopted: the reeling groove 6 is connected to the aluminum profile by four pairs of bolts and nuts, the aluminum profile is fixed above the reeling groove 6, and the top of the aluminum profile is connected to the linear module 7 by bolts and nuts.

[0031] Example 3 This embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the above technical solutions are not repeated here. Figure 3 As shown, in order to better realize the device for counting cocoon particles under the thread described in the present invention, the following setting method is particularly adopted: the linear module 7 includes a stepper motor 71, a linear guide 72, a synchronous belt 73, a slider 74 and a limiter 75, the slider 74 is fixedly connected to the synchronous belt 73, the stepper motor 71 is installed on one side of the synchronous belt 73, the stepper motor 71 drives the synchronous belt 73 on the linear guide 72 to move to realize the movement of the slider 74, the movement of the slider 74 is limited within a fixed range by the limiter 75, the limiter 75 is installed on the linear guide 72, and its position can be adjusted, which plays a role of protection and positioning, and can prevent the module from being accidentally damaged during movement.

[0032] Example 4 This embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the above technical solutions are not repeated here. Figure 4 As shown, in order to better realize the device for counting the number of cocoon particles under the thread described in the present invention, the following setting method is particularly adopted: the image acquisition device 8 is fixedly installed on the slider 74, and the slider 74 can drive the image acquisition device 8 to move together, the fixed plate 83 in the image acquisition device 8 fixes the industrial camera 82 on the slider 74 by bolts, and the lens 81 is connected to the industrial camera 82 by threads. The lens 81 is a short-focus lens, and the lens 81 is about 3 to 5 cm away from the cocoon silk 3 so that a clear image can be captured, and the support plate 9 is installed above the fixed plate 83 by bolts, so that the online laser 10 and the image acquisition device 8 on the support plate 9 can move together.

[0033] As a preferred setting scheme, the image acquisition device 8 includes a slider 74 that can move horizontally along the working area of ​​the silk reeling machine, and a high-resolution lens 81 and a line laser 10 are installed on the slider 74. The movement of the slider 74 can be driven by a stepper motor 71 to ensure that it is quickly and accurately positioned in the working area of ​​the silk reeling machine. When the slider 74 moves in front of a certain thread of cocoon silk 3, the line laser beam irradiates the cocoon silk 3 to form a clear light spot. At this time, the industrial camera 82 quickly captures the image of the cocoon silk 3. Due to the irradiation of the laser and the high sensitivity of the lens 81, the image acquisition can be completed in a very short time, usually at the millisecond level. After the image is acquired, the built-in image processing algorithm immediately analyzes the acquired image. The algorithm can quickly identify the number and position of the light spot, so as to accurately calculate the number of cocoons under the thread. After the image processing is completed, the system will display the counting results of the cocoon particles under the thread in real time. After completing the image acquisition and data processing of the current thread, the slider 74 will automatically move to the position of the next thread without staying for too long. The whole process is efficient and continuous, ensuring that the silk reeling machine is not disturbed during operation and maximizing production efficiency.

[0034] Example 5 This embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the above technical solutions are not repeated here. Figure 5 As shown, in order to better realize the device for counting the number of cocoon particles under the thread described in the present invention, the following setting is particularly adopted: the line laser 10 includes a laser head 103, a circuit board 102 and a terminal 101, the laser head 103 and the terminal 101 are embedded in the circuit board 102, the terminal 101 is connected to the power line, and the support plate 9 is fixedly connected to the circuit board 102 of the line laser 10 by bolts and nuts, so that the line laser 10 can be fixed on the inclined surface of the support plate 9.

[0035] As a preferred setting scheme, the line laser 10 is fixed on the inclined surface of the support plate 9 to maintain a preset tilt angle, which can ensure that the line laser can irradiate the cocoon silk 3 within the field of view collected by the industrial camera 82. At the same time, it can also avoid the industrial camera 82 capturing the situation where the line laser hits the background, so as to avoid the appearance of long laser strips in the acquired image affecting subsequent image processing.

[0036] Example 6 This embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the above technical solutions are not repeated here. A method for counting cocoon grains under the thread, like Figure 1 As shown, The method is realized by using a device for counting cocoon grains under the thread, comprising the following steps: The first step is to control the linear module 7 to move the slider 74 to the bottom of the thread receiving device 2 so that the lens 81 is accurately aligned with the cocoon silk 3; The second step is to activate the line laser 10 to irradiate a uniform linear laser light strip on the aligned cocoon silk 3, and ensure that the light strip is clearly visible; In the third step, the industrial camera 82 collects the image of the cocoon silk 3 under the thread connector 2 being illuminated by the laser light strip of the line laser 10 through the lens 81; In the fourth step, the industrial camera 82 uploads the collected image data to the host computer in real time through the data interface for subsequent processing; Step 5: The host computer runs the image processing software and imports the received image data into the software for analysis and processing; The sixth step is to use image processing algorithms, such as Figure 6 As shown, the imported image is processed and analyzed, the presentation result of the laser light strip is highlighted, and a visually marked cocoon silk 3 image is generated to facilitate subsequent counting; A: Image Preprocessing Preprocess the input image, set the coordinates of the region of interest (ROI), and draw the region on the original image.

[0037] B: ROI segmentation Get the ROI image of the region of interest from the original image, such as Figure 7a As shown. The OTSU threshold method is used to segment the ROI image, and then the morphological opening operation is used to remove image noise, as shown Figure 7b shown.

[0038] The basic idea of ​​OTSU threshold segmentation is to select the optimal threshold by maximizing the variance between classes.

[0039] Algorithm steps: 1. Calculate weights Where p(i) is the probability of gray level i, L is the total number of gray levels, and T is the current threshold. 2. Calculate the mean 3. Calculate the between-class variance 4. Select the best threshold value by traversing all possible threshold values ​​T and selecting one that makes σ 2 (T) The largest threshold is taken as the optimal threshold.

[0040] C: Apply the watershed algorithm 1. Gradient image generation: First, the gradient image g(x,y) of the image is generated using the gradient calculation formula.

[0041] Among them, f(x,y) is the grayscale value of the original image.

[0042] 2. Construct the labeling map: After generating the gradient map, set the threshold T to filter out the low gradient area to highlight the main structure. The following conditions can be used for preliminary labeling: 3. Simulate water flow: The core of the watershed algorithm is to treat each pixel as a water source. The algorithm simulates the rising process of water through the following steps: a. Initialize the water level h for each labeled pixel (background and foreground).

[0043] b. Water gradually rises from the lowest point and expands to adjacent pixels.

[0044] c. In each iteration, the pixels of the water area can be updated using the following rules: 4. Identify watershed lines: Watershed lines are formed where two or more water bodies meet, i.e. where the gradient reaches its peak, thus separating different areas.

[0045] 5. Merge areas and update marks: After the waters meet, merge these areas and update the marks to eventually form a marked map: D: Post-processing The segmentation results are post-processed using Gaussian blur to remove small noise and smooth the image edges, such as Figure 7c shown.

[0046] The core of Gaussian blur is the Gaussian function, whose formula is: in: G(x,y) is the value of the two-dimensional Gaussian function.

[0047] σ is the standard deviation of the Gaussian distribution and controls the degree of blur (the larger σ, the stronger the blur effect).

[0048] x and y are the coordinates in the image.

[0049] When applying Gaussian blur, for an image I(x,y), the result of Gaussian blur can be achieved by the following convolution operation: E: Connected region analysis and counting Set the maximum and minimum connected body areas, mark the connected bodies that meet the threshold, and traverse the connected bodies to count the number of silk threads under the thread, such as Figure 7d As shown. The algorithm to achieve this process uses the Seed-Filling method: a. Scanned image Find the current pixel (x, y) = 1, use it as a seed, assign it a label, and push the surrounding foreground pixels into the stack.

[0050] 1. Pop the top pixel of the stack, assign it the same label, and push all adjacent foreground pixels onto the stack.

[0051] 2. Repeat the above steps until the stack is empty. At this time, a connected area is found and all pixel values ​​in the area are marked with the same label.

[0052] b. Repeat step a until the scan is complete. After that, all connected areas and corresponding labels in the image can be obtained.

[0053] Step 7: through the control system of the host computer, instruct the linear module 7 slider 74 to move to the position of the next thread of cocoon silk 3 to ensure continuous processing; Step 8, looping through Step 2 to Step 7, performing laser irradiation, image acquisition, data uploading and image processing on each cocoon silk 3, thereby achieving accurate counting of all cocoon silks 3; Step 9: After all the cocoon silks are counted, the linear module 7 is instructed to reset the slider 74 to the initial position, ready for the next counting cycle; As a preferred setting scheme, a method for counting cocoon particles under the thread is provided. During image acquisition, a small motor rotates to make the cocoon silk 3 in the water 5 of the reeling trough 6 be twisted into a strand of raw silk 1 through the thread connector 2, and the cocoon silk 3 is kept in a straightened state.

[0054] As a preferred setting scheme, in a method for counting the cocoon grains, when the laser light bar of the line laser 10 hits the cocoon silk 3, a light spot will appear on the cocoon silk 3. Several light spots represent several cocoon silks 3, which also correspond to several cocoons under the thread. The industrial camera 82 collects these light spots, obtains the number of light spots, and obtains the number of cocoons under the thread.

[0055] As a preferred setting scheme, in a method for counting cocoon grains under a thread, the distance between threads on the reeling trough 6 is the same, and the upper computer software controls the slider 74 to move a fixed distance, so that the image acquisition device 8 can accurately move from the current thread to the next thread to collect the image of the cocoon silk 3.

[0056] As a preferred setting scheme, in a method for counting cocoon grains under a thread, the position of the stopper 75 is adjusted to the linear guide 72 corresponding to the last thread of cocoon silk 3. When the slider 74 moves to the stopper 75 and completes the image acquisition of the image acquisition device 8, the upper computer software controls the slider 74 to automatically reset.

[0057] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention is within the protection scope of the present invention.

Claims

1. A device for counting cocoon particles under the thread, characterized in that: The invention comprises a linear module (7), an image acquisition device (8) and a line laser (10), wherein the linear module (7) is mounted above a reeling groove (6), a slider (74) on the linear module (7) is fixedly mounted with the image acquisition device (8), the image acquisition device (8) comprises an industrial camera (82), a lens (81) and a fixing plate (83), a support plate (9) is fixedly mounted above the fixing plate (83), the support plate (9) is mounted with the line laser (10), the image acquisition device (8) and the line laser (10) can move with the slider (74), the line laser (10) is used to produce a line laser light strip on the cocoon silk (3), and the industrial camera (82) is used to acquire an image of the cocoon silk (3) illuminated by the laser.

2. The device for counting cocoon particles under the thread according to claim 1, characterized in that: The top of the reeling groove (6) is connected to the aluminum profile via bolts and nuts, and the top of the aluminum profile is connected to the linear module (7) via bolts and nuts.

3. The device for counting cocoon particles under the thread according to claim 2, characterized in that: The linear module (7) comprises a stepper motor (71), a linear guide rail (72), a synchronous belt (73), a slider (74) and a stopper (75); the slider (74) is fixedly connected to the synchronous belt (73); the stepper motor (71) is mounted on one side of the synchronous belt (73) and drives the synchronous belt (73) on the linear guide rail (72) to move so as to realize the movement of the slider (74); the movement of the slider (74) is limited within a fixed range by the stopper (75); the stopper (75) is mounted on the linear guide rail (72) and its position can be adjusted.

4. The device for counting cocoon particles under the thread according to claim 3, characterized in that: An image acquisition device (8) is fixedly mounted on the slider (74); a fixing plate (83) in the image acquisition device (8) fixes an industrial camera (82) on the slider (74) by means of bolts; the lens (81) is connected to the industrial camera (82) by means of threads; and the support plate (9) is mounted above the fixing plate (83) by means of bolts.

5. The device for counting cocoon particles under the thread according to claim 4, characterized in that: The line laser (10) comprises a laser head (103), a circuit board (102) and a terminal (101); the laser head (103) and the terminal (101) are both embedded in the circuit board (102); the terminal (101) is connected to a power line; the support plate (9) is fixedly connected to the circuit board (102) of the line laser (10) by means of bolts and nuts, so that the line laser (10) is fixed on the inclined surface of the support plate (9).

6. A method for counting cocoon particles under the thread, implemented by using a cocoon particle counting device under the thread as claimed in any one of claims 1 to 5, characterized in that: The steps include: The first step is to control the linear module (7) to move the slider (74) to the bottom of the thread connector (2) so that the lens (81) is accurately aligned with the cocoon silk (3); The second step is to activate the line laser (10) to irradiate a uniform linear laser light strip on the aligned cocoon silk (3) to ensure that the light strip is clearly visible; In the third step, the industrial camera (82) collects the image of the cocoon silk (3) under the thread connector (2) being illuminated by the laser light strip of the line laser (10) through the lens (81); In the fourth step, the industrial camera (82) uploads the collected image data to the host computer in real time through the data interface for subsequent processing; Step 5: The host computer runs the image processing software and imports the received image data into the software for analysis and processing; Step 6: Using image processing algorithms, the imported images are processed and analyzed to highlight the results of the laser light strips and generate a visually marked cocoon silk (3) image for subsequent counting; A: Image Preprocessing Preprocess the input image, set the coordinates of the region of interest (ROI), and draw the region on the original image; B: ROI segmentation Get the ROI map of the region of interest from the original image; The OTSU threshold method was applied to segment the ROI image, and then the morphological opening operation was used to remove image noise; C: Apply the watershed algorithm Select low-density areas in the image as starting points, which are usually regarded as local minima, and mark these areas as different starting points; Starting from the lowest starting point, gradually increase the "water level" to simulate the process of water flooding the image from low to high; During the flooding process, when water reaches different local minima, "dams" are formed between these areas, and these dams are the final dividing lines; As the water level rises, new areas are constantly updated and marked; When all regions are separated by the watershed line, the image segmentation is completed; D: Post-processing The segmentation results were post-processed using Gaussian blur to remove small noise and smooth the image edges; E: Connected region analysis and counting Set the maximum and minimum areas of connected bodies, mark connected bodies that meet the threshold, and traverse the connected bodies to count the number of cocoon silk threads; Step 7: through the control system of the host computer, instruct the linear module (7) slider (74) to move to the position of the next thread of cocoon silk (3) to ensure continuous processing; In the eighth step, steps 2 to 7 are executed cyclically to perform laser irradiation, image acquisition, data uploading and image processing on each cocoon silk (3), so as to achieve accurate counting of all cocoon silks (3); The ninth step is to instruct the linear module (7) to reset the slider (74) to the initial position after completing the counting of all the cocoon silks, so as to prepare for the next counting cycle.

Citation Information

Patent Citations

  • Reeling cocoon segmentation and identification method based on HSI space

    CN111798472A