A fish pond farming intelligent feeding system and method based on machine vision
Through the machine vision system and artificial bee colony-support vector machine algorithm, the precise feeding of the intelligent feeding system for fish pond breeding is realized, which solves the problem of inaccurate feeding under the timed feeding method and improves the feed utilization rate and breeding efficiency. .
Patent Information
- Application Number
- CN202410272949.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-03-11
AI Technical Summary
Existing aquaculture feeding machines adopt a timed feeding method, which cannot be adjusted according to the actual situation of the fish in the fish pond, resulting in inaccurate feeding time, which may lead to feed waste or malnutrition of the fish, affecting breeding efficiency.
Design an intelligent feeding system for fish pond farming based on machine vision. The number of fish groups is obtained by taking pictures through the visual system. It combines image processing and artificial bee colony-support vector machine algorithm to control the amount of feeding in real time and achieve precise and intelligent feeding.
It improves the feed utilization rate of fish ponds, improves the level of intelligent breeding, and effectively improves the economic benefits of fish pond breeding.
Smart Images

Figure CN118120683B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent feeding equipment design for fish pond farming, and in particular relates to an intelligent feeding system and method for fish pond farming based on machine vision. Background Art
[0002] With the development of the economy, the scale of fish pond farming has been continuously expanded across the country, but the current aquaculture management model is still a primitive and extensive farming method, with low farming efficiency and low feed utilization rate. The existing aquaculture feeding machine mainly adopts the method of timed feeding, and its structure usually includes a feeding box, which is filled with feed and a controller for setting the time and amount of feeding; the feeding machine automatically releases the feed into the fish pond according to the set time for the fish to eat. However, this traditional timed feeding machine can often only feed according to the preset time, and cannot be adjusted according to the actual situation, resulting in inaccurate feeding time, which may cause the fish to fail to get feed at the best time; and the timed feeding method cannot be adjusted according to the actual situation of the fish in the fish pond, which may lead to overfeeding or underfeeding, resulting in feed waste or malnutrition of the fish, thereby affecting the breeding efficiency. Therefore, the present invention develops a fish pond farming intelligent feeding device based on machine vision, which can accurately and intelligently feed according to the number of fish eating in the fish pond, and effectively improve the feed utilization rate. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention provides a machine vision-based intelligent feeding system and method for fish pond farming, which realizes precise intelligent feeding, improves the intelligence level of fish pond farming, increases the utilization rate of fish pond feed, and effectively improves the economic benefits of fish pond farming.
[0004] The present invention achieves the above technical objectives through the following technical means.
[0005] A feeding method using a fish pond farming intelligent feeding system based on machine vision, the fish pond farming intelligent feeding system based on machine vision comprises a feeding machine, a visual system, and a control system; the feeding machine comprises a silo, a feed support plate is arranged at a feed outlet below the silo, a feed distribution hopper is arranged below the feed support plate, a throwing plate is arranged below the feeding hopper, and the throwing plate is connected to an output shaft of a throwing motor; a feeding motor is installed on a feeding motor seat, the output shaft of the feeding motor is connected to the feed support plate through an eccentric connecting rod, and a lead screw is connected to the feeding motor seat through a connecting rod;
[0006] The feeding method includes the following steps:
[0007] Step 1: Turn on the feeder, the feeding motor rotates, the eccentric connecting rod drives the feed support plate to shake, so that the feed slides from the silo through the feed support plate to the feed hopper. After the feed falls into the throwing plate, the throwing motor drives the throwing plate to rotate and throw the feed; at the same time, the visual system starts to take pictures, taking pictures once at a certain interval, and sending the images to the image processing module in the industrial computer of the control system;
[0008] Step 2: The image processing module receives the image and processes the acquired image to obtain the number and category of fish schools feeding in multiple fish ponds, and then further compares it with the fish school number data in the database of the control system, so as to determine the number of fish schools feeding in the fish pond, and compares the feeding amount data in the database to realize the judgment of the feeding amount;
[0009] Step 3: The control system is based on the Arduino mega2560 main control board. According to the corresponding relationship between the feeding amount and the speed of the feeding motor and the throwing motor, it sends signals to the feeding motor driver and the throwing motor driver to control the speed of the feeding motor and the throwing motor, and performs feeding flow control and feed throwing width control to achieve precise feeding.
[0010] Furthermore, in step 2, the specific process of image processing is as follows:
[0011] Step 2.1: The image processing module first performs grayscale processing and filtering on the image of the number of fish feeding in the fish pond;
[0012] Step 2.2: The image processing module performs feature extraction on the image processed in step 2.1, uses the Canny edge detection method to extract the edge features of the image of the fish school eating in the fish pond, and constructs the edge feature vector V1; uses the gray level co-occurrence matrix method to extract the energy, moment of inertia, entropy and correlation in the texture features of the image of the fish school eating in the fish pond, and constructs the texture feature vector V2;
[0013] Step 2.3: The image processing module uses the improved artificial bee colony-support vector machine algorithm to classify and identify the number of fish in the pond:
[0014] Step 2.3.1: Build the SVM model, normalize the input data of the SVM, initialize and extract the SVM penalty factor c and kernel function parameter σ: use the combined edge feature vector V1 and texture feature vector V2 as the input feature vector V of the SVM, V = [V1, V2], set the upper limit of the number of times the leader bee position remains unchanged to L1, set the upper limit of the continuous and unchanged global optimal solution to L2, set the maximum number of iterations to L3, and set the value range of the penalty factor c to [c min 、c max ], the kernel function parameter σ ranges from [σ min , σ max ];
[0015] Step 2.3.2: Use the improved artificial bee colony algorithm to optimize the parameters c and σ, and then assign them to SVM, that is, initialize the artificial bee colony, calculate the fitness value of the initial colony, select the Gaussian radial basis kernel function as the kernel function of the support vector machine, and the fitness value of each artificial colony is the classification accuracy of the support vector machine. Compare the sizes of the fitness values, and the maximum value is the optimal value of the current artificial bee colony.
[0016] Furthermore, in step 2.3.2, the specific process of optimizing the parameters c and σ using the improved artificial bee colony algorithm is as follows:
[0017] First, set the honey source initialization formula as:
[0018] x i,d =L d +rand(0,1)(U d -L d ),i∈[1,N]
[0019] Where N is the number of bee colonies; i is the nectar source; x i,d is the original nectar source; d is the dimension of the nectar source, set to 2, representing the parameters c and σ; U d and L d They are the preset maximum and minimum values of the honey source respectively;
[0020] Evaluate the fitness of the initial nectar source and the new nectar source. The fitness function fit is:
[0021]
[0022] Among them, f i is the objective function value of the solution, which is the classification accuracy of SVM;
[0023] After each search, the scout bee will become the leader bee, recruit follower bees, and share nectar source information, including positive feedback for good nectar sources and negative feedback for bad nectar sources. Each follower bee targets a nectar source by using a roulette wheel selection:
[0024]
[0025] Among them, P i is the selection probability; SN is the number of leader bees;
[0026] In the follower bee search phase, the follower bee conducts random searches near the selected nectar source and optimizes the nectar source update formula. During each information search, the nectar source location corresponding to the previous optimal fitness value is added to the next search. When the number of iterations exceeds three, the new nectar source update formula is:
[0027] v i,d =x i,d+rand(-1,1)(x best1 -x k,d )+rand(-1,1)(x best2 -x k,d )
[0028] Among them, v i,d For new nectar source; x k,d To do this by using a random selection among all nectar sources x k,d Different adjacent nectar sources; x best1 、x best2 They are the nectar source locations corresponding to the two previous optimal fitness values;
[0029] Step 2.3.3: Update the position of the leader bee, and update the current individual optimal solution and the global optimal solution;
[0030] Step 2.3.4: Determine whether the iteration termination condition is met. If the position of the leading bee does not change continuously for L1 times, it will become a scout bee, randomly initialize its own position and search; if the global optimal solution changes discontinuously for L2 times, the inferior leading bee will randomly initialize its own position and search; when the global optimal solution changes discontinuously for 2L2 times or reaches the maximum number of iterations L3, output the fitness value of the point and the global optimal solution, assign the optimal values to c and σ of SVM, and train the SVM after the assignment.
[0031] The present invention has the following beneficial effects:
[0032] The present invention adopts the technical means of machine vision, takes pictures of the feeding conditions of fish in the fish pond, and then analyzes the number of fish eating, and controls the feeding amount of the feeding machine in real time to achieve precise and intelligent feeding, thereby improving the intelligence level of fish pond farming, increasing the utilization rate of fish pond feed, and effectively improving the economic benefits of fish pond farming. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a schematic diagram of the structure of the feeding machine of the present invention;
[0034] Figure 2 This is a flow chart of the feeding process;
[0035] Figure 3 It is a flowchart of the image processing process;
[0036] Figure 4 To improve the artificial bee colony-support vector machine algorithm flow chart;
[0037] In the figure: 1- silo; 2- feed support plate; 3- unloading motor; 4- throwing plate; 5- throwing motor; 6- lead screw; 7- dividing hopper; 8- eccentric connecting rod; 9- unloading motor seat. DETAILED DESCRIPTION
[0038] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments, but the protection scope of the present invention is not limited thereto.
[0039] The machine vision-based intelligent feeding system for fish pond culture of the present invention comprises a feeding machine, a vision system and a control system.
[0040] like Figure 1 As shown, the feeding machine is used to feed fish ponds, including a feed bin 1, a feed support plate 2, a feed discharge motor 3, a feed throwing plate 4, a feed throwing motor 5, a lead screw 6, a feed hopper 7, an eccentric connecting rod 8, and a feed discharge motor seat 9. The silo 1 is located at the top of the feeding machine, the feed support plate 2 is located at the feed outlet below the silo 1, the dividing hopper 7 is located below the feed support plate 2, and the throwing plate 4 is located below the dividing hopper 7; the feeding motor 3 is installed on the feeding motor seat 9, and the output shaft of the feeding motor 3 is connected to the feed support plate 2 through an eccentric connecting rod 8, which can drive the feed support plate 2 to vibrate and transport the feed dropped from the silo 1 to the dividing hopper 7 below. The rotation speed of the feeding motor 3 determines the shaking frequency of the feed support plate 2; the screw 6 is connected to the feeding motor seat 9 through a connecting rod. By adjusting the stroke of the screw 6, the inclination angle of the feeding motor seat 9 can be adjusted, and then the inclination of the feed support plate 2 can be indirectly adjusted, so as to control the feeding flow rate; the output shaft of the throwing motor 5 is connected to the throwing plate 4, which can drive the throwing plate 4 to rotate, thereby throwing the feed, and the rotation speed of the throwing motor 5 determines the throwing distance.
[0041] The visual system includes an industrial camera and related auxiliary equipment (such as fill light). The visual system can be installed next to the feeder through a column, or it can be directly installed on the feeder to take pictures of fish feeding in the fish pond.
[0042] The control system includes hardware equipment and corresponding software control programs. The hardware equipment includes a feeding motor driver, a throwing motor driver, an Arduino mega2560 main control board and an industrial computer. The control system is mainly used to control the rotation speed of the feeding motor 3 and the throwing motor 5, thereby controlling the feeding amount. The industrial computer is integrated with a database and an image processing module. The industrial computer receives the image data obtained by the visual system, and the database stores the image data of fish schools eating in the fish pond at different periods and different species collected by the visual system, and pre-calibrates the corresponding data of the number of eating fish schools according to different images based on artificial experience, and classifies the images of different numbers of fish schools. Corresponding to different feeding amount requirements, users can add, delete and update the data in the database through the industrial computer. The image processing module uses image processing technology to process the images obtained by the visual system and judge the number of fish schools eating in the fish pond.
[0043] Reference Figure 2 , 34. The intelligent feeding method for fish pond farming based on machine vision using the intelligent feeding system for fish pond farming based on machine vision of the present invention comprises the following steps:
[0044] Step 1: Turn on the feeding machine, the feeding motor 3 rotates, the eccentric connecting rod 8 drives the feed support plate 2 to shake, so that the feed slides from the silo 1 through the feed support plate 2 to the distribution hopper 7, and after the feed falls into the throwing plate 4, the throwing motor 5 drives the throwing plate 4 to rotate and throw the feed; at the same time, the industrial camera starts to take pictures, and takes pictures once at a certain interval, and sends the images to the image processing module in the industrial computer;
[0045] Step 2: The image processing module receives the image and processes the acquired image to obtain the number categories of fish feeding in multiple fish ponds, and then further compares it with the fish number data in the database, so as to accurately determine the number of fish feeding in the current fish pond, and compares the feeding amount data in the database to realize the judgment of the feeding amount;
[0046] The image processing process is as follows:
[0047] Step 2.1: The image processing module performs grayscale processing and filtering on the image of the number of fish feeding in the fish pond obtained by the industrial camera;
[0048] Step 2.2: The image processing module performs feature extraction on the image processed in step 2.1, uses the Canny edge detection method to extract the edge features of the image of the fish school eating in the fish pond, and constructs the edge feature vector V1; uses the gray level co-occurrence matrix method to extract the energy, moment of inertia, entropy and correlation in the texture features of the image of the fish school eating in the fish pond, and constructs the texture feature vector V2;
[0049] Step 2.3: The image processing module uses the improved artificial bee colony-support vector machine (IABC-SVM) algorithm to classify and identify the number of fish in the fish pond, as follows:
[0050] Step 2.3.1: Build the SVM model, normalize the SVM input data, initialize and extract the SVM penalty factor c and kernel function parameter σ:
[0051] The combined edge feature vector V1 and texture feature vector V2 are used as the input feature vector V of SVM, V = [V1, V2], the upper limit of the number of times the leader bee position remains unchanged is set to L1, the upper limit of the continuous and unchanged global optimal solution is set to L2, the maximum number of iterations is set to L3, and the value range of the penalty factor c is set to [c min 、c max ], the kernel function parameter σ ranges from [σ min , σ max ];
[0052] Step 2.3.2: Use the improved artificial bee colony (IABC) algorithm to optimize the parameters c and σ, and then assign them to the SVM, that is, initialize the artificial bee colony, calculate the fitness value of the initial colony, select the Gaussian radial basis kernel function as the kernel function of the support vector machine, and the fitness value of each artificial colony is the classification accuracy of the support vector machine. Compare the size of the fitness value, and the maximum value is the optimal value of the current artificial bee colony;
[0053] The process of optimizing the parameters c and σ using the improved artificial bee colony algorithm is as follows:
[0054] First, set the honey source initialization formula as:
[0055] x i,d =L d +rand(0,1)(U d -L d ),i∈[1,N]
[0056] Where N is the number of bee colonies; i is the nectar source; x i,d is the original nectar source; d is the dimension of the nectar source, set to 2, representing the parameters c and σ; U d and L d They are the preset maximum and minimum values of the honey source respectively;
[0057] Evaluate the fitness of the initial nectar source and the new nectar source. The fitness function fit is:
[0058]
[0059] Among them, f i is the objective function value of the solution, which is the classification accuracy of SVM;
[0060] After each search, the scout bee will become the leader bee, recruit follower bees, and share nectar source information, including positive feedback for good nectar sources and negative feedback for bad nectar sources. Each follower bee targets a nectar source by using a roulette wheel selection:
[0061]
[0062] Among them, P i is the selection probability; SN is the number of leader bees;
[0063] In the follower bee search phase, the follower bee conducts a random search near the selected nectar source and selects a new nectar source through a greedy algorithm. The new nectar source update formula is:
[0064] v i,d =x i,d +rand(0,1)(x i,d -x k,d )
[0065] Among them, x i,d For the original nectar source; i,d For new nectar source; x k,d To do this by using a random selection among all nectar sources x k,d Different adjacent nectar sources;
[0066] Since the artificial bee colony algorithm discards the nectar source location corresponding to the best fitness value obtained in each search during the information update process, it is not conducive to improving the overall convergence speed. In order to eliminate this unfavorable factor, the nectar source update formula is optimized. In each information search, the nectar source location corresponding to the previous best fitness value is added to the next search to improve the original algorithm search ability.
[0067] In the improved algorithm, when the number of iterations exceeds three, the new honey source update formula is:
[0068] v i,d =x i,d +rand(-1,1)(x best1 -x k,d )+rand(-1,1)(x best2 -x k,d )
[0069] Among them, x best1 、x best2 They are the nectar source locations corresponding to the two previous optimal fitness values.
[0070] Step 2.3.3: Update the position of the leader bee, and update the current individual optimal solution and the global optimal solution;
[0071] Step 2.3.4: Determine whether the iteration termination condition is met. If the position of the leading bee does not change continuously for L1 times, it will become a scout bee, randomly initialize its own position and search; if the global optimal solution changes discontinuously for L2 times, the inferior leading bee randomly initializes its own position and searches; when the global optimal solution changes discontinuously for 2L2 times or reaches the maximum number of iterations L3, output the fitness value of the point and the global optimal solution, assign the optimal values to c and σ of SVM, and train the SVM after the assignment.
[0072] Step 3: The control system receives the feeding amount information. The Arduino mega2560 main control board sends signals to the feeding motor driver and the throwing motor driver according to the corresponding relationship between the feeding amount and the speed of the feeding motor 3 and the throwing motor 5, controls the speed of the feeding motor 3 and the throwing motor 5, and realizes that the feeding flow of the feeding device is controllable and the throwing width of the throwing device is adjustable. The feeding flow is determined by the feeding amount per unit time, and the throwing width is determined by the speed of the throwing motor, thereby realizing accurate feeding.
[0073] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.
Claims
1. A feeding method using a fish pond farming intelligent feeding system based on machine vision, characterized in that: The machine vision-based intelligent feeding system for fish pond farming comprises a feeding machine, a visual system and a control system; the feeding machine comprises a silo (1), a feed support plate (2) is arranged at a feed outlet below the silo (1), a feed distribution hopper (7) is arranged below the feed support plate (2), a throwing plate (4) is arranged below the feeding hopper (7), and the throwing plate (4) is connected to the output shaft of a throwing motor (5); a feeding motor (3) is mounted on a feeding motor base (9), the output shaft of the feeding motor (3) is connected to the feed support plate (2) through an eccentric connecting rod (8), and a lead screw (6) is connected to the feeding motor base (9) through a connecting rod; The feeding method includes the following steps: Step 1: Turn on the feeding machine, the feeding motor (3) rotates, the eccentric connecting rod (8) drives the feed support plate (2) to shake, so that the feed slides from the feed bin (1) through the feed support plate (2) to the distribution hopper (7), and after the feed falls into the throwing plate (4), the throwing motor (5) drives the throwing plate (4) to rotate and throw the feed; at the same time, the visual system starts to take pictures, takes pictures once at a certain interval, and sends the images to the image processing module in the industrial computer of the control system; Step 2: The image processing module receives the image and processes the acquired image to obtain the number and category of fish schools feeding in multiple fish ponds, and then further compares it with the fish school number data in the database of the control system, so as to determine the number of fish schools feeding in the fish pond, and compares the feeding amount data in the database to realize the judgment of the feeding amount; Step 3: The control system is based on the Arduino mega2560 main control board. According to the corresponding relationship between the feeding amount and the rotation speed of the feeding motor (3) and the throwing motor (5), a signal is sent to the feeding motor driver and the throwing motor driver to control the rotation speed of the feeding motor (3) and the throwing motor (5), thereby controlling the feeding flow rate and the feed throwing width, thereby achieving accurate feeding; In step 2, the specific process of image processing is as follows: Step 2.1: The image processing module first performs grayscale processing and filtering on the image of the number of fish feeding in the fish pond; Step 2.2: The image processing module performs feature extraction on the image processed in step 2.1, uses the Canny edge detection method to extract the edge features of the image of the fish school eating in the fish pond, and constructs the edge feature vector V1; uses the gray level co-occurrence matrix method to extract the energy, moment of inertia, entropy and correlation in the texture features of the image of the fish school eating in the fish pond, and constructs the texture feature vector V2; Step 2.3: The image processing module uses the improved artificial bee colony-support vector machine algorithm to classify and identify the number of fish in the pond: Step 2.3.1: Build the SVM model, normalize the input data of the SVM, initialize and extract the SVM penalty factor c and kernel function parameter σ: use the combined edge feature vector V1 and texture feature vector V2 as the input feature vector V of the SVM, V = [V1, V2], set the upper limit of the number of times the leader bee position remains unchanged to L1, set the upper limit of the continuous and unchanged global optimal solution to L2, set the maximum number of iterations to L3, and set the value range of the penalty factor c to [c min 、c max ], the kernel function parameter σ ranges from [σ min , σ max ]; Step 2.3.2: Use the improved artificial bee colony algorithm to optimize the parameters c and σ, and then assign them to SVM, that is, initialize the artificial bee colony, calculate the fitness value of the initial colony, select the Gaussian radial basis kernel function as the kernel function of the support vector machine, and the fitness value of each artificial colony is the classification accuracy of the support vector machine. Compare the sizes of the fitness values, and the maximum value is the optimal value of the current artificial bee colony.
2. The feeding method according to claim 1, characterized in that In step 2.3.2, the specific process of optimizing the parameters c and σ using the improved artificial bee colony algorithm is as follows: First, set the honey source initialization formula as: x i,d =L d +rand(0,1)(U d -L d ),i∈[1,N] Where N is the number of bee colonies; i is the nectar source; x i,d is the original nectar source; d is the dimension of the nectar source, set to 2, representing the parameters c and σ; U d and L d They are the preset maximum and minimum values of the honey source respectively; Evaluate the fitness of the initial nectar source and the new nectar source. The fitness function fit is: Among them, f i is the objective function value of the solution, which is the classification accuracy of SVM; After each search, the scout bee will become the leader bee, recruit follower bees, and share nectar source information, including positive feedback for good nectar sources and negative feedback for bad nectar sources. Each follower bee targets a nectar source by using a roulette wheel: Among them, P i is the selection probability; SN is the number of leader bees; In the follower bee search phase, the follower bee conducts random searches near the selected nectar source and optimizes the nectar source update formula. During each information search, the nectar source location corresponding to the previous optimal fitness value is added to the next search. When the number of iterations exceeds three, the new nectar source update formula is: v i,d =x i,d +rand(-1,1)(x best1 -x k,d )+rand(-1,1)(x best2 -x k,d ) Among them, v i,d For new nectar source; x k,d To do this by using a random selection among all nectar sources x k,d Different adjacent nectar sources; x best1 、x best2 They are the nectar source locations corresponding to the two previous optimal fitness values; Step 2.3.3: Update the position of the leader bee, and update the current individual optimal solution and the global optimal solution; Step 2.3.4: Determine whether the iteration termination condition is met. If the position of the leading bee does not change continuously for L1 times, it will become a scout bee, randomly initialize its own position and search; if the global optimal solution changes discontinuously for L2 times, the inferior leading bee will randomly initialize its own position and search; when the global optimal solution changes discontinuously for 2L2 times or reaches the maximum number of iterations L3, output the fitness value of the point and the global optimal solution, assign the optimal values to c and σ of SVM, and train the SVM after the assignment.
