WO2022253015A1 - 家畜感温变色耳标、其温度检测方法及系统 - Google Patents

家畜感温变色耳标、其温度检测方法及系统 Download PDF

Info

Publication number
WO2022253015A1
WO2022253015A1 PCT/CN2022/094371 CN2022094371W WO2022253015A1 WO 2022253015 A1 WO2022253015 A1 WO 2022253015A1 CN 2022094371 W CN2022094371 W CN 2022094371W WO 2022253015 A1 WO2022253015 A1 WO 2022253015A1
Authority
WO
WIPO (PCT)
Prior art keywords
temperature
ear tag
color
contour
ellipse
Prior art date
Application number
PCT/CN2022/094371
Other languages
English (en)
French (fr)
Inventor
宋乐
李国良
罗奥成
惠一航
刘宇驰
谢宇涛
武晟祥
陈松林
刘子祯
尹太昕
樊兴宇
杨诗宇
Original Assignee
天津大学四川创新研究院
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
Priority claimed from CN202110614045.8A external-priority patent/CN115428745B/zh
Priority claimed from CN202210243683.8A external-priority patent/CN114305349B/zh
Application filed by 天津大学四川创新研究院 filed Critical 天津大学四川创新研究院
Publication of WO2022253015A1 publication Critical patent/WO2022253015A1/zh

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01KANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
    • A01K11/00Marking of animals
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/01Measuring temperature of body parts ; Diagnostic temperature sensing, e.g. for malignant or inflamed tissue
    • 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
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Definitions

  • the invention belongs to the field of livestock medical instruments, and in particular relates to a temperature-sensitive color-changing ear tag for livestock, a temperature detection method and a system thereof.
  • African swine fever is characterized by a short onset process, the most acute and acute infection mortality rate is as high as 100%, the natural infection incubation period of African swine fever is 5 to 9 days, and the body temperature rises to 41°C when it occurs, and lasts for about four days until 48 days before death. After hours, the body temperature begins to drop, and the clinical symptoms do not gradually appear until the body temperature drops, showing loss of appetite, extreme fragility, rapid pulse, coughing, breathing about one-third faster, obvious dyspnea, and often death on the seventh day after fever, or Symptoms appear only one or two days before death.
  • thermochromic powder is prepared from an electron transfer type organic compound system.
  • Electron-transfer organic compounds are a class of organic chromogenic systems with special chemical structures. At a specific temperature, the molecular structure of the organic substance changes due to electron transfer, thereby achieving color transformation.
  • This color-changing substance is not only bright in color, but also can realize color transition from colored to colorless state. This is not available in heavy metal double salt complex type and liquid crystal type reversible thermochromic substances.
  • Thermochromic powder is a microencapsulated reversible thermochromic substance, called reversible thermochromic color, called thermochromic powder or temperature-changing powder; this product can be used in polypropylene (PP), soft polyvinyl chloride (S- Injection molding and extrusion molding of transparent or translucent plastics such as PVC), AS, ABS and silicone.
  • the existing temperature measurement methods have unavoidable defects.
  • the temperature measurement technology relying on infrared cameras has high maintenance costs and the accuracy is not ideal;
  • the number of networks is limited, it is difficult to cope with high-density centralized breeding, and the cost is still high and does not have the ability to be applied on a large scale;
  • the artificial temperature measurement technology is inefficient and often misses the best disposal time.
  • thermochromic materials into transparent or translucent plastics, and use the characteristics of thermochromic materials to repeatedly change color with the rise and fall of temperature to monitor the body temperature of livestock.
  • camera monitoring at the same time, even black and white cameras can be used to achieve temperature monitoring, which completely replaces the traditional expensive infrared camera or the real-time temperature measurement method of the Internet of Things temperature measurement ear tag, and also avoids the problem of untimely manual measurement and high labor costs.
  • temperature monitoring there are inaccurate temperature monitoring in actual use, so it is necessary to provide a temperature detection method based on the temperature-sensitive color-changing ear tag of livestock.
  • the purpose of the present invention is to use the temperature-sensitive and discoloration characteristics of the existing thermochromic powder to monitor the body temperature of domestic animals so as to detect and treat plague in the early stage of domestic animals.
  • the temperature-sensitive color-changing material is added to the transparent thermoplastic elastic material TPU for injection molding or the glue containing the temperature-sensitive color-changing powder is applied to the side in contact with the livestock.
  • each ear tag of the present invention costs less than 1 yuan, and gets rid of the dependence of traditional temperature measurement methods on expensive infrared equipment, and uses ordinary monitoring Camera; and relative parameters are used instead of absolute parameters, thereby eliminating the interference of other factors other than the color RGB value on the regression model; and the regression analysis model in machine learning is adopted to fit the multi-parameters between the temperature and the RGB value of the ear tag color
  • the regression model can identify and monitor pigs with abnormal body temperature, which greatly reduces the cost of laying. Based on the conventional security monitoring system, real-time temperature detection can be realized to achieve the fastest response and greatly reduce losses.
  • a temperature-sensitive color-changing ear tag for livestock including an ear tag body and a tag neck, and an inverted cone is arranged at the top of the tag neck;
  • the ear tag body includes a part that contacts the skin of the livestock as the first part, and The rest of the ear tag body is the second part;
  • At least the first part contains 1-3wt% thermochromic powder; at least the second part is a transparent or translucent thermoplastic capable of displaying the color of the first part;
  • the temperature-sensitive color-changing powder is a white/colored temperature-sensitive color-changing powder that changes color at 38°C. As the temperature of the contacted livestock increases, the color of the temperature-sensitive color-changing powder gradually becomes darker or lighter. When the temperature reaches 41°C Changes to a tinted/white color that is the opposite of the primary color.
  • the outer surface of the ear specimen body is coated with heat insulating material.
  • the outer surface of the ear tag body is circular, and includes two concentric first and second rings and a discoloration area from the edge inward, and the outer radius of the first ring is larger than the The second ring; the first ring is coated with a non-removable colored pigment; the second ring is coated with a white non-removable pigment, and the part of the discoloration area in contact with the skin of the livestock contains a temperature-sensitive color-changing powder, so The color-changing area can change color as the temperature of the contacted livestock increases; and the color of the first ring pigment is different from that of the second ring.
  • the sum of the diameters of the first ring and the second ring is less than half of the radius of the outer surface of the ear specimen body.
  • the transparent or translucent thermoplastic is selected from the following one: polypropylene, soft polyvinyl chloride, AS, ABS, silica gel, TPU, PMMA, PVC, MS, PET, epoxy resin and common polyethylene.
  • the transparent or translucent thermoplastic is a thermoplastic elastic material, more preferably a transparent TPU material.
  • thermochromic powder is a microencapsulated reversible thermochromic substance.
  • a temperature detection method using a temperature-sensing color-changing ear tag of a pig comprising a temperature-sensing color-changing ear tag worn on the ear of a pig to be monitored, and a monitoring camera set in an area to be monitored;
  • the temperature-sensitive color-changing ear tag for pigs includes a circular ear tag body and a tag neck.
  • the outer surface of the ear tag body is circular, and includes a first ring, a second ring and a discoloration area from the edge inward;
  • the first circular ring is coated with a non-removable colored pigment
  • the second circular ring is coated with a white non-removable pigment
  • the part of the discoloration area in contact with the livestock skin contains a temperature-sensitive discoloration powder, and the discoloration area can follow the
  • the temperature of the contacted livestock increases and changes color; and the color of the first ring pigment is different from the color of the second ring; specifically comprises the following steps:
  • Step 1 Use the monitoring camera in the pig farm to obtain the picture of the pig farm, extract the ear tag image in the picture according to the training model of the ear tag image, and divide the obtained pig farm picture to generate multiple rectangular pictures containing a single ear tag, so as to select Export all the ear tags in the picture;
  • Step 2 Convert the rectangular image containing a single ear tag obtained in step 1 to a uniform size using opencv image processing technology, select a possible center point of the ear tag as the focus of the ellipse, and use the ellipse focus as the focus of the geometric contour of the ear tag.
  • the Canny edge detection algorithm uses the Canny edge detection algorithm to obtain a reasonable edge point set of the image, and then perform binarization processing to convert the image into a single-channel grayscale image, use the findContours tool to retrieve the contour in the image, and obtain the rough contour point set of the earmark in the current image; Then two threshold conditions are set, the obtained rough contour is fitted to a maximum ellipse, and the periphery of the fitted maximum ellipse is considered as the earmark contour, that is, the outer edge of the first ring; the obtained maximum ellipse
  • the parameter of is used as the parameter of the ear tag profile after processing, and described parameter comprises the major axis of maximum ellipse, minor axis and deflection angle;
  • Step 3 Divide the rectangular picture of a single ear tag obtained in Step 1 from outside to inside into three areas: the first reference area, the second reference area, and the discoloration area, corresponding to the first ring, the second ring, and the discoloration area;
  • Relative RGB value (color-changing area RGB value-the first reference area RGB value)/(the second reference area RGB value-the first reference area RGB value) of the relative RGB value of discoloration area;
  • the method for obtaining the "training model of the ear tag image" in the first step is as follows: pre-collect the pig pictures containing the ear tag, use the labelimg labeling tool to mark the position of the ear tag in each picture, and mark the content of the label Import the target detection algorithm model as a data set for model training. After multiple rounds of training, the specific positions of all ear tags in the picture are obtained; use the trained training model to save the ear tags in the picture in the form of pictures. It is used for subsequent image processing training and earmark extraction in practical applications.
  • step 2 "setting two threshold conditions and fitting the obtained rough contour into a maximum ellipse" specifically includes the following steps:
  • the first threshold is set to be equal to 50 as the threshold of the number of elements in the contour point set of the ellipse, if the number of point set elements in the rough contour point set is greater than the preset threshold 50, it is considered to be a possible outer contour; otherwise, Abandon the current contour, return to step 2 to reselect the ellipse focus; use the fitEllipse tool, set the threshold conditions of the second threshold group to 2 and 5 as the thresholds for filtering the major and minor axis parameters of the current ellipse contour, if the major and minor axis length of the current ellipse contour meets If the conditions of the second threshold group are used, the current contour is considered to be the largest ellipse fitted; if the length parameters of the major and minor axes of the current ellipse contour do not meet the current threshold conditions, the current contour is discarded, and returning to step 2 to reselect the ellipse focus.
  • a temperature detection system for a temperature-sensitive color-changing ear tag for pigs comprising:
  • the pig temperature-sensitive color-changing ear tag includes a circular ear tag body and a tag neck.
  • the outer surface of the ear tag body is circular.
  • Inwardly includes a first ring, a second ring and a discoloration area; the first ring is coated with a colored non-removable pigment, the second ring is coated with a white non-removable pigment, and in the discoloration area
  • the part in contact with the livestock skin contains thermosensitive color-changing powder, and the color-changing area can change color as the temperature of the contacted livestock increases; and the color of the first circular ring is different from that of the second circular ring;
  • the surveillance camera located in the area to be monitored, the surveillance camera is a color camera;
  • the ear tag training model module collects pig pictures containing ear tags in advance, uses the labelimg labeling tool to mark the position of the ear tags in each picture, and imports the marked content as a data set into the target detection algorithm model for model training. After rounds of training, obtain the specific positions of all ear tags in the picture; use the trained training model to save the ear tags in the picture in the form of pictures, and use them for subsequent image processing training and ear tag extraction in practical applications ;
  • the ear tag frame selection module divides the images collected by the surveillance camera to generate multiple rectangular images containing a single ear tag;
  • the rough outline generation module scales the pictures selected by the ear tag frame selection module to a uniform size, selects the possible center point of the ear tag as the ellipse focus, uses the Canny edge detection algorithm to obtain a reasonable edge point set of the image, and then performs binarization processing. Convert the picture into a single-channel grayscale image, use the findContours tool to retrieve the contour in the image, and obtain the rough contour point set of the earmark in the current picture;
  • the ellipse contour generation module sets two threshold conditions, and the rough contour obtained by the rough contour generation module is fitted to a maximum ellipse, and the fitted maximum ellipse is considered as the ear tag contour, that is, the outer surface of the first ring. edge;
  • Color-changing area feature extraction module the rectangular picture of a single earmark is divided into three areas from the outside to the inside: the first reference area, the second reference area and the color-changing area, corresponding to the first ring, the second ring and the color-changing area; select the ellipse
  • Each of the four sampling points in the three areas on the axis of the largest ellipse obtained by the contour generation module calculates the average RGB values of the four sampling points in the three areas, representing the average RGB values of the three areas, and then takes the first reference area and the average RGB values obtained in the second reference area are the upper limit and the lower limit respectively, and the specific calculation formula is as follows:
  • the relative RGB value of the discoloration area (the RGB value of the discoloration area-the RGB value of the first reference area)/(the RGB value of the second reference area-the RGB value of the first reference area) value;
  • the relative RGB value and temperature mapping module of the discoloration area creates a locally weighted linear regression analysis model, and takes the obtained relative RGB values of multiple discoloration areas and the corresponding actual temperature values as the input layer input, and uses local weighted linear regression to carry out the two parameters.
  • Machine learning can obtain the corresponding relationship between the relative RGB value of the discoloration area and the temperature, so as to output the temperature value corresponding to the discoloration area of the current picture, that is, obtain the temperature of the pig wearing the current ear tag.
  • the ellipse profile generation module includes a first threshold discrimination unit and a second threshold group discrimination unit;
  • the first threshold discrimination unit includes: setting the first threshold equal to 50 as the threshold of the number of elements of the contour point set of the ellipse, if the number of point set elements of the rough contour point set is greater than the preset threshold 50, it is considered It is a possible outer contour; otherwise, discard the current contour and return to the rough contour generation module to reselect the ellipse focal point;
  • the second threshold group discrimination unit includes: using the fitEllipse tool, setting the threshold condition of the second threshold group to be 2 and 5 as the threshold of the most reasonable ellipse in the screening contour, such as the length of the major and minor axes of the current contour and the first threshold If the difference of 50 is less than 5, and the difference between the long and short axes of the previous ellipse contour is greater than 2, then the current contour is considered to be the largest fitted ellipse; if the long and short axis length parameters of the current contour do not meet the current threshold conditions, then Abandon the current contour and return to the rough contour generation module to re-select the ellipse focal point for refitting; wherein, the initial value of the ellipse contour is 0 by default.
  • first circular ring, the second circular ring and the discoloration zone are arranged concentrically, and their radius ratio is 1:1:3, so the ring ratio of the first reference zone, the second reference zone and the discoloration zone is 1 :1:6:1:1.
  • the temperature-sensitive color-changing powder is a colored thermo-chromic powder that changes color at 38°C. As the temperature of the contacted livestock increases, the color of the temperature-sensitive color-changing powder gradually becomes lighter. When the temperature reaches 41°C, it becomes White opposite to the primary color; optionally, the primary color of the thermochromic powder is red, and becomes white after discoloration.
  • the temperature-sensitive color-changing ear tag of the present invention can automatically change color according to the body temperature of livestock, so that abnormal conditions such as fever can be found at the first time;
  • the application forms of the present invention include but are not limited to ear tags, ankle rings, collars, etc. of any shape;
  • the present invention proposes a temperature measurement method that combines temperature-sensitive color-changing ear tags with machine vision to save costs, especially greatly reducing labor costs.
  • the present invention performs relative value processing on features, adopts relative parameters instead of absolute parameters, improves the scope of application, and eliminates factors such as white balance, angle and natural light intensity of different cameras. The interference of the results; and only an ordinary camera is needed to collect data, getting rid of the dependence on infrared imaging;
  • the transparent heat insulating material attached to the surface of the present invention can effectively ensure the accuracy of temperature measurement and avoid discoloration due to environmental temperature differences.
  • Fig. 1 is a schematic structural view of embodiment 1 of the temperature-sensitive color-changing ear tag of the present invention
  • Fig. 2 is a schematic structural view of embodiment 2 of the temperature-sensitive color-changing ear tag of the present invention
  • Fig. 3 is a schematic structural view of Embodiment 3 of the temperature-sensitive color-changing ear tag of the present invention.
  • Fig. 4 is the flowchart of the temperature detection method utilizing the temperature-sensitive color-changing ear tag according to the present invention.
  • Fig. 5 is a flowchart of step 2 in the temperature detection method of the present invention.
  • the first part 2 The second part 3: The neck
  • a temperature-sensitive color-changing ear tag for pigs and livestock
  • the ear tag includes an ear tag body and a neck 3, the top of the neck 3 is provided with an inverted cone; the ear tag body includes a part that contacts the skin of the livestock As the first part 1 , the rest of the body of the earmark is the second part 2 .
  • the ear tag is integrally formed by injection molding, and the whole includes thermochromic powder and transparent ABS.
  • the temperature-sensitive color-changing powder is a black temperature-sensitive color-changing material that changes color at 38°C. As the temperature rises, the color gradually becomes lighter and becomes white when the temperature reaches 41°C.
  • the preparation method of the ear tag is as follows:
  • Step 1 Select temperature-sensitive color-changing powder, mix 2% by weight of temperature-sensitive color-changing powder into 8% by weight of polyethylene wax lubricating brightener and stir evenly to obtain a color masterbatch;
  • the temperature-sensitive color-changing powder is a white/black temperature-sensitive color-changing powder that changes color at 38°C. As the temperature rises, the color gradually becomes darker or lighter, and when it reaches 41°C, it becomes black/white opposite to the original color;
  • Step 2 heating 90% by weight of transparent or translucent thermoplastics, the temperature range is controlled at 150° for 8 minutes, and then mixed after adding the color masterbatch prepared in step 1; the melting point of the thermoplastics is 120°;
  • Step 3 Put the mixture into the injection molding machine, use the screw rod of the injection molding machine to mix the mixture, and perform one-time injection molding.
  • the temperature range during injection molding is controlled at 150°-180°.
  • the transparent or translucent thermoplastic is selected from one of the following: polypropylene, soft polyvinyl chloride, AS, ABS, silica gel, TPU, PMMA, PVC, MS, PET and common polyethylene. It can also be formed by injection molding with resin glue.
  • Transparent TPU material is the preferred material for ear tags due to its elasticity. ABS is more suitable for wearable devices such as collars because its hardness is slightly greater than TPU.
  • the temperature-sensitive color-changing powder can be white in primary color and black or red when changing color; it can also be black or red in primary color and white after changing color.
  • the ear tag includes an ear tag body and a tag neck 3, and an inverted cone is arranged at the top of the tag neck.
  • the first part 1 of the ear tag contains 3wt% thermochromic powder; the second part 2 and the neck 3 are transparent TPU;
  • the temperature-sensitive color-changing powder is a white temperature-sensitive color-changing material that changes color at 38°C. As the temperature rises, the color gradually becomes darker, and turns black when the temperature reaches 41°C.
  • the preparation method of the ear tag is as follows:
  • Step 1 Add 3wt% thermochromic powder directly into 97wt% epoxy resin, stir evenly to obtain a mixture, and pour the mixture into the AB rubber hose;
  • Step 2 Use an injection molding machine to inject transparent TPU to prepare the ear tag at one time, and the temperature range during injection molding is controlled at 150°-180°;
  • Step 3 Apply the AB glue tube containing the mixture evenly on the first part 1 of the ear tag, and let it dry at room temperature.
  • the caretaker can easily identify the color-changing ear tag.
  • FIG. 3 it is a temperature-sensitive color-changing ear tag for livestock.
  • the structure and material of the ear tag are the same as those in Embodiment 1, and will not be repeated here.
  • the difference between the preparation method of the ear tag and Example 1 is that after injection molding, it also includes coating a layer of heat-insulating paint or sticking a layer of heat-insulating sticker on the outer wall of the second part 2 of the prepared ear tag to prevent the The low temperature of the environment or the heat of the light can cause inaccurate discoloration.
  • the heat-insulating coating is ceramic coating or glass microsphere coating with a thickness of 0.1mm-0.5mm. Commercially available transparent thermal insulation stickers can also be selected, with a thickness of 0.1mm-0.3mm, preferably 0.2mm.
  • the outer surface of the ear tag body is circular, including two concentric first rings 5 and second rings 4 and a discoloration zone 6 from the edge inward;
  • the first ring is coated with a red non-removable colored Pigment, the red color is defined as CMYK value: C: 50%, M: 100%, Y: 100%, K: 30% pure red, the color of the colored pigment is optional and the color of the thermochromic powder
  • the primary colors are the same;
  • the second ring is coated with a white non-removable pigment, and the part of the discoloration zone 6 that is in contact with the skin of livestock contains 1-3wt% of temperature-sensitive discoloration powder.
  • the temperature-sensitive color-changing powder is a colored temperature-sensing color-changing powder whose primary color is red at 38°C.
  • the color of the temperature-sensing color-changing powder gradually becomes lighter.
  • the temperature reaches 41°C it becomes White is the opposite of the primary color.
  • Pre-collect pig pictures containing ear tags under different pig farm temperatures, different lighting conditions, and different shooting positions use the labelimg labeling tool to mark the position of the ear tags in each picture, and use the marked content as data Set input into target detection algorithm models such as YOLOv5 for model training.
  • target detection algorithm models such as YOLOv5 for model training.
  • After multiple rounds of training it can accurately find the specific positions of all ear tags in the real pictures of the pig farm, so as to obtain the Find the training model for the specific location of all the ear tags in the picture; at this time, use the trained training model and the save-crop function that comes with YOLOv5 to save the ear tags in the picture in the form of pictures for future images Handles earmark extraction in training and in practice.
  • YOLOv5 is used for model training.
  • RCNN, Fast RCNN, Faster RCNN and other target detection algorithm models can be used for model training, so as to obtain the approximate positions of all earmarks in the image.
  • the ambient temperature has little influence on the effect of the present invention, almost negligible, so the influence of the ambient temperature in the pig farm is not considered in this embodiment.
  • the monitoring camera is an ordinary color camera, which gets rid of the dependence of the traditional temperature measurement method on the infrared camera.
  • Step 2 Use image processing technology to identify and fit the contour of the earmark
  • multiple rectangular images are scaled to a uniform size of 100 ⁇ 100, and the possible center point of the earmark is manually selected as the focus of the ellipse; optionally, since the next step is to select the outline of the ellipse, the Hough circle transformation is used
  • the principle selects a possible ellipse focus; according to the ellipse focus and the Canny edge detection algorithm, Gaussian filtering is performed on the image to denoise, the gradient vector is calculated, the non-maximum value is filtered, and the upper and lower thresholds of the gradient are set, that is, the hysteresis threshold value is 50-200. Get a reasonable set of edge points for the image.
  • the image is binarized to convert the image into a single-channel grayscale image, and the grayscale value of the pixels in the edge contour pixel set is obtained.
  • the grayscale value of the pixels in the edge area of the earmark If it is 0, use the findContours tool to retrieve the contours in the image, and get the rough contour point set of the earmark in the current picture.
  • this step fits the rough outline (ie, the edge of the ear tag) obtained by S201 into a precise ellipse . It specifically includes the following steps: setting the first threshold equal to 50 as the threshold of the number of elements of the outline point set of the ellipse, if the number of point set elements of the rough outline point set is greater than the preset threshold 50, it is considered possible Outer contour; otherwise, discard the current contour and return to S201 to reselect the ellipse focal point.
  • the fitEllipse tool set the second threshold group to 2 and 5 as the threshold for filtering the most reasonable ellipse in the contour, such as the difference between the length of the major and minor axes of the current contour and the first threshold 50 is less than 5, and the previous ellipse contour
  • the difference between the lengths of the major and minor axes is greater than 2 (the initial value of the ellipse contour is 0 by default, that is, if the current contour is the first contour, the initial value of the "previous ellipse contour" here is 0), then it is considered to be The largest ellipse close to the ellipse contour; if the length of the major and minor axes of the current contour does not meet the current threshold condition, discard the current contour and return to S201 to re-select the ellipse focus for re-fitting.
  • the largest ellipse obtained after the determination of the above two thresholds can be regarded as the contour of the earmark, that is, the outer edge of the first ring 5, so that the ellipse closest to the shape of the contour is fitted.
  • the obtained parameters of the largest ellipse are used as parameters of the processed ear tag contour, and the parameters include the major axis, minor axis and deflection angle of the largest ellipse.
  • Step 3 Extract the feature of the color-changing area and output the temperature of the pig according to the corresponding relationship between color and temperature
  • the ear tag picture obtained in step 1 is divided into three areas from outside to inside: the first reference area, the second reference area, and the color-changing area, corresponding to the first ring 5 and the second ring respectively.
  • Two circular rings 4 and a discoloration zone 6 are arranged.
  • the radius ratio of the three regions is approximately 1:1:3, and since the first ring 5, the second ring 4 and the discoloration zone 6 are concentrically arranged, the ring ratio is 1:1:6:1:1 ;
  • the ring width ratio may also be 3:3:17:3:3.
  • step S202 Based on the point probability sampling model, select 4 sampling points in each of the three areas on the axis of the ellipse obtained in step S202, respectively calculate the average RGB values of the 4 sampling points in the three areas, representing the average RGB values of the three areas .
  • perform normalization processing In order to eliminate the interference of different factors such as white balance, angle and light intensity among the cameras, perform normalization processing, and then use the average RGB values obtained in the first reference area and the second reference area as the upper limit and lower limit respectively, using the calculation formula:
  • the relative RGB value of the discoloration area (RGB value of the discoloration area-RGB value of the first reference area)/(RGB value of the second reference area-RGB value of the first reference area), to obtain the relative RGB value of the discoloration area.
  • the present invention uses relative parameters instead of absolute parameters, thereby eliminating the interference of other factors on the regression model except color RGB values.
  • the above method processes the picture data into a large number of correspondences between the relative RGB values of the color-changing areas and the temperature.
  • the local weighted linear regression method is used to perform regression analysis on the relationship between the two: according to the difference in the distance between the data point and the predicted point, the point with the smaller distance is assigned For larger weights, select the weight type as Gaussian kernel. By setting reasonable kernel function parameters, a regression model with better effect can be obtained. When it is put into use later, it is only necessary to lightweight the regression analysis model.

Landscapes

  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Environmental Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Animal Husbandry (AREA)
  • Physics & Mathematics (AREA)
  • Zoology (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Birds (AREA)
  • Biomedical Technology (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Image Analysis (AREA)

Abstract

一种家畜感温变色耳标、温度检测方法和温度检测系统,包括耳标本体和标颈(3),所述耳标本体包括与家畜皮肤接触部分作为第一部分(1),所述耳标本体的其余部分为第二部分(2);至少所述第一部分(1)含有1-3wt%的感温变色粉;至少所述第二部分(2)为透明或半透明的热塑性塑料,能够显示所述第一部分的颜色。所述温度检测方法包括根据耳标图像的训练模型提取耳标图像;获得当前图片中耳标的粗糙轮廓点集,将获得的粗糙轮廓拟合为一个最大椭圆;划分矩形图片为三个区域进行抽样,获得变色区的相对RGB值;采用局部加权线性回归对相对RGB值和对应的实际温度进行学习从而获得变色区相对RGB值与温度的对应关系,输出当前图片变色区所对应的温度值。

Description

家畜感温变色耳标、其温度检测方法及系统 技术领域
本发明属于家畜医疗仪器领域,尤其涉及一种家畜感温变色耳标、其温度检测方法及系统。
背景技术
非洲猪瘟的特征是发病过程短,最急性和急性感染死亡率高达100%,非洲猪瘟自然感染潜伏期5~9天,发病时体温升高至41℃,约持续四天,直到死前四十八小时,体温开始下降,而临床症状直至体温下降方逐渐显露,呈现食欲下降,极度脆弱,脉搏动快,咳嗽,呼吸快约三分之一,显呼吸困难,往往发热后第七天死亡,或症状出现仅一、二天便死亡。
对于非洲猪瘟疫情,目前尚无安全和有效的疫苗用于预防非洲猪瘟,也无有效药物进行治疗,只能采取扑杀净化措施,所以尽早发现,及时隔离、扑杀是目前对于非洲猪瘟疫情的唯一处理方式。
感温变色粉是由电子转移型有机化合物体系制备的。电子转移型有机化合物是一类具有特殊化学结构的有机发色体系。在特定温度下因电子转移使该有机物的分子结构发生变化,从而实现颜色转变。这种变色物质不仅颜色鲜艳,而且可以实现从有色至无色状态的颜色转变。这是重金属复盐络合物型和液晶型可逆感温变色物质所不具备的。
感温变色粉为微胶囊化的可逆感温变色物质,称为可逆感温变色颜色,称为感温粉或温变粉;本品可用于聚丙烯(PP),软聚氯乙烯(S-PVC)、AS、ABS和硅胶等透明或半透明塑料的注塑、挤塑成型。
目前已有的测温方式都有着无法避免的缺陷,如依托红外摄像头的测温技术,维护成本高且精度不够理想;依托物联网设备的测温技术,需要大量路由器和基站作为辅助,且通讯组网数量有限,难以应对高密度集中化养殖,成本仍较高不具备大规模应用能力;人工测温技术效率低下,经常错过最佳处置时间,测温已造成猪只受惊影响猪只健康。
为此,考虑将感温变色材料加入透明或半透明塑料中,利用感温变色材料随温度的上升、下降而反复变换颜色的特性进行家畜体温监测。同时使用摄像机监控时,即使使用黑白摄像机都可以实现温度监控,完全替代传统的造价昂贵的红外摄像机或物联网测温耳标 的实时测温方法,也避免人工测量不及时劳动力成本高的问题。但是实际使用中存在温度监控不准确的情况,为此需要提供基于家畜感温变色耳标的温度检测方法。
发明内容
本发明的目的是利用现有感温变色粉感温变色的特性用于监督家畜的体温从而在家畜发生瘟疫初期及早发现并给予治疗。本发明所述的体温监测预警装置是将感温变色材料加入透明热塑性弹性材料TPU中进行注塑或是将含有感温变色粉的胶水涂布于与家畜接触的一侧,当家畜发生发烧等发热症状时,因为温度变化,耳标颜色会发生变化,从而实现直观的体温监测;本发明的耳标每个造价不足1元,且摆脱了传统测温方式对昂贵红外设备的依赖,使用普通监控摄像头;而且采用相对参数代替绝对参数,从而消除颜色RGB值外其他因素对回归模型的干扰;而且采取机器学习中的回归分析模型,拟合出温度与耳标颜色的RGB值之间的多参数回归模型,对于体温异常的猪只进行识别监控,大幅降低铺设成本,基于常规安防监控系统便可实现实时体温检测,以达到最快速度做出反应的目的,大幅度减小损失。
本发明的技术方案如下:一种家畜感温变色耳标,包括耳标本体和标颈,所述标颈顶端设有倒锥;所述耳标本体包括与家畜皮肤接触部分作为第一部分,所述耳标本体的其余部分为第二部分;
其中,至少所述第一部分含有1-3wt%的感温变色粉;至少所述第二部分为透明或半透明的热塑性塑料,能够显示所述第一部分的颜色;
其中所述感温变色粉为38℃变色的白色/有色感温变色粉,随着接触的家畜温度升高,所述感温变色粉的颜色逐渐变深或变淡,当温度达到41℃时变为与原色相反的有色/白色。
进一步的,所述耳标本体外表面涂覆有隔热材料。
进一步的,所述耳标本体的外表面为圆形,从边缘向内包括两个同心的第一圆环和第二圆环以及变色区,所述第一圆环的外圆半径大于所述第二圆环;所述第一圆环涂覆不可去除的有色颜料;所述第二圆环涂覆有白色的不可去除颜料,所述变色区与家畜皮肤接触部分含有感温变色粉,所述变色区能够随着接触的家畜温度升高而变色;且所述第一圆环颜料的颜色与第二圆环的颜色不同。
进一步的,所述第一圆环和第二圆环径宽之和小于所述耳标本体外表面半径的一半。
所述透明或半透明的热塑性塑料选自以下一种:聚丙烯,软聚氯乙烯、AS、ABS、硅 胶、TPU、PMMA、PVC、MS、PET、环氧树脂和普通聚乙烯。
优选的,所述透明或半透明的热塑性塑料为热塑性弹性材料,更优选的为透明的TPU材料。
进一步的,所述感温变色粉为微胶囊化的可逆感温变色物质。
一种利用猪只感温变色耳标的温度检测方法,包括穿戴在待监测猪只耳上的猪只感温变色耳标,以及在待监测区域内设置的监控摄像头;
所述猪只感温变色耳标包括圆形耳标本体和标颈,所述耳标本体的外表面为圆形,从边缘向内包括第一圆环、第二圆环和变色区;所述第一圆环涂覆不可去除的有色颜料,所述第二圆环涂覆有白色的不可去除颜料,所述变色区与家畜皮肤接触部分含有感温变色粉,所述变色区能够随着接触的家畜温度升高而变色;且所述第一圆环颜料的颜色与第二圆环的颜色不同;具体包括如下步骤:
步骤一:利用猪场内的监控摄像头获得猪场图片,根据耳标图像的训练模型提取图片中的耳标图像,将获得的猪场图片分割从而生成多张含单个耳标的矩形图片,从而选出图中所有的耳标;
步骤二:将步骤一获得的含单个耳标的矩形图片,利用opencv图像处理技术将图片转为统一尺寸后,选取可能的耳标中心点为椭圆焦点,将椭圆焦点作为耳标几何轮廓的焦点,使用Canny边缘检测算法得到图像的合理边缘点集,再进行二值化处理,将图片转成单通道灰度图像,使用findContours工具检索图像中的轮廓,获得当前图片中耳标的粗糙轮廓点集;随后设定两个阈值条件,将获得的粗糙轮廓拟合为一个最大椭圆,并将拟合出的最大椭圆的外周认为是耳标轮廓,即第一圆环的外边缘;将得到的最大椭圆的参数作为处理后的耳标轮廓的参数,所述参数包括最大椭圆的长轴、短轴和偏转角;
步骤三:将步骤一得到的单个耳标的矩形图片由外到内划分为第一参照区、第二参照区和变色区三个区域,分别对应第一圆环、第二圆环和变色区;
选取步骤二获得的最大椭圆的轴线上三个区域的各4个抽样点,分别计算三个区域中4个抽样点的平均RGB值,代表三个区域的平均RGB值,再以第一参照区和第二参照区获得的平均RGB值分别为上限和下限,求得变色区的相对RGB值,即变色区RGB值相对于第一参照区值与第二参照区值范围内的位置,计算公式为:
变色区的相对RGB值=(变色区RGB值-第一参照区RGB值)/(第二参照区RGB值-第一参照区RGB值);
继续对步骤一生成的其余多张含单个耳标的矩形图片执行上述操作,从而获得多个变色区的相对RGB值;创建局部加权线性回归分析模型,将获得的多个变色区相对RGB值和与其对应的实际温度值作为输入层输入,采用局部加权线性回归对两个参数进行机器学习从而获得变色区相对RGB值与温度的对应关系,从而输出当前图片变色区所对应的温度值,即获得佩戴当前耳标的猪只温度。
进一步的,所述步骤一中“耳标图像的训练模型”的获得方法如下:预先采集包含耳标的猪只图片,使用labelimg标注工具标注出每张图片中的耳标的位置,并将标注的内容作为数据集导入目标检测算法模型进行模型训练,在进行多轮次的训练后,获得图片中所有耳标的具体位置;利用已训练好的训练模型将图片中的耳标以图片的形式保存下来,用于之后的图像处理训练和实际应用中的耳标提取。
进一步的,所述步骤二中“设定两个阈值条件,将获得的粗糙轮廓拟合为一个最大椭圆”具体包括如下步骤:
设定第一阈值等于50作为椭圆的轮廓点集元素个数的阈值,若所述粗糙轮廓点集的点集元素个数大于预设的阈值50,则认为其是可能的外轮廓;否则,舍弃当前轮廓,返回步骤二重新选取椭圆焦点;使用fitEllipse工具,设定第二阈值组的阈值条件为2和5作为筛选当前椭圆轮廓的长短轴参数的阈值,如果当前椭圆轮廓的长短轴长度符合第二阈值组的条件,则认为当前轮廓为拟合出的最大椭圆;如果当前椭圆轮廓的长短轴长度参数不符合当前的阈值条件,则舍弃当前轮廓,返回步骤二重新选取椭圆焦点。
一种猪只感温变色耳标的温度检测系统,包括:
穿戴在待监测猪只耳上的猪只感温变色耳标,所述猪只感温变色耳标包括圆形耳标本体和标颈,所述耳标本体的外表面为圆形,从边缘向内包括第一圆环、第二圆环和变色区;所述第一圆环涂覆有色的不可去除颜料,所述第二圆环涂覆有白色的不可去除颜料,所述变色区中与家畜皮肤接触部分含有感温变色粉,所述变色区能够随着接触的家畜温度升高而变色;且所述第一圆环的颜色与第二圆环的颜色不同;
监控摄像头,位于待监测区域内,所述监控摄像头为彩色摄像头;
耳标训练模型模块,预先采集包含耳标的猪只图片,使用labelimg标注工具标注出每张图片中的耳标的位置,并将标注的内容作为数据集导入目标检测算法模型进行模型训练,在进行多轮次的训练后,获得图片中所有耳标的具体位置;利用已训练好的训练模型将图片中的耳标以图片的形式保存下来,用于之后的图像处理训练和实际应用中的耳标提取;
耳标框选模块,根据耳标训练模型模块,将监控摄像头采集的图片分割生成多张含单个耳标的矩形图片;
粗糙轮廓生成模块,将耳标框选模块选取的图片缩放为统一尺寸,选取可能的耳标中心点为椭圆焦点,使用Canny边缘检测算法得到图像的合理边缘点集,再进行二值化处理,将图片转成单通道灰度图像,使用findContours工具检索图像中的轮廓,获得当前图片中耳标的粗糙轮廓点集;
椭圆轮廓生成模块,设定两个阈值条件,将粗糙轮廓生成模块的获得的粗糙轮廓拟合为一个最大椭圆,并将拟合出的最大椭圆认为是耳标轮廓,即第一圆环的外边缘;
变色区特征提取模块,单个耳标的矩形图片由外到内划分为第一参照区、第二参照区和变色区三个区域,分别对应第一圆环、第二圆环和变色区;选取椭圆轮廓生成模块获得的最大椭圆的轴线上三个区域的各4个抽样点,分别计算三个区域中4个抽样点的平均RGB值,代表三个区域的平均RGB值,再以第一参照区和第二参照区获得的平均RGB值分别为上限和下限,具体计算公式如下:
变色区的相对RGB值=(变色区RGB值-第一参照区RGB值)/(第二参照区RGB值-第一参照区RGB值)值;以及
变色区相对RGB值与温度映射模块,创建局部加权线性回归分析模型,将获得的多个变色区相对RGB值和与其对应的实际温度值作为输入层输入,采用局部加权线性回归对两个参数进行机器学习从而获得变色区相对RGB值与温度的对应关系,从而输出当前图片变色区所对应的温度值,即获得佩戴当前耳标的猪只温度。
进一步的,所述椭圆轮廓生成模块包括第一阈值判别单元和第二阈值组判别单元;
所述第一阈值判别单元包括:设定第一阈值等于50作为椭圆的轮廓点集元素个数的阈值,若所述粗糙轮廓点集的点集元素个数大于预设的阈值50,则认为其是可能的外轮廓;否则,舍弃当前轮廓,返回粗糙轮廓生成模块重新选取椭圆焦点;
所述第二阈值组判别单元包括:使用fitEllipse工具,设定第二阈值组的阈值条件为2和5作为筛选轮廓中最合理的椭圆的阈值,如当前轮廓的长短轴的长度与第一阈值50的差值均小于5,且上一个椭圆轮廓的长短轴差值都大于2,则认为当前轮廓为拟合出的最大椭圆;如果当前轮廓的长短轴长度参数不符合当前的阈值条件,则舍弃当前轮廓,返回粗糙轮廓生成模块重新选取椭圆焦点进行重新拟合;其中,所述椭圆轮廓的初始值默认为0。
进一步的,所述第一圆环、第二圆环和变色区为同心设置,其半径比为1:1:3,因此所述第一参照区、第二参照区和变色区的环比为1:1:6:1:1。
进一步的,其中所述感温变色粉为38℃变色的有色感温变色粉,随着接触的家畜温度升高,所述感温变色粉的颜色逐渐变淡,当温度达到41℃时变为与原色相反的白色;可选的,所述感温变色粉原色为红色,变色后为白色。
与现有技术相比,本发明有益效果及显著进步在于:
(1)本发明所述的感温变色耳标可以根据家畜体温情况自动变色,从而在第一时间发现发烧等异常情况;
(2)本方案可应用于猪、牛、羊、马、驴、骆驼等任何具有恒定体温的动物的可穿戴设备制造;
(3)本发明的应用形式包括但不限于任何形状的耳标、脚环、项圈等;
(4)相较于以往的猪只测温技术,本发明提出利用感温变色耳标与机器视觉相结合的测温方法节约成本,尤其是大大减少了人力成本。相较于传统的颜色表示方式映射温度的计算方式,本发明对于特征进行相对值处理,采用相对参数代替绝对参数,提高了适用范围,消除了不同摄像头白平衡、角度以及自然光照强度等因素对结果的干扰;而且仅需普通的摄像头即可采集数据,摆脱了对于红外成像的依赖;
(5)图像处理过程中使用了算力需求较低的opencv库与数理统计的点估计原理,降低了计算难度与算力需求,提高了图像处理速度。在对实验数据进行回归分析时采用了局部加权线性回归的方式,有效防止了过拟合与欠拟合的现象,提高了测温结果的精准度;
(6)本发明表面附有的透明隔热材料可以有效保证测温精准性,避免因环境温差导致无法有效变色。
附图说明
图1是本发明所述的感温变色耳标实施例1的结构示意图;
图2是本发明所述的感温变色耳标实施例2的结构示意图;
图3是本发明所述的感温变色耳标实施例3的结构示意图;
图4是本发明所述的利用感温变色耳标的温度检测方法的流程图;
图5是本发明所述的温度检测方法中步骤二的流程图。
图中:
1:第一部分                  2:第二部分         3:标颈
4:第二圆环                  5:第一圆环         6:变色区
具体实施方式
为使本发明实施例的目的、技术方案、有益效果及显著进步更加清楚,下面,将结合本发明实施例中所提供的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所有描述的这些实施例仅是本发明的部分实施例,而不是全部的实施例;基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例1
如图1所示,一种猪家畜感温变色耳标,所述耳标包括耳标本体和标颈3,所述标颈3顶端设有倒锥;所述耳标本体包括与家畜皮肤接触部分作为第一部分1,所述耳标本体的其余部分为第二部分2。所述耳标一体注塑而成,整体包括感温变色粉和透明的ABS。所述感温变色粉为38℃变色的黑色感温变色材料,随温度升高,颜色逐渐变浅,当达到41℃时变为白色。所述耳标的制备方法如下:
步骤1:选取感温变色粉,将2重量%的感温变色粉混入8重量%的聚乙烯蜡润滑光亮剂中搅拌均匀制得色母料;
所述感温变色粉为38℃变色的白/黑色感温变色粉,随温度升高,颜色逐渐变深或变淡,当达到41℃时变为与原色相反的黑/白色;
步骤2:加热90重量%的透明或半透明的热塑性塑料,温度范围控制在150°,8min,随后加入步骤1制备的色母料后混合;所述热塑性塑料熔点为120°;
步骤3:将混合物置入注塑机中,利用注塑机的螺旋杆混匀混合物,进行注塑一次成型,注塑时温度范围控制在150°-180°。
所述透明或半透明的热塑性塑料选自以下一种:聚丙烯,软聚氯乙烯、AS、ABS、硅胶、TPU、PMMA、PVC、MS、PET和普通聚乙烯。还可以利用树脂胶注塑成形。
透明的TPU材料由于其弹性材质因此优选作为耳标的材质,ABS由于其硬度略大于TPU,因此更适用于项圈等可穿戴设备。
所述感温变色粉可以是原色为白色,变色时为黑色或红色;也可以是原色为黑色或红色,变色后为白色。
实施例2
如图2所示,一种猪感温变色耳标,所述耳标包括耳标本体和标颈3,所述标颈顶端设有倒锥。其中所述耳标第一部分1含有3wt%的感温变色粉;所述第二部分2和标颈3为透明的TPU;
所述感温变色粉为38℃变色的白色感温变色材料,随温度升高,颜色逐渐变深,当达到41℃时变为黑色。所述耳标的制备方法如下:
步骤1:将3wt%感温变色粉直接加入97wt%的环氧树脂中,搅拌均匀,获得混合物,并将混合物灌入AB胶胶管中;
步骤2:利用注塑机将透明的TPU注塑一次成型制备所述耳标,注塑时温度范围控制在150°-180°;
步骤3:将装有所述混合物的AB胶胶管均匀涂抹于所述耳标的第一部分1,室温晾干即可。
由于采用的透明材质,在当猪体温升高使感温变色材料变色时,管理员能够轻松辨识出变色的耳标。
实施例3
如图3所示,一种家畜感温变色耳标,所述耳标的结构和材料与实施例1相同,在此不再赘述。所述耳标的制备方法与实施例1的区别在于:在注塑成型后,还包括在制备的所述耳标第二部分2外壁涂覆一层隔热涂料或贴覆一层保温贴纸,防止由于环境低温或是光照热导致不能准确变色。所述隔热涂料为陶瓷涂料或玻璃微球涂料,厚度为0.1mm-0.5mm。还可以选取市售的透明保温贴纸,厚度为0.1mm-0.3mm,优选0.2mm。所述耳标本体的外表面为圆形,从边缘向内包括两个同心的第一圆环5和第二圆环4以及变色区6;所述第一圆环涂覆红色的不可去除有色颜料,所述红色定义为CMYK值为:C:50%,M:100%,Y:100%,K:30%的纯红,可选的所述有色颜料的颜色与所述感温变色粉原色的颜色相同;所述第二圆环涂覆有白色的不可去除颜料,所述变色区6中与家畜皮肤接触部分含有1-3wt%的感温变色粉。其中所述感温变色粉为38℃变色的原色为红色的有色感温变色粉,随着接触的家畜温度升高,所述感温变色粉的颜色逐渐变淡,当温度达到41℃时变为与原色相反的白色。
如图4所示,具体包括如下步骤:
步骤一:识别图片中的耳标
S101:获取耳标的训练模型
预先采集在猪场内不同猪只温度、不同光照条件、不同拍摄位置条件下的包含耳标的猪只图片,使用labelimg标注工具标注出每张图片中的耳标的位置,并将标注的内容作为数据集输入YOLOv5等目标检测算法模型中,进行模型训练,在进行多轮次的训练后,能够精准地找到猪场实拍图片中的所有耳标的具体位置,从而获得能够从猪场实拍照片中找到图片中的所有耳标的具体位置的训练模型;此时利用已训练好的训练模型以及YOLOv5自带的save-crop功能,将图片中的耳标以图片的形式保存下来,用于之后的图像处理训练和实际应用中的耳标提取。本步骤中使用YOLOv5进行模型训练,在实际使用中,可以使用RCNN,Fast RCNN,Faster RCNN等目标检测算法模型进行模型训练,从而得到图像中所有耳标的大致位置。本发明中环境温度对于本发明的效果影响不大,几乎可以忽略不计,因此本实施例中不考虑猪场内环境温度的影响。
S102:基于训练模型识别耳标
利用市售的海康威视DS-2DC2D40IW-DE3型号监控摄像头获得猪场图片,根据S101获得的训练模型,提取图片中的耳标图像,将获得的猪场图片分割从而生成多张含单个耳标的矩形图片,从而选出图中所有的耳标。所述监控摄像头为普通的彩色摄像头,摆脱传统测温方式对于红外摄像头的依赖。
步骤二:利用图像处理技术识别并拟合耳标轮廓
S201:识别轮廓
如图5所示,由于耳标的第一圆环5(即最外层)颜色与猪耳颜色差异大,反映到色彩空间中可以理解为耳标边缘区域的灰度值变化幅度大。因此,提取步骤S102获得的含单个耳标的矩形图片,利用opencv图像处理技术找到耳标的实际范围。具体来说,首先对于多张矩形图片缩放为统一尺寸100×100,手动选取可能的耳标中心点为椭圆焦点;可选的,由于接下来的步骤是选取椭圆轮廓,因此利用霍夫圆变换原理选取可能的椭圆焦点;根据椭圆焦点以及依据Canny边缘检测算法,对图像进行高斯滤波去噪、计算梯度矢量、过滤非最大值,再设置梯度的上下阈值,即滞后阈值取值50-200,得到图像的合理边缘点集。图像经过上述处理后再进行二值化处理,将图片转成单通道灰度图像,获取边缘轮廓像素点集合中的像素点的灰度值,此时耳标边缘区域的像素点的灰度值为0,使用findContours工具检索图像中的轮廓,得到当前图片中耳标的粗糙轮廓点集。
S202:形状拟合
由于摄像头角度的影响,原本为圆形的耳标,在图片中反映为近似椭圆的形状,根据 这一特性,本步骤将S201获得的粗糙轮廓(即耳标边缘)拟合为一个精准的椭圆。具体包括如下步骤:设定第一阈值等于50作为椭圆的轮廓点集元素个数的阈值,若所述粗糙轮廓点集的点集元素个数大于预设的阈值50,则认为其是可能的外轮廓;否则,舍弃当前轮廓,返回S201重新选取椭圆焦点。使用fitEllipse工具,设定第二阈值组为2和5作为筛选轮廓中最合理的椭圆的阈值,如当前轮廓的长短轴的长度与第一阈值50的差值均小于5,且上一个椭圆轮廓的长短轴长度差值都大于2(椭圆轮廓的初始值默认为0,即,如当前轮廓为第一个轮廓,则此处的“上一个椭圆轮廓”的初始值为0),则认为是接近椭圆轮廓的最大椭圆;如果当前轮廓的长短轴长度不符合当前的阈值条件,则舍弃当前轮廓,返回S201重新选取椭圆焦点进行重新拟合。经过上述两个阈值判定后得到的最大椭圆即可认为是耳标轮廓,即第一圆环5的外边缘,从而拟合出最接近于该轮廓形状的椭圆。将得到的最大椭圆的参数作为处理后的耳标轮廓的参数,所述参数包括最大椭圆的长轴、短轴和偏转角。
步骤三:变色区特征提取及根据颜色与温度对应关系输出猪只温度
S301:在第一参照区、第二参照区和变色区分别取点计算变色区相对RGB值
根据猪只感温变色耳标的物理结构,将步骤一得到的耳标图片由外到内划分为第一参照区、第二参照区和变色区三个区域,分别对应第一圆环5、第二圆环4和变色区6。所述三个区域的半径比大致为1:1:3,由于所述第一圆环5、第二圆环4和变色区6为同心设置,因此环比为1:1:6:1:1;可选的,环宽比也可为3:3:17:3:3。以点概率抽样模型为基础,选取步骤S202获得的椭圆的轴线上三个区域的各4个抽样点,分别计算三个区域中4个抽样点的平均RGB值,代表三个区域的平均RGB值。为了消除各摄像头之间白平衡、角度以及光照强度不同等因素的干扰进行归一化处理,再以第一参照区和第二参照区获得的平均RGB值分别为上限和下限,利用计算公式:
变色区相对RGB值=(变色区RGB值-第一参照区RGB值)/(第二参照区RGB值-第一参照区RGB值),求得变色区的相对RGB值。本发明采用相对参数代替绝对参数,从而消除颜色RGB值外其他因素对回归模型的干扰。
S302:获得反映温度与耳标变色区颜色之间的对应关系并输出猪只温度
继续对步骤一生成的其余多张含单个耳标的矩形图片执行上述操作,从而获得多个耳标轮廓的参数和变色区的相对RGB值。为建立猪场图片中变色区6的颜色与温度间的映射关系,创建回归分析模型,将获得的大量变色区相对RGB值和与其对应的实际温度值 作为输入层输入,经局部加权线性回归、树回归等有监督机器学习后即可得到所求的线性相关的映射关系,从而输出图片变色区所对应的温度值,即获得佩戴当前耳标的猪只温度。上述方法将图片数据处理为大量的变色区相对RGB值与温度的对应关系。为弥补普通线性回归中过拟合和欠拟合的问题,采用局部加权线性回归这一方式对二者关系进行回归分析:依据数据点与预测点的距离的不同,对距离越小的点赋予更大的权重,选取权重类型为高斯核。通过设定合理的核函数参数,即可得到一个效果较好的回归模型。后续投入使用时仅需对回归分析模型进行轻量化即可。
以上各实施例和具体案例仅用以说明本发明的技术方案,而非是对其的限制,尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换,而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围,本领域技术人员根据本说明书内容所做出的非本质改进和调整或者替换,均属本发明所要求保护的范围。

Claims (9)

  1. 一种家畜感温变色耳标,包括耳标本体和标颈,所述标颈顶端设有倒锥,其特征在于,所述耳标本体包括与家畜皮肤接触部分作为第一部分,所述耳标本体的其余部分为第二部分;
    其中,至少所述第一部分含有1-3wt%的感温变色粉;至少所述第二部分为透明或半透明的热塑性塑料,能够显示所述第一部分的颜色;
    其中所述感温变色粉为38℃变色的白色/有色感温变色粉,随着接触的家畜温度升高,所述感温变色粉的颜色逐渐变深或变淡,当温度达到41℃时变为与原色相反的有色/白色。
  2. 根据权利要求1所述的感温变色耳标,其特征在于,所述耳标本体外表面涂覆有隔热材料。
  3. 根据权利要求1所述的感温变色耳标,其特征在于,所述耳标本体的外表面为圆形,从边缘向内包括两个同心的第一圆环(5)、第二圆环(4)和变色区(6),所述第一圆环的外圆半径大于所述第二圆环;所述第一圆环(5)涂覆不可去除的有色颜料;所述第二圆环(4)涂覆有白色的不可去除颜料,所述变色区(6)与家畜皮肤接触部分含有感温变色粉,所述变色区能够随着接触的家畜温度升高而变色;且所述第一圆环颜料的颜色与第二圆环的颜色不同。
  4. 根据权利要求1所述的感温变色耳标,其特征在于,所述透明或半透明的热塑性塑料选自以下一种:聚丙烯,软聚氯乙烯、AS、ABS、硅胶、TPU、PMMA、PVC、MS、PET、环氧树脂和普通聚乙烯。
  5. 一种利用如权利要求3所述的感温变色耳标的温度检测方法,包括穿戴在待监测猪只耳上的所述感温变色耳标,以及在待监测区域内设置的监控摄像头;
    其特征在于,具体包括如下步骤:
    步骤一:利用猪场内的监控摄像头获得猪场图片,根据耳标图像的训练模型提取图片中的耳标图像,将获得的猪场图片分割从而生成多张含单个耳标的矩形图片,从而选出图中所有的耳标;
    步骤二:将步骤一获得的含单个耳标的矩形图片,利用opencv图像处理技术将图片转为统一尺寸后,选取可能的耳标中心点为椭圆焦点,使用Canny边缘检测算法得到图像的合理边缘点集,再进行二值化处理,将图片转成单通道灰度图像,使用findContours工具检索图像中的轮廓,获得当前图片中耳标的粗糙轮廓点集;随后设定两个阈值条件,将获得的粗糙轮廓拟合为一个最大椭圆,并将拟合出的最大椭圆的外周认为是耳标轮廓,即第一圆环的外边缘;将得到的最大椭圆的参数作为处理后的耳标轮 廓的参数,所述参数包括最大椭圆的长轴、短轴和偏转角;
    其中,“设定两个阈值条件,将获得的粗糙轮廓拟合为一个最大椭圆”具体包括如下步骤:
    设定第一阈值等于50作为椭圆的轮廓点集元素个数的阈值,若所述粗糙轮廓点集的点集元素个数大于预设的阈值50,则认为其是可能的外轮廓;否则,舍弃当前轮廓,返回步骤二重新选取椭圆焦点;使用fitEllipse工具,设定第二阈值组的阈值条件为2和5作为筛选当前椭圆轮廓的长短轴参数的阈值,如果当前椭圆轮廓的长短轴参数符合第二阈值组的阈值条件,则认为当前轮廓为拟合出的最大椭圆;如果当前椭圆轮廓的长短轴参数不符合当前的阈值条件,则舍弃当前轮廓,返回步骤二重新选取椭圆焦点;
    步骤三:将步骤一得到的单个耳标的矩形图片由外到内划分为第一参照区、第二参照区和变色区三个区域,分别对应第一圆环(5)、第二圆环(4)和变色区(6);
    选取步骤二获得的最大椭圆的轴线上三个区域的各4个抽样点,分别计算三个区域中4个抽样点的平均RGB值,代表三个区域的平均RGB值,再以第一参照区和第二参照区获得的平均RGB值分别为上限和下限,求得变色区的相对RGB值,即变色区RGB值相对于第一参照区值与第二参照区值范围内的位置,计算公式为:
    变色区的相对RGB值=(变色区RGB值-第一参照区RGB值)/(第二参照区RGB值-第一参照区RGB值);
    继续对步骤一生成的其余多张含单个耳标的矩形图片执行上述操作,从而获得多个变色区的相对RGB值;创建局部加权线性回归分析模型,将获得的多个变色区相对RGB值和与其对应的实际温度值作为输入层输入,采用局部加权线性回归对两个参数进行机器学习从而获得变色区相对RGB值与温度的对应关系,从而输出当前图片变色区所对应的温度值,即获得佩戴当前耳标的猪只温度。
  6. 根据权利要求5所述的温度检测方法,其特征在于,所述步骤一中“耳标图像的训练模型”的获得方法如下:预先采集包含耳标的猪只图片,使用labelimg标注工具标注出每张图片中的耳标的位置,并将标注的内容作为数据集导入目标检测算法模型进行模型训练,在进行多轮次的训练后,获得图片中所有耳标的具体位置;利用已训练好的训练模型将图片中的耳标以图片的形式保存下来,用于之后的图像处理训练和实际应用中的耳标提取。
  7. 一种猪只感温变色耳标的温度检测系统,包括:
    穿戴在待监测猪只耳上的如权利要求3所述的猪只感温变色耳标,监控摄像头,位于待监测区域内,所述监控摄像头为彩色摄像头;
    耳标训练模型模块,预先采集包含耳标的猪只图片,使用labelimg标注工具标注出每张图片中的耳标的位置,并将标注的内容作为数据集导入目标检测算法模型进行模型训练,在进行多轮次的训练后,获得图片中所有耳标的具体位置;利用已训练好的训练模型将图片中的耳标以图片的形式保存下来,用于之后的图像处理训练和实际应用中的耳标提取;
    耳标框选模块,根据耳标训练模型模块,将监控摄像头采集的图片分割生成多张含单个耳标的矩形图片;
    粗糙轮廓生成模块,将耳标框选模块选取的图片缩放为统一尺寸,选取可能的耳标中心点为椭圆焦点,使用Canny边缘检测算法得到图像的合理边缘点集,再进行二值化处理,将图片转成单通道灰度图像,使用findContours工具检索图像中的轮廓,获得当前图片中耳标的粗糙轮廓点集;
    椭圆轮廓生成模块,设定两个阈值条件,将粗糙轮廓生成模块的获得的粗糙轮廓拟合为一个最大椭圆,并将拟合出的最大椭圆认为是耳标轮廓,即第一圆环的外边缘;
    所述椭圆轮廓生成模块包括第一阈值判别单元和第二阈值组判别单元;
    所述第一阈值判别单元包括:设定第一阈值等于50作为椭圆的轮廓点集元素个数的阈值,若所述粗糙轮廓点集的点集元素个数大于预设的阈值50,则认为其是可能的外轮廓;否则,舍弃当前轮廓,返回粗糙轮廓生成模块重新选取椭圆焦点;
    所述第二阈值组判别单元包括:使用fitEllipse工具,设定第二阈值组为2和5作为筛选轮廓中最合理的椭圆的阈值,如当前轮廓的长短轴的长度与第一阈值50的差值均小于5,且上一个椭圆轮廓的长短轴差值都大于2,则认为当前轮廓为拟合出的最大椭圆;如果当前轮廓的长短轴的长度不符合当前的阈值条件,则舍弃当前轮廓,返回粗糙轮廓生成模块重新选取椭圆焦点进行重新拟合;其中,所述椭圆轮廓的初始值默认为0;
    变色区特征提取模块,单个耳标的矩形图片由外到内划分为第一参照区、第二参照区和变色区三个区域,分别对应第一圆环(5)、第二圆环(4)和变色区(6);选取椭圆轮廓生成模块获得的最大椭圆的轴线上三个区域的各4个抽样点,分别计算三个区域中4个抽样点的平均RGB值,代表三个区域的平均RGB值,再以第一参照区和第二参照区获得的平均RGB值分别为上限和下限,具体计算公式如下:
    变色区的相对RGB值=(变色区RGB值-第一参照区RGB值)/(第二参照区RGB值-第一参照区RGB值)值;以及
    变色区相对RGB值与温度映射模块,创建局部加权线性回归分析模型,将获得的多个变色区相对RGB值和与其对应的实际温度值作为输入层输入,采用局部加权线性回归对两个参数进行机器学习从而获得变色区相对RGB值与温度的对应关系,从而输出当前图片变色区所对应的温度值,即获得佩戴当前耳标的猪只温度。
  8. 根据权利要求7所述的温度检测系统,其特征在于,所述第一圆环(5)、第二圆环(4)和变色区(6)为同心设置,其半径比为1:1:3,因此所述第一参照区、第二参照区和变色区的环比为1:1:6:1:1。
  9. 根据权利要求7所述的温度检测系统,其特征在于,所述感温变色粉为38℃变色的有色感温变色粉,随着接触的家畜温度升高,所述感温变色粉的颜色逐渐变淡,当温度达到41℃时变为与原色相反的白色。
PCT/CN2022/094371 2021-06-02 2022-05-23 家畜感温变色耳标、其温度检测方法及系统 WO2022253015A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110614045.8A CN115428745B (zh) 2021-06-02 2021-06-02 家畜感温变色耳标,制备方法及其机器视觉监测系统
CN202110614045.8 2021-06-02
CN202210243683.8A CN114305349B (zh) 2022-03-14 2022-03-14 利用猪只感温变色耳标的温度检测方法及系统
CN202210243683.8 2022-03-14

Publications (1)

Publication Number Publication Date
WO2022253015A1 true WO2022253015A1 (zh) 2022-12-08

Family

ID=84322769

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094371 WO2022253015A1 (zh) 2021-06-02 2022-05-23 家畜感温变色耳标、其温度检测方法及系统

Country Status (1)

Country Link
WO (1) WO2022253015A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675920A (en) * 1996-04-16 1997-10-14 Long; Chen-Chen Animal ear number tag
KR20180033726A (ko) * 2016-09-26 2018-04-04 주식회사트레디오 가축의 전염병 발견 방법
KR20180103269A (ko) * 2017-03-09 2018-09-19 이석근 체온이 상승하면 색상이 변색되는 가축용 방한 덮개
CN208754939U (zh) * 2018-03-27 2019-04-19 许昌市建安区东和畜牧养殖专业合作社 一种畜牧耳标
CN110810264A (zh) * 2019-12-11 2020-02-21 秒针信息技术有限公司 电子耳标、基于电子耳标的监控方法和统计方法
CN114305349A (zh) * 2022-03-14 2022-04-12 天津大学四川创新研究院 利用猪只感温变色耳标的温度检测方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675920A (en) * 1996-04-16 1997-10-14 Long; Chen-Chen Animal ear number tag
KR20180033726A (ko) * 2016-09-26 2018-04-04 주식회사트레디오 가축의 전염병 발견 방법
KR20180103269A (ko) * 2017-03-09 2018-09-19 이석근 체온이 상승하면 색상이 변색되는 가축용 방한 덮개
CN208754939U (zh) * 2018-03-27 2019-04-19 许昌市建安区东和畜牧养殖专业合作社 一种畜牧耳标
CN110810264A (zh) * 2019-12-11 2020-02-21 秒针信息技术有限公司 电子耳标、基于电子耳标的监控方法和统计方法
CN114305349A (zh) * 2022-03-14 2022-04-12 天津大学四川创新研究院 利用猪只感温变色耳标的温度检测方法及系统

Similar Documents

Publication Publication Date Title
Wu et al. Using a CNN-LSTM for basic behaviors detection of a single dairy cow in a complex environment
CN106406403B (zh) 一种基于增强现实的农业管控系统
WO2020133560A1 (zh) 基于大数据技术的家畜智能化养殖管理系统及方法
CN110200598A (zh) 一种大型养殖场体征异常禽类检测系统及检测方法
CN111640139B (zh) 一种基于鱼群行为时空特性的循环水养殖水质智能预警装置和方法
CN201846435U (zh) 一种用于人工鱼礁诱集试验的自动监测与连续拍摄装置
WO2022253015A1 (zh) 家畜感温变色耳标、其温度检测方法及系统
CN114305349B (zh) 利用猪只感温变色耳标的温度检测方法及系统
CN112586824A (zh) 一种用于畜禽养殖场的巡检头盔及巡检方法
Devi et al. Eight convolutional layered deep convolutional neural network based banana leaf disease prediction
Xu et al. Automatic sheep behaviour analysis using mask r-cnn
CN110455413A (zh) 一种中大型牲畜养殖场体温监测装置及监测方法
CN108206855A (zh) 一种基于物联网的集约化畜禽养殖管理系统
Jaddoa et al. Automatic temperature measurement for hot spots in face region of cattle using infrared thermography
CN116309480B (zh) 一种基于深度学习的作物生长智能决策系统及方法
CN115147782A (zh) 一种死亡动物识别方法及装置
CN115777572A (zh) 一种可统计生猪疾病数据的远程监控装置及系统
CN115428745B (zh) 家畜感温变色耳标,制备方法及其机器视觉监测系统
CN107886338A (zh) 盐碱地牧业物联网牲畜健康管理系统
CN109446906A (zh) 一种动作捕捉系统和方法
CN107256608A (zh) 一种基于移动互联网可远程抓拍的养殖安防系统
CN106719250B (zh) 一种监测水下底栖动物的装置及方法
CN112241702A (zh) 基于红外双光摄像机的体温检测方法
TWI779334B (zh) 移動式水中生物自動標記方法及水中生物影像自動標記系統
Jeong et al. A Monitoring System for Cattle Behavior Detection using YOLO-v8 in IoT Environments

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22815062

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22815062

Country of ref document: EP

Kind code of ref document: A1