CN114403023B - 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 PDF

Info

Publication number
CN114403023B
CN114403023B CN202111565293.4A CN202111565293A CN114403023B CN 114403023 B CN114403023 B CN 114403023B CN 202111565293 A CN202111565293 A CN 202111565293A CN 114403023 B CN114403023 B CN 114403023B
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.)
Active
Application number
CN202111565293.4A
Other languages
Chinese (zh)
Other versions
CN114403023A (en
Inventor
李斌
白军朋
王海峰
董创
赵宇亮
曹瑶瑶
郎冲冲
朱君
赵文文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences
Original Assignee
Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences filed Critical Intelligent Equipment Technology Research Center of Beijing Academy of Agricultural and Forestry Sciences
Priority to CN202111565293.4A priority Critical patent/CN114403023B/en
Publication of CN114403023A publication Critical patent/CN114403023A/en
Application granted granted Critical
Publication of CN114403023B publication Critical patent/CN114403023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01KANIMAL HUSBANDRY; CARE OF BIRDS, FISHES, INSECTS; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
    • A01K5/00Feeding devices for stock or game ; Feeding wagons; Feeding stacks
    • A01K5/02Automatic devices
    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01KANIMAL HUSBANDRY; CARE OF BIRDS, FISHES, INSECTS; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
    • A01K11/00Marking of animals
    • A01K11/006Automatic identification systems for animals, e.g. electronic devices, transponders for animals
    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01KANIMAL HUSBANDRY; CARE OF BIRDS, FISHES, INSECTS; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
    • A01K29/00Other apparatus for animal husbandry
    • A01K29/005Monitoring or measuring activity, e.g. detecting heat or mating
    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01KANIMAL HUSBANDRY; CARE OF BIRDS, FISHES, INSECTS; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
    • A01K67/00Rearing or breeding animals, not otherwise provided for; New breeds of animals
    • A01K67/02Breeding vertebrates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0008General problems related to the reading of electronic memory record carriers, independent of its reading method, e.g. power transfer
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P60/00Technologies relating to agriculture, livestock or agroalimentary industries
    • Y02P60/80Food processing, e.g. use of renewable energies or variable speed drives in handling, conveying or stacking
    • Y02P60/87Re-use of by-products of food processing for fodder production

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

Method, device and system for feeding pigs based on terahertz fat thickness measurement
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;
according to actual backfat thickness, adjusting the feeding curve of the to-be-detected pig, and feeding the to-be-detected pig 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 the same size, calculating a directional gradient histogram of each grid unit, and acquiring a sub-feature vector corresponding to each directional gradient histogram;
forming all the sub-feature vectors into feature vectors 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;
according to the terahertz time-domain waveform information, calculating the theoretical backfat thickness of the to-be-detected pig, 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 feeding method comprises the steps of measuring the fat thickness of pigs by using a terahertz technology, wherein the method comprises the following steps of measuring the fat thickness of the pigs by using a terahertz technology, and the method also comprises a memory and a program or instruction which is stored on the memory and can run on the computer, wherein when the program or instruction is executed by the computer, the method for measuring the fat thickness of the pigs by using the terahertz technology performs the steps of the pig feeding method based on the terahertz technology;
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, the terahertz time-domain waveform information of the pigs to be detected is obtained through real-time scanning, the actual backfat thickness of the pigs to be detected is quickly obtained through a pre-trained thickness correction model, the backfat conditions of the pigs in different growth stages in different limiting fences in a pigsty can be accurately, conveniently, quickly and efficiently detected in a non-contact mode, 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.
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 numbers 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 a … …" does not exclude the presence of another identical element 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 the feeding method of the pig based on terahertz fat thickness measurement, 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 be moved in a pigsty, one camera or a camera may be respectively installed above each of the fences, or one camera may be set in each of the preset ranges, and the final purpose is to capture a shot image of the pigsty in real time.
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 terahertz wave beam can be reflected and refracted on the surface of the cortex layer of the pig, refracted light continues to be transmitted on the fat layer of the pig until the fat layer and the lean layer are reached (namely, the interface layer of the fat layer and the lean layer), the wave beam can be reflected and refracted again on the fat layer and the lean layer due to the change of the density of a medium, the reflected wave beam can penetrate through the fat layer again, and the reflected wave beam penetrates through the surface of the cortex layer to be 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 feeding method of 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 backfat 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, 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 robustness of the feature description Fu Duiguang illumination of the back image and environmental changes, reduce local shadows, excessive local exposure and texture distortion of the image, and suppress 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 oriented gradients is a local feature descriptor that describes local texture information of an image, if feature extraction is directly performed on a large image, the effect is poor. Therefore, the present invention first divides the back image into a plurality of smaller Cell cells, for example: the normalized back image is divided into a plurality of grid unit cells with the size of 20 pixels by means of a correlation program, then 2*2 cells form a Block area, and finally all the Block areas form 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).
Figure BDA0003421569080000121
Figure BDA0003421569080000122
The angle of the gradient direction calculated by the above equations (1) and (2) is an arc value in the range of 0 to 360 degrees, and for the sake of simple calculation, the range of the gradient direction is constrained to 0 to 180 degrees, and divided into 9 directions, each of which is 20 degrees, and the constrained angle is divided by 20, so that the value of the gradient direction angle becomes the range [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 Cell unit 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 Block feature vector, and a specific combination mode is to form a Block area by using 2*2 grid Cell cells.
Then, all the feature vectors of the blocks are formed into a 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 dimension of the feature vector of each Block region is 9 dimensions (one dimension is 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, 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 fat-thin boundary layer of the pig to be detected, and generating 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 2 down
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 2 up
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 diagram down And the time length T corresponding to the peak position of the second echo wave beam up
Further, the terahertz time-domain waveform information includes a first flight time length T corresponding to the reception of the first echo beam down Receiving a second flight time length T corresponding to the second echo wave beam up (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:
Figure BDA0003421569080000141
wherein d is the theoretical backfat thickness; c is the speed of light in vacuum; n is 1 Is the backfat refractive index; n is 0 Is the refractive index of air; theta.theta. i Is the incident angle of the terahertz wave beam; t is up Time of flight for the first echo beam; t is a unit of down Is 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 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 acquisition vehicle is provided with a visible light camera for shooting images of pigs in the limiting fence, a terahertz device for acquiring terahertz time-domain waveform information at a target point, and a Radio Frequency Identification (RFID) for acquiring a pig ear tag to acquire the 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 pig information so as to control the action state of the blanking electromagnetic valve of the swinery 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 a 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.
It is emphasized that the target point for backfat thickness measurement is automatically positioned by adopting a target recognition algorithm through the back image of the 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 to the position above any limiting fence, so that the backfat thickness detection of the pigs in the limiting fence can be 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, manpower 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 calculating 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 detected 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 can be 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 backfat 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, 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 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 related to the pig to be detected and is positioned 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 invention provides a pig feeding system based on terahertz fat thickness measurement, which 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; according to actual backfat thickness, adjusting the feeding curve of the to-be-detected pig, and feeding the to-be-detected pig 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 or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several 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; according to actual backfat thickness, adjusting the feeding curve of the to-be-detected pig, and feeding the to-be-detected pig 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; acquiring terahertz time-domain waveform information of the target point, and calculating theoretical backfat thickness of the to-be-detected pig 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, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should 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 (7)

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;
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 acquiring of the 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;
acquiring terahertz time-domain waveform information according to the terahertz time-domain waveform diagram;
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;
the theoretical backfat thickness is calculated according to the following calculation formula:
Figure FDA0004051857730000021
wherein d is the theoretical backfat thickness; c is the speed of light in vacuum; n is 1 Is the backfat refractive index; n is a radical of an alkyl radical 0 Is the refractive index of air; theta i An incident angle of the terahertz wave beam; t is down Is a first flight duration; t is up A second flight duration;
before inputting the theoretical backfat thickness 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.
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 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 to-be-detected pig 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 swinery where the to-be-detected pig is located according to the adjusted feeding curve.
4. 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.
5. The pig feeding method based on terahertz fat thickness measurement according to claim 4, 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.
6. 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 obtaining of the 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;
acquiring terahertz time-domain waveform information according to the terahertz time-domain waveform diagram;
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;
the theoretical backfat thickness is calculated according to the following calculation formula:
Figure FDA0004051857730000051
wherein d is the theoretical backfat thickness; c is the speed of light in vacuum; n is 1 Is the backfat refractive index; n is 0 Is the refractive index of air; theta.theta. i Is the incident angle of the terahertz wave beam; t is a unit of down Is a first flight duration; t is a unit of up A second flight duration;
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;
before inputting the theoretical backfat thickness 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;
pre-training the thickness correction model by using the training sample set;
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.
7. 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 a collection vehicle running on the slide rail, wherein a terahertz detection device and an RFID reader are arranged on the collection vehicle;
further comprising a memory and a program or instructions stored on the memory and executed 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 5;
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.
CN202111565293.4A 2021-12-20 2021-12-20 Pig feeding method, device and system based on terahertz fat thickness measurement Active CN114403023B (en)

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 CN114403023A (en) 2022-04-29
CN114403023B true 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)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4113749A1 (en) * 1991-04-26 1992-11-05 Lba Labor Fuer Bioanalytik Und DEVICE AND METHOD FOR DETERMINING THE THICKNESS OF A FAT LAYER
CN109253701A (en) * 2018-11-09 2019-01-22 中国农业大学 Pig carcass back-fat thickness laser detection system and method
CN109632059B (en) * 2018-12-13 2021-05-14 北京小龙潜行科技有限公司 Intelligent pig raising method and 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
CN110754426B (en) * 2019-11-28 2022-01-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

Also Published As

Publication number Publication date
CN114403023A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
AU2019101786A4 (en) Intelligent pig group rearing weighing method and apparatus, electronic device and storage medium
CN109785337A (en) Mammal counting method in a kind of column of Case-based Reasoning partitioning algorithm
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
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. A vision-based robust grape berry counting algorithm for fast calibration-free bunch weight estimation in the field
CN110689519B (en) Fog drop deposition image detection system and method based on yolo network
CN105651776A (en) Device and method for automatically grading beef carcass meat yield based on computer vision
CN109141248A (en) Pig weight measuring method and system based on image
CN108961330A (en) The long measuring method of pig body and system based on image
CN112288793B (en) Method and device for detecting backfat of livestock individuals, electronic equipment and storage medium
CN113947734A (en) Pig physical sign information acquisition method and system
CN112184791A (en) Yak weight prediction method based on CNN-LSTM neural network
CN114403023B (en) Pig feeding method, device and system based on terahertz fat thickness measurement
CN112508890B (en) Dairy cow body fat rate detection method based on secondary evaluation model
Wu et al. Body condition score for dairy cows method based on vision transformer
CN113762745A (en) Live pig body shape assessment method and device based on machine vision
CN112331345A (en) Cow body fat rate detection method based on direct evaluation model
KR20210069987A (en) Crop growth diagnosis system and method using image
CN114403089B (en) Laying poultry feeding method, device and system based on terahertz eggshell thickness measurement
CN115294181B (en) Cow body type assessment index measurement method based on two-stage key point positioning
CN101799427B (en) Online observing method and system of plant callus reproductive output based on image processing
Van Daalen et al. Determining fresh tomato weight using depth images from an AR headset

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