CN114403023A - Pig feeding method, device and system based on terahertz fat thickness measurement - Google Patents
Pig feeding method, device and system based on terahertz fat thickness measurement Download PDFInfo
- Publication number
- CN114403023A CN114403023A CN202111565293.4A CN202111565293A CN114403023A CN 114403023 A CN114403023 A CN 114403023A CN 202111565293 A CN202111565293 A CN 202111565293A CN 114403023 A CN114403023 A CN 114403023A
- Authority
- CN
- China
- Prior art keywords
- pig
- terahertz
- thickness
- backfat
- detected
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000005259 measurement Methods 0.000 title claims abstract description 72
- 238000001514 detection method Methods 0.000 claims abstract description 64
- 238000012937 correction Methods 0.000 claims abstract description 55
- 239000013598 vector Substances 0.000 claims description 40
- 238000012549 training Methods 0.000 claims description 26
- 238000010586 diagram Methods 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000004891 communication Methods 0.000 claims description 8
- 230000003287 optical effect Effects 0.000 claims description 7
- 230000036544 posture Effects 0.000 claims description 5
- 230000009471 action Effects 0.000 claims description 3
- 241000282887 Suidae Species 0.000 abstract description 52
- 230000008901 benefit Effects 0.000 abstract description 9
- 238000004519 manufacturing process Methods 0.000 abstract description 8
- 230000008569 process Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000003860 storage Methods 0.000 description 7
- 238000009395 breeding Methods 0.000 description 5
- 230000001488 breeding effect Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000010606 normalization Methods 0.000 description 4
- 210000000577 adipose tissue Anatomy 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 230000006651 lactation Effects 0.000 description 2
- 230000004962 physiological condition Effects 0.000 description 2
- 210000003491 skin Anatomy 0.000 description 2
- 210000000683 abdominal cavity Anatomy 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000007822 coupling agent Substances 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000008021 deposition Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 210000002615 epidermis Anatomy 0.000 description 1
- 210000003195 fascia Anatomy 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 235000013372 meat Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000003205 muscle Anatomy 0.000 description 1
- 230000035764 nutrition Effects 0.000 description 1
- 235000016709 nutrition Nutrition 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K5/00—Feeding devices for stock or game ; Feeding wagons; Feeding stacks
- A01K5/02—Automatic devices
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K11/00—Marking of animals
- A01K11/006—Automatic identification systems for animals, e.g. electronic devices, transponders for animals
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K29/00—Other apparatus for animal husbandry
- A01K29/005—Monitoring or measuring activity, e.g. detecting heat or mating
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K67/00—Rearing or breeding animals, not otherwise provided for; New or modified breeds of animals
- A01K67/02—Breeding vertebrates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/0008—General problems related to the reading of electronic memory record carriers, independent of its reading method, e.g. power transfer
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P60/00—Technologies relating to agriculture, livestock or agroalimentary industries
- Y02P60/80—Food processing, e.g. use of renewable energies or variable speed drives in handling, conveying or stacking
- Y02P60/87—Re-use of by-products of food processing for fodder production
Landscapes
- Life Sciences & Earth Sciences (AREA)
- Environmental Sciences (AREA)
- Engineering & Computer Science (AREA)
- Animal Husbandry (AREA)
- Biodiversity & Conservation Biology (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Birds (AREA)
- Zoology (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Animal Behavior & Ethology (AREA)
- Biophysics (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
The invention provides a method, a device and a system for feeding pigs based on terahertz fat thickness measurement, which comprises the following steps: determining a target point for backfat thickness detection according to the back image of the pig; obtaining terahertz time-domain waveform information of a target point, and calculating theoretical backfat thickness of the pig according to the terahertz time-domain waveform information; inputting the theoretical backfat thickness into a thickness correction model, and obtaining the actual backfat thickness output by the thickness correction model; and adjusting a feeding curve according to the actual backfat thickness so as to feed the pigs. According to the method, the actual backfat thickness of the pig is quickly obtained through the obtained terahertz time-domain waveform information of the pig and the pre-trained thickness correction model, the backfat condition of the pig in different growth stages in different limiting fences in a pigsty can be accurately, conveniently, quickly, efficiently and contactlessly detected, data support is provided for accurate feeding of the pig, feed can be effectively saved, the labor intensity of fat measurement is reduced, and the production benefit of a pig farm is maximized.
Description
Technical Field
The invention relates to the technical field of intelligent equipment and automatic control, in particular to a method, a device and a system for feeding pigs based on terahertz fat thickness measurement.
Background
Backfat is a stratified adipose tissue beneath the skin of the back of a pig, distinct from the soft adipose tissue of the abdominal cavity, which is a hard adipose tissue. The backfat thickness is a key basis for measuring the back fat deposition condition and is also an important index for evaluating live pig breeding and breeding. In the process of large-scale pig raising, the back fat thickness is an important index reflecting the body condition of the pig, the nutrition condition and physical energy reserve of the pig at different physiological stages are reflected, and the fat condition of the pig at different reproduction stages has great influence on the reproduction performance and the lactation performance in lactation. Through judging whether the backfat thickness of the detected pig is in the reasonable thickness range of presetting to the curve of feeding of suitable adjustment to the pig, and then only feeds the pig according to the curve of feeding after the adjustment, can adjust its backfat's thickness to a certain extent.
At present, two widely used pig backfat measuring instruments are provided, one is ultrasonic backfat detection, the contact measurement is carried out, pig hair needs to be removed, a coupling agent needs to be coated, the process is complicated, and the application requirement of the non-contact environment of an actual pig farm cannot be met; the other is a caliper backfat measuring instrument which has low detection precision and can not accurately measure the actual backfat thickness.
In view of this, it is highly desirable to provide a back fat thickness measurement method with high efficiency and high precision to reduce the labor intensity of fat measurement and provide data support for the precise feeding of pigs, so as to meet the fat condition requirements of each pig at different breeding stages and finally improve the production benefits of a pig farm.
Disclosure of Invention
The invention provides a method, a device and a system for feeding pigs based on terahertz fat thickness measurement, which are used for solving the defect that contact measurement is needed in the prior art, can realize high-efficiency and accurate non-contact measurement of the thickness of the backfat, and further can provide a basis for accurate and automatic feeding of the pigs.
In a first aspect, the invention provides a pig feeding method based on terahertz fat thickness measurement, which comprises the following steps: determining a target point for backfat thickness detection according to the back image of the pig to be detected;
obtaining terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information;
inputting the theoretical backfat thickness into a thickness correction model to obtain the actual backfat thickness output by the thickness correction model;
and adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
According to the pig feeding method based on the terahertz fat thickness measurement, provided by the invention, the determination of the target point for the backfat thickness detection according to the back image of the pig to be detected comprises the following steps:
normalizing the back image, and correcting the normalized image by adopting a Gamma correction method to generate a corresponding gray image;
dividing the gray level image into a plurality of grid units with equal sizes, calculating a directional gradient histogram of each grid unit, and acquiring a sub-feature vector corresponding to each directional gradient histogram;
forming all sub-feature vectors into a feature vector corresponding to the back image;
and inputting the feature vectors into a feature vector machine to classify the feature vectors through the feature vector machine, and determining the target point according to a classification result.
According to the pig feeding method based on the terahertz fat thickness measurement, the terahertz time-domain waveform information of the target point is acquired, and the method comprises the following steps:
controlling a terahertz detection device to emit a terahertz wave beam to the target point, and receiving a first echo wave beam reflected by the terahertz wave beam on the surface of the cortex of the pig to be detected and a second echo wave beam reflected by the lean boundary layer of the pig to be detected so as to generate a terahertz time-domain oscillogram;
and acquiring the terahertz time-domain waveform information according to the terahertz time-domain waveform diagram.
According to the pig feeding method based on the terahertz fat thickness measurement, the terahertz time-domain waveform information comprises a first flight time corresponding to the first echo wave beam and a second flight time corresponding to the second echo wave beam;
calculating the theoretical backfat thickness of the to-be-detected pig according to the terahertz time-domain waveform information, and the method comprises the following steps:
calculating the theoretical backfat thickness according to the first flight time length and the second flight time length and by combining the incident angle of the terahertz wave beam and the refractive indexes of the terahertz wave beam in the air and the backfat;
the first flight time is the time between the emission of the terahertz wave beam and the reception of the peak position of the first echo wave beam;
the second flight time is the time between the emission of the terahertz wave beam and the reception of the peak position of the second echo wave beam.
According to the terahertz fat thickness measurement-based pig feeding method provided by the invention, before the theoretical backfat thickness is input into the thickness correction model, the method further comprises the following steps:
obtaining the theoretical backfat thickness of a pig sample, and measuring the actual backfat thickness of the pig sample;
taking the theoretical backfat thickness and the actual backfat thickness of the pig sample as a group of training samples;
acquiring training samples corresponding to pig samples with different standing postures to construct a training sample set;
and pre-training the thickness correction model by utilizing the training sample set.
According to the feeding method for the pig based on the terahertz fat thickness measurement, provided by the invention, the feeding curve of the pig to be measured is adjusted according to the actual backfat thickness, so that the pig to be measured is fed based on the feeding curve, and the method comprises the following steps:
reading the identification of the pig to be detected to obtain the number information of the pig to be detected;
acquiring the pig information of the pig to be detected according to the serial number information of the pig to be detected;
and adjusting the feeding curve of the pig to be detected based on the pig information so as to control the action state of the blanking electromagnetic valve of the pigsty where the pig to be detected is located according to the adjusted feeding curve.
According to the pig feeding method based on the terahertz fat thickness measurement, provided by the invention, after a target point for backfat thickness detection is determined, before terahertz time-domain waveform information of the target point is acquired, the method further comprises the following steps:
and controlling a terahertz detection device to move to the upper part of the pig to be detected, and debugging the incident angle of a terahertz wave beam emitted by the terahertz detection device, so that the terahertz wave beam is focused on the target point.
According to the terahertz fat thickness measurement-based pig feeding method provided by the invention, after the actual backfat thickness output by the thickness correction model is obtained, the method further comprises the following steps:
and controlling the terahertz detection device to move to the upper side of the next pig to be detected so as to obtain the actual backfat thickness of the next pig to be detected.
In a second aspect, the invention further provides a pig feeding device based on terahertz fat thickness measurement, which comprises:
the positioning unit is used for determining a target point for backfat thickness detection according to the back image of the pig to be detected;
the thickness calculation unit is used for acquiring terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information;
the thickness correction unit is used for receiving the theoretical backfat thickness, correcting the theoretical backfat thickness by using the thickness correction model and outputting the actual backfat thickness;
and the feeding execution unit is used for adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
In a third aspect, the invention further provides a pig feeding system based on terahertz fat thickness measurement, which is characterized by comprising: the system comprises a computer, a slide rail arranged above a pigsty, and an acquisition vehicle capable of running on the slide rail, wherein a terahertz detection device and an RFID reader are arranged on the acquisition vehicle;
the pig feed system further comprises a memory and a program or instructions stored on the memory and capable of running on the computer, wherein the program or instructions when executed by the computer perform the steps of the pig feed method based on terahertz fat thickness measurement as set forth in any one of the above;
the terahertz detection device comprises a terahertz transmitter and a terahertz receiver arranged corresponding to the terahertz transmitter; a lens is arranged on the optical path of the terahertz transmitter and the optical path of the terahertz transmitter;
the terahertz detection device is in communication connection with the computer, and the computer is used for calculating the actual backfat thickness of the pig to be detected according to the terahertz time-domain waveform information which is uploaded by the terahertz detection device and related to the pig to be detected;
and the RFID reader is used for reading the identification of the pig to be detected so as to obtain the number information of the pig to be detected.
In a fourth aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for feeding pigs based on terahertz fat thickness measurement as described in any one of the above.
In a fifth aspect, the present invention also provides a non-transitory computer readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the steps of the terahertz fat thickness measurement based pig feeding-only method as described in any one of the above.
According to the method, the device and the system for feeding the pigs based on the terahertz fat thickness measurement, provided by the invention, the terahertz time-domain waveform information of the pigs to be measured is obtained through real-time scanning, the actual backfat thickness of the pigs to be measured is quickly obtained through a pre-trained thickness correction model, the fat condition of the pigs in different growth stages in different limiting fences in a pigsty can be accurately, conveniently, quickly, efficiently and contactlessly detected, data support is provided for realizing accurate feeding of the pigs, the feed can be effectively saved, the labor intensity of fat measurement is reduced, and the production benefit of a pig farm is maximized.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a pig feeding method based on terahertz fat thickness measurement provided by the invention;
FIG. 2 is a schematic diagram of a terahertz time-domain waveform provided by the present invention;
FIG. 3 is a schematic view of the backfat thickness detection principle provided by the present invention;
FIG. 4 is a schematic diagram of a data acquisition mode during a model training phase according to the present invention;
FIG. 5 is a second schematic flow chart of the pig feeding method based on terahertz fat thickness measurement provided by the invention;
FIG. 6 is a schematic structural diagram of a pig feeding device based on terahertz fat thickness measurement provided by the invention;
FIG. 7 is a schematic view of the operation principle of a pig feeding device based on terahertz fat thickness measurement;
FIG. 8 is a schematic structural diagram of a pig feeding system based on terahertz fat thickness measurement provided by the invention;
FIG. 9 is a schematic structural diagram of an electronic device provided by the present invention;
wherein the reference numerals are:
1: a limit fence; 2: a slide rail; 3: a terahertz transmitter; 4: a terahertz receiver; 5: a radio frequency identifier; 6: a lens; 7: a lifting column; 8: and (4) a computer.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that in the description of the embodiments of the present invention, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The terms "upper", "lower", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The method, the device and the system for feeding pigs based on terahertz fat thickness measurement provided by the embodiment of the invention are described below with reference to fig. 1 to 9.
The execution main body of the method for measuring the backfat thickness by the terahertz wave beam can be a computer, and the computer can be arranged on a pigsty field or a remote control room.
Fig. 1 is a schematic flow chart of a pig feeding method based on terahertz fat thickness measurement provided by the invention, as shown in fig. 1, including but not limited to the following steps:
step 101: and determining a target point for backfat thickness detection according to the back image of the pig to be detected.
According to the invention, the pigs in each limiting fence in the pig farm can be shot by presetting a visible light camera or a camera arranged in the pig farm in a overlooking shooting mode so as to obtain the back image of each pig.
Optionally, the visible light camera or the camera may be a camera or a camera that can walk in a pigsty, one camera or a camera may be respectively installed above each of the fences, or one camera or a camera may be set in each preset range, and the final purpose is to capture the pigsty in real time to obtain a captured image.
Further, an image processing technology can be adopted to extract the pigs in the shot images and acquire back images of the pigs.
Further, an object detection algorithm may be employed, for example: and constructing a Histogram of Oriented Gradients (HOG) corresponding to the back image, combining a feature Vector machine (SVM), extracting and classifying the backfat part features of the back image, and judging whether the back image contains a target point according to a classification result, wherein the target point is a measuring position point of the backfat of the pig.
Wherein, the target pig can be any one of all pigs in the pigsty.
Step 102: and acquiring terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the to-be-detected pig according to the terahertz time-domain waveform information.
After a target point for backfat thickness detection is located according to a back image of a pig to be detected, the direction of an emergent beam of the terahertz device is adjusted, a terahertz beam is emitted to the target point according to preset terahertz beam frequency, and an incident point of the terahertz beam is coincided with the target point.
The terahertz wave beam is incident to the body of the pig to be detected, the reflection and the refraction can be generated on the surface of the cortex of the pig, the refracted light is continuously transmitted on the fat layer of the pig until the fat-thin boundary layer is reached (namely, the boundary layer of the fat layer and the thin meat layer), the wave beam can be reflected and refracted again on the fat-thin boundary layer due to the change of the density of the medium, the reflected wave beam can penetrate through the fat layer again, and the reflected wave beam penetrates through the surface of the cortex and is refracted to enter air.
According to the pig feeding method based on the terahertz fat thickness measurement, the terahertz receiver is used for collecting the related wave beams reflected back and entering air through the surface of the cortex, and the terahertz time-domain oscillogram is drawn.
Further, terahertz time-domain waveform information can be acquired according to the terahertz time-domain waveform diagram. And then, calculating the theoretical backfat thickness of the pig to be detected through reflection type single-point detection according to the propagation property and the propagation theory of the wave beam.
Step 103: and inputting the theoretical backfat thickness into a thickness correction model to obtain the actual backfat thickness output by the thickness correction model.
Because the theoretical backfat thickness does not consider factors influencing backfat thickness calculation, such as attenuation of light beams in a fat layer and air, a certain error is usually caused between the theoretical backfat thickness and the actual backfat thickness.
The method adopts a historical test mode to fit the error between the theoretical backfat thickness and the actual backfat thickness under the similar measurement condition, and a thickness correction model is constructed in advance.
After the theoretical backfat thickness of the to-be-detected pig is obtained, the theoretical backfat thickness is input into the thickness correction model, so that the error is corrected by using the thickness correction model, the actual backfat thickness of the to-be-detected pig is output, and the measurement precision of the backfat thickness can be further improved.
And 104, adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
Because the backfat thickness of the pig is an important index for evaluating the breeding of the pig and breeding the pig, the backfat thickness of the pig can be properly adjusted within a certain time range by adjusting the feeding curve of the pig and feeding the pig according to the adjusted feeding curve.
If the backfat thickness of the target pig is not within the preset reasonable thickness range, the feeding curve of the target pig needs to be readjusted, if the backfat thickness is larger than the maximum value of the reasonable thickness range, the target pig is considered to be too fat, the feed input amount of each input time point can be properly reduced, and the specific gravity of materials related to fattening in the feed can be properly adjusted.
Optionally, after the target pig is fed according to the newly formulated feeding curve, the backfat thickness of the target pig after adjustment is detected again at intervals to verify the adjustment effect, and the feeding curve is appropriately adjusted in a micro-manner according to the verification result.
According to the method for feeding the pigs based on the terahertz fat thickness measurement, the actual backfat thickness of the pigs to be measured is quickly obtained through the obtained terahertz time-domain waveform information of the pigs to be measured by means of the pre-trained thickness correction model, the fat condition of the pigs in different growth stages in different limiting fences in a pig house can be accurately, conveniently, quickly, efficiently and contactlessly detected, data support is provided for accurate feeding of the pigs, feed can be effectively saved, the labor intensity of fat measurement is reduced, and the production benefit of a pig farm is maximized.
Based on the content of the foregoing embodiment, as an alternative embodiment, the determining the target point for backfat thickness detection according to the back image of the pig to be detected includes:
step 1: normalizing the back image, and correcting the normalized image by adopting a Gamma correction method to generate a corresponding gray image;
step 2: dividing the gray level image into a plurality of grid units with equal sizes, calculating a directional gradient histogram of each grid unit, and acquiring a sub-feature vector corresponding to each directional gradient histogram;
and step 3: forming all sub-feature vectors into a feature vector corresponding to the back image;
and 4, step 4: and inputting the feature vectors into a feature vector machine to classify the feature vectors through the feature vector machine, and determining the target point according to a classification result.
Specifically, the method adopts a mode of describing the local texture feature HOG of the image and combines with SVM to realize the detection of the target point in the back image.
The overall idea is to divide the back image into a plurality of grid cells (e.g. 20 pixels by 20 pixels) with equal size;
respectively calculating the gradient direction histograms of the grid cells;
a slightly larger area Block is then formed by a certain number of grid cells, for example: forming 1 Block area by 2 × 2 grid unit cells, and calculating a gradient direction histogram of each Block area;
and then, forming the feature vector of the directional gradient histogram of the whole back image by the directional gradient histogram feature vector of the Block region. This feature vector can uniquely describe the back image.
After the feature vectors of the back image are obtained, target detection can be realized by combining with the SVM, and the image is searched.
As an alternative embodiment, the present invention provides an implementation procedure of the histogram of oriented gradients, which is as follows:
1) and carrying out normalization processing on the back image. The purpose of the normalization processing operation is to improve the robustness of the feature descriptor of the back image to illumination and environmental changes, reduce local shadows, local overexposure and texture distortion of the image, and suppress the interference noise of the image as much as possible.
The normalization processing operation may be realized by converting the image into a gray image and then using Gamma correction.
2) And carrying out segmentation processing on the normalized image. Since the histogram of the directional gradient is a local feature descriptor for describing local texture information of an image, the effect is poor if feature extraction is directly performed on a large image. Therefore, the present invention first divides the back image into a plurality of smaller Cell cells, such as: the normalized back image is divided into a plurality of grid Cell cells with the size of 20 pixels by means of a correlation program, then 2 cells by 2 are formed into a Block area, and finally all the Block areas are formed into the back image.
3) And calculating a directional gradient histogram of each grid Cell. After dividing the back image into smaller grid cells, the histogram of the directional gradient of each grid Cell is calculated:
gradient images in the X and Y directions can be solved for each checkered Cell using the first order differential operator function Sobel in OpenCv. Then, the gradient direction and the gradient amplitude of each pixel point in each Cell unit are calculated according to the following formula (1) and formula (2).
The angle of the gradient direction calculated by the above formula (1) and formula (2) is an arc value in a range of 0 to 360 degrees, and for the sake of simple calculation, the range of the gradient direction is constrained to be 0 to 180 degrees and divided into 9 directions, each direction is 20 degrees, and then the constrained angle is divided by 20, so that the value of the gradient direction angle becomes a range of [0, 9 ].
And counting the gradient amplitude in each grid Cell according to the 9 directions, generating a directional gradient histogram with the abscissa X as the gradient direction and the ordinate Y as the gradient amplitude after calculation, and converting each directional gradient histogram into a corresponding sub-feature vector.
4) And performing feature vector normalization on each sub-feature vector. In order to overcome the variation of uneven illumination and the contrast difference between the foreground and the background, the feature vectors calculated by each grid Cell are normalized, for example, by using the CV _ L2 norm in the normaize function in OpenCv.
5) And generating a feature vector corresponding to the back image. Firstly, the feature vectors of all the grid Cell cells form a relatively large feature vector of a Block, and a specific combination mode is that 2 × 2 grid Cell cells form a Block area.
Then, all the Block feature vectors are formed into the feature vector of the back image. The specific combination mode of the feature vectors is to combine the feature vectors corresponding to the Block regions into a feature vector with a larger dimension in an end-to-end connection mode.
For example, an image is divided into m × n Block regions, and the feature vector of each Block region has 9 dimensions (one dimension for each gradient direction). The dimension of the final feature vector of the back image is then m x n x 9.
It should be noted that the target point is mainly located at the fascia of muscle and fat between the sixth rib and the seventh rib of the pig.
According to the pig feeding method based on the terahertz fat thickness measurement, the target point feature in the back image is extracted based on the directional gradient histogram feature, and the feature is classified by combining a support vector machine, so that the target point position for backfat measurement in the back image can be accurately positioned, and the backfat thickness detection precision is effectively improved.
Based on the content of the foregoing embodiment, as an optional embodiment, the acquiring terahertz time-domain waveform information of the target point includes: controlling a terahertz detection device to emit a terahertz wave beam to the target point, and receiving a first echo wave beam reflected by the terahertz wave beam on the surface of the cortex of the pig to be detected and a second echo wave beam reflected by the lean boundary layer of the pig to be detected so as to generate a terahertz time-domain oscillogram; and acquiring the terahertz time-domain waveform information according to the terahertz time-domain waveform diagram.
Fig. 2 is a schematic diagram of a terahertz time-domain waveform provided by the present invention, as shown in fig. 2, a terahertz transmitter transmits a terahertz wave beam, and the terahertz wave beam is focused on a target point on the epidermis of a pig to be detected through a lens; the terahertz wave beam is reflected and refracted on the surface of the pig skin layer respectively, the terahertz receiver firstly receives the first echo wave beam at the moment, and the propagation time from emission to reception is T shown in figure 2down。
Furthermore, part of the terahertz wave beams penetrate through the surface of the cortex layer to enter the fat layer, and can be refracted to continue to be transmitted to the fat-thin boundary layer. The terahertz wave beam is reflected at a certain angle on the fat-thin boundary layer, refracted through the surface of the cortex layer and enters the air again, the terahertz receiver receives the second echo wave beam at the moment, and the propagation time from emission to reception is T shown in figure 2up。
The terahertz wave beam can generate a terahertz time-domain waveform diagram as shown in fig. 2 according to the wave beam received by the terahertz receiver through the propagation process, and the time length T corresponding to the peak position of the first echo wave beam can be accurately read from the diagramdownAnd the time length T corresponding to the peak position of the second echo wave beamup。
Further, the terahertz time-domain waveform information includes a first flight time length T corresponding to the reception of the first echo beamdownReceiving a second flight time length T corresponding to the second echo wave beamup(ii) a Calculating the theoretical backfat thickness of the to-be-detected pig according to the terahertz time-domain waveform information, and the method comprises the following steps:
and calculating the theoretical backfat thickness according to the first flight time and the second flight time and by combining the incident angle of the terahertz wave beam and the refractive indexes of the terahertz wave beam in the air and the backfat.
Fig. 3 is a schematic diagram of a backfat thickness detection principle, and according to fig. 3, in combination with a wave propagation theory, the theoretical backfat thickness can be calculated through reflection type single-point detection, and a calculation formula thereof can be:
wherein d is the theoretical backfat thickness; c is the speed of light in vacuum; n is1Is the backfat refractive index; n is0Is the refractive index of air; thetaiIs the incident angle of the terahertz wave beam; t isupTime of flight for the first echo beam; t isdownIs the time of flight of the second echo beam.
The pig feeding method based on terahertz fat thickness measurement mainly comprises a model training stage and a model application stage from the point of view of the whole execution process.
As an alternative embodiment, before inputting the theoretical backfat thickness into the thickness correction model, a model training phase is performed, which mainly comprises: obtaining the theoretical backfat thickness of a pig sample, and measuring the actual backfat thickness of the pig sample; taking the theoretical backfat thickness and the actual backfat thickness of the pig sample as a group of training samples; acquiring training samples corresponding to pig samples with different standing postures to construct a training sample set; and pre-training the thickness correction model by utilizing a training sample set.
Fig. 4 is a schematic diagram of a data acquisition mode in a model training phase provided by the present invention, and as shown in fig. 4, a guide rail is arranged at a position about 50cm high above a limiting fence of a pigsty, and a collection vehicle can run on the guide rail according to the operation of a user.
The collecting vehicle is provided with a visible light camera for shooting images of pigs in the limiting fence, a terahertz device for collecting terahertz time-domain waveform information at a target point, and a Radio Frequency Identification (RFID) for collecting pig ear tags to obtain serial number information of the pigs.
As shown in fig. 4, each pig is separately housed in one fence, and all the fences are adjacent and arranged in a row.
The collecting vehicle is controlled to move on the guide rail, after the collecting vehicle reaches the position right above any limiting fence, the movement is stopped, the terahertz time-domain waveform information related to the pigs in the limiting fence is collected, the theoretical backfat thickness of the pigs is calculated based on the method of the embodiment, the serial number information of the pigs in the limiting fence is read based on the RFID, and the serial number information are stored in a computer after the serial number information and the serial number information are associated.
And sequentially controlling the collecting vehicle to move to the position right above each limit fence so as to collect the theoretical backfat thickness and the number information of the pigs in each limit fence and generate a text file.
Furthermore, a backfat measuring instrument (such as a RENCO backfat instrument) is adopted to manually measure the actual backfat thickness of each pig respectively, handheld RFID is adopted to read the number information of each pig, the actual backfat thickness of each pig is also stored into the text file, namely, the theoretical backfat thickness and the actual backfat thickness of each pig are recorded in the text file, and the theoretical backfat thickness and the actual backfat thickness of each pig are used as a training sample to construct a training book set.
Further, a correction model of the theoretical backfat thickness and the actual backfat thickness of the pig is established, and the correction model is pre-trained sequentially by using the training samples of the training sample set until the training result is converged, so that the required thickness correction model is obtained.
It should be noted that when collecting terahertz time-domain waveform information related to each pig, various standing postures of the pig can be covered properly so as to enrich training data, and further the trained thickness correction model can process theoretical backfat thickness correction of the pig under various standing postures, so as to further improve the accuracy of the thickness correction.
After the pre-training of the thickness correction model is completed, a model application phase may be performed, including: collecting multiple groups of terahertz time-domain waveform information for the same pig to be detected; evaluating the obtained multiple groups of terahertz time-domain waveform information, and selecting a group of terahertz time-domain waveform information with the highest signal-to-noise ratio as target terahertz time-domain waveform information; calculating the theoretical backfat thickness by using the calculation method in the embodiment; and inputting the theoretical backfat thickness into the trained thickness correction model, so that the actual backfat thickness of the pig to be measured can be accurately predicted.
In conclusion, the method for measuring the backfat thickness provided by the invention overcomes various defects (such as high labor cost, stress reaction of pigs caused by manual fat measurement and the like) of manually measuring the backfat by using a backfat instrument in the prior art, and realizes non-contact, convenient, efficient and stress-free backfat thickness measurement.
Based on the content of the foregoing embodiment, as an alternative embodiment, after obtaining the actual backfat thickness output by the thickness correction model, the method further includes:
reading the identification (generally referred to as ear tag identification) of the pig to be detected by using the RFID to obtain the number information of the pig to be detected; acquiring pig information of the pigs to be detected according to the number information of the pigs to be detected; and adjusting the feeding curve of the pig to be detected based on the information of the pig so as to control the action state of the blanking electromagnetic valve of the pigsty where the pig to be detected is located according to the adjusted feeding curve.
Fig. 5 is a second schematic flow chart of the pig feeding method based on terahertz fat thickness measurement, as shown in fig. 5, the initialization of the relevant device is executed, the acquisition vehicle is controlled to run on the track to the position above the limit fence where the pig to be detected is located, the visible light camera is controlled to shoot the pig to be detected in the limit fence, and then the pig in the shot whole image is extracted to obtain the back image of the pig to be detected.
And then, performing target point feature extraction on the pig back image by using a Histogram of Oriented Gradients (HOG) feature extraction method to judge whether the back image contains a target point for backfat measurement, and if not, controlling the collection vehicle to move continuously to detect the next target to be detected until the obtained back image contains the target point for backfat measurement.
Based on the method of the embodiment, the terahertz time-domain waveform information at the target point of the pig to be detected is obtained, and the actual backfat thickness of the pig is finally calculated.
It should be noted that the volume data acquired in real time can be uploaded and stored to the remote cloud platform.
During operation, the collection car slides on the slide rail, gather serial number and the terahertz time domain waveform information of the pig in different farrowing crates, then all qualified data that will gather all reach the high in the clouds, the high in the clouds is calculated terahertz time domain waveform information, obtain the actual backfat thickness of every pig through the backfat prediction model, send to the customer end (like notebook computer, desktop, cell-phone etc.), with acquire the backfat information and the backfat change curve of every pig in real time, the system still can carry out data analysis for the user, the pig is only grown in the evaluation, the level of feeding, and give suggestion to follow-up feeding, the evaluation pig is only grown, feeding level, and the system is provided
Furthermore, pig information such as breeds (sows, boars, piglets and fattening pigs), types, ages in days, physiological conditions and the like of the stored pigs can be called from the remote cloud platform according to the read number information of the pigs.
And finally, integrating the actual backfat thickness of each pig and the information of each pig so as to properly adjust the feeding curve of each pig.
After the adjusted feeding curve of each pig is obtained, the control of the blanking electromagnetic valve of each pigsty can be automatically executed according to the feeding curve by using a PLC (programmable logic controller) and other controllers, so that the control of the feeding amount and the feeding time is realized.
According to the method for feeding the pigs based on the terahertz fat thickness measurement, provided by the invention, the automatic control of feeding of all the pigs in the pigsty can be automatically realized according to the measured actual backfat thickness of each pig and by combining the information of each pig, so that the feed can be effectively saved, the labor input can be reduced, and the production benefit of the pigsty can be maximized.
Based on the content of the foregoing embodiment, as an optional embodiment, after determining the target point for backfat thickness detection, before acquiring the terahertz time-domain waveform information of the target point, the method further includes:
and controlling a terahertz detection device to move to the upper part of the pig to be detected, and debugging the incident angle of a terahertz wave beam emitted by the terahertz detection device, so that the terahertz wave beam is focused on the target point.
The method is characterized in that a target recognition algorithm is adopted, and a target point for backfat thickness measurement is automatically positioned through a back image of a pig to be measured; and then, automatically controlling the position and the height of the terahertz detection device, the position and the pose of a terahertz transmitter and a terahertz receiver in the terahertz detection device and a related lens according to the determined target point, so that the transmitted terahertz wave beam is accurately focused on the target point, and the problem that the accuracy of a detection result is influenced because an actual measurement point is not the target point is avoided.
Based on the content of the foregoing embodiment, as an alternative embodiment, after obtaining the actual backfat thickness output by the thickness correction model, the method further includes: and controlling the terahertz detection device to move to the upper side of the next pig to be detected so as to obtain the actual backfat thickness of the next pig to be detected.
According to the invention, the track is arranged at the top of the pigsty, the terahertz detection device can be automatically controlled to move above any limiting fence, so that the backfat thickness detection of the pigs in the limiting fence is completed.
Optionally, a planned path for backfat thickness detection can be made in advance, the sequence of backfat thickness detection of the pigs in each limiting fence on the path is determined, the planned path is led into a computer for controlling the terahertz detection device to work in advance, and therefore the terahertz detection device is automatically controlled by the computer to traverse each limiting fence in the whole piggery according to the planned path, control over the blanking electromagnetic valves related to each limiting fence is automatically completed, and automatic feeding of all the pigs is achieved. In the whole pigsty feeding management process, artificial participation is not needed, automatic control is comprehensively realized, feed waste caused by artificial subjective feeding is avoided, the aim of feeding according to different backfat thicknesses of pigs is scientifically realized, the labor input is greatly reduced, and the production benefit of a pig farm can be maximized.
Fig. 6 is a schematic structural diagram of a pig feeding device based on terahertz fat thickness measurement provided by the invention, as shown in fig. 6, the pig feeding device mainly comprises a positioning unit 61, a thickness calculating unit 62, a thickness correcting unit 63 and a feeding executing unit 64, wherein:
the positioning unit 61 is mainly used for determining a target point for backfat thickness detection according to a back image of a pig to be detected; the thickness calculation unit 62 is mainly configured to obtain terahertz time-domain waveform information of the target point, and calculate the theoretical backfat thickness of the pig to be measured according to the terahertz time-domain waveform information; the thickness correction unit 63 is pre-stored with a thickness correction model, and is mainly used for receiving the theoretical backfat thickness, correcting the theoretical backfat thickness by using the thickness correction model, and outputting the actual backfat thickness; and the feeding execution unit 64 is used for adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
Fig. 7 is a schematic view of an operation principle of a pig feeding device based on terahertz fat thickness measurement, and as shown in fig. 7, the pig feeding device based on terahertz fat thickness measurement provided by the invention can realize closed-loop feedback control, automatically position a target point for backfat thickness detection through a positioning unit 61, then complete measurement of the backfat thickness of a pig through a thickness calculation unit 62 and a thickness correction unit 63, and then correspondingly adjust a feeding curve of the pig by using a feeding execution unit 64 in combination with growth and physiological conditions of the pig so as to execute accurate feeding of the target pig. And finally, iteratively executing the steps of measuring the back fat of the pigs and feeding the pigs to achieve the purpose of periodically measuring the back fat thickness and formulating and executing a corresponding feeding curve of each pig.
It should be noted that, in the pig feeding device based on terahertz fat thickness measurement provided by the embodiment of the present invention, when in specific operation, the pig feeding method based on terahertz fat thickness measurement described in any one of the above embodiments may be performed, and details of this embodiment are not described herein.
According to the feeding device for the pigs based on the terahertz fat thickness measurement, the actual backfat thickness of the pigs to be measured is quickly obtained through the obtained terahertz time-domain waveform information of the pigs to be measured by means of a pre-trained thickness correction model, the fat condition of the pigs in different growth stages in different limiting fences in a pigsty can be accurately, conveniently, quickly, efficiently and contactlessly detected, data support is provided for accurate feeding of the pigs, feed can be effectively saved, the labor intensity of fat measurement is reduced, and the production benefit of a pig farm is maximized.
Fig. 8 is a schematic structural view of a pig feeding system based on terahertz fat thickness measurement provided by the invention, as shown in fig. 8, the system mainly comprises:
the system comprises a computer 8, a slide rail 2 arranged above a pigsty, and a collection vehicle capable of running on the slide rail 2, wherein a terahertz detection device and an RFID reader 5 are arranged on the collection vehicle;
the device also comprises a memory and a program or instructions stored on the memory and capable of running on the computer, wherein the program or instructions are executed by the computer to execute the steps of the pig feeding method based on terahertz fat thickness measurement.
The terahertz detection device comprises a terahertz transmitter 3 and a terahertz receiver 4 which is arranged corresponding to the terahertz transmitter 3; a lens 6 is arranged on the optical path of the terahertz transmitter 3 and the terahertz transmitter 4;
the terahertz detection device is in communication connection with the computer 8, and the computer 8 is used for calculating the actual backfat thickness of the pig to be detected according to terahertz time-domain waveform information which is uploaded by the terahertz detection device and is related to the pig to be detected and located in the limiting fence 1;
and the RFID reader 5 is used for reading the identification of the pig to be detected so as to obtain the number information of the pig to be detected.
Further, the terahertz detection device can be connected to the slide rail through the lifting column 7 to realize height adjustment of the terahertz detection device.
The pig feeding system based on terahertz fat thickness measurement mainly executes the following operations during operation:
the terahertz time-domain waveform information of the pigs in different limiting fences 1 is collected by the terahertz detection device and input into the computer 8 so as to calculate the theoretical backfat thickness of the pigs.
The theoretical backfat thickness and the actual backfat thickness measured by the backfat instrument are stored in the computer 8 in pairs in advance and are fitted and corrected to obtain a thickness correction model.
And correcting the theoretical backfat thickness by using a thickness correction model to obtain the actual backfat thickness of the pig.
According to the system for measuring the backfat thickness, the actual backfat thickness of the pig to be measured is quickly obtained through the obtained terahertz time-domain waveform information of the pig to be measured and the pre-trained thickness correction model, the backfat condition of the pig in different growth stages in different limiting fences in a pigsty can be accurately, conveniently, quickly, efficiently and contactlessly detected, data support is provided for accurate feeding of the pig, feed can be effectively saved, the labor intensity of backfat measurement is reduced, and the production benefit of a pig farm is maximized.
Fig. 9 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 9, the electronic device may include: a processor (processor)910, a communication Interface (Communications Interface)920, a memory (memory)930, and a communication bus 940, wherein the processor 910, the communication Interface 920, and the memory 930 communicate with each other via the communication bus 940. Processor 910 may invoke logic instructions in memory 930 to perform a pig feed only method based on terahertz measurement of fat thickness, the method comprising: determining a target point for backfat thickness detection according to the back image of the pig to be detected; obtaining terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information; inputting the theoretical backfat thickness into a thickness correction model to obtain the actual backfat thickness output by the thickness correction model; and adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
Furthermore, the logic instructions in the memory 930 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform the method for feeding pigs based on terahertz fat thickness measurement, the method comprising: determining a target point for backfat thickness detection according to the back image of the pig to be detected; obtaining terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information; inputting the theoretical backfat thickness into a thickness correction model to obtain the actual backfat thickness output by the thickness correction model; and adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the method for feeding pigs based on terahertz fat thickness measurement provided in the above embodiments, the method including: determining a target point for backfat thickness detection according to the back image of the pig to be detected; obtaining terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information; inputting the theoretical backfat thickness into a thickness correction model to obtain the actual backfat thickness output by the thickness correction model; and adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A pig feeding method based on terahertz fat thickness measurement is characterized by comprising the following steps:
determining a target point for backfat thickness detection according to the back image of the pig to be detected;
obtaining terahertz time-domain waveform information of the target point, and calculating the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information;
inputting the theoretical backfat thickness into a thickness correction model to obtain the actual backfat thickness output by the thickness correction model;
and adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
2. The pig feeding method based on the terahertz fat thickness measurement according to claim 1, wherein the determining of the target point for backfat thickness detection according to the back image of the pig to be detected comprises:
normalizing the back image, and correcting the normalized image by adopting a Gamma correction method to generate a corresponding gray image;
dividing the gray level image into a plurality of grid units with equal sizes, calculating a directional gradient histogram of each grid unit, and acquiring a sub-feature vector corresponding to each directional gradient histogram;
forming all sub-feature vectors into a feature vector corresponding to the back image;
and inputting the feature vectors into a feature vector machine to classify the feature vectors through the feature vector machine, and determining the target point according to a classification result.
3. The pig feeding method based on the terahertz fat thickness measurement according to claim 1, wherein the obtaining of the terahertz time-domain waveform information of the target point comprises:
controlling a terahertz detection device to emit a terahertz wave beam to the target point, and receiving a first echo wave beam reflected by the terahertz wave beam on the surface of the cortex of the pig to be detected and a second echo wave beam reflected by the lean boundary layer of the pig to be detected so as to generate a terahertz time-domain oscillogram;
and acquiring the terahertz time-domain waveform information according to the terahertz time-domain waveform diagram.
4. The pig feeding method based on the terahertz fat thickness measurement is characterized in that the terahertz time-domain waveform information comprises a first flight time corresponding to the first echo wave beam and a second flight time corresponding to the second echo wave beam;
calculating the theoretical backfat thickness of the to-be-detected pig according to the terahertz time-domain waveform information, and the method comprises the following steps:
calculating the theoretical backfat thickness according to the first flight time length and the second flight time length and by combining the incident angle of the terahertz wave beam and the refractive indexes of the terahertz wave beam in the air and the backfat;
the first flight time is the time between the emission of the terahertz wave beam and the reception of the peak position of the first echo wave beam;
the second flight time is the time between the emission of the terahertz wave beam and the reception of the peak position of the second echo wave beam.
5. The pig feeding method based on terahertz fat thickness measurement according to claim 1, wherein before the theoretical backfat thickness is input into a thickness correction model, the method further comprises the following steps:
obtaining the theoretical backfat thickness of a pig sample, and measuring the actual backfat thickness of the pig sample;
taking the theoretical backfat thickness and the actual backfat thickness of the pig sample as a group of training samples;
acquiring training samples corresponding to pig samples with different standing postures to construct a training sample set;
and pre-training the thickness correction model by utilizing the training sample set.
6. The pig feeding method based on the terahertz fat thickness measurement according to claim 1, wherein the adjusting of the feeding curve of the pig to be tested according to the actual backfat thickness to feed the pig to be tested based on the feeding curve comprises:
reading the identification of the pig to be detected to obtain the number information of the pig to be detected;
acquiring the pig information of the pig to be detected according to the serial number information of the pig to be detected;
and adjusting the feeding curve of the pig to be detected by combining the information of the pig and the actual backfat thickness so as to control the action state of the blanking electromagnetic valve of the pigsty where the pig to be detected is located according to the adjusted feeding curve.
7. The pig feeding method based on the terahertz fat thickness measurement is characterized in that after a target point for backfat thickness detection is determined, and before terahertz time-domain waveform information of the target point is acquired, the method further comprises the following steps:
and controlling a terahertz detection device to move to the upper part of the pig to be detected, and debugging the incident angle of a terahertz wave beam emitted by the terahertz detection device, so that the terahertz wave beam is focused on the target point.
8. The pig feeding method based on terahertz fat thickness measurement according to claim 7, further comprising, after obtaining the actual backfat thickness output by the thickness correction model:
and controlling the terahertz detection device to move to the upper side of the next pig to be detected so as to obtain the actual backfat thickness of the next pig to be detected.
9. The utility model provides a pig feeding device based on fat thickness is measured to terahertz now, its characterized in that includes:
the positioning unit is used for determining a target point for backfat thickness detection according to the back image of the pig to be detected;
the thickness calculation unit is used for acquiring terahertz time-domain waveform information of the target point so as to calculate the theoretical backfat thickness of the pig to be detected according to the terahertz time-domain waveform information;
the thickness correction unit is pre-stored with a thickness correction model and used for receiving the theoretical backfat thickness, correcting the theoretical backfat thickness by using the thickness correction model and outputting the actual backfat thickness;
and the feeding execution unit is used for adjusting the feeding curve of the pig to be tested according to the actual backfat thickness so as to feed the pig to be tested based on the feeding curve.
10. The utility model provides a pig feeding system based on fat thickness is measured to terahertz now, includes: the system comprises a computer, a slide rail arranged above a pigsty, and an acquisition vehicle capable of running on the slide rail, wherein a terahertz detection device and an RFID reader are arranged on the acquisition vehicle;
further comprising a memory and a program or instructions stored on the memory and executable on the computer, the program or instructions when executed by the computer performing the pig feeding method steps based on terahertz fat thickness measurement according to any one of claims 1 to 8;
the terahertz detection device comprises a terahertz transmitter and a terahertz receiver arranged corresponding to the terahertz transmitter; a lens is arranged on the optical path of the terahertz transmitter and the optical path of the terahertz transmitter;
the terahertz detection device is in communication connection with the computer, and the computer is used for calculating the actual backfat thickness of the pig to be detected according to the terahertz time-domain waveform information which is uploaded by the terahertz detection device and related to the pig to be detected;
and the RFID reader is used for reading the identification of the pig to be detected so as to obtain the number information of the pig to be detected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111565293.4A CN114403023B (en) | 2021-12-20 | 2021-12-20 | Pig feeding method, device and system based on terahertz fat thickness measurement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111565293.4A CN114403023B (en) | 2021-12-20 | 2021-12-20 | Pig feeding method, device and system based on terahertz fat thickness measurement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114403023A true CN114403023A (en) | 2022-04-29 |
CN114403023B CN114403023B (en) | 2023-04-18 |
Family
ID=81266677
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111565293.4A Active CN114403023B (en) | 2021-12-20 | 2021-12-20 | Pig feeding method, device and system based on terahertz fat thickness measurement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114403023B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE59207088D1 (en) * | 1991-04-26 | 1996-10-17 | Reinhard Dr Moeller | Device for determining the thickness of a layer of fat |
CN109253701A (en) * | 2018-11-09 | 2019-01-22 | 中国农业大学 | Pig carcass back-fat thickness laser detection system and method |
CN109632059A (en) * | 2018-12-13 | 2019-04-16 | 北京小龙潜行科技有限公司 | A kind of intelligence method for culturing pigs, system, electronic equipment and storage medium |
CN110363101A (en) * | 2019-06-24 | 2019-10-22 | 杭州电子科技大学 | A kind of flowers recognition methods based on CNN Fusion Features frame |
CN110754426A (en) * | 2019-11-28 | 2020-02-07 | 深圳市慧农科技有限公司 | Method and system for automatically detecting backfat body and automatically feeding animals |
CN111751314A (en) * | 2020-05-19 | 2020-10-09 | 中国航空工业集团公司北京长城航空测控技术研究所 | Terahertz-based coating thickness detection method and device |
CN215003448U (en) * | 2021-01-29 | 2021-12-03 | 中国农业大学 | Wireless detection and transmission system for carcass backfat thickness of live pig slaughtering line |
-
2021
- 2021-12-20 CN CN202111565293.4A patent/CN114403023B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE59207088D1 (en) * | 1991-04-26 | 1996-10-17 | Reinhard Dr Moeller | Device for determining the thickness of a layer of fat |
CN109253701A (en) * | 2018-11-09 | 2019-01-22 | 中国农业大学 | Pig carcass back-fat thickness laser detection system and method |
CN109632059A (en) * | 2018-12-13 | 2019-04-16 | 北京小龙潜行科技有限公司 | A kind of intelligence method for culturing pigs, system, electronic equipment and storage medium |
CN110363101A (en) * | 2019-06-24 | 2019-10-22 | 杭州电子科技大学 | A kind of flowers recognition methods based on CNN Fusion Features frame |
CN110754426A (en) * | 2019-11-28 | 2020-02-07 | 深圳市慧农科技有限公司 | Method and system for automatically detecting backfat body and automatically feeding animals |
CN111751314A (en) * | 2020-05-19 | 2020-10-09 | 中国航空工业集团公司北京长城航空测控技术研究所 | Terahertz-based coating thickness detection method and device |
CN215003448U (en) * | 2021-01-29 | 2021-12-03 | 中国农业大学 | Wireless detection and transmission system for carcass backfat thickness of live pig slaughtering line |
Non-Patent Citations (3)
Title |
---|
王卫等: "《优质猪肉冷链运输及物流配送关键技术》", 31 May 2011, 四川科学技术出版社 * |
王文祥: "《微波工程技术》", 30 April 2009, 国防工业出版社 * |
赵书广: "《中国养猪大成》", 31 March 2001, 中国农业出版社 * |
Also Published As
Publication number | Publication date |
---|---|
CN114403023B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107667903B (en) | Livestock breeding living body weight monitoring method based on Internet of things | |
US8787621B2 (en) | Methods and systems for determining and displaying animal metrics | |
Salau et al. | Feasibility of automated body trait determination using the SR4K time-of-flight camera in cow barns | |
Liu et al. | A vision-based robust grape berry counting algorithm for fast calibration-free bunch weight estimation in the field | |
CN109785337A (en) | Mammal counting method in a kind of column of Case-based Reasoning partitioning algorithm | |
Halachmi et al. | Cow body shape and automation of condition scoring | |
EP1537531B1 (en) | Imaging system and method for body condition evaluation | |
CN102959354B (en) | Method and apparatus for for analyzing tree canopies with LiDAR data | |
Liu et al. | Automatic estimation of dairy cattle body condition score from depth image using ensemble model | |
CN109141248A (en) | Pig weight measuring method and system based on image | |
CA2744146A1 (en) | Arrangement and method for determining a body condition score of an animal | |
CN110689519A (en) | Fog drop deposition image detection system and method based on yolo network | |
CN112288793B (en) | Method and device for detecting backfat of livestock individuals, electronic equipment and storage medium | |
Bhoj et al. | Image processing strategies for pig liveweight measurement: Updates and challenges | |
CN113947734A (en) | Pig physical sign information acquisition method and system | |
CN112184791A (en) | Yak weight prediction method based on CNN-LSTM neural network | |
Tonachella et al. | An affordable and easy-to-use tool for automatic fish length and weight estimation in mariculture | |
CN112508890B (en) | Dairy cow body fat rate detection method based on secondary evaluation model | |
CN114403023B (en) | Pig feeding method, device and system based on terahertz fat thickness measurement | |
CN113989538A (en) | Depth image-based chicken flock uniformity estimation method, device, system and medium | |
CN117351404A (en) | Milk cow delivery stress degree judging and recognizing method and system | |
CN117115688A (en) | Dead fish identification and counting system and method based on deep learning under low-brightness environment | |
Wu et al. | Body condition score for dairy cows method based on vision transformer | |
CN115690777A (en) | Mushroom stick maturity identification method and system based on maturity identification device | |
KR102404137B1 (en) | Stationary Livestock weight estimation system based on 3D images and Livestock weight estimation method using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |