CN108871520A - Livestock body weight measurement and device - Google Patents

Livestock body weight measurement and device Download PDF

Info

Publication number
CN108871520A
CN108871520A CN201810735603.4A CN201810735603A CN108871520A CN 108871520 A CN108871520 A CN 108871520A CN 201810735603 A CN201810735603 A CN 201810735603A CN 108871520 A CN108871520 A CN 108871520A
Authority
CN
China
Prior art keywords
livestock
picture
image data
body weight
segmentation
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.)
Pending
Application number
CN201810735603.4A
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810735603.4A priority Critical patent/CN108871520A/en
Priority to PCT/CN2018/108289 priority patent/WO2020006899A1/en
Publication of CN108871520A publication Critical patent/CN108871520A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01GWEIGHING
    • G01G17/00Apparatus for or methods of weighing material of special form or property
    • G01G17/08Apparatus for or methods of weighing material of special form or property for weighing livestock

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of livestock body weight measurement and device, the livestock body weight measurement includes:Image data is obtained, described image data are to carry out different angle shooting to the livestock to generate;Image segmentation is carried out to the image data of the livestock, obtains segmentation picture;Indicate that the pixel of the livestock calculates the livestock in the projected area of different shooting angles according in the segmentation picture;The livestock is carried out to the measured body weight of the livestock in the projected area input measured body weight function of different shooting angles.Solve the problems, such as that the efficiency and accuracy rate of livestock measured body weight in the prior art is not high using livestock body weight measurement disclosed in this invention and device.

Description

Livestock body weight measurement and device
Technical field
The present invention relates to animal husbandry field more particularly to a kind of livestock body weight measurements and device.
Background technique
It is usually to take people in order to grasp the changes of weight and growth situation of livestock in time in animal husbandry field The method of work measurement or artificial estimation livestock weight, the method not only inefficiency, accuracy rate is not high, and manual measurement is also It is easy to generate physical injury to livestock.
For this purpose, how to improve the efficiency of livestock measured body weight and accuracy rate still have it is to be solved.
Summary of the invention
In order to solve the above-mentioned technical problem, it is an object of the present invention to provide a kind of livestock body weight measurement and dresses It sets.
Wherein, the technical scheme adopted by the invention is as follows:
On the one hand, a kind of livestock body weight measurement, including:Image data is obtained, described image data are to the domestic animal Poultry carries out what different angle shooting generated;Image segmentation is carried out to the image data of the livestock, obtains segmentation picture;According to institute Stating in segmentation picture indicates that the pixel of the livestock calculates the livestock in the projected area of different shooting angles;By the livestock The measured body weight of the livestock is carried out in the projected area input measured body weight function of different shooting angles.
On the other hand, a kind of livestock body weigher, including:Data reception module, it is described for obtaining image data Image data is to carry out different angle shooting to the livestock to generate;Image segmentation module, for the image to the livestock Data carry out image segmentation, obtain segmentation picture;Area calculation module, for indicating the livestock according in the segmentation picture Pixel calculate the livestock in the projected area of different shooting angles;Measured body weight module is used for the livestock in difference The projected area input measured body weight function of shooting angle carries out the measured body weight of the livestock.
In one exemplary embodiment, described device further includes:Denoising module, for calling filter to the figure As data progress denoising, so that described image segmentation is the described image data based on denoising.
In one exemplary embodiment, described image segmentation module includes:Locations of contours unit, for different shooting angles The livestock spent in picture represented by generated image data carries out locations of contours, obtains the livestock in the picture Profile;Area division unit, for according to the livestock where the picture is divided into livestock by the profile in the picture Region and background region;Grayvalue transition unit will be located at where the livestock for traversing the pixel in the picture The grayvalue transition of pixel is the first specified gray value in region, and will be positioned at the gray value of pixel in the background region Be converted to the second specified gray value;Picture forms unit and forms different shootings for the traversal of pixel in the picture to be done The corresponding segmentation picture of angle.
In one exemplary embodiment, the corresponding segmentation picture of different shooting angles includes the corresponding segmentation figure of depression angle Piece and the corresponding segmentation picture of side view angle, the area calculation module include:Number of pixels statistic unit, for for vertical view The corresponding segmentation picture of angle and the corresponding segmentation picture of side view angle count the picture that gray value is the first specified gray value respectively Plain number obtains the corresponding sum of all pixels of depression angle and the corresponding sum of all pixels of side view angle;Area definition unit, for The corresponding sum of all pixels of depression angle as the livestock depression angle projected area, and with the corresponding pixel of side view angle Sum as the livestock side view angle projected area.
In one exemplary embodiment, the described first specified gray value is 255, and the second specified gray value is 0.
In one exemplary embodiment, described device further includes:Sample data obtains module, carries weight mark for obtaining The sample image data of label, the sample image data are to carry out different angle shooting to livestock sample to generate, the weight Label indicates the actual weight of the livestock sample;Fitting module is used for according to the sample image data to linear regression Unknown fitting parameter in equation is fitted, and obtains optimal fitting parameter;Function generation module, being used for will be described optimal quasi- It closes the parameter substitution unknown fitting parameter and is input to the linear regression equations, obtain the measured body weight function.
In one exemplary embodiment, described device further includes:Screening module is used for the livestock in different shooting angles The projected area of degree is screened, and the projected area of not up to specified threshold is given up.
On the other hand, a kind of livestock body weigher, including processor and memory are stored with meter on the memory Calculation machine readable instruction, the computer-readable instruction realize livestock measured body weight side as described above when being executed by the processor Method.
On the other hand, a kind of computer readable storage medium is stored thereon with computer program, the computer program quilt Processor realizes livestock body weight measurement as described above when executing.
In the above-mentioned technical solutions, different angle shooting image data progress image point generated is carried out using to livestock It cuts, obtains segmentation picture, according to projection of the pixel calculating livestock in different shooting angles for indicating livestock in this segmentation picture Area, and then livestock is kept away in the measured body weight of the projected area input measured body weight function progress livestock of different shooting angles The weight of manpower-free's measurement or artificial estimation livestock, to solve the efficiency of livestock measured body weight in the prior art and accurate The not high problem of rate.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and in specification together principle for explaining the present invention.
Fig. 1 is the schematic diagram of related implementation environment according to the present invention.
Fig. 2 is a kind of hardware block diagram of server shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of livestock body weight measurement shown according to an exemplary embodiment.
Fig. 4 be in Fig. 3 corresponding embodiment step 330 in the flow chart of one embodiment.
Fig. 5 is the schematic diagram of related depression angle shooting livestock according to the present invention.
Fig. 6 is the schematic diagram of related side view angle shot livestock according to the present invention.
Fig. 7 is the schematic diagram of the corresponding segmentation picture of related depression angle according to the present invention.
Fig. 8 is the schematic diagram of the corresponding segmentation picture of related side view angle according to the present invention.
Fig. 9 is the flow chart of another livestock body weight measurement shown according to an exemplary embodiment.
Figure 10 be in Fig. 3 corresponding embodiment step 330 in the flow chart of another embodiment.
Figure 11 be in Fig. 3 corresponding embodiment step 350 in the flow chart of one embodiment.
Figure 12 is a kind of block diagram of livestock body weigher shown according to an exemplary embodiment.
Through the above attached drawings, it has been shown that the specific embodiment of the present invention will be hereinafter described in more detail, these attached drawings It is not intended to limit the scope of the inventive concept in any manner with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate idea of the invention.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is a kind of schematic diagram of implementation environment involved in livestock body weight measurement.The implementation environment includes livestock 110, the acquisition equipment 130 of different angle shooting is carried out to livestock 110 and carries out the server 150 of measured body weight to livestock.
Wherein, acquisition equipment 130 can be independent picture pick-up device, for example, video camera, video recorder etc. have image data The electronic equipment for acquiring function can also be the electronic equipment for carrying camera, for example, smart phone, tablet computer, notebook Computer etc., is not defined herein.
Further, acquisition equipment 130 is laid in the four of livestock 110 for the shooting actually required angle of livestock 110 Week, for example, the top of livestock 110 is laid in, to carry out the shooting of depression angle to livestock 110, alternatively, being laid in livestock 110 Side, with to livestock 110 carry out side view angle shooting, or, be laid in the front end of livestock 110, with to livestock 110 into The shooting of the positive angle of row.
Wireless or wired network connection has been pre-established between acquisition equipment 130 and server 150, and then has passed through net Network connection realizes that the data between acquisition equipment 130 and server 150 are transmitted, for example, data are to carry out different angle to livestock Shoot image data generated.
Based on the interaction between server 150 and acquisition equipment 130, server 150 can get image data, in turn Thus the measured body weight for carrying out livestock automatically using this image data avoids the weight of manual measurement or artificial estimation livestock, It is simple and convenient, the efficiency of livestock measured body weight is not only effectively improved, but also fully ensure that the standard of livestock measured body weight True rate.
Fig. 2 is a kind of hardware block diagram of server shown according to an exemplary embodiment.With this hardware configuration Server can be used for measuring the weight of livestock and be deployed in implementation environment shown in FIG. 1.
It should be noted that the server, which is one, adapts to example of the invention, it must not believe that there is provided to this Any restrictions of the use scope of invention.The server can not be construed to need to rely on or must have in Fig. 2 to show Illustrative server 200 in one or more component.
The hardware configuration of the server can generate biggish difference due to the difference of configuration or performance, as shown in Fig. 2, clothes Business device 200 include:Power supply 210, interface 230, at least a memory 250 and at least central processing unit (CPU, a Central Processing Units)270。
Wherein, power supply 210 is used to provide operating voltage for each hardware device on server 200.
Interface 230 includes an at least wired or wireless network interface 231, at least a string and translation interface 233, at least one defeated Enter output interface 235 and at least USB interface 237 etc., is used for and external device communication.
The carrier that memory 250 is stored as resource, can be read-only memory, random access memory, disk or CD Deng the resource stored thereon includes operating system 251, application program 253 and data 255 etc., and storage mode can be of short duration It stores or permanently stores.Wherein, operating system 251 is for managing and each hardware device in control server 200 and answering It can be Windows with program 253 to realize calculating and processing of the central processing unit 270 to mass data 255 ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..Application program 253 be based on operating system 251 it The upper computer program for completing at least one particular job, may include an at least module (being not shown in Fig. 2), each module The series of computation machine readable instruction to server 200 can be separately included.Data 255 can be stored in disk Photo, picture etc..
Central processing unit 270 may include the processor of one or more or more, and be set as through bus and memory 250 communications, for the mass data 255 in operation and processing memory 250.
As described in detail above, memory will be read by central processing unit 270 by being applicable in server 200 of the invention The form of the series of computation machine readable instruction stored in 250 completes livestock body weight measurement.
In addition, also can equally realize the present invention by hardware circuit or hardware circuit combination software, therefore, this hair is realized The bright combination for being not limited to any specific hardware circuit, software and the two.
Referring to Fig. 3, in one exemplary embodiment, a kind of livestock body weight measurement is suitable for implementing ring shown in Fig. 1 The structure of the server in border, the server can be as shown in Figure 2.
This kind of livestock body weight measurement can be executed by server, may comprise steps of:
Step 310, image data is obtained.
Wherein, image data is to carry out different angle shooting to livestock to generate.
Image data can be also possible to be stored in advance in server from the image data that acquisition equipment acquires in real time Image data.That is, server can carry out the image data real-time after acquisition equipment collects image data Processing, can also be stored in advance reprocessing.For example, being handled when server process task is less, alternatively, grasping The specified time for making personnel is handled.
For server, accessed image data can be the acquisition current acquired image of equipment Data are also possible to pre-stored image data in server, i.e., by transferring being acquired by acquisition equipment for a historical time The image data arrived, herein without limiting.
And just acquire for equipment, image data accessed by server is acquired by acquisition equipment, both can be with It is that acquisition equipment actively uploads acquired image data, is also possible to the figure initiated in response to server to acquisition equipment As data acquisition request, and acquired image data are uploaded to server, is also not limited herein.
Acquisition equipment can be laid in the surrounding of livestock, for example, being laid in the top of livestock, side, front end etc., accordingly Ground, image data are then to shoot the image of generation according to the angle laid of acquisition equipment, this image can be depression angle Livestock, be also possible to the livestock of side view angle, or the livestock of positive angle, be also not limited herein.
In an embodiment in the specific implementation, the angle laid of acquisition equipment is the top and side of livestock, correspondingly, The shooting that different angle is carried out to livestock refers to that shooting angle is depression angle and side view angle, as a result, acquired image Data include the corresponding image data of depression angle and the corresponding image data of side view angle.
Further, image data includes dynamic image data and static image data.Dynamic image data refers to video Deng the dynamic image including multiple image, relative to dynamic image data, it includes one that static image data, which then can be picture etc., The still image of frame image.Candidate livestock measured body weight is executed based on this, in the present embodiment can be based on multiple image Video carries out, and can also be carried out based on the picture of single-frame images.
It should be noted that no matter image data is the video of multiple image or the picture of single-frame images, image data It is that subsequent livestock measured body weight is executed as unit of frame.
So, acquired image data are more, then frame number is more, fully guarantee the essence of subsequent livestock measured body weight with this Accuracy.
Step 330, image segmentation is carried out to the image data of livestock, obtains segmentation picture.
Image segmentation, be in order to which picture represented by image data is divided into livestock region and background region, This background region refers to the region not comprising livestock.It is also understood that image segmentation is substantially by the same area In pixel assign identical gray value so that the pixel in different zones has different gray values, so that picture number According in represented picture livestock and background separation.
Divide picture as a result, refers to the picture being made of livestock region and background region, i.e., where livestock The gray value of pixel is different from the gray value of pixel in background region in region.
It remarks additionally herein, for convenience in image segmentation, the surrounding of livestock shelter and ground are coated in advance with It is different from the color of livestock itself body colour, so that the livestock and background in picture represented by image data are capable of forming color pair Than.
For example, empty column pigsty and ground are coated in advance with green, then, pig then forms with background in captured picture Color contrast, i.e. white and green, and then be conducive to separate the pig in picture and background.
In an embodiment in the specific implementation, image segmentation can be binary conversion treatment, i.e., will scheme represented by image data The gray value of pixel is set as 0 (black) or 255 (whites) in piece, so that segmentation picture shows in white and black effect Fruit is finally completed the separation of livestock and background.
Specifically, it is assumed that shooting angle includes depression angle and side view angle, as shown in figure 4, step 330 may include with Lower step:
Step 331, it is corresponding to obtain depression angle through binary conversion treatment for the image data generated by depression angle shooting livestock Segmentation picture.
Step 333, it is corresponding to obtain side view angle through binary conversion treatment for the image data generated by side view angle shot livestock Segmentation picture.
Still using livestock as pig for example, as shown in figure 5, for the pig that depression angle is shot, by binary conversion treatment, i.e., The corresponding segmentation picture of depression angle can be obtained, as shown in Figure 7.
As shown in fig. 6, it is corresponding that side view angle can be obtained by binary conversion treatment in the pig for side view angle shot Divide picture, as shown in Figure 8.
Step 350, according to projected area of the pixel calculating livestock in different shooting angles for indicating livestock in segmentation picture.
It should be appreciated that weight=volume × density, for the one species livestock grown in identical environment, unit bodies Long-pending quality, that is, density is identical, it is possible to influence of the negligible density to the weight of this one species livestock, this one species domestic animal Substantially there is close relationships with the volume of livestock for the weight of poultry, i.e. the volume of livestock is bigger, then the weight of livestock is heavier.
In order to execute subsequent livestock measured body weight, need to know the volume of livestock, in the present embodiment, the volume of livestock by Livestock is indicated in the projected area of different shooting angles.
That is, for livestock depression angle projected area=livestock length × it is wide, for livestock at side view angle Projected area=livestock length × height of degree, alternatively, for livestock positive angle projected area=livestock width × height, i.e., It can correspondingly indicate volume=livestock length × width × height of livestock.
In an embodiment in the specific implementation, the projected area by livestock in depression angle, side view angle indicates livestock Volume.
Further, since livestock is in the projected area of different shooting angles, for corresponding to different shooting angles points For cutting picture, the region area of livestock region in the corresponding segmentation picture of different shooting angles is physically referred to.
It is appreciated that picture is typically denoted as pixel, i.e., picture is formed by thousands of a pixels, and with pixel ash Color representated by angle value forms color possessed by picture.
As a result, in the present embodiment, livestock is in the projected area of different shooting angles, the i.e. corresponding segmentation of different shooting angles The region area of livestock region in picture, can be by indicating that the pixel of livestock is calculated in corresponding picture.
Further, since acquired image data are not limited only to single frames, then correspond to multiple image data, difference is clapped Segmentation picture corresponding to angle is taken the photograph there is also multiframe, projected area of the livestock being thus calculated in different shooting angles Certainly will exist multiple.
So, consider that acquisition equipment is likely to occur Single Point of Faliure, alternatively, acquisition equipment acquired image data exist clearly It clear the problem of spending, is likely to cause that image segmentation is wrong, and then causes livestock calculated in the projection of different shooting angles Area is unqualified.
Further, since the mobility of livestock, livestock captured by different shooting angles may not be complete individuals, then counted The livestock of calculation cannot embody the volume of livestock in the projected area of different shooting angles completely, i.e., unqualified.
For this purpose, also the projected area to livestock in different shooting angles is screened, is given up not up in the present embodiment The projected area of specified threshold abandons underproof projected area, so that only qualified projected area can be held The subsequent livestock measured body weight of row.
Certainly, specified threshold can be flexibly set according to practical application scene, for example, in the survey to livestock weight In the more demanding application scenarios of accuracy of measurement, biggish specified threshold is set, so that livestock is on the perspective plane of different shooting angles Product maximizes as far as possible.
By so set, further increasing the accuracy rate of livestock measured body weight.
Step 370, livestock is carried out to the weight of livestock in the projected area input measured body weight function of different shooting angles Measurement.
Measured body weight function, for calculating the weight of livestock in the projected area of different shooting angles according to livestock, i.e., pair For measured body weight function, livestock is input in the projected area of different shooting angles, and the weight of livestock is then output.
Specifically, it is assumed that shooting angle includes depression angle and side view angle, then measured body weight function is represented as follows Calculation formula (1):
Y=a ' × x1+b ' × x2 (1).
Wherein, a ', b ' are optimal fitting parameter, and x1 indicates livestock in the projected area of depression angle, and x2 indicates that livestock exists The projected area of side view angle, y indicate the weight of livestock.
As a result, obtain livestock depression angle, side view angle projected area after, can according to calculation formula (1), The weight of livestock is calculated.
Further, as previously mentioned, if there is livestock in depression angle, multiple projected areas of side view angle, then gesture Multiple weight of livestock must can be calculated.
For this purpose, for multiple weight of livestock, average calculating operation will be carried out to multiple weight of livestock in the present embodiment, and The weight final as livestock using the average value that operation obtains, and then fully ensure that the accuracy rate of livestock measured body weight.
Building process of measured body weight function is illustrated at this as follows.
In an embodiment in the specific implementation, as shown in figure 9, this building process may comprise steps of:
Step 410, the sample image data for carrying weight label is obtained.
Wherein, sample image data is to carry out different angle shooting to livestock sample to generate, and weight label indicates domestic animal Raise the actual weight of sample.
Step 430, the unknown fitting parameter in linear regression equations is fitted according to sample image data, is obtained Optimal fitting parameter.
Step 450, optimal fitting parameter is substituted into unknown fitting parameter and is input to linear regression equations, obtain weight survey Flow function.
In the present embodiment, measured body weight function substantially carries out the unknown fitting parameter in linear regression equations What fitting obtained.
Specifically, shown in linear regression equations such as calculation formula (2):
N=a × m1+b × m2 (2).
Wherein, a, b are unknown fitting parameter, and m1 indicates livestock sample in the projected area of depression angle, and m2 indicates livestock In the projected area of side view angle, n indicates the actual weight of livestock sample.
From the foregoing, it will be observed that fitting, is to be overlooked using the actual weight n and corresponding livestock sample of a large amount of livestock samples Projected area m1, m2 of angle, side view angle continuously adjusts unknown fitting parameter a, b so that unknown fitting parameter a, b by Optimal fitting parameter a ', b ' are gradually converged to, it is final to realize curve represented by linear regression equations, it infinitely approaches by livestock sample This collection of curves constituted in the projected area of depression angle, side view angle with the actual weight of corresponding livestock sample.
After determining optimal fitting parameter a ', b ', this optimal fitting parameter a ', b ' can be substituted unknown fitting parameter A, b is input to calculation formula (2), and then forms calculation formula (1) to get measured body weight function is arrived.
In short, fitting, is the process that unknown fitting parameter is solved based on projected area known to livestock sample and weight, And measure, then it is the process that livestock weight is solved based on known optimal fitting parameter and the projected area of livestock.
It should be noted that the actual weight of livestock sample can be artificial survey before measured body weight function is unstructured It measures, is also possible to manually estimation and obtains, be not defined herein.
And livestock sample livestock in depression angle, the calculating process of the projected area of side view angle, with previous embodiment It is almost the same in the calculating process of depression angle, the projected area of side view angle, it no longer describes in detail herein.
By process as described above, realizes automatic measurement livestock weight, avoid manually realizing, be effectively improved with this The efficiency and accuracy rate of livestock measured body weight.
In addition, will not only cause physical injury to livestock, and be convenient to grasp in real time the changes of weight of livestock and at Long situation.
In one exemplary embodiment, before step 330, method as described above can also include the following steps:
Filter is called to carry out denoising to image data, so that image segmentation is the picture number based on denoising According to.
As previously mentioned, with the interaction between acquisition equipment and server, image data will be uploaded to clothes by acquisition equipment Business device.It is appreciated that image data transmission process in, certainly will there is the interference of other signals, for example, other signals be make an uproar Sound.
For this purpose, for image data, calling filter to carry out denoising in the present embodiment, guaranteeing subsequent image with this The precision of segmentation.This is filter-incorporated in server, including but not limited to:Mean filter, median filter, bilateral filter Wave device, one-sided filter, Gaussian filter etc..
Under the action of above-described embodiment, image data is avoided to be distorted by noise jamming, subsequent image point is avoided with this Cut accuracy rate that is wrong, and then fully ensure that subsequent livestock measured body weight.
Referring to Fig. 10, in one exemplary embodiment, step 330 may comprise steps of:
Step 332, the livestock in picture represented by image data generated to different shooting angles carries out locations of contours, obtains To profile of the livestock in picture.
As previously mentioned, binary conversion treatment, substantially sets 0 for the gray value of pixel in picture represented by image data (black) or 255 (whites) are finally completed livestock and background so that segmentation picture shows in white and black effect Separation.
As a result, before carrying out gray value conversion, it is necessary first to which picture represented by image data is divided into livestock institute In region and background region, and then it is convenient to subsequent respectively to the pixel progress gray value conversion in different zones.
In the present embodiment, region division is realized by locations of contours, i.e., profile inner region is livestock region, and Profile exterior domain is background region.For example, as shown in Figure 7, Figure 8, profile is livestock and background in segmentation picture Line of demarcation.
Specifically, it calls image segmentation function to carry out locations of contours to picture represented by image data, this can be obtained The profile of livestock in picture.
For example, image segmentation function is findContours function, this findContours function can pass through openCV The operation of application program and called by server.
Certainly, in other embodiments, if the application program run is different, the image segmentation that server is called Also correspondingly different from, the present embodiment are not limited with this function.
It is noted that profile of the livestock in picture is required to embody livestock volume completely, i.e. this profile It can be appreciated that be largest contours of the livestock in picture, for example, largest contours when depression angle, as shown in fig. 7, side view Largest contours when angle, as shown in figure 8, fully ensureing the accuracy of livestock measured body weight with this.
Step 334, picture is divided into livestock region and background region by the profile according to livestock in picture.
Step 336, the pixel in picture is traversed, is the first finger by the grayvalue transition for being located at pixel in livestock region Determine gray value, and is the second specified gray value by the grayvalue transition for being located at pixel in background region.
It should be appreciated that pixel is matrix arrangement mode in picture, i.e., it first is booked pixel by column in the first row, then in the second row It is booked pixel by column, and so on, until last line is booked pixel by column.
Correspondingly, in picture pixel traversal, that is, refer to by row by the pixel in Leie time scanned picture.
So, for the pixel scanned, if this pixel is located at livestock region, by the gray scale of this pixel Value is converted into the first specified gray value, for example, the first specified gray value is 255 when binary conversion treatment;If this pixel is located at back Scape region then converts the second specified gray value for the gray value of this pixel, for example, second is specified when binary conversion treatment Gray value is 0.
Certainly, in other embodiments, the first specified sum of the grayscale values second specifies gray value can be according to practical application field Scape is flexibly set, as long as the gray value of pixel is different from the gray value of pixel in background region i.e. in livestock region Can, the present embodiment is not limited with this.
Step 338, in picture to be done pixel traversal, form the corresponding segmentation picture of different shooting angles.
In the above process, as shown in Figure 7, Figure 8, divide in picture, livestock region is white, and background region For black, so that segmentation picture shows in white and black effect, and then the separation of livestock and background is completed.
Certainly, in other embodiments, shooting angle, which can also be, looks up angle, posterior view point, positive angle etc., not It is confined to depression angle and side view angle, the present embodiment does not constitute this and limits.
Figure 11 is please referred to, in one exemplary embodiment, the corresponding segmentation picture of different shooting angles includes depression angle Corresponding segmentation picture and the corresponding segmentation picture of side view angle.
Correspondingly, step 350 may comprise steps of:
Step 351, for the corresponding segmentation picture of depression angle and the corresponding segmentation picture of side view angle, statistics is grey respectively Angle value is the number of pixels of the first specified gray value, obtains the corresponding sum of all pixels of depression angle and the corresponding pixel of side view angle Sum.
Step 353, using the corresponding sum of all pixels of depression angle as livestock in the projected area of depression angle, and with side view The corresponding sum of all pixels of angle as livestock side view angle projected area.
Still to be illustrated shown in Fig. 7, Fig. 8, for white area, i.e., in livestock region gray value be 255 picture Plain number is counted to arrive the sum of all pixels of livestock region, and the region area of livestock region is indicated with this.
For black region, i.e., gray value is counted for 0 number of pixels to get to background institute in background region Sum of all pixels in region indicates the region area of background region with this.
As previously mentioned, region area is substantially the projected area that livestock is directed to different shooting angles.
Either depression angle or side view angle as a result, can be obtained livestock in the projected area of corresponding shooting angle, And then it is input to measured body weight function and the weight of livestock can be obtained.
Following is apparatus of the present invention embodiment, can be used for executing livestock body weight measurement according to the present invention.It is right The undisclosed details in apparatus of the present invention embodiment, the method for please referring to livestock body weight measurement according to the present invention are real Apply example.
Figure 12 is please referred to, in one exemplary embodiment, a kind of livestock body weigher 900 includes but is not limited to:Number According to receiving module 910, image segmentation module 930, area calculation module 950 and measured body weight module 970.
Wherein, data reception module 910 is to carry out different angle shooting to livestock for obtaining image data, image data It generates.
Image segmentation module 930 is used to carry out image segmentation to the image data of livestock, obtains segmentation picture.
Area calculation module 950 is used to calculate livestock according to the pixel of expression livestock in segmentation picture in different shooting angles Projected area.
Measured body weight module 970 is used to carry out livestock in the projected area input measured body weight function of different shooting angles The measured body weight of livestock.
In one exemplary embodiment, a kind of livestock body weigher, including processor and memory.
Wherein, it is stored with computer-readable instruction on memory, realization when which is executed by processor Livestock body weight measurement in the various embodiments described above.
In one exemplary embodiment, a kind of computer readable storage medium, is stored thereon with computer program, the calculating The livestock body weight measurement in the various embodiments described above is realized when machine program is executed by processor.
It should be noted that livestock body weigher provided by above-described embodiment is carrying out the processing of livestock measured body weight When, only the example of the division of the above functional modules, in practical application, it can according to need and divide above-mentioned function With being completed by different functional modules, i.e., the internal structure of livestock body weigher will be divided into different functional modules, with Complete all or part of function described above.
In addition, livestock body weigher and the embodiment of livestock body weight measurement provided by above-described embodiment belong to Same design, the concrete mode that wherein modules execute operation are described in detail in embodiment of the method, herein It repeats no more.
Above content, preferable examples embodiment only of the invention, is not intended to limit embodiment of the present invention, this Field those of ordinary skill central scope according to the present invention and spirit can be carried out very easily corresponding flexible or repaired Change, therefore protection scope of the present invention should be subject to protection scope required by claims.

Claims (10)

1. a kind of livestock body weight measurement, which is characterized in that including:
Image data is obtained, described image data are to carry out different angle shooting to the livestock to generate;
Image segmentation is carried out to the image data of the livestock, obtains segmentation picture;
Indicate that the pixel of the livestock calculates the livestock in the projected area of different shooting angles according in the segmentation picture;
The livestock is carried out to the measured body weight of the livestock in the projected area input measured body weight function of different shooting angles.
2. the method as described in claim 1, which is characterized in that the image data to the livestock carries out image segmentation, Before obtaining segmentation picture, the method also includes:
Filter is called to carry out denoising to described image data, so that described image segmentation is based on described in denoising Image data.
3. the method as described in claim 1, which is characterized in that the image data to the livestock carries out image segmentation, Segmentation picture is obtained, including:
The livestock in picture represented by image data generated to different shooting angles carries out locations of contours, obtains the domestic animal Raise the profile in the picture;
The picture is divided into livestock region and background region according to profile of the livestock in the picture;
The pixel in the picture is traversed, is the first specified ash by the grayvalue transition for being located at pixel in the livestock region Angle value, and be the second specified gray value by the grayvalue transition for being located at pixel in the background region;
The traversal of pixel in the picture to be done forms the corresponding segmentation picture of different shooting angles.
4. method as claimed in claim 3, which is characterized in that the corresponding segmentation picture of different shooting angles includes depression angle Corresponding segmentation picture and the corresponding segmentation picture of side view angle, it is described according to the picture for indicating the livestock in the segmentation picture Element calculates the livestock in the projected area of different shooting angles, including:
For the corresponding segmentation picture of depression angle and the corresponding segmentation picture of side view angle, counting gray value respectively is the first finger The number of pixels for determining gray value obtains the corresponding sum of all pixels of depression angle and the corresponding sum of all pixels of side view angle;
Using the corresponding sum of all pixels of depression angle as the livestock in the projected area of depression angle, and it is corresponding with side view angle Sum of all pixels as the livestock side view angle projected area.
5. the method as claimed in claim 3 or 4, which is characterized in that the first specified gray value is 255, and described second refers to Determining gray value is 0.
6. the method as described in claim 1, which is characterized in that it is described by the livestock different shooting angles projected area Before input measured body weight function carries out the measured body weight of the livestock, the method also includes:
The sample image data for carrying weight label is obtained, the sample image data is to carry out different angle bat to livestock sample Regimen at, the weight label indicates the actual weight of the livestock sample;
The unknown fitting parameter in linear regression equations is fitted according to the sample image data, obtains optimal fitting Parameter;
The optimal fitting parameter is substituted into the unknown fitting parameter and is input to the linear regression equations, obtains the body Resurvey flow function.
7. the method as described in claim 1, which is characterized in that it is described by the livestock different shooting angles projected area Before input measured body weight function carries out the measured body weight of the livestock, the method also includes:
Projected area to the livestock in different shooting angles is screened, and the perspective plane of not up to specified threshold is given up Product.
8. a kind of livestock body weigher, which is characterized in that including:
Data reception module, for obtaining image data, described image data are that different angle shooting life is carried out to the livestock At;
Image segmentation module carries out image segmentation for the image data to the livestock, obtains segmentation picture;
Area calculation module, for dividing the pixel calculating livestock for indicating the livestock in picture in different bats according to described Take the photograph the projected area of angle;
Measured body weight module carries out institute for the projected area input measured body weight function by the livestock in different shooting angles State the measured body weight of livestock.
9. a kind of livestock body weigher, which is characterized in that including:
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor The livestock body weight measurement as described in any one of claims 1 to 7 is realized when row.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The livestock body weight measurement as described in any one of claims 1 to 7 is realized when being executed by processor.
CN201810735603.4A 2018-07-06 2018-07-06 Livestock body weight measurement and device Pending CN108871520A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810735603.4A CN108871520A (en) 2018-07-06 2018-07-06 Livestock body weight measurement and device
PCT/CN2018/108289 WO2020006899A1 (en) 2018-07-06 2018-09-28 Method and device for measuring weight of livestock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810735603.4A CN108871520A (en) 2018-07-06 2018-07-06 Livestock body weight measurement and device

Publications (1)

Publication Number Publication Date
CN108871520A true CN108871520A (en) 2018-11-23

Family

ID=64299422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810735603.4A Pending CN108871520A (en) 2018-07-06 2018-07-06 Livestock body weight measurement and device

Country Status (2)

Country Link
CN (1) CN108871520A (en)
WO (1) WO2020006899A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109579956A (en) * 2018-12-13 2019-04-05 北京小龙潜行科技有限公司 A kind of intelligent limit method for measuring weight, device, electronic equipment and storage medium of raising pigs
CN109632059A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligence method for culturing pigs, system, electronic equipment and storage medium
CN109632058A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligent group rearing method for measuring weight, device, electronic equipment and storage medium of raising pigs
CN110288580A (en) * 2019-06-25 2019-09-27 深圳德里克设备有限公司 Measurement method, measuring device and the readable storage medium storing program for executing of livestock weight
CN110480644A (en) * 2019-07-08 2019-11-22 华南农业大学 A kind of pig farm crusing robot based on UWB positioning
CN111008560A (en) * 2019-10-31 2020-04-14 重庆小雨点小额贷款有限公司 Livestock weight determination method, device, terminal and computer storage medium
CN111121932A (en) * 2019-12-24 2020-05-08 秒针信息技术有限公司 Method and device for measuring weight of livestock
CN111150402A (en) * 2020-01-02 2020-05-15 秒针信息技术有限公司 Method, device, storage medium and electronic device for determining livestock form parameters
CN111639777A (en) * 2019-03-01 2020-09-08 北京海益同展信息科技有限公司 Method and device for estimating target weight
CN111888775A (en) * 2020-06-05 2020-11-06 祝爱莲 Stable airflow speed regulating and controlling system
CN111985477A (en) * 2020-08-27 2020-11-24 平安科技(深圳)有限公司 Monocular camera-based animal body online claims checking method and device and storage medium
CN112461342A (en) * 2020-11-04 2021-03-09 青岛丰禾星普科技有限公司 Aquatic product weighing method, terminal equipment and storage medium
CN113077485A (en) * 2021-04-28 2021-07-06 北京神州慧达信息技术有限公司 Artificial intelligence-based reference-free measuring method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19918100A1 (en) * 1999-04-22 2000-10-26 Helmut Niklaus Compact mobile device for contactless weight measurement of living animals, preferably pigs in stalls, has image acquisition unit, distance measurement device, positioning aid, computer
CN101144705A (en) * 2007-07-25 2008-03-19 中国农业大学 Method for monitoring pig growth using binocular vision technology
CN102509085A (en) * 2011-11-19 2012-06-20 江苏大学 Pig walking posture identification system and method based on outline invariant moment features
CN203206909U (en) * 2013-05-09 2013-09-25 中国农业大学 Data acquisition device and pig growth form detection system using same
CN106662437A (en) * 2014-06-17 2017-05-10 玛精能手股份有限公司 Method and device for automated parameters calculation of object

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235550B (en) * 2013-04-15 2015-06-17 南京农业大学 System and method for monitoring growth parameters of piglets in nursery box

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19918100A1 (en) * 1999-04-22 2000-10-26 Helmut Niklaus Compact mobile device for contactless weight measurement of living animals, preferably pigs in stalls, has image acquisition unit, distance measurement device, positioning aid, computer
CN101144705A (en) * 2007-07-25 2008-03-19 中国农业大学 Method for monitoring pig growth using binocular vision technology
CN102509085A (en) * 2011-11-19 2012-06-20 江苏大学 Pig walking posture identification system and method based on outline invariant moment features
CN203206909U (en) * 2013-05-09 2013-09-25 中国农业大学 Data acquisition device and pig growth form detection system using same
CN106662437A (en) * 2014-06-17 2017-05-10 玛精能手股份有限公司 Method and device for automated parameters calculation of object

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020119659A1 (en) * 2018-12-13 2020-06-18 北京小龙潜行科技有限公司 Intelligent pig group rearing weighing method and apparatus, electronic device and storage medium
CN109632059A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligence method for culturing pigs, system, electronic equipment and storage medium
CN109632058A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligent group rearing method for measuring weight, device, electronic equipment and storage medium of raising pigs
CN109579956A (en) * 2018-12-13 2019-04-05 北京小龙潜行科技有限公司 A kind of intelligent limit method for measuring weight, device, electronic equipment and storage medium of raising pigs
CN109632059B (en) * 2018-12-13 2021-05-14 北京小龙潜行科技有限公司 Intelligent pig raising method and system, electronic equipment and storage medium
CN109632058B (en) * 2018-12-13 2020-06-02 北京小龙潜行科技有限公司 Intelligent pig raising group weight measuring method and device, electronic equipment and storage medium
CN111639777B (en) * 2019-03-01 2023-09-29 京东科技信息技术有限公司 Method and device for estimating target body weight
CN111639777A (en) * 2019-03-01 2020-09-08 北京海益同展信息科技有限公司 Method and device for estimating target weight
CN110288580A (en) * 2019-06-25 2019-09-27 深圳德里克设备有限公司 Measurement method, measuring device and the readable storage medium storing program for executing of livestock weight
CN110480644A (en) * 2019-07-08 2019-11-22 华南农业大学 A kind of pig farm crusing robot based on UWB positioning
CN111008560A (en) * 2019-10-31 2020-04-14 重庆小雨点小额贷款有限公司 Livestock weight determination method, device, terminal and computer storage medium
CN111121932A (en) * 2019-12-24 2020-05-08 秒针信息技术有限公司 Method and device for measuring weight of livestock
CN111150402A (en) * 2020-01-02 2020-05-15 秒针信息技术有限公司 Method, device, storage medium and electronic device for determining livestock form parameters
CN111888775A (en) * 2020-06-05 2020-11-06 祝爱莲 Stable airflow speed regulating and controlling system
CN111985477A (en) * 2020-08-27 2020-11-24 平安科技(深圳)有限公司 Monocular camera-based animal body online claims checking method and device and storage medium
CN112461342A (en) * 2020-11-04 2021-03-09 青岛丰禾星普科技有限公司 Aquatic product weighing method, terminal equipment and storage medium
CN113077485A (en) * 2021-04-28 2021-07-06 北京神州慧达信息技术有限公司 Artificial intelligence-based reference-free measuring method

Also Published As

Publication number Publication date
WO2020006899A1 (en) 2020-01-09

Similar Documents

Publication Publication Date Title
CN108871520A (en) Livestock body weight measurement and device
JP4416795B2 (en) Correction method
JP3935499B2 (en) Image processing method, image processing apparatus, and image processing program
WO2020128134A1 (en) Data denoising based on machine learning
US10645364B2 (en) Dynamic calibration of multi-camera systems using multiple multi-view image frames
US8908989B2 (en) Recursive conditional means image denoising
US10796141B1 (en) Systems and methods for capturing and processing images of animals for species identification
CN109688351A (en) A kind of image-signal processing method, device and equipment
CN112232978B (en) Aquatic product length and weight detection method, terminal equipment and storage medium
CN107111781A (en) Fish counting device, fish method of counting, fish number prediction meanss, fish number Forecasting Methodology, fish number system and fish number forecasting system
CN111972700B (en) Cigarette appearance detection method and device, equipment, system and medium thereof
CN112862757A (en) Weight evaluation system based on computer vision technology and implementation method
CN108805851A (en) A kind of appraisal procedure and device of image noise in time domain
CN108846837A (en) Body surface defect inspection method and device
WO2019210707A1 (en) Image sharpness evaluation method, device and electronic device
CN109934789A (en) Image de-noising method, device and electronic equipment
Fan et al. Application of blind deconvolution approach with image quality metric in underwater image restoration
CN110349206B (en) Method and related device for detecting human body symmetry
CN111444555A (en) Temperature measurement information display method and device and terminal equipment
CN110287902A (en) Livestock and poultry lifetime detection method, device, equipment and computer program product
CN108764040A (en) A kind of image detecting method, terminal and computer storage media
CN105472405B (en) Remind generation method and device
WO2018214900A1 (en) Storage apparatus, mobile terminal and image processing method thereof
CN113645419B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN112995518A (en) Image generation method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123