Red and white koi single-color and multi-color sorting device and use method thereof

Through intelligent equipment and image recognition technology, combined with HSV color space, the problem of koi color sorting recognition and sorting in water is solved, and efficient and accurate automatic screening of red and white koi is achieved, improving the efficiency and accuracy of koi sorting sex.

CN118511844BActive Publication Date: 2024-12-13CHINESE ACAD OF FISHERY SCI +1
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202410731160.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-12-13
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

The prior art cannot effectively solve the problem of koi color sorting, especially when identifying and sorting in water, it is easy to cause koi death or misjudgment, and there is a lack of automated sorting devices.

Method used

Using intelligent equipment, image recognition and deep learning technology, by setting up leaked fish pipelines, photoelectric sensors and driving devices, combined with image recognition system, automatically identifying and sorting red and white koi, using HSV color space and characteristic numerical range to judge the color of fish, realizing Automatic filtering.

Benefits of technology

It realizes efficient and accurate identification and sorting of koi in water, avoids errors in manual screening and fish death, improves the efficiency and accuracy of koi sorting, and has high market application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118511844B_ABST
    Figure CN118511844B_ABST
Patent Text Reader

Abstract

The present invention discloses a single-color and multi-color sorting device for red and white koi and a method for using the same. The device comprises: a mounting frame; a fish-leaking pipe, which is arranged on the mounting frame, the upper part of the fish-leaking pipe has an imaging area, the lower part is provided with an opening, a fish-leaking plate is arranged at the opening, the fish-leaking plate is arranged obliquely, and the upper end thereof is rotatably connected with the fish-leaking pipe; a driving device, which is connected with the lower end of the fish-leaking plate, and the driving device can drive the lower end of the fish-leaking plate to move; a camera device, which is arranged on the mounting frame and is opposite to the imaging area; a first photoelectric sensor, which is arranged above the imaging area; a second photoelectric sensor, which is arranged on the side of the fish-leaking pipe; and a controller, which is connected with the driving device, the camera device, the first photoelectric sensor, and the second photoelectric sensor. The present invention can accurately capture the image of the living body and automatically identify the segment pattern without damaging the living body and is suitable for young fish, and can automatically distinguish between single-color and multi-segment red and white koi.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of aquaculture and image recognition, and more specifically, to a single-color and multi-color sorting device for red and white koi and a method for using the same. Background Art

[0002] At present, koi breeding faces industrial problems such as low stability of appearance, low yield rate, few excellent strains, and high intensity of manual screening. The existing manual screening model has become a "neck-breaking" problem that restricts the development of the koi industry. The prices of koi of different appearances vary greatly. In the market, there are many types of koi, and the appearance and color of different varieties have different characteristics, and the prices are also significantly different. Koi are mainly divided into three levels: A, B, and C. Among them, the price of grade A is the lowest, generally ranging from a few yuan to tens of yuan, while the price of grade B ranges from hundreds of yuan to tens of thousands of yuan, and the price of grade C ranges from hundreds of thousands of yuan to hundreds of yuan. The price of koi is determined by the grade. The grade of koi is affected by many factors such as the number of segment patterns, patterns, color, color, and body shape. Therefore, the selection of top koi is very strict and requires multiple rounds of screening, starting from the fry. The existing koi selection model relies entirely on manual selection. At present, koi breeding and breeding units at home and abroad, including Japan, are all manually selecting high-quality koi. This industrial development model has many disadvantages, such as high labor intensity, strong subjective judgment, long cycle, large breeding investment, and unstable appearance. Due to the lack of novel screening technology, it is impossible to form excellent strains with stable appearance, resulting in low commodity rate of koi and the inability to expand the scale of the industry. Artificial screening mainly relies on experienced experts. However, young people have problems such as insufficient screening experience and unwillingness to carry out intensive work, which leads to the risk of a lack of successors in the manual screening model of koi. To solve these problems, it is urgent to innovate koi screening technology, solve the above disadvantages, and improve the accuracy of screening for excellent commodity koi. The first selection of koi is to sort out single color and multi-color from millions of koi seedlings, retain multi-color and eliminate single color. The retained multi-color koi seedlings will enter the second selection and later stages after being raised for a period of time. Generally speaking, the first selection has the greatest labor intensity, reducing from millions of seedlings to tens of thousands of seedlings, so there is a saying of "picking one out of a hundred". This stage most needs intelligent sorting methods and devices.

[0003] The sorting of koi is mainly divided into grading by size and grading by color. There are many invention patents and utility model patents involving the screening of koi by size. For example, utility model patent CN 217826390 U provides a koi fry grading and screening device, the purpose of which is to grade koi by size. Utility model patent CN 217523641 U provides a koi fry sorting device, which is used to quickly and effectively scoop up dead fry to prevent the impact on live fry. Invention patent CN 106980873 B provides a koi screening method and device based on deep learning, which is applied to the screening of high-quality koi fry by training a deep belief network model with a large amount of koi image data. This method collects individuals that meet expectations according to a preset koi style, and eliminates individuals that do not meet expectations. It is easily affected by the preset style, resulting in individuals with excellent appearance being misjudged and eliminated. Utility model patent CN 215819781 U, invention patent CN115805192A, CN 107484809 A, and CN 107667945 A respectively provide a grading and sorting system based on fish size. Other similar fish sorting patents are based on body size. So far, no technology or equipment for sorting koi carp colors has been reported.

[0004] The existing color sorting of koi is all done manually, which is very labor-intensive and prone to errors. However, if mechanical identification and sorting is used, two problems must be solved: (1) Since koi are expensive, out-of-water screening can easily lead to the death of koi, so the problem of in-water screening, identification and sorting must be solved; (2) Koi swim in the water, and it is easy for multiple koi to pass through the image acquisition area at the same time, resulting in image overlap. In particular, when a single red koi and a single white koi pass through the image acquisition area at the same time, they are easily misjudged as variegated red and white koi, resulting in sorting errors. In view of these technical difficulties, there is no equipment that can perform color screening of koi. Invention patent CN 113989227 B provides a color quantification evaluation method, device and system for red-crowned red and white koi, which can only quantify the chromaticity of variegated red and white koi, and cannot distinguish between single color and variegated colors; it also does not have a sorting function; therefore, it cannot solve the problem of identifying and sorting single color and variegated colors of red and white koi. Similarly, invention patent CN113610185A provides a wood color sorting method based on main color recognition. This method only provides a method for identifying the main characteristic color of wood, but does not solve the sorting problem, nor can it be applied to solve the problem of identifying and orderly collecting images of koi in water. Although invention patent CN 109376257 A discloses a method for identifying and sorting tea leaves based on image processing, this method collects image information of tea leaves, tea stems, and yellow leaves through vibration and a special background plate, and sorts them through a high-speed spray valve. This method is not suitable for koi identification and sorting. Summary of the invention

[0005] The purpose of the present invention is to provide a single-color and multi-color sorting device for red and white koi and a method for using the same. The present invention includes two parts, namely, identification and sorting, and can solve the problem of screening, identification and sorting in water. The present invention integrates technologies such as intelligent equipment, image recognition and deep learning. Under the premise of not damaging the living body and being suitable for young fish, it can accurately capture the living body image and automatically identify the segment pattern, and can automatically distinguish between single-color and multi-segment red and white koi.

[0006] In order to achieve these purposes and other advantages of the present invention, a single-color and multi-color sorting device for red and white koi is provided, comprising:

[0007] Install the frame;

[0008] A fish leakage pipe is arranged on the mounting frame, the upper part of the fish leakage pipe has an imaging area, the lower part is provided with an opening, a fish leakage plate is arranged at the opening, the fish leakage plate is arranged obliquely, and the upper end thereof is rotatably connected to the fish leakage pipe;

[0009] A driving device connected to the lower end of the fish leakage plate, the driving device can drive the lower end of the fish leakage plate to move so that the fish leakage plate opens or seals the opening;

[0010] A camera device, which is arranged on the mounting frame or the fish leakage pipe and is opposite to the imaging area;

[0011] A first photoelectric sensor is arranged above the imaging area and is used to collect the position information of the koi in the fish leaking pipe;

[0012] A second photoelectric sensor is arranged at the side of the fish leakage pipe and is used to collect the position information of the koi in the fish leakage pipe between the imaging area and the fish leakage plate;

[0013] A controller is connected to the driving device, the camera device, the first photoelectric sensor and the second photoelectric sensor.

[0014] Preferably, the red and white koi single-color and multi-color sorting device further comprises:

[0015] A selection basket is located below the fish leakage plate;

[0016] A waste fish collecting frame is located below the bottom of the fish drain pipe.

[0017] Preferably, in the red and white koi single-color and multi-color sorting device, the fish leakage pipe rotates downward.

[0018] Preferably, the red and white koi single-color and multi-color sorting device further comprises:

[0019] A bottom plate, which is horizontally arranged on the top of the mounting frame, and a fence is arranged at the outer edge of the bottom plate;

[0020] A spiral runway is arranged on the bottom plate and is arranged in a spiral shape from top to bottom. The head end of the spiral runway forms a fish landing area, and the tail end is provided with a runway exit, which is connected to the top of the fish leakage pipe. A spiral guardrail is arranged at the outer edge of the spiral runway.

[0021] Preferably, in the red and white koi single-color and multi-color sorting device, an opening is provided on the fence, the bottom of the opening extends to the bottom plate, a dial is provided at the opening, a baffle is provided at the tail end of the spiral runway, and the runway exit is located between the baffle and the dial.

[0022] Preferably, in the red and white koi monochrome and multi-color sorting device, a circular plate is provided in the center of the top of the spiral runway, the plate is separated from the fence by a certain distance, a water supply port is provided at the bottom of the plate, the water supply port is communicated with the spiral runway, and is connected to a water pipe.

[0023] The method for using the red and white koi single-color and multi-color sorting device comprises the following steps:

[0024] The fish enter the fish leakage pipe one by one. The first photoelectric sensor firstly feeds back a signal of fish. When the fish pass by the camera device, the camera device is triggered to take a picture. Then, the image recognition system identifies and outputs a signal of whether it is a screening target object. If it is a screening target, when the second photoelectric sensor senses that the fish is coming, the controller controls the rear driving device to start, so that the fish leakage plate is opened, and the selected characteristic fish is screened and falls into the first collector. If it is a non-target screening object, when the second photoelectric sensor senses that the fish is coming, the driving device will not be triggered, and the fish will fall into the second collector along the fish leakage pipe.

[0025] The method for the image recognition system to identify and output whether it is a screening target object includes the following steps:

[0026] Step 1: Preprocessing of image recognition

[0027] 1) The collected original photos of pure red koi, pure white koi and red and white koi are subjected to Gaussian blur to remove noise from the images;

[0028] 2) Define the red and white BGR threshold range to extract the target outline from the background;

[0029] 3) Convert the Gaussian blurred image from the RGB color space to the HSV color space of the hexagonal pyramid model with hue H, saturation S, and brightness V;

[0030] 4) Apply histogram equalization to standardize the brightness and contrast of the image and improve the image quality;

[0031] 5) Extract the brightness channel for dilation operation;

[0032] Step 2: Color classification

[0033] Extract salient features that can characterize the target from the image;

[0034] Step 3: Classification or matching

[0035] Based on the features extracted in the second step, the image is compared with sample images in the database, and a classification or matching algorithm is used to determine the category or identity of the target in the image;

[0036] Step 4: Output recognition results

[0037] According to the image recognition results classified or matched in the third step, subsequent processing is performed and the final recognition results are output.

[0038] Preferably, in the method for using the red and white koi monochrome and multi-color sorting device, in the step 3), after converting the Gaussian blurred image from the RGB color space to the hexagonal pyramid model HSV color space of hue H, saturation S, and brightness V, the characteristic value range of the red and pure white koi in the HSV color space is defined;

[0039] The color characteristic value range of red koi is:

[0040] Hue H range: 0°≤H≤10°

[0041] Saturation S range: S ≥ 0.70

[0042] Brightness V range: V ≥ 0.70;

[0043] The color characteristic value range of white koi is:

[0044] Tonal range: Any value

[0045] Saturation range: 0≤S≤0.11

[0046] Brightness range: 0.87≤V≤1.

[0047] Preferably, in the red and white koi monochrome and multi-color sorting device, the specific method for determining the target category or identity in the image is:

[0048] According to the characteristic value range of red and pure white koi in HSV color space, it is judged whether it is red koi or white koi;

[0049] The hue H value of a specific area is judged to determine whether it contains red components, and the saturation S and brightness V values ​​are combined to determine whether the area also contains white components. If the hue H value in a specific area meets the red range, and the saturation S is extremely low and the brightness is extremely high, then it is judged that the area has both red and white, which proves that the koi is red and white koi;

[0050] The discrimination formula is as follows:

[0051]

[0052] Among them, R is red koi, W is white koi, and RW is red and white koi.

[0053] The present invention has at least the following beneficial effects:

[0054] Compared with the prior art, the beneficial effect of the present invention is that the red and white koi monochrome and multi-color screening method and device described in the present application, firstly, by setting the runway area, in a limited area, setting the longest limit runway, so that the fish school becomes a queue that goes down in sequence, and with the use of the dial wheel, the fish school automatically completes the release by strip; secondly, the runway area and the screening area have a spiral runway and a fish leakage pipeline respectively, the purpose is to allow the koi to pass through the imaging area in the water, and avoid the occurrence of water-out detection causing the death of the koi; thirdly, each fish is photographed, and then the picked-up image is recognized and output by the image recognition system, and the fish is screened and classified by controlling the driving device; finally, by setting a photoelectric sensor near the imaging area and the fish leakage plate, the function of automatically triggering the camera device and the start switch is realized respectively, and the function of automatically screening the fish body color is realized. The method and device can complete the whole set of work of queuing-imaging-screening in the shortest time during the automatic falling of the fish school and the water body, the image recognition system has high recognition efficiency, the whole set of devices works fast and efficiently, and has high market application value.

[0055] Other advantages, objectives and features of the present invention will be embodied in part through the following description, and in part will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a schematic structural diagram of a runway area according to an embodiment of the present invention;

[0057] Figure 2 2 is a schematic structural diagram of a device for sorting red and white koi monochromatic and multichromatic colors according to an embodiment of the present invention;

[0058] Figure 3 yes Figure 2 The enlarged view of point A in the middle;

[0059] Figure 4 is a top view of a device for sorting red and white koi monochromatic and multichromatic colors according to an embodiment of the present invention;

[0060] Figure 5 It is the original image of the Koi;

[0061] Figure 6 is the image after Gaussian blur processing;

[0062] Figure 7 is the extracted contour image;

[0063] Figure 8 is an HSV image;

[0064] Fig. 9 is the image after histogram equalization;

[0065] Fig.10 is the image after dilation.

[0066] The meanings of the reference numerals in the specification are as follows: 1. runway area, 2. spiral runway, 3. spiral guardrail, 4. dial wheel, 5. fish landing area, 6. runway exit, 7. baffle, 8. fence, 9. camera device, 10. imaging area, 11. second photoelectric sensor, 12. waste fish collection frame, 13. driving device, 14. selection basket, 15. installation frame, 16. fish leakage plate, 17. first photoelectric sensor, 18. controller, 19. fish leakage pipe, 20. water supply port. DETAILED DESCRIPTION

[0067] The present invention is further described in detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.

[0068] It should be noted that, in the description of the present invention, the terms "lateral", "longitudinal", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc. indicating orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0069] like Figures 1 to 4 As shown, the present invention provides a single-color and multi-color sorting device for red and white koi, comprising:

[0070] Install the frame;

[0071] A fish leakage pipe is arranged on the mounting frame, the upper part of the fish leakage pipe has an imaging area, the lower part is provided with an opening, a fish leakage plate is arranged at the opening, the fish leakage plate is arranged obliquely, and the upper end thereof is rotatably connected to the fish leakage pipe;

[0072] A driving device is connected to the lower end of the fish leakage plate, and the driving device can drive the lower end of the fish leakage plate to move so that the fish leakage plate opens or seals the opening; the driving device can be a pneumatic pump to control the opening and closing of the fish leakage plate.

[0073] A camera device, which is arranged on the mounting frame or the fish leakage pipe and is opposite to the imaging area;

[0074] A first photoelectric sensor is arranged above the imaging area and is used to collect the position information of the koi in the fish leaking pipe;

[0075] A second photoelectric sensor is arranged at the side of the fish leakage pipe and is used to collect the position information of the koi in the fish leakage pipe between the imaging area and the fish leakage plate;

[0076] A controller is connected to the driving device, the camera device, the first photoelectric sensor and the second photoelectric sensor.

[0077] The first photoelectric sensor and the second photoelectric sensor detect the presence or absence of an object through the principle of blocking or reflecting the light beam by the detected object and selecting the circuit by the synchronous circuit. The first photoelectric sensor is used to stimulate the camera recognition system of the camera device, and the second photoelectric sensor is an image recognition system that judges the output recognition result based on image recognition. If it is a screening target, it triggers the driving device at the rear to screen the feature fish to be selected and fall into the first collector. If it is a non-target screening object, it falls into the second collector along the fish leakage pipe.

[0078] The red and white koi monochrome and multi-color sorting device provided by the scheme, when in use, allows the fish to enter the fish leakage pipe one by one, the first photoelectric sensor first feedbacks a fish signal, and when the fish passes by the camera device, the camera device is triggered to take a picture, and then the image recognition system recognizes and outputs a signal whether it is a screening target object; if it is a screening target (multi-color koi), when the second photoelectric sensor senses that the fish is coming, the controller controls the rear drive device to start, so that the fish leakage plate is opened, and the selected characteristic fish is screened and falls into the first collector. If it is a non-target screening object, when the second photoelectric sensor senses that the fish is coming, the drive device will not be triggered, and the fish will fall into the second collector along the fish leakage pipe;

[0079] The method for the image recognition system to identify and output whether it is a screening target object includes the following steps:

[0080] Step 1: Preprocessing of image recognition

[0081] 1) The collected original photos of pure red koi, pure white koi and red and white koi are subjected to Gaussian blur to remove noise from the images;

[0082] 2) Define the red and white BGR threshold range to extract the target outline from the background;

[0083] 3) Convert the Gaussian blurred image from the RGB color space to the HSV color space of the hexagonal pyramid model with hue H, saturation S, and brightness V;

[0084] 4) Apply histogram equalization to standardize the brightness and contrast of the image and improve the image quality;

[0085] 5) Extract the brightness channel for dilation operation;

[0086] Step 2: Color classification

[0087] Extract salient features that can characterize the target from the image;

[0088] Step 3: Classification or matching

[0089] Based on the features extracted in the second step, the image is compared with sample images in the database, and a classification or matching algorithm is used to determine the category or identity of the target in the image;

[0090] Step 4: Output recognition results

[0091] According to the image recognition results classified or matched in the third step, subsequent processing is performed and the final recognition results are output.

[0092] In another embodiment, the red and white koi single-color and multi-color sorting device further comprises:

[0093] A selection basket is located below the fish leakage plate;

[0094] A waste fish collecting frame is located below the bottom of the fish drain pipe.

[0095] If it is a screening target, when the second photoelectric sensor senses that the fish is coming, the controller controls the rear driving device to start, so that the fish leakage plate is opened, the characteristic fish to be selected are screened and fall into the selection basket. If it is a non-target screening object, when the second photoelectric sensor senses that the fish is coming, the driving device will not be triggered, and the fish will fall into the waste fish collection frame along the fish leakage pipe.

[0096] In another embodiment, in the single-color and multi-color sorting device for red and white koi, the fish leakage pipe rotates downward.

[0097] In another embodiment, the red and white koi single-color and multi-color sorting device further comprises:

[0098] A bottom plate is horizontally arranged on the top of the installation frame, and a fence is arranged at the outer edge of the bottom plate; the bottom plate is used to support the spiral runway.

[0099] A spiral runway is arranged on the bottom plate and is arranged in a spiral shape from top to bottom. The head end of the spiral runway forms a fish landing area, and the tail end is provided with a runway exit, which is connected to the top of the fish leakage pipe. A spiral guardrail is arranged at the outer edge of the spiral runway.

[0100] In another embodiment, in the single-color and multi-color sorting device for red and white koi, an opening is provided on the fence, the bottom of the opening extends to the bottom plate, a thumbwheel is provided at the opening, a baffle is provided at the tail end of the spiral runway, and the runway exit is located between the baffle and the thumbwheel. By setting the runway area, the longest limit runway is set in a limited area, so that the fish school is formed into a queue that goes down in sequence, and the use of the thumbwheel allows the fish school to be automatically released one by one.

[0101] In another embodiment, in the red and white koi single-color and multi-color sorting device, a circular plate is provided at the center of the top of the spiral runway, the plate is spaced a certain distance from the fence so that the fish can pass between the two, and a water replenishment port is provided at the bottom of the plate, the water replenishment port is communicated with the spiral runway and connected to a water pipe, the water pipe is provided inside the structure of the spiral runway, and the water pipe is connected to an external water supply device. The water replenishment and water supply system is used to ensure that the entire screening process is maintained in a non-water state.

[0102] The method for using the red and white koi single-color and multi-color sorting device comprises the following steps:

[0103] The fish enter the fish leakage pipe one by one. The first photoelectric sensor firstly feeds back a signal of fish. When the fish pass by the camera device, the camera device is triggered to take a picture. Then, the image recognition system identifies and outputs a signal of whether it is a screening target object. If it is a screening target, when the second photoelectric sensor senses that the fish is coming, the controller controls the rear driving device to start, so that the fish leakage plate is opened, and the selected characteristic fish is screened and falls into the first collector. If it is a non-target screening object, when the second photoelectric sensor senses that the fish is coming, the driving device will not be triggered, and the fish will fall into the second collector along the fish leakage pipe.

[0104] The method for the image recognition system to identify and output whether it is a screening target object includes the following steps:

[0105] Step 1: Preprocessing of image recognition

[0106] 1) The collected original photos of pure red koi, pure white koi and red and white koi are subjected to Gaussian blur to remove noise from the images;

[0107] 2) Define the red and white BGR threshold range to extract the target outline from the background;

[0108] 3) Convert the Gaussian blurred image from the RGB color space to the HSV color space of the hexagonal pyramid model with hue H, saturation S, and brightness V;

[0109] 4) Apply histogram equalization to standardize the brightness and contrast of the image and improve the image quality;

[0110] 5) Extract the brightness channel for dilation operation;

[0111] Step 2: Color classification

[0112] Extract salient features that can characterize the target from the image;

[0113] Step 3: Classification or matching

[0114] Based on the features extracted in the second step, the image is compared with sample images in the database, and a classification or matching algorithm is used to determine the category or identity of the target in the image;

[0115] Step 4: Output recognition results

[0116] According to the image recognition results classified or matched in the third step, subsequent processing is performed and the final recognition results are output.

[0117] In another embodiment, in the method for using the device for sorting red and white koi in single color and multi-color, in step 2, the feature extraction algorithm adopts SIFT, SURF, or HOG.

[0118] In another embodiment, in the method for using the device for sorting red and white koi in single color and multiple colors, in step three, the classification methods include SVM and random forest, and the matching algorithms include nearest neighbor matching and correlation matching.

[0119] In another embodiment, in the method for using the device for sorting red and white koi in monochrome and multicolor, in the step 3), after converting the image after Gaussian blur from the RGB color space to the hexagonal cone model HSV color space of hue H, saturation S, and brightness V, the characteristic value range of red and pure white koi in the HSV color space is defined;

[0120] The color characteristic value range of red koi is:

[0121] Hue H range: 0°≤H≤10°

[0122] Saturation S range: S ≥ 0.70

[0123] Brightness V range: V ≥ 0.70;

[0124] The color characteristic value range of white koi is:

[0125] Tonal range: Any value

[0126] Saturation range: 0≤S≤0.11

[0127] Brightness range: 0.87≤V≤1.

[0128] In another embodiment, in the method of using the red and white koi single-color and multi-color sorting device, the specific method of determining the target category or identity in the image is:

[0129] According to the characteristic value range of red and pure white koi in HSV color space, it is judged whether it is red koi or white koi;

[0130] The hue H value of a specific area is judged to determine whether it contains red components, and the saturation S and brightness V values ​​are combined to determine whether the area also contains white components. If the hue H value in a specific area meets the red range, and the saturation S is extremely low and the brightness is extremely high, then it is judged that the area has both red and white, which proves that the koi is red and white koi;

[0131] The discrimination formula is as follows:

[0132]

[0133] Among them, R is red koi, W is white koi, and RW is red and white koi.

[0134] The invention provides a single-color and multi-color screening method for red and white koi and a device for implementing the screening method.

[0135] First, the technical solution adopted by the screening method of the present invention is:

[0136] Photo collection: Use a high-speed camera device set up above the channel to take original photos of pure red koi, pure white koi, and red and white koi (such as Figure 5 shown).

[0137] Image preprocessing:

[0138] The collected photos are preprocessed to ensure image quality and clarity. The processing process is as follows:

[0139] (1) Denoising:

[0140] Use Gaussian blur to remove noise from the image, which filters out the high-frequency components of the image (the details of the image) and retains the low-frequency components of the image (the smooth area of ​​the image). Therefore, after the image is 'Gaussian blurred', the image will become blurred, thereby retaining the main color characteristics of the koi. The image after Gaussian blur processing is as follows Figure 6 shown.

[0141] Gaussian denoising uses a Gaussian filter to smooth the image and reduce the noise in the image by taking a weighted average of the pixel values ​​around each pixel. Since the collected image is an RGB image with three primary colors, red, green and blue, each pixel position of the three primary color image has data of three colors: red R, green G, and blue B, and their values ​​are all between 0-255; Gaussian blur is performed on the pixels of the three channels in turn.

[0142] The Gaussian filter is a linear smoothing filter that uses a Gaussian function as a weight for the weighted average calculation of pixels.

[0143]

[0144] Gaussian filter principle formula, where σ is the weight of the Gaussian function, also known as the weight of the Gaussian function, x and y are the horizontal and vertical coordinates of the Gaussian filter window, respectively. 2 +y 2 It is the Euclidean distance from the current coordinate to the center of the circle.

[0145] (2) Eliminate the background and extract the general outline of the koi:

[0146] Defines the BGR threshold range for red and white, used to create a mask of the corresponding color.

[0147] Among them, the white and red threshold ranges are as follows:

[0148] White range: R∈[100,255], G∈[100,255, B∈[100,255]

[0149] Red range: R∈[125,255], G∈[0,80], B∈[0,80]

[0150] The target object contour extraction operation is as follows:

[0151]

[0152] DST(x,y) represents the pixel value at position (x,y) in the output image. SRC(x,y) represents the pixel value at position (x,y) in the input image, i.e., the pixel value after the first step of Gaussian blur processing. The lower and upper thresholds are the ranges of the white and red thresholds mentioned above, respectively. This operation extracts the contour of the target object from the background. The extracted contour image is as follows: Figure 7 shown.

[0153] Red and white masks are created separately based on the threshold range. The red and white masks are merged into an overall mask using a bitwise OR operation. The merged mask is then processed using a morphological closing operation to remove noise and connect the target region. The target region is extracted based on the processed mask, retaining the red and white parts. Finally, the segmented result image is shown, in which the red and white target regions are retained.

[0154] (3) Color space conversion:

[0155] The image after Gaussian blur is converted from RGB color space to HSV color space of hexagonal cone model with hue H, saturation S, and brightness V. HSV space is more suitable for extracting color features. For example, hue can be used to identify the type of color, saturation can indicate the purity of the color, and brightness can affect the lightness and darkness of the color. Using HSV space can better achieve color segmentation, that is, separate the color of interest from the background, which is convenient for subsequent classification and recognition.

[0156] The conversion formula is as follows:

[0157] R'=R / 255

[0158] G'=G / 255

[0159] B'=B / 255

[0160] C max =max(R',G',B')

[0161] Cmin min

[0162] Δ=C max -C min

[0163]

[0164] V=C max

[0165] Since the color of the koi in the picture is affected by factors such as the shooting environment and camera parameters and cannot conform to the color accuracy defined by HSV in a strict sense, the color range is defined as follows:

[0166] Define the value range of red and pure white koi in the HSV color space. HSV image is as follows Figure 8 shown.

[0167] Among them, the color characteristics of red koi are:

[0168] Hue H range: 0°≤H≤10°

[0169] Saturation S range: S ≥ 0.70

[0170] Brightness V range: V ≥ 0.70;

[0171] The color characteristics of white koi are:

[0172] Tonal range: Any value

[0173] Saturation range: 0≤S≤0.11

[0174] Brightness range: 0.87≤V≤1.

[0175] (4) Enhance contrast:

[0176] By applying histogram equalization, the color values ​​of each channel are processed. After the image is converted into HSV color space, the color information is separated into hue H, saturation S and brightness V. Histogram equalization can be applied more accurately to the brightness channel, while avoiding the impact on hue and saturation. The histogram distribution is balanced, thereby enhancing the contrast of the image and making the color features more obvious.

[0177] The brightness channel is extracted from the HSV color space as the processing object. The brightness channel reflects the brightness of the image. The brightness channel is histogram-statisticed to obtain the frequency distribution of the brightness value. The cumulative distribution function is calculated based on the brightness channel histogram to equalize the distribution of the brightness value. According to the mapping function of the calculated brightness value, the original brightness value is mapped to the new equalized brightness value. The mapping function is applied to each pixel value of the brightness channel to achieve histogram equalization. The image after histogram equalization is as follows: Fig. 9 shown.

[0178]

[0179] Where MN is the total number of image pixels, n k The brightness is r k The number of pixels in the image, L is the number of possible brightness levels of the image. Through this formula, the brightness value of the pixel in the output image can be obtained from the brightness r of the pixel in the input image. k Mapping to s k Then get it.

[0180] (5) Morphological operations:

[0181] The brightness channel is extracted for dilation operation. The brightness channel mainly reflects the brightness of the image. Dilation operation on the brightness channel can improve the brightness and darkness details of the image while keeping the color information of hue and saturation unaffected.

[0182] The dilation operation can expand the areas with higher brightness values ​​in the image, enhance the brighter parts of the image, help fill the holes and broken connections, and make the features of the image more prominent. The structural element is matched with the pixels in the image. If the structural element matches the pixel, the pixel value in the area covered by the structural element is set to the maximum value. The processed brightness channel is recombined with the original hue and saturation channels to form the processed HSV image. The image after dilation is as follows Fig.10 shown.

[0183]

[0184] A is expanded with structure B, and the origin of structure element B is translated to the position of image pixel (x, y). If the intersection of B and A at the image pixel (x, y) is not empty, the corresponding pixel (x, y) of the output image is assigned 1, otherwise it is assigned 0.

[0185] 3. Color classification:

[0186] (1) Traversing pixels:

[0187] Traverse each pixel of the image, extract the values ​​of the hue, saturation and brightness channels for each pixel, and use the image processing library to obtain the value of each pixel in the HSV color space.

[0188] (2) Determine the color type:

[0189] To distinguish red and white koi, you need to make a comprehensive judgment based on the hue (H), saturation (S) and brightness (V) values. The following is a detailed description of the distinction:

[0190] Red area: Usually the hue H value of the red area will be in the lower range. Therefore, the red area can be judged first by checking whether the hue H value is in the red range.

[0191] White area: The saturation of the white area is extremely low and the brightness V is extremely high. You can check the saturation S and brightness V values ​​to determine whether it is a white area.

[0192] The hue H value of a specific area is judged to determine whether it contains red components. At the same time, the saturation S and brightness V values ​​are combined to determine whether the area also contains white components. If in a specific area, the hue H value is within the red range, and at the same time the saturation S is extremely low and the brightness is extremely high, it can be determined that the area has both red and white, which proves that the koi is red and white.

[0193]

[0194] Identification judgment formula, where R is red koi, W is white koi, and RW is red and white koi.

[0195] Secondly, the device developed by the present invention generally includes a runway area for fish schools, so that the fish schools line up in the runway area in turn and leak into the screening area, and then select fish with specific characteristics through image pickup, image screening, and switch control, which is simple and convenient.

[0196] The specific device is as follows: the present invention provides a single-color and multi-color screening device for red and white koi, including a runway area and a screening area, the runway area includes a bottom plate and a spiral runway, the edge of the bottom plate is provided with a fence, the outer side of the spiral runway is provided with a spiral guardrail, the top of the spiral runway is provided as a fish landing area, the bottom of the spiral runway is provided with a runway exit on the bottom plate, at the runway exit, the spiral guardrail is provided with a baffle, the bottom of the runway area is fixedly provided as a screening area, the screening area includes a mounting frame, a fish leakage pipe, an imaging area and a fish leakage plate, the mounting frame is fixedly installed below the bottom plate of the runway area, the fish leakage pipe It is docked and connected with the runway exit, an imaging area and a fish leakage plate are sequentially arranged in series on the fish leakage pipe, a first photoelectric sensor is arranged above the imaging area, a camera device is arranged at a position corresponding to the imaging area, a second photoelectric sensor is arranged above the fish leakage plate, the fish leakage plate is arranged on the lower side of the fish leakage pipe, a driving device is connected to the fish leakage plate, a selection basket is placed directly below the fish leakage plate, a waste fish collection frame is placed below the bottom of the fish leakage pipe, a controller is installed on the mounting frame, and the camera device, the first photoelectric sensor, the second photoelectric sensor and the driving device are all electrically connected to the controller.

[0197] The above-mentioned red and white koi monochrome and multi-color screening device, the fish leakage pipe is smoothly bent below the runway area and fixed on the mounting frame, and the camera device, the first photoelectric sensor, the second photoelectric sensor, and the driving device are all fixedly mounted on the mounting frame or the fish leakage pipe.

[0198] In the above-mentioned red and white koi single-color and multi-color screening device, a thumbwheel is installed at the edge of the spiral runway near the runway exit, and the rotating shaft of the thumbwheel is arranged at the position of the spiral guardrail or outside the spiral guardrail.

[0199] The above-mentioned red and white koi single-color and multi-color screening device has 2-20 paddles arranged on the paddle wheel.

[0200] The above-mentioned red and white koi monochrome and multi-color screening device has a water inlet arranged below the fish landing area, the water inlet is connected to a water pipe arranged inside the structure of the spiral runway, and the water pipe is connected to an external water supply device.

[0201] The above-mentioned red and white koi single-color and multi-color screening device, the spiral runway and the spiral guardrail are spirally arranged with a height difference of 0.5cm-10cm per layer.

[0202] The above-mentioned red and white koi single-color and multi-color screening device, the driving device is a pneumatic pump to control the opening and closing of the fish leakage plate.

[0203] In the above-mentioned red and white koi monochrome and multi-color screening device, the first photoelectric sensor and the second photoelectric sensor detect the presence or absence of an object through the principle of blocking or reflecting the light beam by the detected object, and the synchronous circuit selects the circuit. The first photoelectric sensor is used to stimulate the camera recognition system of the camera device, and the second photoelectric sensor is an image recognition system that judges the output recognition result based on image recognition. If it is a screening target, it will trigger the driving device at the rear to screen the feature fish to be selected and drop them into the selection basket. If it is a non-target screening object, it will fall into the waste fish collection frame along the fish leakage pipe.

[0204] As attached Figure 1-4 As shown, a red and white koi monochrome and multi-color screening device provided by the present invention comprises a runway area 1 and a screening area, wherein the runway area 1 comprises a bottom plate and a spiral runway 2, a fence 8 is arranged at the edge of the bottom plate, a spiral guardrail 3 is arranged on the outer side of the spiral runway 2, the top of the spiral runway 2 is arranged as a fish landing area 5, a runway exit 6 is opened on the bottom plate of the spiral runway 2, at the runway exit 6, a baffle 7 is arranged continuously on the spiral guardrail 3, the bottom of the runway area 1 is fixedly arranged as a screening area, the screening area comprises an installation frame 15, a fish leakage pipe 19, an imaging area 10 and a fish leakage plate 16, the installation frame 15 is fixedly installed below the bottom plate of the runway area 1, the fish leakage pipe 19 is docked and connected with the runway exit 6, the imaging area 10 and the fish leakage plate 16 are arranged in series on the fish leakage pipe 19, a first photoelectric sensor 17 is arranged above the imaging area 10, and a camera is arranged at a position corresponding to the imaging area 10 Device 9, the imaging area 10 is set as a transparent pipe or opened on the upper side of the fish leakage pipe 19, so that the camera device 9 can clearly capture images, the fish leakage plate 16 is a plate opened on the lower side of the fish leakage pipe 19, the upper end of the fish leakage plate 16 is rotatably connected to the fish leakage pipe 19, and the bottom of the lower end is connected to the driving device 13. The driving device 13 is started to open the fish leakage plate 16 for the selected fish to fall into the selection basket 14 below it, a second photoelectric sensor 11 is arranged above the fish leakage plate 16, the fish leakage plate 16 is arranged on the lower side of the fish leakage pipe 19, the driving device 13 is connected to the fish leakage plate 16, a selection basket 14 is placed directly below the fish leakage plate 16, a waste fish collection frame 12 is placed below the bottom of the fish leakage pipe 19, a controller 18 is installed on the mounting frame 15, and the camera device 9, the first photoelectric sensor 17, the second photoelectric sensor 11 and the driving device 13 are all electrically connected to the controller 18.

[0205] Furthermore, the fish leakage pipe 19 is smoothly bent and fixed on the mounting frame 15 below the runway area 1 , and the camera device 9 , the first photoelectric sensor 17 , the second photoelectric sensor 11 , and the driving device 13 are all fixedly mounted on the mounting frame 15 .

[0206] Furthermore, a thumbwheel 4 is installed on the edge of the spiral runway 2 near the runway exit 6 , and the rotating shaft of the thumbwheel 4 is arranged at the position of the spiral guardrail 3 .

[0207] Furthermore, the dial wheel 4 is provided with four dials.

[0208] Furthermore, a water inlet 20 is set below the fish landing area 5, and a water pipe is connected to the water inlet 20. The water pipe is set inside the structure of the spiral runway 2, and the water pipe is connected to an external water supply device. The fish landing area 5 is set as a circular plate to prevent fish from falling into the water inlet 20.

[0209] Furthermore, the runway area 1 is made of stainless steel plate.

[0210] Furthermore, the spiral runway 2 and the spiral guardrail 3 are spirally arranged with a height difference of 3 cm per layer.

[0211] Furthermore, the driving device 13 is a pneumatic pump that controls the fish leaking plate 16 to open and close.

[0212] Furthermore, the image recognition system of the device including the camera device 9 and the controller 18 is developed based on TensorFlow Lite software, and the image recognition process includes the following steps:

[0213] Step 1: The preparatory stage of image recognition, which removes image noise through filtering, histogram equalization and other methods, and standardizes the brightness and contrast of the image to improve image quality and facilitate subsequent processing;

[0214] Step 2: Feature extraction, extracting salient features that can characterize the target from the image, such as geometric features such as edges, corners, contours, or visual features such as color and texture. Salient features are crucial for subsequent recognition. Commonly used feature extraction algorithms include SIFT, SURF, HOG, etc.

[0215] The third step: classification or matching, this step is the core step of image recognition. According to the features extracted in the second step, the image is compared with the sample images in the database, and the classifier or matching algorithm is used to determine the target category or identity in the image. Commonly used classification methods include SVM, random forest, etc., and matching algorithms include nearest neighbor matching, correlation matching, etc.

[0216] The fourth step is to output the recognition results. According to the image recognition results classified or matched in the third step, subsequent processing is performed, such as target positioning, semantic understanding, etc., and the final recognition results are output.

[0217] Furthermore, the first photoelectric sensor 17 and the second photoelectric sensor 11 detect the presence or absence of an object through the principle of blocking or reflecting the light beam by the detected object, and the synchronous circuit selection circuit. The first photoelectric sensor 17 is used to stimulate the photo recognition system of the camera device 9, and the second photoelectric sensor 11 is an image recognition system that judges the output recognition result based on image recognition. If it is a screening target, it will further trigger the driving device 13 at the rear to screen the feature fish to be selected and drop them into the selection basket 14. If it is a non-target screening object, it will fall into the waste fish collection frame 12 along the fish leakage pipe 19.

[0218] Furthermore, the fish leakage pipe 19 adopts a transparent or translucent plastic pipe with a built-in metal wire. The fish leakage pipe 19 has good support performance, ensuring smooth leakage fish screening.

[0219] During use of the device of the present invention, an external water supply device is started to add sufficient water through the water supply port 20 to prevent insufficient water when the fish are placed in the fish landing area 5, thereby causing harm to the fish. At the same time, sufficient water is provided to the spiral runway 2 to lubricate the runway, thereby facilitating the smooth movement of the fish in the spiral runway 2. After the fish school falls into the spiral runway 2, after passing through the long runway, the fish school will one by one move forward and backward to enter the key point of the runway. Even if there are fish that slip through the net and fall in pairs, they will be automatically pushed apart and pulled apart when passing through the thumbwheel 4. After the fish school enters the fish leakage pipe 19 one by one, the first photoelectric sensor 17 first feedbacks a fish signal. When the fish school passes through the camera device 9, the camera device 9 is triggered to take pictures, and then the image recognition system recognizes and outputs a signal whether it is a screening target object. If it is a screening target, when the second photoelectric sensor 11 senses that the fish has arrived, it will trigger the driving device 13 at the rear to open the fish leakage plate, screen the selected characteristic fish, and drop them into the selection basket 14. If it is a non-target screening object, when the second photoelectric sensor 11 senses that the fish has arrived, it will not trigger the driving device 13 at the rear, and the fish will fall into the waste fish collection frame 12 along the fish leakage pipe 19.

[0220] Example

[0221] 137 red and white koi were collected, including 43 variegated koi and 94 single-color koi, to evaluate the accuracy and speed of the sorting device. The sorting accuracy = accurately identified individuals / 137. Sorting speed = 3600 seconds × 137 samples / 137 sorting time.

[0222] The device sorted 137 red and white koi in 257 seconds. It accurately sorted 36 mixed colors and 94 single colors, while 7 mixed colors were misjudged as single colors. The accuracy was 95%, the sorting speed was 2 seconds per fish, and the single-channel sorting speed was 1,900 fish per hour. It initially realized the transition from "manual selection" to "machine selection" for commercial fish, reducing labor costs. This technology has achieved technological innovation in the sorting process of red and white koi.

[0223] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the implementation modes, and they can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.

Claims

1. A method for using a single-color and multi-color sorting device for red and white koi, wherein: The single-color and multi-color sorting device for red and white koi includes: Install the frame; A fish leakage pipe is arranged on the mounting frame, the upper part of the fish leakage pipe has an imaging area, the lower part is provided with an opening, a fish leakage plate is arranged at the opening, the fish leakage plate is arranged obliquely, and the upper end thereof is rotatably connected to the fish leakage pipe; A driving device connected to the lower end of the fish leakage plate, the driving device can drive the lower end of the fish leakage plate to move so that the fish leakage plate opens or seals the opening; A camera device, which is arranged on the mounting frame or the fish leakage pipe and is opposite to the imaging area; A first photoelectric sensor is arranged above the imaging area and is used to collect the position information of the koi in the fish leaking pipe; A second photoelectric sensor is arranged at the side of the fish leakage pipe and is used to collect the position information of the koi in the fish leakage pipe between the imaging area and the fish leakage plate; a controller connected to the driving device, the camera device, the first photoelectric sensor and the second photoelectric sensor; The method for using the red and white koi single-color and multi-color sorting device comprises the following steps: The fish enter the fish leakage pipe one by one. The first photoelectric sensor firstly feeds back a signal of fish. When the fish pass by the camera device, the camera device is triggered to take a picture. Then, the image recognition system identifies and outputs a signal of whether it is a screening target object. If it is a screening target, when the second photoelectric sensor senses that the fish is coming, the controller controls the rear driving device to start, so that the fish leakage plate is opened, and the selected characteristic fish is screened and falls into the first collector. If it is a non-target screening object, when the second photoelectric sensor senses that the fish is coming, the driving device will not be triggered, and the fish will fall into the second collector along the fish leakage pipe. The method for the image recognition system to identify and output whether it is a screening target object includes the following steps: Step 1: Preprocessing of image recognition 1) Use Gaussian blur to remove noise from the collected original photos of pure red koi, pure white koi, and red and white koi; 2) Define the RGB threshold range of red and white to extract the target outline from the background; 3) Convert the Gaussian blurred image from the RGB color space to the HSV color space of the hexagonal cone model with hue H, saturation S, and brightness V; 4) Apply histogram equalization to standardize the brightness and contrast of the image and improve the image quality; 5) Extract the brightness channel for dilation operation; Step 2: Color classification Extract salient features that can characterize the target from the image; Step 3: Classification or matching Based on the features extracted in the second step, the image is compared with sample images in the database, and a classification or matching algorithm is used to determine the category or identity of the target in the image; Step 4: Output recognition results According to the image recognition results classified or matched in the third step, subsequent processing is performed and the final recognition results are output; In step 3) of the first step, after converting the Gaussian blurred image from the RGB color space into the hexagonal cone model HSV color space of hue H, saturation S, and brightness V, the characteristic value range of pure red and pure white koi in the HSV color space is defined; The color characteristic value range of pure red koi is: Hue H range: 0° ≤ H ≤ 10° Saturation S range: S ≥ 0.70 Brightness V range: V ≥ 0.70; The color characteristic value range of pure white koi is: Hue H range: any value Saturation S range: 0 ≤ S ≤ 0.11 Brightness V range: 0.87 ≤ V ≤ 1; The specific method for determining the target category or identity in an image is: According to the characteristic value range of pure red and pure white koi in HSV color space, it is judged whether it is pure red koi or pure white koi; The hue H value of a specific area is judged to determine whether it contains red components, and the saturation S value and brightness V value are combined to determine whether the area also contains white components. If the hue H value in a specific area meets the red range, and the saturation S value is extremely low and the brightness V value is extremely high, then it is judged that the area has both red and white, which proves that the koi is red and white koi; The discrimination formula is as follows: Among them, R is pure red koi, W is pure white koi, and RW is red and white koi.

Citation Information

Patent Citations

  • A Deep Learning-Based Method and Device for Selecting Koi Fish

    CN106980873B

  • Graded screening machine for live fishes

    CN107484809A

  • Multi-specification screening equipment for fish fry

    CN107667945A

  • Tea recognition method based on image processing

    CN109376257A

  • Dominant hue recognition-based wood color sorting method

    CN113610185A