WO2015096345A1 - Forage detection system and method based on machine vision - Google Patents

Forage detection system and method based on machine vision Download PDF

Info

Publication number
WO2015096345A1
WO2015096345A1 PCT/CN2014/076753 CN2014076753W WO2015096345A1 WO 2015096345 A1 WO2015096345 A1 WO 2015096345A1 CN 2014076753 W CN2014076753 W CN 2014076753W WO 2015096345 A1 WO2015096345 A1 WO 2015096345A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
feed
feed detection
detection
forage
Prior art date
Application number
PCT/CN2014/076753
Other languages
French (fr)
Chinese (zh)
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
Application filed by 中国科学院自动化研究所, 东莞中国科学院云计算产业技术创新与育成中心 filed Critical 中国科学院自动化研究所
Publication of WO2015096345A1 publication Critical patent/WO2015096345A1/en

Links

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
    • A01K5/00Feeding devices for stock or game ; Feeding wagons; Feeding stacks
    • A01K5/02Automatic devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30128Food products

Definitions

  • the present invention relates to automated intelligent control in facility husbandry, and more particularly to a grass vision feed detection system and method based on machine vision.
  • the present invention is directed to the above problems in the intelligent animal husbandry, and proposes a machine vision based forage feed detection system and method for determining the remaining amount of feed by performing machine vision intelligent detection on the forage feed.
  • a machine vision based forage feed detection method comprising the following steps:
  • Step 1 Divide the area of the trough trough to be monitored to obtain multiple feed tests Area
  • Step 2 determining a region of interest in the feed detection area, performing edge detection after transforming the region of interest, obtaining a feed detection region in which the livestock is present, and identifying the same;
  • Step 3 For the smallest rectangular area where the region of interest in the feed detection area where no livestock exists, the RGB color component is detected to obtain relevant feed detection information; and step 4, the detected feed information is displayed.
  • a machine vision based forage feed detection system comprising: a feed detection area module, an edge detection module, a feed detection module, and a display module, wherein:
  • the feed detection area module is configured to divide the pasture trough area to be monitored to obtain a plurality of feed detection areas
  • the edge detecting module is configured to determine a region of interest in the feed detecting region, perform edge detection after transform stretching for the region of interest (ROI region), obtain a feed detecting region in which a livestock exists, and perform the same Identification
  • the feed detection module is configured to detect the minimum rectangular area where the region of interest is located in the feed detection area where no livestock exists, and obtain relevant feed detection information based on the RGB color component;
  • the display module is configured to display the feed information detected by the feed detection module.
  • the beneficial effects of the invention are:
  • FIG. 1 is a flow chart of a method for detecting a forage feed based on machine vision according to the present invention
  • FIG. 2 is a schematic view showing a region division of a pasture trough according to an embodiment of the present invention
  • 3 is a schematic view of animal edge detection according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of feed detection according to an embodiment of the present invention
  • Figure 5 is a schematic diagram showing the results of feed detection according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural view of a forage-based feed detection system based on machine vision of the present invention.
  • FIG. 1 is a flow chart of a machine vision based forage feed detection method. As shown in FIG. 1, according to an aspect of the present invention, a machine vision based forage feed detection method is provided, the method comprising the following steps:
  • Step 1 Divide the pasture trough area to be monitored to obtain multiple feed detection areas
  • the step is specifically as follows: manually dividing the effective area in the visible range of the fixed monitoring video into the trough area, and the divided area is the feed detection area.
  • Fig. 2 is a schematic view showing the division of the trough area according to an embodiment of the present invention. In the on-site monitoring image shown in Fig. 1, the livestock trough is artificially divided into a plurality of feed detection areas.
  • the trough target detection area can be manually divided within the detectable effective range based on the actual scene of the surveillance image, so that the feed can be based on the apparent difference between the feed color and the background color of the trough. Detection. In the actual application scenario, detecting the feed alone is not enough to meet the actual demand, because when the feed is monitored in real time, the livestock often eats, so the feed detection area is often affected by the feeding of the livestock. Therefore, the present invention also requires the detection of the edge contour of the animal in the target area based on significant gradient changes in the background of the livestock and the trough.
  • Step 2 determining a region of interest in the feed detection region, performing edge detection after transforming the region of interest (ROI region), obtaining a feed detection region in which the livestock is present, and identifying the region;
  • ROI region region of interest
  • the method uses a combination of image stretching and canny edge detection to extract the edge of the animal, and then Calculate the number of continuous edge track points to determine the presence of livestock in the feed detection area.
  • the specific steps are as follows:
  • Step 21 Image initialization: According to the region division of step 1, the feed detection area of each minimum unit is specified as the region of interest (ROI region) for each feed detection, and the feed detection region is used by using the perspective transformation and the stretching function. The ROI area is transformed and stretched;
  • ROI region region of interest
  • the image is transformed and stretched by using the OpenCV perspective transformation and the stretching function, and the normalized size after stretching is 100*200, and the image of the ROI region before the transformation is as shown in FIG. 3(a).
  • the image after the transformation is as shown in Fig. 3(b), and the width of the image after perspective transformation and stretching in Fig. 3(b) is more than twice the height;
  • Step 22 performing canny edge detection on the image obtained by transforming and stretching, and obtaining an edge contour of the animal in the image, as shown in FIG. 3 (c, and determining whether the livestock is present in the feed detection area according to the obtained animal edge contour;
  • the step of determining whether there is a livestock in the feed detection area is specifically: calculating the number of consecutive edge track points in the edge contour of the animal, and if the number of consecutive edge track points is greater than a predetermined threshold, it is considered that there is a livestock in the feed detection area, for example If the number of continuous edge track points in the edge profile is longer than 40, it means that there is livestock in the feed detection area;
  • Step 23 Identify the feed detection area where the livestock is present, and the result of the area in the next feed detection algorithm is not recorded as valid in the feed detection area where the animal is eating.
  • the white line is identified at the boundary of the smallest rectangle where the ROI region is located, as shown in Figure 3(d).
  • Step 3 detecting, according to the RGB color component, the smallest rectangular area where the region of interest in the feed detection area where no livestock exists is obtained, and obtaining relevant feed detection information; the step is specifically: scanning the region where the region of interest is located The smallest rectangular area, the original image of the feed detection is shown in Figure 4(a), and the RGB pixels of the image in the area are taken out to determine the color of the pixel to distinguish the feed and the base color of the trough, thereby detecting the blank of the feed and the trough. At the location, and get the proportion of the area occupied by the feed, and then you can estimate the remaining value.
  • the step 3 further includes the following steps:
  • Step 31 Obtain pixel points in a minimum rectangular area where the region of interest is located, and extract values of respective components of RGB;
  • Step 32 Determine the location of the feed according to the values of the respective components of each pixel RGB and perform statistics
  • the color of the feed is grass yellow, it can be used as a judgment condition of the feed. If the value of each component of RGB of a certain pixel satisfies the following formula, the position of the pixel is considered as a feed. :
  • Step 33 judging the position of the trough according to the values of the respective components of each pixel and performing statistics
  • the background color of the pasture trough is artificially painted into a smooth white or other light color to distinguish it from the color of the feed, so that it can be used as a judgment condition for the blank of the trough, that is, if a certain pixel is used
  • the value of each component of RGB satisfies the following formula, and the position of the pixel is considered to be a blank of the trough:
  • step 34 based on the position information of the feed and the trough blank obtained in the steps 32 and 33, the proportion of the area in which the feed is located is calculated. ⁇ (0 ⁇ ⁇ ⁇ 1 and estimate the remaining amount y of the feed in the smallest rectangular area in which the region of interest is located.
  • the step is specifically to count the number of pixels of the feed, and calculate the proportion of the region where the feed is located ⁇ ⁇ ⁇ ;>, and then estimate the remaining amount y of the feed in the smallest rectangular region where the region of interest is located:
  • the detected result is displayed in real time on the monitoring display.
  • the area where the livestock is eating and the remaining amount of the feed can be indicated, as shown in FIG. 5, 5(a) is a schematic view showing the division of the pasture trough area according to an embodiment of the present invention, and FIG. 5(b) is a view showing the feed information obtained by detecting the feed detection area according to the method of the present invention, letters A and B.
  • K represents the serial number of the feed detection area, and the percentage value after the letter indicates the surplus of the feed in the feed detection area.
  • the present invention can also set different alarm states according to the consumption of the feed to remind the management personnel, and can record the feed consumption.
  • the historical data enables real-time query and retrieval, and on this basis, intelligent monitoring and management of forage conditions based on machine vision is realized.
  • FIG. 6 is a schematic structural view of a machine vision based forage feed detection system.
  • a machine vision based forage feed detection system comprising: a feed detection area module , an edge detection module, a feed detection module, and a display module, wherein:
  • the feed detection area module is configured to divide the pasture trough area to be monitored to obtain a plurality of feed detection areas
  • the edge detecting module is configured to determine a region of interest in the feed detecting region, perform edge detection after transform stretching for the region of interest (ROI region), obtain a feed detecting region in which a livestock exists, and Marking
  • the feed detection module is configured to detect the minimum rectangular area where the region of interest is located in the feed detection area where no livestock exists, and obtain relevant feed detection information based on the RGB color component;
  • the display module is configured to display the feed information detected by the feed detection module.

Landscapes

  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Environmental Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Birds (AREA)
  • Animal Husbandry (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Feeding And Watering For Cattle Raising And Animal Husbandry (AREA)

Abstract

A forage detection method based on machine vision. The method comprises the following steps: dividing a pasture feed trough region to be monitored to obtain multiple forage detection regions; obtaining a forage detection region with livestock according to edge detection on a minimum rectangular region of a region of interest in the forage detection regions; detecting, according to RGB color components, a minimum rectangular region of the region of interest in the forage detection region without livestock, so as to obtain related forage detection information; and displaying the obtained forage detection information. By using the method, the surplus of forage in pasture feed troughs can be automatically detected and alarm conditions with varying degrees can be set according to consumption conditions of the forage, so as to remind managers; historical data of forage consumption can also be recorded to implement query and retrieval; and on this basis, machine vision-based intelligent monitoring and management on forage conditions can be implemented.

Description

基于机器视觉的牧草饲料检测系统和方法 技术领域 本发明涉及设施牧业中的自动化智能控制, 特别是涉及一种基于机 器视觉的牧草饲料检测系统和方法。  BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to automated intelligent control in facility husbandry, and more particularly to a grass vision feed detection system and method based on machine vision.
背景技术 从近 50 年来我国养牛业的统计情况来看, 我国牛的存栏数目不断 增多, 经营规模不断扩大, 养牛技术水平不断提高, 但与国外一些发达 国家的养牛技术相比较, 我国养牛业仍然存在饲料结果不合理、 出场率 不高、 管理成本大等问题。 尽管近年来我国奶业的发展速度很快, 但总 体上来看, 奶业在农业中依然是一个发展相对滞后的产业, 基础还相当 薄弱, 具体体现在奶牛单产水平低、 监管不够完善、 饲养管理水平低等 许多方面, 过去对牧业的饲料管理仍基于人工劳力的监管方式, 管理不 够全面和完善。 BACKGROUND OF THE INVENTION From the statistics of China's cattle industry in the past 50 years, the number of cattle in China has been increasing, the scale of operations has been continuously expanded, and the level of cattle raising technology has been continuously improved. However, compared with the cattle raising technology in some developed countries abroad, China The cattle industry still has problems such as unreasonable feed results, low exit rate and high management costs. Despite the rapid development of China's dairy industry in recent years, in general, the dairy industry is still a relatively lagging industry in agriculture, and the foundation is still quite weak, which is reflected in the low yield of dairy cows, inadequate supervision, and feeding management. In many aspects, the past level of feed management for animal husbandry is still based on the supervision of artificial labor, and the management is not comprehensive and perfect.
随着设施牧业的大力发展, 牧业管理逐歩趋向智能化应用。 用机器 视觉技术代替人眼进行监管作业具有明显的优越性: 首先其能排除人的 主观因素的干扰, 避免因人而异的判断结果; 另外能完成较为定量、 客 观的计算工作,不仅可以提高精度,也可将人从繁重的劳动中解放出来。  With the vigorous development of the facility animal husbandry, the management of animal husbandry tends to be intelligently applied. The use of machine vision technology to replace the human eye for supervisory operations has obvious advantages: First, it can eliminate the interference of subjective factors of human beings, avoid the judgment results that vary from person to person; in addition, it can complete more quantitative and objective calculations, which can not only improve Accuracy can also free people from heavy labor.
发明内容 本发明针对智能牧业中存在的上述问题, 提出一种基于机器视觉的 牧草饲料检测系统和方法, 以对牧草饲料进行机器视觉智能检测从而判 断饲料的剩余量。 SUMMARY OF THE INVENTION The present invention is directed to the above problems in the intelligent animal husbandry, and proposes a machine vision based forage feed detection system and method for determining the remaining amount of feed by performing machine vision intelligent detection on the forage feed.
根据本发明的一方面, 提供一种基于机器视觉的牧草饲料检测方法, 该方法包括以下歩骤:  According to an aspect of the present invention, a machine vision based forage feed detection method is provided, the method comprising the following steps:
歩骤 1, 对于待监控的牧场食槽区域进行划分, 得到多个饲料检测 区域; Step 1: Divide the area of the trough trough to be monitored to obtain multiple feed tests Area
歩骤 2, 确定所述饲料检测区域中的感兴趣区域, 在对于所述感兴 趣区域变换拉伸后进行边缘检测, 得到存在牲畜的饲料检测区域, 并对 其进行标识;  Step 2: determining a region of interest in the feed detection area, performing edge detection after transforming the region of interest, obtaining a feed detection region in which the livestock is present, and identifying the same;
歩骤 3, 对于不存在牲畜的饲料检测区域中感兴趣区域所在的最小 矩形区域, 基于 RGB颜色分量进行检测, 得到相关的饲料检测信息; 歩骤 4, 将检测得到的饲料信息显示出来。  Step 3: For the smallest rectangular area where the region of interest in the feed detection area where no livestock exists, the RGB color component is detected to obtain relevant feed detection information; and step 4, the detected feed information is displayed.
根据本发明的另一方面, 还提供一种基于机器视觉的牧草饲料检测 系统, 该系统包括: 饲料检测区域模块、 边缘检测模块、 饲料检测模块 和显示模块, 其中:  According to another aspect of the present invention, there is also provided a machine vision based forage feed detection system, the system comprising: a feed detection area module, an edge detection module, a feed detection module, and a display module, wherein:
所述饲料检测区域模块用于对于待监控的牧场食槽区域进行划分, 得到多个饲料检测区域;  The feed detection area module is configured to divide the pasture trough area to be monitored to obtain a plurality of feed detection areas;
所述边缘检测模块用于确定所述饲料检测区域中的感兴趣区域, 在 对于所述感兴趣区域 (ROI区域) 变换拉伸后进行边缘检测, 得到存在 牲畜的饲料检测区域, 并对其进行标识;  The edge detecting module is configured to determine a region of interest in the feed detecting region, perform edge detection after transform stretching for the region of interest (ROI region), obtain a feed detecting region in which a livestock exists, and perform the same Identification
所述饲料检测模块用于对于不存在牲畜的饲料检测区域中感兴趣 区域所在的最小矩形区域, 基于 RGB颜色分量进行检测, 得到相关的 饲料检测信息;  The feed detection module is configured to detect the minimum rectangular area where the region of interest is located in the feed detection area where no livestock exists, and obtain relevant feed detection information based on the RGB color component;
所述显示模块用于将饲料检测模块检测得到的饲料信息显示出来。 本发明的有益效果是:  The display module is configured to display the feed information detected by the feed detection module. The beneficial effects of the invention are:
( 1 )通过现场实时监控录像, 自动检测牧场料槽中饲料的剩余量; (1) Automatically detecting the remaining amount of feed in the pasture trough through on-site real-time monitoring and video recording;
(2) 根据草料消耗情况可设置不同程度报警状态提醒管理人员;(2) According to the situation of forage consumption, different levels of alarm status can be set to remind management personnel;
(3 ) 记录草料消耗历史数据, 可实现查询及检索, 并在此基础上 实现基于机器视觉的草料状况智能监控和管理。 (3) Record historical data of forage consumption, which can realize query and retrieval, and realize intelligent monitoring and management of forage conditions based on machine vision.
附图说明 图 1为本发明基于机器视觉的牧草饲料检测方法的流程图; 图 2为根据本发明一实施例的牧场食槽区域划分示意图; 图 3为根据本发明一实施例的牲畜边缘检测示意图; 图 4为根据本发明一实施例的饲料检测示意图; BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow chart of a method for detecting a forage feed based on machine vision according to the present invention; FIG. 2 is a schematic view showing a region division of a pasture trough according to an embodiment of the present invention; 3 is a schematic view of animal edge detection according to an embodiment of the present invention; FIG. 4 is a schematic diagram of feed detection according to an embodiment of the present invention;
图 5为根据本发明一实施例的饲料检测结果示意图;  Figure 5 is a schematic diagram showing the results of feed detection according to an embodiment of the present invention;
图 6为本发明基于机器视觉的牧草饲料检测系统的结构示意图。  6 is a schematic structural view of a forage-based feed detection system based on machine vision of the present invention.
具体实施方式 为使本发明的目的、 技术方案和优点更加清楚明白, 以下结合具体 实施例, 并参照附图, 对本发明进一歩详细说明。 DETAILED DESCRIPTION OF THE INVENTION In order to make the objects, the technical solutions and the advantages of the present invention more comprehensible, the present invention will be described in detail below with reference to the accompanying drawings.
图 1为基于机器视觉的牧草饲料检测方法的流程图, 如图 1所示, 根据本发明的一方面, 提供一种基于机器视觉的牧草饲料检测方法, 该 方法包括以下歩骤:  1 is a flow chart of a machine vision based forage feed detection method. As shown in FIG. 1, according to an aspect of the present invention, a machine vision based forage feed detection method is provided, the method comprising the following steps:
歩骤 1, 对于待监控的牧场食槽区域进行划分, 得到多个饲料检测 区域;  Step 1. Divide the pasture trough area to be monitored to obtain multiple feed detection areas;
该歩骤具体为: 对固定监控录像可视范围内的有效区域进行人工划 分食槽区域, 划分得到的区域为饲料检测区域。 图 2为根据本发明一实 施例的牧场食槽区域划分示意图, 在图 1所示的现场监控图像中, 人为 地将牲畜食槽划分为多个饲料检测区域。  The step is specifically as follows: manually dividing the effective area in the visible range of the fixed monitoring video into the trough area, and the divided area is the feed detection area. Fig. 2 is a schematic view showing the division of the trough area according to an embodiment of the present invention. In the on-site monitoring image shown in Fig. 1, the livestock trough is artificially divided into a plurality of feed detection areas.
在无明显食槽划分的环境下, 可基于监控图像的实际场景, 对食槽 目标检测区域在可检测的有效范围内进行人工划分, 这样就可以基于饲 料颜色和食槽背景颜色的明显区别进行饲料的检测。 在实际应用场景中, 单单检测饲料并不足以满足实际需求, 因为在对饲料进行实时监控时, 常常出现牲畜进食的情况, 因此饲料检测区域经常受到牲畜进食的影响。 因此, 本发明还需要基于牲畜和食槽背景的明显梯度变化检测目标区域 中牲畜的边缘轮廓。  In the environment without obvious trough division, the trough target detection area can be manually divided within the detectable effective range based on the actual scene of the surveillance image, so that the feed can be based on the apparent difference between the feed color and the background color of the trough. Detection. In the actual application scenario, detecting the feed alone is not enough to meet the actual demand, because when the feed is monitored in real time, the livestock often eats, so the feed detection area is often affected by the feeding of the livestock. Therefore, the present invention also requires the detection of the edge contour of the animal in the target area based on significant gradient changes in the background of the livestock and the trough.
歩骤 2, 确定所述饲料检测区域中的感兴趣区域, 在对于所述感兴 趣区域 (ROI区域) 变换拉伸后进行边缘检测, 得到存在牲畜的饲料检 测区域, 并对其进行标识;  Step 2: determining a region of interest in the feed detection region, performing edge detection after transforming the region of interest (ROI region), obtaining a feed detection region in which the livestock is present, and identifying the region;
考虑到将饲料检测区域进行透视变换后的拉伸图像能够使得牲畜 轮廓线得到明显的拉伸, 同时牲畜的肤色与检测背景具有明显的颜色梯 度变化, 因此该歩骤采用透视变换后进行图像拉伸和 canny边缘检测相 结合的方法来提取牲畜的边缘, 然后再计算连续边缘轨迹点的个数以判 断饲料检测区域存在牲畜进食的情况, 具体歩骤如下: Considering that the stretched image after the perspective transformation of the feed detection area can make the livestock The contour is obviously stretched, and the skin color of the animal has a significant color gradient change with the detection background. Therefore, the method uses a combination of image stretching and canny edge detection to extract the edge of the animal, and then Calculate the number of continuous edge track points to determine the presence of livestock in the feed detection area. The specific steps are as follows:
歩骤 21, 图像初始化: 根据歩骤 1的区域划分, 规定每个最小单元 的饲料检测区域为每一次饲料检测的感兴趣区域 (ROI 区域), 使用透 视变换和拉伸函数对饲料检测区域中 ROI区域进行变换拉伸;  Step 21: Image initialization: According to the region division of step 1, the feed detection area of each minimum unit is specified as the region of interest (ROI region) for each feed detection, and the feed detection region is used by using the perspective transformation and the stretching function. The ROI area is transformed and stretched;
在本发明一实施例中, 采用 OpenCV透视变换和拉伸函数对于图像 进行变换拉伸, 拉伸后的归一化尺寸为 100*200, 变换拉伸前的 ROI区 域图像如图 3(a)所示, 变换拉伸后的图像如图 3(b)所示, 图 3(b)中透视 变换和拉伸后的图像宽度大于高度两倍左右;  In an embodiment of the invention, the image is transformed and stretched by using the OpenCV perspective transformation and the stretching function, and the normalized size after stretching is 100*200, and the image of the ROI region before the transformation is as shown in FIG. 3(a). As shown, the image after the transformation is as shown in Fig. 3(b), and the width of the image after perspective transformation and stretching in Fig. 3(b) is more than twice the height;
歩骤 22, 对于变换拉伸后得到的图像进行 canny边缘检测, 得到图 像中牲畜的边缘轮廓, 如图 3 (c所示, 并根据得到的牲畜边缘轮廓判断 该饲料检测区域中是否存在牲畜;  Step 22: performing canny edge detection on the image obtained by transforming and stretching, and obtaining an edge contour of the animal in the image, as shown in FIG. 3 (c, and determining whether the livestock is present in the feed detection area according to the obtained animal edge contour;
所述判断饲料检测区域中是否存在牲畜的歩骤具体为: 计算牲畜边 缘轮廓中连续边缘轨迹点的数目, 若连续边缘轨迹点的数目大于一预定 阈值则认为该饲料检测区域中存在牲畜, 例如若边缘轮廓中的连续边缘 轨迹点的数目线长大于 40则表示该饲料检测区域中存在牲畜;  The step of determining whether there is a livestock in the feed detection area is specifically: calculating the number of consecutive edge track points in the edge contour of the animal, and if the number of consecutive edge track points is greater than a predetermined threshold, it is considered that there is a livestock in the feed detection area, for example If the number of continuous edge track points in the edge profile is longer than 40, it means that there is livestock in the feed detection area;
歩骤 23, 对存在牲畜的饲料检测区域进行标识, 被标识有牲畜在进 食的饲料检测区域在下一歩的饲料检测算法中该区域的结果不作有效 记录。  Step 23: Identify the feed detection area where the livestock is present, and the result of the area in the next feed detection algorithm is not recorded as valid in the feed detection area where the animal is eating.
在本发明一实施例中,用白色线在 ROI区域所在最小矩形的边界进 行标识, 如图 3 (d)所示。  In an embodiment of the invention, the white line is identified at the boundary of the smallest rectangle where the ROI region is located, as shown in Figure 3(d).
歩骤 3, 对于不存在牲畜的饲料检测区域中感兴趣区域所在的最小 矩形区域, 基于 RGB颜色分量进行检测, 得到相关的饲料检测信息; 该歩骤具体为: 扫描所述感兴趣区域所在的最小矩形区域, 饲料检测的 原始图像如图 4(a)所示,取出该区域内图像的 RGB像素点,判断像素点 的颜色, 以区分饲料和食槽底色, 从而检测得到饲料和食槽空白处所在 的位置, 并得到饲料所占的面积比重, 进而可以估算其剩余值。 所述歩骤 3进一歩包括以下歩骤: Step 3: detecting, according to the RGB color component, the smallest rectangular area where the region of interest in the feed detection area where no livestock exists is obtained, and obtaining relevant feed detection information; the step is specifically: scanning the region where the region of interest is located The smallest rectangular area, the original image of the feed detection is shown in Figure 4(a), and the RGB pixels of the image in the area are taken out to determine the color of the pixel to distinguish the feed and the base color of the trough, thereby detecting the blank of the feed and the trough. At the location, and get the proportion of the area occupied by the feed, and then you can estimate the remaining value. The step 3 further includes the following steps:
歩骤 31, 获取所述感兴趣区域所在最小矩形区域中的像素点, 并提 取其 RGB各个分量的值;  Step 31: Obtain pixel points in a minimum rectangular area where the region of interest is located, and extract values of respective components of RGB;
歩骤 32, 根据各像素点 RGB各个分量的值判断饲料所在的位置并 进行统计;  Step 32: Determine the location of the feed according to the values of the respective components of each pixel RGB and perform statistics;
在本发明一实施例中, 考虑到饲料的颜色是草黄色, 因此可以以此 作为饲料的判断条件, 如果某一像素点 RGB各个分量的值满足下式, 则认为该像素点的位置为饲料:
Figure imgf000007_0001
In an embodiment of the present invention, considering that the color of the feed is grass yellow, it can be used as a judgment condition of the feed. If the value of each component of RGB of a certain pixel satisfies the following formula, the position of the pixel is considered as a feed. :
Figure imgf000007_0001
歩骤 33, 根据各像素点 RGB各个分量的值判断食槽所在的位置并 进行统计;  Step 33: judging the position of the trough according to the values of the respective components of each pixel and performing statistics;
本发明中, 人为地将牧场食槽的背景颜色涂成光滑的白色或其他浅 色, 以有别于饲料的颜色, 因此可以以此作为食槽空白处的判断条件, 即如果某一像素点 RGB各个分量的值满足下式, 则认为该像素点的位 置为食槽空白处:
Figure imgf000007_0002
In the present invention, the background color of the pasture trough is artificially painted into a smooth white or other light color to distinguish it from the color of the feed, so that it can be used as a judgment condition for the blank of the trough, that is, if a certain pixel is used The value of each component of RGB satisfies the following formula, and the position of the pixel is considered to be a blank of the trough:
Figure imgf000007_0002
后的饲料区域用黑色表示, 空白区域用白色表示, 如图 40^所 歩骤 34,根据所述歩骤 32和 33得到的饲料和食槽空白处所在的位 置信息, 计算得到饲料所在区域的比重 χ(0<χ<1 并估算饲料在所述感 兴趣区域所在最小矩形区域内的剩余量 y。  The rear feed area is indicated by black, and the blank area is indicated by white. As shown in Fig. 40, step 34, based on the position information of the feed and the trough blank obtained in the steps 32 and 33, the proportion of the area in which the feed is located is calculated. χ (0 < χ < 1 and estimate the remaining amount y of the feed in the smallest rectangular area in which the region of interest is located.
该歩骤具体为, 统计饲料的像素点数量, 并据此计算饲料所在区域 的比重 ο<χ<ι;>, 然后估算得到饲料在所述感兴趣区域所在最小矩形区 域内的剩余量 y: 该歩骤中, 根据检测得到的饲料信息, 在监控显示器中实时显示检 测得到的结果, 比如可以在每个饲料检测区域表示出有牲畜在进食的区 域和饲料剩余量, 如图 5所示, 其中, 图 5(a)为最初根据本发明一实施 例的牧场食槽区域划分示意图, 图 5 (b)则显示了根据本发明方法对于饲 料检测区域进行检测得到的饲料信息, 字母 A、 B…… K表示饲料检测 区域的序号, 字母后面的百分比数值表示该饲料检测区域中饲料的剩余 另外, 本发明还可根据饲料的消耗情况设置不同程度的报警状态提 醒管理人员, 并可记录饲料消耗的历史数据, 实现实时的查询及检索, 进而在此基础上实现基于机器视觉的草料状况智能监控和管理。 The step is specifically to count the number of pixels of the feed, and calculate the proportion of the region where the feed is located ο< χ <ι;>, and then estimate the remaining amount y of the feed in the smallest rectangular region where the region of interest is located: In the step, according to the detected feed information, the detected result is displayed in real time on the monitoring display. For example, in each of the feed detection areas, the area where the livestock is eating and the remaining amount of the feed can be indicated, as shown in FIG. 5, 5(a) is a schematic view showing the division of the pasture trough area according to an embodiment of the present invention, and FIG. 5(b) is a view showing the feed information obtained by detecting the feed detection area according to the method of the present invention, letters A and B. K represents the serial number of the feed detection area, and the percentage value after the letter indicates the surplus of the feed in the feed detection area. In addition, the present invention can also set different alarm states according to the consumption of the feed to remind the management personnel, and can record the feed consumption. The historical data enables real-time query and retrieval, and on this basis, intelligent monitoring and management of forage conditions based on machine vision is realized.
图 6为基于机器视觉的牧草饲料检测系统的结构示意图, 如图 6所 示, 根据本发明的另一方面, 还提供一种基于机器视觉的牧草饲料检测 系统, 该系统包括: 饲料检测区域模块、 边缘检测模块、 饲料检测模块 和显示模块, 其中:  6 is a schematic structural view of a machine vision based forage feed detection system. As shown in FIG. 6, according to another aspect of the present invention, a machine vision based forage feed detection system is provided, the system comprising: a feed detection area module , an edge detection module, a feed detection module, and a display module, wherein:
所述饲料检测区域模块用于对于待监控的牧场食槽区域进行划分, 得到多个饲料检测区域;  The feed detection area module is configured to divide the pasture trough area to be monitored to obtain a plurality of feed detection areas;
所述边缘检测模块用于确定所述饲料检测区域中的感兴趣区域, 在 对于所述感兴趣区域 (ROI区域) 变换拉伸后的进行边缘检测, 得到存 在牲畜的饲料检测区域, 并对其进行标识;  The edge detecting module is configured to determine a region of interest in the feed detecting region, perform edge detection after transform stretching for the region of interest (ROI region), obtain a feed detecting region in which a livestock exists, and Marking
所述饲料检测模块用于对于不存在牲畜的饲料检测区域中感兴趣 区域所在的最小矩形区域, 基于 RGB颜色分量进行检测, 得到相关的 饲料检测信息;  The feed detection module is configured to detect the minimum rectangular area where the region of interest is located in the feed detection area where no livestock exists, and obtain relevant feed detection information based on the RGB color component;
所述显示模块用于将饲料检测模块检测得到的饲料信息显示出来。 以上所述的具体实施例, 对本发明的目的、 技术方案和有益效果进 行了进一歩详细说明, 所应理解的是, 以上所述仅为本发明的具体实施 实例而已, 并不用于限制本发明, 凡在本发明的精神和原则之内, 所做 的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。  The display module is configured to display the feed information detected by the feed detection module. The specific embodiments of the present invention have been described in detail with reference to the preferred embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种基于机器视觉的牧草饲料检测方法, 其特征在于, 该方法 包括以下歩骤: 1. A forage feed detection method based on machine vision, characterized in that the method includes the following steps:
歩骤 1, 对于待监控的牧场食槽区域进行划分, 得到多个饲料检测 区域; Step 1: Divide the pasture trough areas to be monitored to obtain multiple feed detection areas;
歩骤 2, 确定所述饲料检测区域中的感兴趣区域, 在对于所述感兴 趣区域变换拉伸后进行边缘检测, 得到存在牲畜的饲料检测区域, 并对 其进行标识; Step 2: Determine the area of interest in the feed detection area, perform edge detection after transforming and stretching the area of interest, obtain the feed detection area where livestock exists, and mark it;
歩骤 3, 对于不存在牲畜的饲料检测区域中感兴趣区域所在的最小 矩形区域, 基于 RGB颜色分量进行检测, 得到相关的饲料检测信息; 歩骤 4, 将检测得到的饲料信息显示出来。 Step 3. For the smallest rectangular area where the area of interest is located in the feed detection area where livestock does not exist, perform detection based on RGB color components to obtain relevant feed detection information; Step 4. Display the detected feed information.
2、 根据权利要求 1所述的方法, 其特征在于, 所述歩骤 2进一歩 包括以下歩骤: 2. The method according to claim 1, characterized in that said step 2 further includes the following steps:
歩骤 21, 根据所述歩骤 1的区域划分, 规定每个最小单元的饲料检 测区域为每一次饲料检测的感兴趣区域 (ROI 区域), 并使用透视变换 和拉伸函数对 ROI区域进行变换拉伸; Step 21: According to the area division of step 1, define the feed detection area of each minimum unit as the area of interest (ROI area) for each feed detection, and use perspective transformation and stretching functions to transform the ROI area stretch; stretch
歩骤 22, 对于拉伸后得到的图像进行 canny边缘检测, 得到图像中 牲畜的边缘轮廓, 并根据得到的牲畜边缘轮廓判断该饲料检测区域中是 否存在牲畜; Step 22: Perform canny edge detection on the stretched image to obtain the edge outline of the livestock in the image, and determine whether there is livestock in the feed detection area based on the obtained edge outline of the livestock;
歩骤 23, 对存在牲畜的饲料检测区域进行标识。 Step 23. Mark the feed inspection areas where livestock are present.
3、 根据权利要求 2所述的方法, 其特征在于, 所述歩骤 22中, 判 断饲料检测区域中是否存在牲畜的歩骤具体为: 计算牲畜边缘轮廓中连 续边缘轨迹点的数目, 若连续边缘轨迹点的数目大于一预定阈值则认为 该饲料检测区域中存在牲畜。 3. The method according to claim 2, characterized in that, in the step 22, the step of determining whether there is livestock in the feed detection area is specifically: calculating the number of continuous edge track points in the livestock edge contour, if continuous If the number of edge track points is greater than a predetermined threshold, it is considered that there are livestock in the feed detection area.
4、 根据权利要求 1 所述的方法, 其特征在于, 所述饲料检测信息 至少包括: 饲料所在的位置、 饲料所占的面积比重、 饲料的剩余值。 4. The method according to claim 1, characterized in that the feed detection information at least includes: the location of the feed, the proportion of the area occupied by the feed, and the residual value of the feed.
5、 根据权利要求 1所述的方法, 其特征在于, 所述歩骤 3进一歩 包括以下歩骤: 歩骤 31, 获取所述感兴趣区域所在最小矩形区域中的像素点, 并提 取其 RGB各个分量的值; 5. The method according to claim 1, characterized in that said step 3 further includes the following steps: Step 31: Obtain the pixels in the minimum rectangular area where the area of interest is located, and extract the values of each of its RGB components;
歩骤 32, 根据各像素点 RGB各个分量的值判断饲料所在的位置并 进行统计; Step 32: Determine the location of the feed based on the value of each RGB component of each pixel and perform statistics;
歩骤 33, 根据各像素点 RGB各个分量的值判断食槽空白处所在的 位置并进行统计; Step 33: Determine the location of the empty space in the food trough based on the value of each RGB component of each pixel and perform statistics;
歩骤 34,根据所述歩骤 32和 33得到的饲料和食槽空白处所在的位 置信息, 计算得到饲料所在区域的比重 X, 并估算饲料在所述感兴趣区 域所在最小矩形区域内的剩余量 y。 Step 34: Calculate the proportion y.
6、 根据权利要求 5所述的方法, 其特征在于, 所述歩骤 32中, 如 果某一像素点 RGB各个分量的值满足下式, 则认为该像素点的位置为 饲料: 6. The method according to claim 5, characterized in that, in the step 32, if the values of each RGB component of a certain pixel satisfy the following formula, the position of the pixel is considered to be the feed:
2 2
? < ^ * 0.9。 ? <^*0.9.
2 。 2 .
G - R < 20 G - R < 20
R - G < 20 R - G < 20
7、 根据权利要求 5 所述的方法, 其特征在于, 所述牧场食槽的背 景颜色涂成浅色。 7. The method according to claim 5, characterized in that the background color of the pasture trough is painted in a light color.
8、 根据权利要求 7所述的方法, 其特征在于, 所述歩骤 33中, 如 果某一像素点 RGB各个分量的值满足下式, 则认为该像素点的位置为 食槽空白处: 8. The method according to claim 7, characterized in that in step 33, if the values of each RGB component of a certain pixel satisfy the following formula, the position of the pixel is considered to be the empty space of the trough:
Γ mm(R, G, B) > 100 Γ mm(R, G, B) > 100
l (fi + G)2 + (G + Β 2 + (B + RY/3 < 12。 l (fi + G) 2 + (G + Β 2 + (B + RY/3 < 12.
9、根据权利要求 5所述的方法,其特征在于,所述歩骤 34具体为: 统计饲料的像素点数量, 并据此计算饲料所在区域的比重 X, 0<χ<1 , 然 后估算得到饲料在所述感兴趣区域所在最小矩形区域内的剩余量 y: 9. The method according to claim 5, characterized in that the step 34 is specifically: count the number of pixels of the feed, and calculate the proportion X of the area where the feed is located based on this, 0<χ<1, and then estimate The remaining amount of feed y in the smallest rectangular area where the region of interest is located:
— 2 - 2
_ (x+1) _ _ (x+1) _ .
10、 一种基于机器视觉的牧草饲料检测系统, 其特征在于, 该系统 包括: 饲料检测区域模块、 边缘检测模块、 饲料检测模块和显示模块, 其中: 10. A forage feed detection system based on machine vision, characterized in that the system includes: a feed detection area module, an edge detection module, a feed detection module and a display module, wherein:
所述饲料检测区域模块用于对于待监控的牧场食槽区域进行划分, 得到多个饲料检测区域; The feed detection area module is used to divide the pasture trough area to be monitored, Get multiple feed detection areas;
所述边缘检测模块用于确定所述饲料检测区域中的感兴趣区域, 在 对于所述感兴趣区域 (ROI区域) 变换拉伸后进行边缘检测, 得到存在 牲畜的饲料检测区域, 并对其进行标识; The edge detection module is used to determine the area of interest in the feed detection area, perform edge detection after transforming and stretching the area of interest (ROI area), obtain the feed detection area where livestock exists, and perform logo;
所述饲料检测模块用于对于不存在牲畜的饲料检测区域中感兴趣 区域所在的最小矩形区域, 基于 RGB颜色分量进行检测, 得到相关的 饲料检测信息; The feed detection module is used to detect the smallest rectangular area where the area of interest is located in the feed detection area where livestock does not exist based on RGB color components to obtain relevant feed detection information;
所述显示模块用于将饲料检测模块检测得到的饲料信息显示出来。 The display module is used to display the feed information detected by the feed detection module.
PCT/CN2014/076753 2013-12-23 2014-05-05 Forage detection system and method based on machine vision WO2015096345A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310715072.X 2013-12-23
CN201310715072.XA CN103674857B (en) 2013-12-23 2013-12-23 Based on forage detection system and the method for machine vision

Publications (1)

Publication Number Publication Date
WO2015096345A1 true WO2015096345A1 (en) 2015-07-02

Family

ID=50313069

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/076753 WO2015096345A1 (en) 2013-12-23 2014-05-05 Forage detection system and method based on machine vision

Country Status (2)

Country Link
CN (1) CN103674857B (en)
WO (1) WO2015096345A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11937580B2 (en) 2019-02-05 2024-03-26 Wisconsin Alumni Research Foundation Computer vision-based feeding monitoring and method therefor

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942657B (en) * 2014-04-30 2017-06-16 中国科学院自动化研究所 animal husbandry intelligent management system based on machine vision analysis
WO2015165054A1 (en) * 2014-04-30 2015-11-05 中国科学院自动化研究所 Animal husbandry intelligent management system based on machine vision analysis
WO2015176223A1 (en) * 2014-05-20 2015-11-26 中国科学院自动化研究所 Dung amount detecting method based on machine vision and field slide-resisting way
CN106525113A (en) * 2016-11-02 2017-03-22 百奥森(江苏)食品安全科技有限公司 Forage feed detection method
CN106778555B (en) * 2016-11-30 2020-04-07 石河子大学 Cow rumination chewing and swallowing frequency statistical method based on machine vision
CN109711346A (en) * 2018-12-27 2019-05-03 南京林业大学 A kind of birds abnormality recognition method and device
CN110956608A (en) * 2019-10-10 2020-04-03 北京海益同展信息科技有限公司 Remaining foodstuff detection method, device, electronic equipment and storage medium
CN111382739A (en) * 2020-03-03 2020-07-07 北京海益同展信息科技有限公司 Method, apparatus, system and computer-readable storage medium for feeding foodstuff
CN111406662B (en) * 2020-03-12 2022-01-28 中国地质大学(武汉) Automatic detection system and method for feed quantity of nursery pig feeder based on machine vision
CN112131973B (en) * 2020-09-07 2023-11-07 京东科技信息技术有限公司 Feed processing supervision method, system, equipment and storage medium
CN112465833B (en) * 2020-11-25 2022-11-11 安徽工业大学 Automatic feed detection and supplement method for livestock trough
CN115049934B (en) * 2022-08-11 2022-12-16 山东万牧农业科技有限公司郯城分公司 Poultry feed intelligent detection method based on image processing
CN117528038B (en) * 2024-01-08 2024-03-26 中博农畜牧科技股份有限公司 Deep learning-based cow feeding forage state monitoring and early warning system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4532892A (en) * 1981-08-17 1985-08-06 Ralston Purina Company Animal feeding and monitoring system
CN1699916A (en) * 2004-03-25 2005-11-23 株式会社三丰 System and method for excluding extraneous features from image inspection operations
CA2403407C (en) * 2000-03-17 2008-12-23 Growsafe Systems Ltd. Method of monitoring animal feeding behavior
CN201622243U (en) * 2010-04-20 2010-11-03 杭州电子科技大学 Device for detecting and analyzing antibiotic residual quantity

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NL1020173C2 (en) * 2001-05-23 2002-12-12 Lely Entpr Ag Device for supplying feed to an animal.
US6868804B1 (en) * 2003-11-20 2005-03-22 Growsafe Systems Ltd. Animal management system
US7405670B2 (en) * 2005-07-29 2008-07-29 Fitzgerald Timothy W Method and system for detecting and isolating stray voltage
WO2010059161A1 (en) * 2008-11-21 2010-05-27 Hill's Pet Nutrition, Inc. Feeding system and process for behavioral modification of animals
CN101438681B (en) * 2008-12-22 2011-03-16 中国农业大学 Method and system for triggering carcass image collection based on cattle bowl

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4532892A (en) * 1981-08-17 1985-08-06 Ralston Purina Company Animal feeding and monitoring system
CA2403407C (en) * 2000-03-17 2008-12-23 Growsafe Systems Ltd. Method of monitoring animal feeding behavior
CN1699916A (en) * 2004-03-25 2005-11-23 株式会社三丰 System and method for excluding extraneous features from image inspection operations
CN201622243U (en) * 2010-04-20 2010-11-03 杭州电子科技大学 Device for detecting and analyzing antibiotic residual quantity

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XU, NING., JOURNAL OF SICHUAN ORDNANCE, vol. 30, no. 3, 31 March 2009 (2009-03-31), pages 84 - 86 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11937580B2 (en) 2019-02-05 2024-03-26 Wisconsin Alumni Research Foundation Computer vision-based feeding monitoring and method therefor

Also Published As

Publication number Publication date
CN103674857A (en) 2014-03-26
CN103674857B (en) 2015-09-30

Similar Documents

Publication Publication Date Title
WO2015096345A1 (en) Forage detection system and method based on machine vision
Mortensen et al. Weight prediction of broiler chickens using 3D computer vision
Fang et al. Comparative study on poultry target tracking algorithms based on a deep regression network
CN108717523B (en) Sow oestrus behavior detection method based on machine vision
Yang et al. An automatic recognition framework for sow daily behaviours based on motion and image analyses
Kashiha et al. Automatic identification of marked pigs in a pen using image pattern recognition
Zion et al. Real-time underwater sorting of edible fish species
CN104112370B (en) Parking lot based on monitoring image intelligent car position recognition methods and system
Jingqiu et al. Cow behavior recognition based on image analysis and activities
Zhu et al. Automatic animal detection from Kinect sensed images for livestock monitoring and assessment
Zhu et al. Recognition and drinking behaviour analysis of individual pigs based on machine vision
CN111161214B (en) System and method for measuring pig weight and identifying drinking behavior based on binocular vision
Kaixuan et al. Target detection method for moving cows based on background subtraction
US20210216758A1 (en) Animal information management system and animal information management method
WO2020078114A1 (en) Animal labour identification method, apparatus, and device
WO2018120634A1 (en) Method and apparatus for identifying disease and insect damage
Suwannakhun et al. Estimating pig weight with digital image processing using deep learning
Li et al. Estimation of pig weight by machine vision: A review
CN109086696B (en) Abnormal behavior detection method and device, electronic equipment and storage medium
CN113662530A (en) Pig physiological growth state monitoring and early warning method
CN111986234A (en) Self-adaptive resolution ratio livestock video information processing method based on artificial intelligence
TWI707293B (en) Automatic monitoring system for poultry or livestock behavior and automatic monitoring method thereof
CN111797831A (en) BIM and artificial intelligence based parallel abnormality detection method for poultry feeding
CN110490161B (en) Captive animal behavior analysis method based on deep learning
Martinez-Ortiz et al. Video tracking of dairy cows for assessing mobility scores

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: 14875188

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: 14875188

Country of ref document: EP

Kind code of ref document: A1