《第1の実施形態》
以下、第1の実施形態に係る牛の評価装置100について、図1~図14に基づいて説明する。図1には、第1の実施形態に係る牛の評価装置100の機能構成がブロック図にて示されている。図2には、第1の実施形態における制御部15の機能構成がブロック図にて示されている。本第1の実施形態では、評価装置100は、作業者が携帯して利用する携帯型情報機器であるとする。携帯型情報機器として、例えばスマートフォン、タブレット型パソコン、PDA(Personal Digital Assistant)、スマートグラスなどが挙げられる。評価装置100は、例えば、電話機能やメール機能、インターネットなどに接続するための通信機能、およびプログラムを実行するためのデータ処理機能などを有する。
First Embodiment
A cow evaluation device 100 according to a first embodiment will be described below with reference to Figs. 1 to 14. Fig. 1 shows in a block diagram the functional configuration of the cow evaluation device 100 according to the first embodiment. Fig. 2 shows in a block diagram the functional configuration of a control unit 15 in the first embodiment. In this first embodiment, the evaluation device 100 is a portable information device carried and used by an operator. Examples of portable information devices include smartphones, tablet computers, PDAs (Personal Digital Assistants), and smart glasses. The evaluation device 100 has, for example, a telephone function, an email function, a communication function for connecting to the Internet, and a data processing function for executing a program.
図1に示すように、評価装置100は、表示部10と、入力部11と、通信部12と、撮像部13と、記憶部14と、制御部15と、を有する。
As shown in FIG. 1, the evaluation device 100 has a display unit 10, an input unit 11, a communication unit 12, an imaging unit 13, a memory unit 14, and a control unit 15.
表示部10は、画像や、各種情報、およびタッチ操作ボタンなどの入力用画像などを表示する表示デバイスである。
The display unit 10 is a display device that displays images, various information, and input images such as touch operation buttons.
入力部11は、タッチパネルやスイッチなどのデバイスである。タッチパネルは、作業者が触れたことに応じて情報入力を受け付け、受け付けた情報を制御部15に送信する。タッチパネルは、例えば表示部10に組み込まれている。したがって、タッチパネルは、作業者が表示部10の表面をタッチすることに応じて、種々の情報入力を受け付ける。スイッチは、作業者から評価装置100に対する入力を受け付ける入力部材であり、受け付けた情報を制御部15に送信する。
The input unit 11 is a device such as a touch panel or a switch. The touch panel accepts information input in response to a worker's touch and transmits the accepted information to the control unit 15. The touch panel is, for example, incorporated in the display unit 10. Therefore, the touch panel accepts various information inputs in response to the worker touching the surface of the display unit 10. The switch is an input member that accepts input from the worker to the evaluation device 100 and transmits the accepted information to the control unit 15.
通信部12は、他の機器と近距離無線通信(例えばNFC(Near Field Communication))を行ったり、ネットワークに接続された他の機器と無線通信(例えば携帯電話回線や無線LAN(Local Area Network)などを用いた通信)を行ったりする通信インターフェースである。
The communication unit 12 is a communication interface that performs short-range wireless communication (e.g., NFC (Near Field Communication)) with other devices, and wireless communication (e.g., communication using a mobile phone line or a wireless LAN (Local Area Network)) with other devices connected to the network.
撮像部13は、静止画や動画などの画像を撮像するデバイスである。撮像部13は、作業者が入力部11を操作することに応じて撮像する。例えば、作業者は、牛のルーメンサイズスコアを特定する場合に、撮像部13によって立位にある牛を略真後ろから撮像する。略真後ろから撮像するとは、牛の左右の腰角周りおよび左右の腹部周りの輪郭が写り、かつ、牛の足元まで写る範囲で撮像することである。したがって、作業者は、牛の後方数m(例えば1m~2m)の位置から、牛の足元まで入りかつ牛の左右の腰角周りおよび左右の腹部周りの輪郭が写るように牛を撮像する。
The imaging unit 13 is a device that captures images such as still images and videos. The imaging unit 13 captures images in response to an operator's operation of the input unit 11. For example, when identifying a cow's rumen size score, the operator uses the imaging unit 13 to capture an image of the cow in a standing position from approximately directly behind. Capturing an image from approximately directly behind means capturing an image that captures the contours of the cow's left and right hip corners and left and right abdominal areas, as well as the cow's feet. Therefore, the operator captures the cow from a position several meters (e.g., 1 m to 2 m) behind the cow, capturing an image of the cow up to the cow's feet and capturing the contours of the left and right hip corners and left and right abdominal areas.
記憶部14は、牛の撮像画像や牛の輪郭線を抽出した抽出画像、牛のルーメンサイズスコアを特定した評価結果など、各種情報を記憶する。
The memory unit 14 stores various information, such as captured images of the cow, extracted images of the cow's contour lines, and evaluation results that identify the cow's rumen size score.
制御部15は、評価装置100の各部を制御する処理部である。図2に示すように、制御部15は、画像取得部20、抽出部21、基準点特定部22、寸法特定部23、算出部24、直線決定部25、角度取得部26、およびスコア特定部27を有する。
The control unit 15 is a processing unit that controls each unit of the evaluation device 100. As shown in FIG. 2, the control unit 15 has an image acquisition unit 20, an extraction unit 21, a reference point identification unit 22, a dimension identification unit 23, a calculation unit 24, a straight line determination unit 25, an angle acquisition unit 26, and a score identification unit 27.
図3には、画像取得部20が取得する画像の一例が示されている。図3に示すように、画像取得部20は、立位にある牛を略後ろから撮像した撮像画像30を取得する。取得する撮像画像30は、撮像部13が撮像した画像であってもよいし、通信部12が他の機器から受信した画像であってもよいし、記憶部14に記憶されていた画像の中から作業者が入力部11を用いて選択した画像であってもよい。画像取得部20は、取得した撮像画像30を表示部10に表示してもよい。これにより、作業者は、これからルーメンサイズスコアを特定する牛を表示部10上で視覚的に認識することができる。
Figure 3 shows an example of an image acquired by the image acquisition unit 20. As shown in Figure 3, the image acquisition unit 20 acquires an image 30 of a cow in an upright position, captured from approximately behind. The acquired image 30 may be an image captured by the imaging unit 13, an image received by the communication unit 12 from another device, or an image selected by the operator using the input unit 11 from among images stored in the memory unit 14. The image acquisition unit 20 may display the acquired image 30 on the display unit 10. This allows the operator to visually recognize on the display unit 10 the cow whose rumen size score is to be specified.
図4は、抽出部21が実行する処理を説明するための図である。図4に示すように、抽出部21は、画像取得部20が取得した牛の撮像画像30から、牛の輪郭をなぞった輪郭線40を抽出する。輪郭線40の抽出は、一般的に知られた画像処理技術を用いることができる。抽出部21は、抽出した牛の輪郭線40のみを表した抽出画像31を表示部10に表示してもよい。これにより、作業者は、これからルーメンサイズスコアを特定する牛の輪郭を表示部10上で視覚的に認識することができる。抽出画像31の外形は撮像画像30の外形と同じであり、画像の枠に対する牛の位置は抽出画像31と撮像画像30とで同じである。
Figure 4 is a diagram for explaining the processing executed by the extraction unit 21. As shown in Figure 4, the extraction unit 21 extracts a contour line 40 that traces the outline of the cow from the captured image 30 of the cow acquired by the image acquisition unit 20. A commonly known image processing technique can be used to extract the contour line 40. The extraction unit 21 may display an extracted image 31 that shows only the extracted contour line 40 of the cow on the display unit 10. This allows the operator to visually recognize on the display unit 10 the outline of the cow from which the rumen size score will be determined. The outer shape of the extracted image 31 is the same as the outer shape of the captured image 30, and the position of the cow relative to the image frame is the same in the extracted image 31 and the captured image 30.
輪郭線40の上部の左右両側には山部41a、41bが存在する。山部41a、41bは、牛の腰角に対応する部分である。輪郭線40の下部の先端43a、43bは、牛の後足の蹄に対応する部分である。
There are ridges 41a and 41b on both the left and right sides of the upper part of the contour line 40. The ridges 41a and 41b correspond to the cow's hip angles. The tips 43a and 43b at the lower part of the contour line 40 correspond to the hooves of the cow's hind legs.
図5は、第1の実施形態における基準点特定部22および寸法特定部23が実行する処理を説明するための図である。図5に示すように、本第1の実施形態では、基準点特定部22は、牛の輪郭線40の上部の左側に存在する山部41aの頂点42aと右側に存在する山部41bの頂点42bとを結ぶ線分50の略中点を基準点60と特定する。基準点60は、牛の左右方向中央部近傍かつ上端部近傍に位置する点となる。また、左右の腰角の間の中央付近には肛門があることから、基準点60は肛門付近に位置する点ともなる。なお、基準点特定部22は、山部41aの頂点42aと山部41bの頂点42bとから他の方法によって基準点を特定してもよい。
Figure 5 is a diagram for explaining the processing executed by the reference point identification unit 22 and the dimension identification unit 23 in the first embodiment. As shown in Figure 5, in this first embodiment, the reference point identification unit 22 identifies the approximate midpoint of a line segment 50 connecting the vertex 42a of the mountain portion 41a on the left side of the upper part of the cow's contour line 40 and the vertex 42b of the mountain portion 41b on the right side as the reference point 60. The reference point 60 is a point located near the center in the left-right direction of the cow and near the upper end. In addition, since the anus is located near the center between the left and right hip angles, the reference point 60 is also a point located near the anus. Note that the reference point identification unit 22 may identify the reference point from the vertex 42a of the mountain portion 41a and the vertex 42b of the mountain portion 41b by another method.
山部41aの頂点42aと山部41bの頂点42bの特定は、以下の方法により行うことができる。例えば、抽出画像31内で上から左下に向かって傾いた傾斜直線51を抽出画像31の左上端点32から輪郭線40に向かって近づけて行き、傾斜直線51が輪郭線40に最初に接した点を左側に存在する山部41aの頂点42aと特定してもよい。同様に、抽出画像31内で上から右下に向かって傾いた傾斜直線52を抽出画像31の右上端点33から輪郭線40に向かって近づけて行き、傾斜直線52が輪郭線40に最初に接した点を右側に存在する山部41bの頂点42bと特定してもよい。傾斜直線51、52は、抽出画像31内の水平線から例えば30°~60°傾いた直線としてもよく、40°~50°傾いた直線としてもよく、45°傾いた直線としてもよい。また、傾斜直線51、52は、山部41a、41bの下側が頂点42a、42bと特定されるような角度で傾斜していてもよい。
The apex 42a of the mountain portion 41a and the apex 42b of the mountain portion 41b can be identified by the following method. For example, an inclined straight line 51 inclined from the top to the bottom left in the extracted image 31 may be moved from the upper left end point 32 of the extracted image 31 toward the contour line 40, and the point where the inclined straight line 51 first touches the contour line 40 may be identified as the apex 42a of the mountain portion 41a located on the left side. Similarly, an inclined straight line 52 inclined from the top to the bottom right in the extracted image 31 may be moved from the upper right end point 33 of the extracted image 31 toward the contour line 40, and the point where the inclined straight line 52 first touches the contour line 40 may be identified as the apex 42b of the mountain portion 41b located on the right side. The inclined straight lines 51 and 52 may be, for example, straight lines inclined at 30° to 60°, 40° to 50°, or 45° from the horizontal line in the extracted image 31. Additionally, the inclined straight lines 51 and 52 may be inclined at an angle such that the lower sides of the peaks 41a and 41b are identified as apexes 42a and 42b.
山部41aの頂点42aと山部41bの頂点42bは、上記の方法によって特定される場合に限られず、その他の方法によって特定されてもよい。例えば、抽出画像31内で上から左下に向かって第1の所定角度で傾いた傾斜直線を左上端点32から輪郭線40に向かって近づけて最初に接する第1の点を特定し、第2の所定角度で傾いた傾斜直線を左上端点32から輪郭線40に向かって近づけて最初に接する第2の点を特定し、輪郭線40上において第1の点と第2の点の略中央に位置する点を山部41aの頂点42aと特定してもよい。同様に、抽出画像31内で上から右下に向かって第3の所定角度で傾いた傾斜直線を右上端点33から輪郭線40に向かって近づけて最初に接する第3の点を特定し、第4の所定角度で傾いた傾斜直線を右上端点33から輪郭線40に向かって近づけて最初に接する第4の点を特定し、輪郭線40上において第3の点と第4の点の略中央に位置する点を山部41bの頂点42bと特定してもよい。第1の所定角度及び第3の所定角度は抽出画像31内の水平線から15°~30°とし、第2の所定角度及び第4の所定角度は抽出画像31内の水平線から60°~75°としてもよい。
The apex 42a of the mountain portion 41a and the apex 42b of the mountain portion 41b may be identified by other methods, not limited to the above-mentioned method. For example, a first point of contact may be identified by approaching a slanted straight line inclined from the top to the bottom left in the extracted image 31 from the upper left end point 32 toward the contour line 40, a second point of contact may be identified by approaching a slanted straight line inclined at a second predetermined angle from the upper left end point 32 toward the contour line 40, and a point located approximately in the center between the first point and the second point on the contour line 40 may be identified as the apex 42a of the mountain portion 41a. Similarly, a third point where an inclined line inclined from the top to the bottom right in the extracted image 31 at a third predetermined angle is first contacted by approaching the contour line 40 from the upper right end point 33, and a fourth point where an inclined line inclined at a fourth predetermined angle is first contacted by approaching the contour line 40 from the upper right end point 33, and a point on the contour line 40 located approximately in the middle between the third point and the fourth point is identified as the apex 42b of the mountain portion 41b. The first and third predetermined angles may be 15° to 30° from the horizontal line in the extracted image 31, and the second and fourth predetermined angles may be 60° to 75° from the horizontal line in the extracted image 31.
例えば、抽出画像31をX-Y座標系に変換し、抽出画像31の各画素のX、Y座標から2つの山部41a、41bの頂点42a、42bを特定してもよい。山部41aの頂点42aは輪郭線40のなかで抽出画像31の左上端点32からの距離が最も短い点、山部41bの頂点42bは輪郭線40のなかで抽出画像31の右上端点33からの距離が最も短い点としてもよい。
For example, the extracted image 31 may be converted into an X-Y coordinate system, and the vertices 42a, 42b of the two peaks 41a, 41b may be identified from the X and Y coordinates of each pixel of the extracted image 31. The vertex 42a of the peak 41a may be the point on the contour 40 that is the shortest distance from the upper left corner 32 of the extracted image 31, and the vertex 42b of the peak 41b may be the point on the contour 40 that is the shortest distance from the upper right corner 33 of the extracted image 31.
また、上記いずれかの方法によって山部41aまたは山部41bのいずれか一方の頂点を特定し、特定した頂点を通る抽出画像31内の略水平線が他方の山部の輪郭線40に交わる点を他方の山部の頂点と特定してもよい。
Alternatively, the apex of either the peak 41a or the peak 41b may be identified by any of the above methods, and the point where an approximately horizontal line in the extracted image 31 passing through the identified apex intersects with the contour line 40 of the other peak may be identified as the apex of the other peak.
図5に示すように、本第1の実施形態では、寸法特定部23は、まず、輪郭線40の2つの先端43a、43bのうち下側に位置する先端43aを通る抽出画像31内の略水平線を直線53と特定する。言い換えると、寸法特定部23は、輪郭線40のうち最も下側に位置する箇所である先端43aを通る抽出画像31内の略水平線を直線53と特定する。次いで、寸法特定部23は、基準点60と直線53との間の距離L1を、牛の上下方向に関する身体の大きさを示す寸法として特定する。すなわち、寸法特定部23は、基準点60と、基準点60を通る抽出画像31内の垂線59が直線53と交差する交点61と、の間の距離L1を、牛の上下方向に関する身体の大きさを示す寸法として特定する。
As shown in FIG. 5, in this first embodiment, the dimension specification unit 23 first specifies, as a straight line 53, an approximately horizontal line in the extracted image 31 that passes through the lower end 43a of the two ends 43a, 43b of the contour line 40. In other words, the dimension specification unit 23 specifies, as a straight line 53, an approximately horizontal line in the extracted image 31 that passes through the lowermost end 43a of the contour line 40. Next, the dimension specification unit 23 specifies the distance L1 between the reference point 60 and the straight line 53 as a dimension that indicates the size of the cow's body in the vertical direction. In other words, the dimension specification unit 23 specifies the distance L1 between the reference point 60 and the intersection point 61 where the perpendicular line 59 in the extracted image 31 that passes through the reference point 60 intersects with the straight line 53 as a dimension that indicates the size of the cow's body in the vertical direction.
算出部24は、寸法特定部23が特定した寸法L1に所定の係数を掛けた寸法L2を算出する。本第1の実施形態では、所定の係数は例えば0.2以上0.4以下の範囲内の値である。
The calculation unit 24 calculates the dimension L2 by multiplying the dimension L1 identified by the dimension identification unit 23 by a predetermined coefficient. In this first embodiment, the predetermined coefficient is, for example, a value in the range of 0.2 to 0.4.
図6は、第1の実施形態における直線決定部25および角度取得部26が実行する処理を説明するための図である。図6に示すように、本第1の実施形態では、直線決定部25は、まず、算出部24が算出した寸法L2だけ基準点60から下側に離れた(例えば真下に位置する)点62を特定し、点62を通る抽出画像31内の略水平線54が輪郭線40に交わる2つの交点を点44、45と特定する。次いで、直線決定部25は、点44と基準点60とを通る直線55および点45と基準点60とを通る直線56を決定する。
Figure 6 is a diagram for explaining the processing executed by the line determination unit 25 and the angle acquisition unit 26 in the first embodiment. As shown in Figure 6, in this first embodiment, the line determination unit 25 first identifies a point 62 that is located downward from the reference point 60 (e.g., directly below) by the dimension L2 calculated by the calculation unit 24, and identifies two intersections where an approximately horizontal line 54 in the extracted image 31 that passes through point 62 intersects with the contour line 40 as points 44 and 45. Next, the line determination unit 25 determines a line 55 that passes through point 44 and the reference point 60, and a line 56 that passes through point 45 and the reference point 60.
角度取得部26は、本第1の実施形態では、直線55と直線56とがなす角度αを取得する。角度αは、例えば直線55と直線56が交差することで形成される複数の角度のうち基準点60の上下に位置する角度とする。
In the first embodiment, the angle acquisition unit 26 acquires the angle α between the straight lines 55 and 56. The angle α is, for example, an angle located above and below the reference point 60 among the multiple angles formed by the intersection of the straight lines 55 and 56.
スコア特定部27は、角度取得部26が取得した角度αから、撮像画像30に写された牛のルーメンサイズスコアを特定する。
The score determination unit 27 determines the rumen size score of the cow captured in the captured image 30 from the angle α acquired by the angle acquisition unit 26.
ここで、ルーメンサイズスコアは、牛の健康状態を示す指標の一つであり、第1胃(ルーメン)の充満度を評価するものである。第1胃が健全な牛は乾物摂取量が多くなるため、第1胃の膨らみが大きくなる。第1胃は左腹部に位置することから、第1胃の膨らみが大きくなるほど、左腹部の張り出しが大きくなる。この左腹部の張り出し具合を、立位にある牛を略真後ろから見た腹部全体の相対形状から評価したのがルーメンサイズスコアである。
The rumen size score is an index of a cow's health, and evaluates the fullness of the first stomach (rumen). Cows with healthy first stomachs consume more dry matter, and therefore the first stomach becomes more swollen. As the first stomach is located in the left abdomen, the greater the swollen first stomach, the greater the left abdominal protrusion. The rumen size score evaluates the degree of this left abdominal protrusion from the relative shape of the entire abdomen when the cow is viewed from directly behind in an upright position.
図7(a)および図7(b)は、第1胃(ルーメン)の充満度が異なる牛の撮像画像30である。図7(b)の撮像画像30に写された牛は、図7(a)の撮像画像30に写された牛よりも第1胃の充満度が高い牛である。図8(a)および図8(b)は、第1胃(ルーメン)の充満度と角度取得部26が取得する角度αとの関係を示す図である。図8(a)および図8(b)には、図7(a)および図7(b)の撮像画像30に写された牛の輪郭線40を抽出した抽出画像31が示されている。図7(a)から図8(b)に示すように、第1胃の充満度が高いほど、腹部の張り出し具合が大きくなるため、角度αが大きくなる。このため、角度αを求めることで、第1胃の充満度を評価でき、ルーメンサイズスコアを特定できると考えられる。
7(a) and 7(b) are images 30 of cows with different degrees of fullness of the first stomach (rumen). The cow in the image 30 in FIG. 7(b) has a higher degree of fullness of the first stomach than the cow in the image 30 in FIG. 7(a). FIG. 8(a) and FIG. 8(b) are diagrams showing the relationship between the degree of fullness of the first stomach (rumen) and the angle α acquired by the angle acquisition unit 26. FIG. 8(a) and FIG. 8(b) show an extracted image 31 in which the outline 40 of the cow captured in the image 30 in FIG. 7(a) and FIG. 7(b) is extracted. As shown in FIG. 7(a) to FIG. 8(b), the higher the degree of fullness of the first stomach, the greater the degree of abdominal protrusion, and therefore the larger the angle α. Therefore, it is considered that the degree of fullness of the first stomach can be evaluated and the rumen size score can be determined by determining the angle α.
ここで、図7(a)および図7(b)の撮像画像30に写された牛は、腹部が他の部位よりも左右外側に張り出している。このため、牛の輪郭線のうち最も左右外側に張り出した点をルーメンサイズスコアの特定に用いることが考えられる。しかしながら、牛が痩せている場合、すなわちルーメンサイズスコアが低い場合、立位にある牛を略真後ろから撮像したときに、腹部よりも臀部の方が左右外側に張り出してしまうことがある。このことについて、図を用いて説明する。
Here, the cow in the captured images 30 of Figures 7(a) and 7(b) has an abdomen that protrudes more outwardly to the left and right than other parts. For this reason, it is conceivable to use the point on the cow's contour that protrudes most outwardly to the left and right to determine the rumen size score. However, if the cow is thin, i.e., if the rumen size score is low, when the cow is photographed standing from almost directly behind, the buttocks may protrude more outward to the left and right than the abdomen. This will be explained using figures.
図9は、ルーメンサイズスコアが低い牛を略真後ろから撮像した撮像画像30である。図10は、図9の撮像画像30に写された牛の輪郭線40を抽出した抽出画像31である。図9に示すように、痩せてルーメンサイズスコアが低い牛の場合、胃が位置する腹部90よりも臀部91の方が左右外側に張り出してしまうことがある。この場合、図10に示すように、輪郭線40のうち最も左側の点93および最も右側の点94は臀部に対応する点となる。このため、最も左側の点93と基準点60とを通る直線95と、最も右側の点94と基準点60とを通る直線96と、がなす角度を用いてルーメンサイズスコアを特定しても、正確なルーメンサイズスコアを特定することができない。このことから、腹部の位置を特定し、特定した腹部における点と基準点60とを通る直線から角度を取得するのが好ましいことが分かる。
9 is a captured image 30 of a cow with a low rumen size score captured from almost directly behind. FIG. 10 is an extracted image 31 in which the contour line 40 of the cow captured in the captured image 30 of FIG. 9 is extracted. As shown in FIG. 9, in the case of a thin cow with a low rumen size score, the buttocks 91 may protrude outward to the left and right from the abdomen 90 where the stomach is located. In this case, as shown in FIG. 10, the leftmost point 93 and the rightmost point 94 of the contour line 40 correspond to the buttocks. Therefore, even if the rumen size score is determined using the angle formed by the line 95 passing through the leftmost point 93 and the reference point 60, and the line 96 passing through the rightmost point 94 and the reference point 60, an accurate rumen size score cannot be determined. From this, it can be seen that it is preferable to determine the position of the abdomen and obtain the angle from the line passing through the specified point in the abdomen and the reference point 60.
[実験1]
非特許文献1に記載されている判定シートを用いて専門家が特定したルーメンサイズスコアと、角度取得部26が取得した角度αの大きさと、の相関を調査する実験を行った。実験は、乳牛(ホルスタイン種)に対して行った(以下の実験2から実験5においても同じ)。
[Experiment 1]
An experiment was conducted to investigate the correlation between the rumen size score determined by an expert using the assessment sheet described in Non-Patent Document 1 and the magnitude of the angle α acquired by the angle acquisition unit 26. The experiment was conducted on dairy cows (Holstein breed) (the same applies to the following Experiments 2 to 5).
図11には、ルーメンサイズスコアと角度取得部26が取得した角度αとの相関を調査した実験結果が示されている。図11の横軸(x軸)は専門家が判定シートを用いて特定したルーメンサイズスコアであり、縦軸(y軸)は角度取得部26が取得した角度αである。図11中の○、△、□、●、▲、■、×の各点は実験を行った乳牛1頭1頭を示していて、直線は近似直線を示している。また、○、△、□、●、▲、■、×は、算出部24が寸法L2の算出に用いた係数が互いに異なる場合を示している。寸法L2の算出に用いた係数は、○は0.15、△は0.2、□は0.25、●は0.3、▲は0.35、■は0.4、×は0.45である。
Figure 11 shows the results of an experiment investigating the correlation between the rumen size score and the angle α acquired by the angle acquisition unit 26. The horizontal axis (x-axis) of Figure 11 is the rumen size score determined by an expert using a judgment sheet, and the vertical axis (y-axis) is the angle α acquired by the angle acquisition unit 26. Each point in Figure 11, ○, △, □, ●, ▲, ■, and ×, represents each dairy cow in the experiment, and the straight lines represent approximate straight lines. In addition, ○, △, □, ●, ▲, ■, and × represent cases in which the coefficients used by the calculation unit 24 to calculate the dimension L2 are different from one another. The coefficients used to calculate the dimension L2 are ○: 0.15, △: 0.2, □: 0.25, ●: 0.3, ▲: 0.35, ■: 0.4, and ×: 0.45.
図11に示すように、寸法L2の算出に用いた係数が0.15以上0.45以下の範囲内の場合では、いずれにおいても、ルーメンサイズスコアが大きいほど、角度αは大きくなる結果であった。○の結果における近似直線はy=5.64x+96.99であり、決定係数R2は0.389であった。△の結果における近似直線はy=9.28x+72.46であり、決定係数R2は0.594であった。□の結果における近似直線はy=12.90x+50.55であり、決定係数R2は0.724であった。●の結果における近似直線はy=15.76x+31.68であり、決定係数R2は0.765であった。▲の結果における近似直線はy=13.96x+27.13であり、決定係数R2は0.717であった。■の結果における近似直線はy=10.11x+27.50であり、決定係数R2は0.618であった。×の結果における近似直線はy=5.52x+31.51であり、決定係数R2は0.341であった。
As shown in FIG. 11, when the coefficient used to calculate the dimension L2 was in the range of 0.15 to 0.45, the angle α increased as the lumen size score increased. The approximate line for the results of ○ was y = 5.64x + 96.99, and the coefficient of determination R2 was 0.389. The approximate line for the results of △ was y = 9.28x + 72.46, and the coefficient of determination R2 was 0.594. The approximate line for the results of □ was y = 12.90x + 50.55, and the coefficient of determination R2 was 0.724. The approximate line for the results of ● was y = 15.76x + 31.68, and the coefficient of determination R2 was 0.765. The approximate line for the results of ▲ was y = 13.96x + 27.13, and the coefficient of determination R2 was 0.717. The approximate line for the result of (2) was y = 10.11x + 27.50, and the coefficient of determination R2 was 0.618. The approximate line for the result of (x) was y = 5.52x + 31.51, and the coefficient of determination R2 was 0.341.
図12は、図11の実験結果から得られた、算出部24が寸法L2の算出に用いた係数と決定係数との相関を示す図である。図12の横軸は寸法L2の算出に用いた係数であり、縦軸は決定係数である。図12に示すように、寸法L2の算出に用いた係数が0.3のときに、決定係数が最も大きくなった。また、係数を0.2以上0.4以下の範囲内の値とすることで0.6程度以上の決定係数が得られる結果であった。
Figure 12 is a diagram showing the correlation between the coefficient used by the calculation unit 24 to calculate the dimension L2 and the coefficient of determination obtained from the experimental results of Figure 11. The horizontal axis of Figure 12 is the coefficient used to calculate the dimension L2, and the vertical axis is the coefficient of determination. As shown in Figure 12, the coefficient of determination was largest when the coefficient used to calculate the dimension L2 was 0.3. Furthermore, the coefficient of determination of about 0.6 or more was obtained by setting the coefficient to a value within the range of 0.2 to 0.4.
このように、寸法L2の算出に用いる係数を0.2以上0.4以下の範囲内とした場合に、点44と基準点60を通る直線55と、点45と基準点60を通る直線56と、がなす角度αとルーメンサイズスコアとの相関関係が強くなることから、点44、45は牛の腹部に位置する点であることが言える。すなわち、寸法特定部23が特定した寸法L1に0.2以上0.4以下の範囲内の係数を掛けて寸法L2を算出し、算出した寸法L2だけ基準点60から下側に離れた点の略左右両側に位置する牛の表面は腹部の表面であることが言える。このことについて図9を用いて説明する。
In this way, when the coefficient used to calculate dimension L2 is set within the range of 0.2 to 0.4, the correlation between the rumen size score and the angle α formed by the line 55 passing through point 44 and reference point 60 and the line 56 passing through point 45 and reference point 60 becomes stronger, so it can be said that points 44 and 45 are points located in the cow's abdomen. In other words, dimension L2 is calculated by multiplying dimension L1 specified by the dimension specifying unit 23 by a coefficient within the range of 0.2 to 0.4, and it can be said that the surface of the cow located approximately on both the left and right sides of the point that is located downward from reference point 60 by the calculated dimension L2 is the surface of the abdomen. This will be explained using Figure 9.
図9において、算出部24が寸法L2の算出に用いた係数を0.2とした場合に、基準点60から寸法L2だけ下側に離れた点を通る水平線を破線97で示し、係数を0.4とした場合に、基準点60から寸法L2だけ離れた点を通る水平線を破線98で示している。図9に示すように、0.2以上0.4以下の範囲内の係数を用いて寸法L2を算出し、算出した寸法L2だけ基準点60から下側に離れた点の略左右両側に位置する牛の表面は、破線97と破線98の間の範囲内となり、牛の腹部の表面となる。したがって、基準点60から寸法L2だけ下側に離れた点の略左右両側に位置する牛の表面上の点を特定することで牛の腹部に位置する点を特定でき、その結果、角度αからルーメンサイズスコアを精度良く特定できるようになる。
In FIG. 9, when the coefficient used by the calculation unit 24 to calculate the dimension L2 is 0.2, the horizontal line passing through a point that is distanced downward from the reference point 60 by the dimension L2 is indicated by dashed line 97, and when the coefficient is 0.4, the horizontal line passing through a point that is distanced downward from the reference point 60 by the dimension L2 is indicated by dashed line 98. As shown in FIG. 9, the dimension L2 is calculated using a coefficient in the range of 0.2 to 0.4, and the surface of the cow located approximately on both sides of the point that is distanced downward from the reference point 60 by the calculated dimension L2 falls within the range between dashed lines 97 and 98, and becomes the surface of the cow's abdomen. Therefore, by identifying points on the surface of the cow that are approximately on both sides of the point that is distanced downward from the reference point 60 by the dimension L2, it is possible to identify points located in the cow's abdomen, and as a result, it becomes possible to accurately identify the rumen size score from the angle α.
このように、ルーメンサイズスコアと角度αとには強い相関関係があることから、スコア特定部27が角度αからルーメンサイズスコアを特定することで、ルーメンサイズスコアを精度良く特定することができる。スコア特定部27は、例えば、記憶部14に記憶された、角度とルーメンサイズスコアとが関連付けられたスコア情報を用いて、角度αからルーメンサイズスコアを特定する。
As such, since there is a strong correlation between the lumen size score and the angle α, the score determination unit 27 can determine the lumen size score from the angle α with high accuracy. The score determination unit 27 determines the lumen size score from the angle α, for example, by using score information that associates the angle with the lumen size score and that is stored in the memory unit 14.
表1には、記憶部14に記憶されたスコア情報の一例が示されている。表1に示すように、スコア情報においては、角度とルーメンサイズスコアとが関連付けられている。例えば、角度がa°未満である場合のルーメンサイズスコアは1.00、a°以上b°未満である場合のルーメンサイズスコアは1.50などのように、角度とルーメンサイズスコアとが関連付けられている。なお、表1では、ルーメンサイズスコアが2.00~4.00の間は0.25刻み、それ以外は0.50刻みとしているが、その他の場合でもよい。例えば、全ての範囲で0.25刻み又は0.50刻みとしてもよい。
Table 1 shows an example of score information stored in the storage unit 14. As shown in Table 1, in the score information, angles and lumen size scores are associated with each other. For example, when the angle is less than a°, the lumen size score is 1.00, and when the angle is equal to or greater than a° and less than b°, the lumen size score is 1.50. In Table 1, the lumen size scores are in increments of 0.25 between 2.00 and 4.00, and in increments of 0.50 otherwise, but other cases are also possible. For example, the increments may be 0.25 or 0.50 in the entire range.
なお、記憶部14に記憶されるスコア情報は、角度とルーメンサイズスコアとが関連付けられた情報であれば、表1に示したスコア情報以外であってもよい。例えば、図11に示す近似直線に対応する一次関数(y=ax+b)がスコア情報として記憶部14に記憶されていてもよい。この場合、yに角度を代入することで得られたxの値に対して四捨五入や、切り上げ、切り下げなどの端数処理を行ってルーメンサイズスコアを特定してもよい。
The score information stored in the memory unit 14 may be other than the score information shown in Table 1, as long as it is information that associates the angle with the lumen size score. For example, a linear function (y = ax + b) corresponding to the approximation line shown in FIG. 11 may be stored in the memory unit 14 as score information. In this case, the lumen size score may be determined by performing fractional processing such as rounding up, rounding up, or rounding down on the value of x obtained by substituting the angle for y.
図13は、第1の実施形態に係る牛の評価装置100のハードウェア構成を示すブロック図である。図13に示すように、牛の評価装置100は、記憶装置70、メモリ71、プロセッサ72、通信インターフェース73、入力装置74、表示装置75、および撮像装置76を有する。これらの各部はバス77により相互に接続される。
Figure 13 is a block diagram showing the hardware configuration of the cow evaluation device 100 according to the first embodiment. As shown in Figure 13, the cow evaluation device 100 has a storage device 70, a memory 71, a processor 72, a communication interface 73, an input device 74, a display device 75, and an imaging device 76. These components are interconnected by a bus 77.
記憶装置70は、フラッシュメモリ等の不揮発性の半導体メモリであって、牛の評価プログラム78を記憶する。
The storage device 70 is a non-volatile semiconductor memory such as a flash memory, and stores the cow evaluation program 78.
メモリ71は、DRAM(Dynamic Random Access Memory)などのようなデータを一時的に記憶するハードウェアである。図1における記憶部14は、記憶装置70とメモリ71によって実現される。
Memory 71 is hardware that temporarily stores data, such as a dynamic random access memory (DRAM). The memory unit 14 in FIG. 1 is realized by the storage device 70 and memory 71.
プロセッサ72は、牛の評価装置100の各部を制御するCPU(Central Processing Unit)などのハードウェアである。プロセッサ72は、メモリ71と協働して牛の評価プログラム78を実行する。このように、メモリ71とプロセッサ72とが協働して牛の評価プログラム78を実行することにより、図2における制御部15の各機能が実現される。
The processor 72 is hardware such as a CPU (Central Processing Unit) that controls each part of the cow evaluation device 100. The processor 72 executes the cow evaluation program 78 in cooperation with the memory 71. In this way, the memory 71 and the processor 72 cooperate to execute the cow evaluation program 78, thereby realizing each function of the control unit 15 in FIG. 2.
通信インターフェース73は、牛の評価装置100を他の機器と近距離無線通信またはネットワークを介した無線通信をさせるためのハードウェアである。通信インターフェース73により図1における通信部12が実現される。
The communication interface 73 is hardware that enables the cow evaluation device 100 to communicate with other devices by short-range wireless communication or wireless communication via a network. The communication interface 73 realizes the communication unit 12 in FIG. 1.
入力装置74は、作業者が牛の評価装置100を操作するためのタッチパネルやスイッチ等の入力デバイスである。入力装置74により図1における入力部11が実現される。
The input device 74 is an input device such as a touch panel or a switch that allows the operator to operate the cattle evaluation device 100. The input device 74 realizes the input unit 11 in FIG. 1.
表示装置75は、図1における表示部10を実現するためのハードウェアであり、牛の撮像画像30や抽出画像31、ルーメンサイズスコアの評価結果などを表示するための液晶ディスプレイ等の表示デバイスである。
The display device 75 is hardware for implementing the display unit 10 in FIG. 1, and is a display device such as an LCD display for displaying the captured image 30 of the cow, the extracted image 31, the rumen size score evaluation results, etc.
撮像装置76は、図1における撮像部13を実現するためのハードウェアであり、レンズや撮像素子等を備える。
The imaging device 76 is hardware for implementing the imaging unit 13 in FIG. 1, and includes a lens, an imaging element, etc.
次に、第1の実施形態に係る牛の評価方法の一例について、図14のフローチャートに沿って説明する。図14の処理は、評価装置100の制御部15によって実行される。なお、記憶部14には、一例として表1のようなスコア情報が格納されているとする。
Next, an example of the cattle evaluation method according to the first embodiment will be described with reference to the flowchart in FIG. 14. The process in FIG. 14 is executed by the control unit 15 of the evaluation device 100. It is assumed that the memory unit 14 stores score information such as that shown in Table 1, for example.
図14の処理では、まず、ステップS10において、制御部15の画像取得部20は、牛の評価プログラム78が起動されるまで待機する。この場合、作業者の操作(例えば入力部11への入力操作またはマイク(不図示)への音声入力など)に応じて制御部15が牛の評価プログラム78を起動した段階で、ステップS12に移行する。
In the process of FIG. 14, first, in step S10, the image acquisition unit 20 of the control unit 15 waits until the cow evaluation program 78 is started. In this case, the process moves to step S12 when the control unit 15 starts the cow evaluation program 78 in response to an operation by the operator (e.g., an input operation to the input unit 11 or voice input to a microphone (not shown)).
ステップS12に移行すると、画像取得部20は、ルーメンサイズスコアを特定する牛が撮像された撮像画像30を取得する(図3参照)。牛の撮像画像30は、立位にある牛が略真後ろから撮像された画像である。画像取得部20は、例えば、作業者が撮像部13を用いて撮像した牛の撮像画像を取得する。なお、画像取得部20は、通信部12を介して他の機器から受信した牛の撮像画像、または記憶部14に記憶された複数の牛の撮像画像の中から作業者が入力部11を操作することで選択した牛の撮像画像を取得してもよい。なお、画像取得部20は、牛の評価プログラム78が起動した後に、作業者が撮像部13によって牛を撮像できるよう、カメラ機能を立ち上げてもよい。作業者が撮像部13によって牛を撮像した場合、撮像した牛の画像と、この撮像画像を選択するか否かを問う選択ボタンと、を表示部10に表示してもよい。
When the process proceeds to step S12, the image acquisition unit 20 acquires an image 30 of the cow for which the rumen size score is to be specified (see FIG. 3). The image 30 of the cow is an image of the cow in an upright position captured from approximately directly behind. The image acquisition unit 20 acquires, for example, an image of the cow captured by the operator using the imaging unit 13. The image acquisition unit 20 may acquire an image of the cow received from another device via the communication unit 12, or an image of the cow selected by the operator by operating the input unit 11 from among multiple images of the cow stored in the memory unit 14. The image acquisition unit 20 may start up a camera function so that the operator can capture an image of the cow using the imaging unit 13 after the cow evaluation program 78 is started. When the operator captures an image of the cow using the imaging unit 13, the image of the captured cow and a selection button asking whether or not to select this captured image may be displayed on the display unit 10.
制御部15の抽出部21は、ステップS14において、ステップS12で取得した牛の撮像画像30から牛の輪郭をなぞった輪郭線40を抽出する(図4参照)。これにより、牛の輪郭線40が示された抽出画像31が生成される。輪郭線40を抽出するにあたり、抽出部21は、輪郭線40を良好な精度で抽出するために、撮像画像30内の牛以外の背景を除去する処理を行ってもよい。
In step S14, the extraction unit 21 of the control unit 15 extracts a contour line 40 that traces the outline of the cow from the captured image 30 of the cow acquired in step S12 (see FIG. 4). This generates an extracted image 31 showing the cow's contour line 40. When extracting the contour line 40, the extraction unit 21 may perform a process to remove background other than the cow from the captured image 30 in order to extract the contour line 40 with good accuracy.
次いで、制御部15の基準点特定部22は、ステップS15において、輪郭線40の上部の左右両側に存在する2つの山部41a、41bの頂点42a、42bから基準点60の特定が可能か否か判断し、可能であれば(Yes)、ステップS16に進んで、輪郭線40の上部の左右両側に存在する2つの山部41a、41bの頂点42a、42bから基準点60を特定する(図5参照)。例えば、基準点特定部22は、抽出画像31内で斜めに傾いた傾斜直線51、52を輪郭線40に近づけて行き、輪郭線40に最初に接した点を山部41a、41bの頂点42a、42bと特定し、この頂点42a、42bを結ぶ線分50の略中点を基準点60と特定する。
Next, in step S15, the reference point identification unit 22 of the control unit 15 determines whether it is possible to identify the reference point 60 from the vertices 42a, 42b of the two peaks 41a, 41b that exist on both the left and right sides of the upper part of the contour line 40. If it is possible (Yes), the process proceeds to step S16, where the reference point 60 is identified from the vertices 42a, 42b of the two peaks 41a, 41b that exist on both the left and right sides of the upper part of the contour line 40 (see FIG. 5). For example, the reference point identification unit 22 moves the inclined straight lines 51, 52 that are inclined obliquely in the extracted image 31 closer to the contour line 40, identifies the points that first touch the contour line 40 as the vertices 42a, 42b of the peaks 41a, 41b, and identifies the approximate midpoint of the line segment 50 that connects the vertices 42a, 42b as the reference point 60.
ステップS15において、例えば、基準点特定部22は、線分50が抽出画像31内の水平線または抽出画像31の枠に対して所定の角度以上で傾いている場合など、牛の撮像画像30がルーメンサイズスコアの特定に適していないと判断した場合に、基準点60の特定ができないと判断する(No)。この場合、ステップS12に戻って、撮像画像30の取得から再度実行し直す。このときに、基準点特定部22は、撮像画像30を再度取得し直すことを作業者に促すメッセージを表示部10に表示したり、音声で出力したりしてもよい。
In step S15, for example, if the reference point identification unit 22 determines that the captured image 30 of the cow is not suitable for identifying the rumen size score, such as when the line segment 50 is inclined at a predetermined angle or more relative to the horizontal line in the extracted image 31 or the frame of the extracted image 31, it determines that it is not possible to identify the reference point 60 (No). In this case, the process returns to step S12 and the process is repeated from the acquisition of the captured image 30. At this time, the reference point identification unit 22 may display a message on the display unit 10 or output it by voice, urging the operator to reacquire the captured image 30.
ステップS18では、制御部15の寸法特定部23は、基準点60と、輪郭線40の下部に位置する先端43aを通る抽出画像31内の略水平線である直線53と、の間の距離L1を、牛の上下方向に関する身体の大きさを示す寸法として特定する(図5参照)。
In step S18, the dimension determination unit 23 of the control unit 15 determines the distance L1 between the reference point 60 and a straight line 53, which is a substantially horizontal line in the extracted image 31 that passes through the tip 43a located at the bottom of the contour line 40, as a dimension indicating the size of the cow's body in the vertical direction (see Figure 5).
次いで、ステップS20では、制御部15の算出部24は、寸法特定部23が特定した寸法L1に所定の係数を掛けた寸法L2を算出する。所定の係数は、例えば0.2以上0.4以下の範囲内の値である。したがって、寸法L2は寸法L1より短い。
Next, in step S20, the calculation unit 24 of the control unit 15 calculates the dimension L2 by multiplying the dimension L1 identified by the dimension identification unit 23 by a predetermined coefficient. The predetermined coefficient is, for example, a value in the range of 0.2 to 0.4. Therefore, the dimension L2 is shorter than the dimension L1.
次いで、ステップS22では、制御部15の直線決定部25は、基準点60から寸法L2だけ下側に離れた(例えば真下に位置する)点62の略左右両側に位置する輪郭線40上の2つの点44、45を特定し、点44、45と基準点60とを通る直線55、56を決定する(図6参照)。例えば、直線決定部25は、基準点60から寸法L2だけ真下に位置する点62を特定し、点62を通る抽出画像31内の略水平線54が輪郭線40に交わる2つの交点を点44、45と特定する。そして、直線決定部25は、点44と基準点60とを通る直線55および点45と基準点60とを通る直線56を決定する。
Next, in step S22, the straight line determination unit 25 of the control unit 15 identifies two points 44, 45 on the contour line 40 located on both sides of a point 62 that is located downward (e.g., directly below) by a dimension L2 from the reference point 60, and determines straight lines 55, 56 that pass through the points 44, 45 and the reference point 60 (see FIG. 6). For example, the straight line determination unit 25 identifies a point 62 that is located directly below the reference point 60 by a dimension L2, and identifies the two intersections where an approximately horizontal line 54 in the extracted image 31 that passes through the point 62 intersects with the contour line 40 as points 44, 45. The straight line determination unit 25 then determines a straight line 55 that passes through the point 44 and the reference point 60, and a straight line 56 that passes through the point 45 and the reference point 60.
次いで、ステップS24では、制御部15の角度取得部26は、ステップS16で決定した直線55と直線56とがなす角度αを取得する(図6参照)。
Next, in step S24, the angle acquisition unit 26 of the control unit 15 acquires the angle α between the straight lines 55 and 56 determined in step S16 (see FIG. 6).
次いで、ステップS26では、制御部15のスコア特定部27は、ステップS24で取得した角度αと、記憶部14に記憶された表1のようなスコア情報と、から、撮像画像30に写された牛のルーメンサイズスコアを特定する。次いで、ステップS28では、スコア特定部27は、ステップS26で特定したルーメンサイズスコアを表示部10に表示すると共に、記憶部14に記憶する。例えば、スコア特定部27は、牛の撮像画像30と共にルーメンサイズスコアを表示部10に表示してもよい。また、スコア特定部27は、ルーメンサイズスコアを特定した牛の個体識別番号と、当該牛を撮像した撮像画像30と、撮像日と、当該牛のルーメンサイズスコアと、を関連付けた1つの情報として記憶部14に記憶してもよい。
Next, in step S26, the score determination unit 27 of the control unit 15 determines the rumen size score of the cow captured in the captured image 30 from the angle α acquired in step S24 and the score information such as Table 1 stored in the memory unit 14. Next, in step S28, the score determination unit 27 displays the rumen size score determined in step S26 on the display unit 10 and stores it in the memory unit 14. For example, the score determination unit 27 may display the rumen size score on the display unit 10 together with the captured image 30 of the cow. In addition, the score determination unit 27 may store in the memory unit 14 as a single piece of information that associates the individual identification number of the cow for which the rumen size score has been determined, the captured image 30 of the cow, the image capture date, and the rumen size score of the cow.
以上説明したように、本第1の実施形態によれば、画像取得部20は、立位にある牛を略真後ろから撮像した二次元の撮像画像30を取得する(図3参照)。抽出部21は、撮像画像30から、牛の輪郭線40を抽出する(図4参照)。寸法特定部23は、撮像画像30から、牛の上下方向に関する身体の大きさを示す寸法L1(第1の寸法)を予め定められた方法で特定する(図5参照)。直線決定部25は、牛の左右方向中央部近傍かつ上端部近傍の基準点60から寸法L1より短い寸法L2(第2の寸法)だけ下側に離れた点62の略左右両側に位置する輪郭線40上の点44、45を特定し、点44、45と基準点60とを通る直線55、56(第1直線および第2直線)を決定する(図6参照)。角度取得部26は、直線55と直線56とがなす角度αを取得する(図6参照)。スコア特定部27は、角度取得部26が取得した角度αから、撮像画像30に写された牛のルーメンサイズスコアを特定する。このように、本第1の実施形態では、制御部15が、直線55、56を決定し、直線55と直線56とがなす角度αを取得し、角度αからルーメンサイズスコアを特定することから、非特許文献1のように人がルーメンサイズスコアを特定する場合に比べて、ルーメンサイズスコアのばらつきを小さく抑えることができる。また、直線決定部25が特定する輪郭線40上の点44、45は、基準点60から寸法L2だけ下側に位置する点62の略左右両側に位置する点であるため、図9で説明したように牛の腹部の表面に位置する点である。したがって、直線55と直線56とがなす角度αからルーメンサイズスコアを特定することで、牛が痩せている場合でも、太っている場合でも、ルーメンサイズスコアを精度良く特定することができる。また、2次元画像である撮像画像30に牛が大きく写された場合でも、小さく写された場合でも、角度αは変化しないことから、角度αからルーメンサイズスコアを特定することで、正規化などの処理を行わずにルーメンサイズスコアを精度良く特定することができる。更に、立位にある牛を略真後ろから撮像した二次元の撮像画像30を用いてルーメンサイズスコアを特定するため、牛の三次元画像を用いてルーメンサイズスコアを特定する場合に比べて処理の負荷が小さくなり、スマートフォンなどの携帯性に優れて汎用性の高い簡易な評価装置100を用いてもルーメンサイズスコアを特定することができる。
As described above, according to the first embodiment, the image acquisition unit 20 acquires a two-dimensional captured image 30 of a cow in a standing position captured from approximately directly behind (see FIG. 3). The extraction unit 21 extracts the cow's contour line 40 from the captured image 30 (see FIG. 4). The dimension specification unit 23 specifies the dimension L1 (first dimension) indicating the size of the cow's body in the vertical direction from the captured image 30 using a predetermined method (see FIG. 5). The straight line determination unit 25 specifies points 44 and 45 on the contour line 40 located approximately on both the left and right sides of a point 62 located downward from a reference point 60 near the center in the horizontal direction of the cow and near the upper end by a dimension L2 (second dimension) shorter than the dimension L1, and determines straight lines 55 and 56 (first and second straight lines) passing through the points 44 and 45 and the reference point 60 (see FIG. 6). The angle acquisition unit 26 acquires the angle α between the straight lines 55 and 56 (see FIG. 6). The score determination unit 27 determines the rumen size score of the cow captured in the captured image 30 from the angle α acquired by the angle acquisition unit 26. In this way, in the first embodiment, the control unit 15 determines the straight lines 55 and 56, acquires the angle α between the straight lines 55 and 56, and determines the rumen size score from the angle α. This makes it possible to reduce the variation in the rumen size score compared to when a person determines the rumen size score as in Non-Patent Document 1. In addition, the points 44 and 45 on the contour line 40 determined by the straight line determination unit 25 are points located on both the left and right sides of the point 62 located below the reference point 60 by the dimension L2, and therefore are points located on the surface of the abdomen of the cow as described in FIG. 9. Therefore, by determining the rumen size score from the angle α between the straight lines 55 and 56, the rumen size score can be determined with high accuracy whether the cow is thin or fat. In addition, because the angle α does not change whether the cow is shown large or small in the captured image 30, which is a two-dimensional image, the rumen size score can be determined from the angle α, and therefore the rumen size score can be determined with high accuracy without performing processing such as normalization. Furthermore, because the rumen size score is determined using the two-dimensional captured image 30, which is captured from almost directly behind a cow in an upright position, the processing load is smaller than when the rumen size score is determined using a three-dimensional image of the cow, and the rumen size score can be determined even using a simple evaluation device 100 that is highly portable and versatile, such as a smartphone.
また、本第1の実施形態では、直線決定部25は、基準点60から寸法L2だけ下側に離れた点62(第1の点)を特定し、点62を通る抽出画像31内の略水平線54が輪郭線40に交わる2つの交点を点44、45と特定する(図6参照)。そして、直線決定部25は、直線55(第1直線)を決定する場合、2つの点44、45のうちの一方の点44と基準点60とを通る直線を直線55と決定する(図6参照)。また、直線決定部25は、直線56(第2直線)を決定する場合、2つの点44、45のうちの他方の点45と基準点60とを通る直線を直線56と決定する(図6参照)。これにより、牛の腹部の表面上に位置する点44、45と基準点60とを通る直線55、56が決定されるため、直線55と直線56とがなす角度αから牛のルーメンサイズスコアを特定することで、ルーメンサイズスコアを精度良く特定することができる。抽出画像31内の略水平線54とは、完全な水平線の場合に限られず、ルーメンサイズスコアの特定に支障がない程度に傾いている場合でもよく、水平線から±5°の範囲内で傾いている場合でもよい。
In the first embodiment, the straight line determination unit 25 identifies a point 62 (first point) that is separated downward from the reference point 60 by a dimension L2, and identifies two intersections where an approximately horizontal line 54 in the extracted image 31 that passes through the point 62 intersects with the contour line 40 as points 44 and 45 (see FIG. 6). When determining a straight line 55 (first straight line), the straight line determination unit 25 determines a straight line that passes through one of the two points 44 and 45, point 44, and the reference point 60 as the straight line 55 (see FIG. 6). When determining a straight line 56 (second straight line), the straight line determination unit 25 determines a straight line that passes through the other of the two points 44 and 45, point 45, and the reference point 60 as the straight line 56 (see FIG. 6). This determines straight lines 55, 56 passing through points 44, 45 located on the surface of the cow's abdomen and reference point 60, and the rumen size score of the cow can be determined with high accuracy by determining the angle α between straight lines 55 and 56. The approximately horizontal line 54 in the extracted image 31 does not have to be a completely horizontal line, and may be inclined to an extent that does not interfere with determining the rumen size score, or may be inclined within a range of ±5° from the horizontal line.
また、本第1の実施形態では、基準点特定部22は、輪郭線40の上部の左右両側に存在する山部41a、41bの頂点42a、42bを結ぶ線分50の略中点を基準点60と特定する(図5参照)。寸法特定部23は、基準点60と、輪郭線40の下部に存在する2つの先端43a、43bのうちの下側の先端43aを通る抽出画像31内の略水平線である直線53と、の間の距離L1を、牛の上下方向に関する身体の大きさを示す寸法として特定する(図5参照)。そして、直線決定部25は基準点特定部22および寸法特定部23が特定した事項に基づいて直線55と直線56を決定し、角度取得部26は直線55と直線56とがなす角度αを取得し、スコア特定部27は角度αからルーメンサイズスコアを特定する(図6参照)。これにより、立位にある牛を略真後ろから撮像した二次元の撮像画像30から、人の指示を介さずに制御部15による処理だけで、ルーメンサイズスコアを特定するため、ルーメンサイズスコアのばらつきを小さく抑えることができる。また、基準点特定部22が山部41aの頂点42aと山部41bの頂点42bとを結ぶ線分50の略中点を基準点60と特定することで、基準点60は牛の肛門付近に位置する点となる。このような肛門付近に位置する点を基準点60とすることで、直線55と直線56とのなす角度αからルーメンサイズスコアを精度良く特定することができる。山部41a、41bの頂点42a、42bを結ぶ線分50の略中点とは、線分50の完全な中点である場合に限られず、肛門付近に位置する場合であればよく、線分50の完全な中点から左右に線分50の長さの10%の範囲内に位置していればよい。直線53が抽出画像31内の略水平線とは、完全な水平線の場合に限られず、ルーメンサイズスコアの特定に支障がない程度に傾いている場合でもよく、水平線から±5°の範囲内で傾いている場合でもよい。
In the first embodiment, the reference point identification unit 22 identifies the approximate midpoint of the line segment 50 connecting the vertices 42a, 42b of the mountain portions 41a, 41b on both the left and right sides of the upper part of the contour line 40 as the reference point 60 (see FIG. 5). The dimension identification unit 23 identifies the distance L1 between the reference point 60 and a straight line 53, which is an approximately horizontal line in the extracted image 31 passing through the lower tip 43a of the two tips 43a, 43b present at the lower part of the contour line 40, as a dimension indicating the size of the body in the vertical direction of the cow (see FIG. 5). Then, the straight line determination unit 25 determines the straight lines 55 and 56 based on the items identified by the reference point identification unit 22 and the dimension identification unit 23, the angle acquisition unit 26 acquires the angle α between the straight lines 55 and 56, and the score identification unit 27 identifies the rumen size score from the angle α (see FIG. 6). As a result, the rumen size score is determined from the two-dimensional captured image 30 of the cow in a standing position, captured from almost directly behind, by the processing of the control unit 15 alone, without any human instruction, and the variation in the rumen size score can be suppressed to a small value. In addition, the reference point determination unit 22 determines the approximate midpoint of the line segment 50 connecting the apex 42a of the crest 41a and the apex 42b of the crest 41b as the reference point 60, so that the reference point 60 is a point located near the cow's anus. By using such a point located near the anus as the reference point 60, the rumen size score can be determined with high accuracy from the angle α formed by the straight lines 55 and 56. The approximate midpoint of the line segment 50 connecting the apexes 42a and 42b of the crests 41a and 41b is not limited to the exact midpoint of the line segment 50, but may be located near the anus, and may be located within a range of 10% of the length of the line segment 50 on either side of the exact midpoint of the line segment 50. The straight line 53 being an approximately horizontal line in the extracted image 31 does not necessarily have to be a completely horizontal line, but may be tilted to an extent that does not interfere with identifying the lumen size score, or may be tilted within a range of ±5° from the horizontal line.
なお、図5では、線分50は抽出画像31内で略水平となっているが、山部41a、41bの頂点42a、42bの位置によっては水平とならない場合がある。また、線分50は、頂点42a、42bの求め方によっては、図5から上下方向に多少ずれることもある。しかしながら、線分50が多少傾斜しても基準点60の位置はほとんど変わらないし、線分50が上下に多少ずれても角度αの値はほとんど変わらないため、ルーメンサイズスコアの特定精度への影響はほとんどない。
In FIG. 5, line segment 50 is approximately horizontal in extracted image 31, but may not be horizontal depending on the positions of vertices 42a, 42b of peaks 41a, 41b. Line segment 50 may also deviate slightly in the vertical direction from FIG. 5 depending on how vertices 42a, 42b are determined. However, even if line segment 50 is slightly inclined, the position of reference point 60 hardly changes, and even if line segment 50 is slightly deviated vertically, the value of angle α hardly changes, so there is almost no effect on the accuracy of identifying the lumen size score.
また、本第1の実施形態では、算出部24は、寸法特定部23が特定した寸法L1に0.2以上0.4以下の範囲内の値である係数を掛けて寸法L2を算出する。すなわち、寸法L2は寸法L1に0.2以上0.4以下の係数を掛けた値である。基準点特定部22が山部41a、41bの頂点42a、42bを結ぶ線分50の略中点を基準点60と特定し、寸法特定部23が基準点60と輪郭線40の先端43aを通る直線53との間の距離L1を牛の上下方向に関する身体の大きさを示す寸法と特定する場合では、図12のように、係数を0.2以上0.4以下の値とすることで、ルーメンサイズスコアを精度良く特定することができる。ルーメンサイズスコアの特定の精度を向上させる点から、係数は0.25以上0.35以下の場合が好ましく、0.28以上0.32以下の場合がより好ましく、0.3の場合が更に好ましい。
In addition, in this first embodiment, the calculation unit 24 calculates the dimension L2 by multiplying the dimension L1 identified by the dimension identification unit 23 by a coefficient that is a value in the range of 0.2 to 0.4. That is, the dimension L2 is a value obtained by multiplying the dimension L1 by a coefficient that is 0.2 to 0.4. In the case where the reference point identification unit 22 identifies the approximate midpoint of the line segment 50 connecting the vertices 42a, 42b of the peaks 41a, 41b as the reference point 60, and the dimension identification unit 23 identifies the distance L1 between the reference point 60 and the straight line 53 passing through the tip 43a of the contour line 40 as the dimension indicating the body size in the vertical direction of the cow, the rumen size score can be accurately identified by setting the coefficient to a value of 0.2 to 0.4 as shown in FIG. 12. In order to improve the accuracy of identifying the rumen size score, the coefficient is preferably 0.25 to 0.35, more preferably 0.28 to 0.32, and even more preferably 0.3.
なお、上記第1の実施形態において、寸法特定部23は、基準点60と輪郭線40の先端43a、43bのうちの下側の先端43aを通る直線53との間の距離L1を牛の上下方向に関する基準寸法と特定する場合を例に示したが、この場合に限られない。寸法特定部23は、基準点60と、輪郭線40の先端43a、43bのうちの上側の先端43bを通る抽出画像31内の略水平線または先端43aと先端43bを通る直線と、の間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合でもよい。また、寸法特定部23は、基準点60と、先端43aを通る抽出画像31内の略水平線と先端43bを通る抽出画像31内の略水平線との中間に位置する略水平線と、の間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合でもよい。これらの場合でも、牛の上下方向に関する身体の大きさを示す寸法は大きく変わらないことから、算出部24が用いる係数は0.2以上0.4以下であればよく、0.25以上0.35以下が好ましく、0.28以上0.32以下がより好ましく、0.3が更に好ましい。
In the above first embodiment, the dimension specification unit 23 specifies the distance L1 between the reference point 60 and the straight line 53 passing through the lower tip 43a of the tips 43a and 43b of the contour line 40 as the reference dimension in the vertical direction of the cow, but this is not limited to this case. The dimension specification unit 23 may specify the distance between the reference point 60 and an approximately horizontal line in the extracted image 31 passing through the upper tip 43b of the tips 43a and 43b of the contour line 40, or a straight line passing through the tips 43a and 43b, as the dimension indicating the size of the body in the vertical direction of the cow. The dimension specification unit 23 may also specify the distance between the reference point 60 and an approximately horizontal line located midway between the approximately horizontal line in the extracted image 31 passing through the tip 43a and the approximately horizontal line in the extracted image 31 passing through the tip 43b, as the dimension indicating the size of the body in the vertical direction of the cow. Even in these cases, the dimensions indicating the size of the cow's body in the vertical direction do not change significantly, so the coefficient used by the calculation unit 24 should be 0.2 to 0.4, preferably 0.25 to 0.35, more preferably 0.28 to 0.32, and even more preferably 0.3.
また、本第1の実施形態では、輪郭線40の上部の左右両側に存在する山部41a、41bは、牛の腰角に対応する部分である。このような山部41a、41bの頂点42a、42b(牛の腰角に対応する部分の頂点)から基準点60を特定することで、牛が太っていても、痩せていても、基準点60は牛の肛門付近に位置するようになる。よって、ルーメンサイズスコアを精度良く特定することができる。
In addition, in this first embodiment, the peaks 41a, 41b on both the left and right sides of the upper part of the contour line 40 correspond to the cow's hip angle. By identifying the reference point 60 from the vertices 42a, 42b (vertices of the parts corresponding to the cow's hip angle) of such peaks 41a, 41b, the reference point 60 will be located near the cow's anus, regardless of whether the cow is fat or thin. Therefore, the rumen size score can be identified with high accuracy.
《第2の実施形態》
第2の実施形態に係る牛の評価装置の機能構成およびハードウェア構成は、第1の実施形態の図1および図13と同じである。第2の実施形態における制御部15の機能構成は第1の実施形態の図2と同じであるが、基準点特定部22、寸法特定部23、および算出部24が実行する処理が第1の実施形態と異なっている。以下においては、第2の実施形態における基準点特定部22、寸法特定部23、算出部24、直線決定部25、角度取得部26、およびスコア特定部27が実行する処理について説明する。画像取得部20および抽出部21が実行する処理は、第1の実施形態と同じであるため説明を省略する。
Second Embodiment
The functional configuration and hardware configuration of the cattle evaluation device according to the second embodiment are the same as those of the first embodiment shown in Fig. 1 and Fig. 13. The functional configuration of the control unit 15 in the second embodiment is the same as that of the first embodiment shown in Fig. 2, but the processes executed by the reference point specifying unit 22, the dimension specifying unit 23, and the calculation unit 24 are different from those in the first embodiment. The processes executed by the reference point specifying unit 22, the dimension specifying unit 23, the calculation unit 24, the straight line determination unit 25, the angle acquisition unit 26, and the score specifying unit 27 in the second embodiment will be described below. The processes executed by the image acquisition unit 20 and the extraction unit 21 are the same as those in the first embodiment, and therefore will not be described.
図15は、第2の実施形態における基準点特定部22および寸法特定部23が実行する処理を説明するための図である。図15に示すように、基準点特定部22は、本第2の実施形態では、牛の輪郭線40のうち最も上側に位置する点を基準点60aと特定する。基準点60aは、牛の左右方向中央部近傍かつ上端部近傍に位置する点となる。また、基準点60aは、牛の尻尾の付け根付近に位置する点となる。寸法特定部23は、本第2の実施形態では、まず、輪郭線40の下部に位置する2つの先端43aと先端43bを通る直線53aを特定する。そして、寸法特定部23は、基準点60aと直線53aとの間の距離L3を、牛の上下方向に関する身体の大きさを示す寸法として特定する。すなわち、寸法特定部23は、基準点60aと、基準点60aを通る抽出画像31内の垂線59aが直線53aと交差する交点61aと、の間の距離L3を、牛の上下方向に関する身体の大きさを示す寸法として特定する。
15 is a diagram for explaining the processing executed by the reference point identification unit 22 and the dimension identification unit 23 in the second embodiment. As shown in FIG. 15, in this second embodiment, the reference point identification unit 22 identifies the point located at the top of the cow's contour line 40 as the reference point 60a. The reference point 60a is a point located near the center in the left-right direction of the cow and near the upper end. The reference point 60a is also a point located near the base of the cow's tail. In this second embodiment, the dimension identification unit 23 first identifies a straight line 53a that passes through the two tips 43a and 43b located at the bottom of the contour line 40. Then, the dimension identification unit 23 identifies the distance L3 between the reference point 60a and the straight line 53a as a dimension indicating the size of the cow's body in the vertical direction. That is, the dimension determination unit 23 determines the distance L3 between the reference point 60a and the intersection point 61a where the perpendicular line 59a in the extracted image 31 that passes through the reference point 60a intersects with the straight line 53a as the dimension that indicates the size of the cow's body in the vertical direction.
算出部24は、寸法特定部23が特定した寸法L3に所定の係数を掛けた寸法L4を算出する。本第2の実施形態では、所定の係数は例えば0.3以上0.4以下の範囲内の値である。
The calculation unit 24 calculates the dimension L4 by multiplying the dimension L3 identified by the dimension identification unit 23 by a predetermined coefficient. In this second embodiment, the predetermined coefficient is, for example, a value in the range of 0.3 to 0.4.
図16は、第2の実施形態における直線決定部25および角度取得部26が実行する処理を説明するための図である。図16に示すように、直線決定部25は、本第2の実施形態では、まず、算出部24が算出した寸法L4だけ基準点60aから下側に離れた(例えば真下の位置する)点62aを特定し、点62aを通る抽出画像31内の略水平線54aが輪郭線40に交わる2つの交点を点44a、45aと特定する。次いで、直線決定部25は、点44aと基準点60aとを通る直線55aおよび点45aと基準点60aとを通る直線56aを決定する。角度取得部26は、本第2の実施形態では、直線55aと直線56aとがなす角度βを取得する。角度βは、例えば直線55aと直線56aが交差することで形成される複数の角度のうち基準点60aの上下に位置する角度とする。
16 is a diagram for explaining the processing executed by the straight line determination unit 25 and the angle acquisition unit 26 in the second embodiment. As shown in FIG. 16, in the second embodiment, the straight line determination unit 25 first identifies a point 62a that is separated downward from the reference point 60a by the dimension L4 calculated by the calculation unit 24 (e.g., located directly below), and identifies two intersections at which the approximately horizontal line 54a in the extracted image 31 that passes through the point 62a intersects with the contour line 40 as points 44a and 45a. Next, the straight line determination unit 25 determines a straight line 55a that passes through the point 44a and the reference point 60a, and a straight line 56a that passes through the point 45a and the reference point 60a. In the second embodiment, the angle acquisition unit 26 acquires an angle β between the straight line 55a and the straight line 56a. The angle β is, for example, an angle located above and below the reference point 60a among a plurality of angles formed by the intersection of the straight lines 55a and 56a.
スコア特定部27は、角度取得部26が取得した角度βから、撮像画像30に写された牛のルーメンサイズスコアを特定する。
The score determination unit 27 determines the rumen size score of the cow captured in the captured image 30 from the angle β acquired by the angle acquisition unit 26.
第2の実施形態に係る牛の評価方法は、基準点特定部22が特定する基準点60a、寸法特定部23が特定する寸法L3、および算出部24が算出する寸法L4が異なる点以外は第1の実施形態の図14のフローチャートと同様であるため図示および説明を省略する。
The cattle evaluation method according to the second embodiment is similar to the flowchart of FIG. 14 of the first embodiment, except that the reference point 60a identified by the reference point identification unit 22, the dimension L3 identified by the dimension identification unit 23, and the dimension L4 calculated by the calculation unit 24 are different, and therefore will not be illustrated or described.
[実験2]
非特許文献1に記載されている判定シートを用いて専門家が特定したルーメンサイズスコアと、角度取得部26が取得した角度βの大きさと、の相関を調査する実験を行った。図17には、ルーメンサイズスコアと角度取得部26が取得した角度βとの相関を調査した実験結果が示されている。図17の横軸(x軸)は専門家が判定シートを用いて特定したルーメンサイズスコアであり、縦軸(y軸)は角度取得部26が取得した角度βである。図17中の○、△、□の各点は実験を行った乳牛1頭1頭を示していて、直線は近似直線を示している。また、○、△、□は、算出部24が寸法L4の算出に用いた係数が互いに異なる場合を示している。算出部24が寸法L4の算出に用いた係数は、○は0.3、△は0.35、□は0.4である。
[Experiment 2]
An experiment was conducted to investigate the correlation between the rumen size score determined by an expert using the judgment sheet described in Non-Patent Document 1 and the magnitude of the angle β acquired by the angle acquisition unit 26. FIG. 17 shows the results of an experiment investigating the correlation between the rumen size score and the angle β acquired by the angle acquisition unit 26. The horizontal axis (x-axis) of FIG. 17 is the rumen size score determined by an expert using the judgment sheet, and the vertical axis (y-axis) is the angle β acquired by the angle acquisition unit 26. Each point of ○, △, and □ in FIG. 17 indicates each dairy cow in the experiment, and the straight line indicates an approximate straight line. In addition, ○, △, and □ indicate cases where the coefficients used by the calculation unit 24 to calculate the dimension L4 are different from each other. The coefficients used by the calculation unit 24 to calculate the dimension L4 are 0.3 for ○, 0.35 for △, and 0.4 for □.
図17に示すように、算出部24が寸法L4の算出に用いた係数が0.3以上0.4以下の範囲内では、いずれにおいても、ルーメンサイズスコアが大きいほど、角度βは大きくなる結果であった。○の結果における近似直線はy=12.79x+36.54であり、決定係数R2は0.906であった。△の結果における近似直線はy=13.24x+26.47であり、決定係数R2は0.881であった。□の結果における近似直線はy=13.03x+19.15であり、決定係数R2は0.8571であった。このように、寸法L4の算出に用いる係数を0.3以上0.4以下の範囲内とすることで、点44aと基準点60aを通る直線55aと、点45aと基準点60aを通る直線56aと、がなす角度βとルーメンサイズスコアとの相関関係が強くなることから、点44a、45aは牛の腹部に位置する点であることが言える。すなわち、寸法特定部23が特定した寸法L3に0.3以上0.4以下の範囲内の係数を掛けて寸法L4を算出し、算出した寸法L4だけ基準点60aから下側に離れた点の略左右両側に位置する牛の表面は腹部の表面であることが言える。したがって、基準点60aから寸法L4だけ下側に離れた点の略左右両側に位置する牛の表面上の点を特定することで牛の腹部に位置する点を特定でき、その結果、角度βからルーメンサイズスコアを精度良く特定することができる。
As shown in Fig. 17, when the coefficient used by the calculation unit 24 to calculate the dimension L4 is in the range of 0.3 to 0.4, the larger the lumen size score, the larger the angle β. The approximate line for the results of ○ is y = 12.79x + 36.54, and the coefficient of determination R2 is 0.906. The approximate line for the results of △ is y = 13.24x + 26.47, and the coefficient of determination R2 is 0.881. The approximate line for the results of □ is y = 13.03x + 19.15, and the coefficient of determination R2 is 0.8571. In this way, by setting the coefficient used for calculating the dimension L4 within the range of 0.3 to 0.4, the correlation between the angle β formed by the line 55a passing through the point 44a and the reference point 60a and the line 56a passing through the point 45a and the reference point 60a and the rumen size score becomes stronger, so it can be said that the points 44a and 45a are points located in the abdomen of the cow. In other words, the dimension L3 specified by the dimension specifying unit 23 is multiplied by a coefficient within the range of 0.3 to 0.4 to calculate the dimension L4, and it can be said that the surface of the cow located approximately on both sides of the point located downward from the reference point 60a by the calculated dimension L4 is the surface of the abdomen. Therefore, by specifying the points on the surface of the cow located approximately on both sides of the point located downward from the reference point 60a by the dimension L4, it is possible to specify the points located in the abdomen of the cow, and as a result, it is possible to accurately specify the rumen size score from the angle β.
本第2の実施形態によれば、基準点特定部22は、輪郭線40の最も上側の点を基準点60aと特定する(図15参照)。寸法特定部23は、基準点60aと、輪郭線40の下部に位置する2つの先端43aと先端43bを通る直線53aと、の間の距離L3を、牛の上下方向に関する身体の大きさを示す寸法と特定する(図15参照)。このような場合でも、図17で説明したように、ルーメンサイズスコアを精度良く特定することができる。
According to this second embodiment, the reference point identification unit 22 identifies the uppermost point of the contour line 40 as the reference point 60a (see FIG. 15). The dimension identification unit 23 identifies the distance L3 between the reference point 60a and the straight line 53a passing through the two tips 43a and 43b located at the bottom of the contour line 40 as the dimension indicating the size of the cow's body in the vertical direction (see FIG. 15). Even in such a case, the rumen size score can be accurately identified as described in FIG. 17.
また、本第2の実施形態では、算出部24は、寸法特定部23が特定した寸法L3に0.3以上0.4以下の範囲内の値である係数を掛けて寸法L4を算出する。すなわち、寸法L4は寸法L3に0.3以上0.4以下の係数を掛けた値である。基準点特定部22が輪郭線40の最も上側の点を基準点60aと特定し、寸法特定部23が基準点60aと輪郭線40の先端43aと先端43bを通る直線53aとの間の距離L3を牛の上下方向に関する身体の大きさを示す寸法と特定する場合では、図17のように、係数を0.3以上0.4以下の値とすることで、ルーメンサイズスコアを精度良く特定することができる。ルーメンサイズスコアの特定の精度を向上させる点から、係数は0.3以上0.38以下の場合が好ましく、0.3以上0.35以下の場合がより好ましく、0.3以上0.32以下の場合が更に好ましい。
In addition, in this second embodiment, the calculation unit 24 calculates the dimension L4 by multiplying the dimension L3 identified by the dimension identification unit 23 by a coefficient that is a value in the range of 0.3 to 0.4. That is, the dimension L4 is a value obtained by multiplying the dimension L3 by a coefficient that is 0.3 to 0.4. In a case where the reference point identification unit 22 identifies the uppermost point of the contour line 40 as the reference point 60a, and the dimension identification unit 23 identifies the distance L3 between the reference point 60a and the straight line 53a passing through the tip 43a and the tip 43b of the contour line 40 as a dimension indicating the body size in the vertical direction of the cow, the rumen size score can be accurately identified by setting the coefficient to a value of 0.3 to 0.4 as shown in FIG. 17. In order to improve the accuracy of identifying the rumen size score, the coefficient is preferably 0.3 to 0.38, more preferably 0.3 to 0.35, and even more preferably 0.3 to 0.32.
なお、上記第2の実施形態において、寸法特定部23は、基準点60aと輪郭線40の先端43aと先端43bを通る直線53aとの間の距離L3を牛の上下方向に関する身体の大きさを示す寸法と特定する場合に限られず、基準点60aと輪郭線40の先端43a、43bの一方を通る抽出画像31内の略水平線との間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合でもよい。この場合でも、牛の上下方向に関する身体の大きさを示す寸法は大きく変わらないことから、算出部24が用いる係数は0.3以上0.4以下であればよく、0.3以上0.38以下が好ましく、0.3以上0.35以下がより好ましく、0.3以上0.32以下が更に好ましい。なお、算出部24が用いる係数は0.2以上0.4以下の場合でもよい。
In the second embodiment, the dimension specification unit 23 is not limited to specifying the distance L3 between the reference point 60a and the straight line 53a passing through the tip 43a and the tip 43b of the contour line 40 as the dimension indicating the size of the body in the vertical direction of the cow, but may specify the distance between the reference point 60a and an approximately horizontal line in the extracted image 31 passing through one of the tips 43a and 43b of the contour line 40 as the dimension indicating the size of the body in the vertical direction of the cow. Even in this case, the dimension indicating the size of the body in the vertical direction of the cow does not change significantly, so the coefficient used by the calculation unit 24 may be 0.3 to 0.4, preferably 0.3 to 0.38, more preferably 0.3 to 0.35, and even more preferably 0.3 to 0.32. The coefficient used by the calculation unit 24 may be 0.2 to 0.4.
《第3の実施形態》
第3の実施形態に係る牛の評価装置の機能構成およびハードウェア構成は、第1の実施形態の図1および図13と同じである。第3の実施形態における制御部15の機能構成は第1の実施形態の図2と同じであるが、寸法特定部23および角度取得部26が実行する処理が第1の実施形態と異なっている。以下においては、第3の実施形態における寸法特定部23、算出部24、直線決定部25、角度取得部26、およびスコア特定部27が実行する処理について説明する。画像取得部20、抽出部21、および基準点特定部22が実行する処理は第1の実施形態と同じであるため説明を省略する。
Third Embodiment
The functional configuration and hardware configuration of the cattle evaluation device according to the third embodiment are the same as those of the first embodiment shown in Fig. 1 and Fig. 13. The functional configuration of the control unit 15 in the third embodiment is the same as that of the first embodiment shown in Fig. 2, but the processes executed by the dimension specifying unit 23 and the angle acquiring unit 26 differ from those in the first embodiment. The processes executed by the dimension specifying unit 23, the calculation unit 24, the straight line determination unit 25, the angle acquiring unit 26, and the score specifying unit 27 in the third embodiment will be described below. The processes executed by the image acquiring unit 20, the extraction unit 21, and the reference point identifying unit 22 are the same as those in the first embodiment, and therefore will not be described.
図18は、第3の実施形態における寸法特定部23、直線決定部25、および角度取得部26が実行する処理を説明するための図である。図18では、第1の実施形態と同じ方法によって基準点特定部22が基準点60を特定した後の状態が示されている。図18に示すように、寸法特定部23は、輪郭線40の下部に位置する2つの先端43aと先端43bを通る直線53aを特定する。そして、寸法特定部23は、基準点60と直線53aとの間の距離L5を、牛の上下方向に関する身体の大きさを示す寸法として特定する。
Figure 18 is a diagram for explaining the processing executed by the dimension specification unit 23, the straight line determination unit 25, and the angle acquisition unit 26 in the third embodiment. Figure 18 shows the state after the reference point specification unit 22 specifies the reference point 60 using the same method as in the first embodiment. As shown in Figure 18, the dimension specification unit 23 specifies a straight line 53a that passes through the two tips 43a and 43b located at the bottom of the contour line 40. Then, the dimension specification unit 23 specifies the distance L5 between the reference point 60 and the straight line 53a as the dimension indicating the size of the cow's body in the vertical direction.
算出部24は、寸法特定部23が特定した寸法L5に所定の係数を掛けた寸法L6を算出する。所定の係数は、第1の実施形態と同じく、0.2以上0.4以下の範囲内の値である。
The calculation unit 24 calculates the dimension L6 by multiplying the dimension L5 identified by the dimension identification unit 23 by a predetermined coefficient. The predetermined coefficient is a value in the range of 0.2 to 0.4, as in the first embodiment.
直線決定部25は、まず、算出部24が算出した寸法L6だけ基準点60から下側に離れた(例えば真下の位置する)点62bを特定し、点62bを通る抽出画像31内の略水平線54bが輪郭線40に交わる交点である点44b、45bのいずれか一方を特定する。次いで、直線決定部25は、点44bと基準点60とを通る直線55bまたは点45bと基準点60とを通る直線56bのいずれか一方を決定する。なお、図18においては、理解の容易性のため、点44b、45bの両方を図示し、直線55b、56bの両方を図示している。
The straight line determination unit 25 first identifies point 62b that is spaced downward from the reference point 60 by the dimension L6 calculated by the calculation unit 24 (e.g., located directly below), and identifies either point 44b or 45b that is the intersection point where a substantially horizontal line 54b in the extracted image 31 that passes through point 62b intersects with the contour line 40. Next, the straight line determination unit 25 determines either straight line 55b that passes through point 44b and the reference point 60, or straight line 56b that passes through point 45b and the reference point 60. Note that, for ease of understanding, in FIG. 18, both points 44b and 45b and both straight lines 55b and 56b are illustrated.
角度取得部26は、基準点60を通る抽出画像31内の略垂線である基準線57と直線55bとがなす角度γ1、または、基準線57と直線56bとがなす角度γ2、のいずれか一方を取得する。角度γ1は、例えば基準線57と直線55bが交差することで形成される複数の角度のうち基準点60に対して左下または右上の角度とする。角度γ2は、例えば基準線57と直線56bが交差することで形成される複数の角度のうち基準点60に対して右下または左上の角度とする。なお、図18においては、理解の容易性のため、角度γ1、γ2の両方を図示している。
The angle acquisition unit 26 acquires either the angle γ1 between the reference line 57, which is a substantially perpendicular line in the extracted image 31 that passes through the reference point 60, and the straight line 55b, or the angle γ2 between the reference line 57 and the straight line 56b. The angle γ1 is, for example, an angle on the lower left or upper right side of the reference point 60 among the multiple angles formed by the intersection of the reference line 57 and the straight line 55b. The angle γ2 is, for example, an angle on the lower right or upper left side of the reference point 60 among the multiple angles formed by the intersection of the reference line 57 and the straight line 56b. Note that, for ease of understanding, both angles γ1 and γ2 are illustrated in FIG. 18.
スコア特定部27は、角度取得部26が取得した角度γ1またはγ2から、撮像画像30に写された牛のルーメンサイズスコアを特定する。
The score determination unit 27 determines the rumen size score of the cow captured in the captured image 30 from the angle γ1 or γ2 acquired by the angle acquisition unit 26.
第3の実施形態に係る牛の評価方法は、寸法特定部23が特定する寸法L5、算出部24が算出する寸法L6、直線決定部25が決定する直線55b、56b、および角度取得部26が取得する角度γ1、γ2が異なる点以外は第1の実施形態の図14のフローチャートと同様であるため図示および説明を省略する。
The cattle evaluation method according to the third embodiment is similar to the flowchart of FIG. 14 of the first embodiment, except that the dimension L5 determined by the dimension determination unit 23, the dimension L6 calculated by the calculation unit 24, the straight lines 55b and 56b determined by the straight line determination unit 25, and the angles γ1 and γ2 acquired by the angle acquisition unit 26 are different, and therefore will not be illustrated or described.
[実験3]
非特許文献1に記載されている判定シートを用いて専門家が特定したルーメンサイズスコアと、角度取得部26が取得した角度γ1、γ2と、の相関を調査する実験を行った。図19には、ルーメンサイズスコアと角度取得部26が取得した角度γ1および/またはγ2との相関を調査した実験結果が示されている。図19の横軸は専門家が判定シートを用いて特定したルーメンサイズスコアであり、右縦軸は角度取得部26が取得した角度γ1またはγ2であり、左縦軸は角度γ1と角度γ2の和である。図19中の○、△、×の各点は実験を行った乳牛1頭1頭を示していて、○は角度γ1を取得した場合の結果、△は角度γ2を取得した場合の結果、×は参考として角度γ1とγ2を足した場合の結果を示している。また、○の結果の近似直線を太実線で示し、△の結果の近似直線を細実線で示し、×の結果の近似直線を破線で示している。なお、○、△、×の全てにおいて、算出部24が寸法L6の算出に用いた係数は0.3とした。
[Experiment 3]
An experiment was conducted to investigate the correlation between the rumen size score specified by an expert using the judgment sheet described in Non-Patent Document 1 and the angles γ1 and γ2 acquired by the angle acquisition unit 26. FIG. 19 shows the results of an experiment investigating the correlation between the rumen size score and the angles γ1 and/or γ2 acquired by the angle acquisition unit 26. The horizontal axis of FIG. 19 is the rumen size score specified by an expert using the judgment sheet, the right vertical axis is the angle γ1 or γ2 acquired by the angle acquisition unit 26, and the left vertical axis is the sum of the angles γ1 and γ2. Each point of ○, △, and × in FIG. 19 indicates each dairy cow in the experiment, and ○ indicates the result when the angle γ1 is acquired, △ indicates the result when the angle γ2 is acquired, and × indicates the result when the angles γ1 and γ2 are added together as a reference. In addition, the approximate straight line of the result of ○ is shown by a thick solid line, the approximate straight line of the result of △ is shown by a thin solid line, and the approximate straight line of the result of × is shown by a dashed line. In addition, in all of the cases of ◯, △, and ×, the coefficient used by the calculation unit 24 in calculating the dimension L6 was 0.3.
図19に示すように、ルーメンサイズスコアが大きいほど、角度γ1、角度γ2、および角度γ1とγ2の和は全て大きくなる結果であった。角度γ1を取得した○の結果の近似直線の決定係数R2は0.767であり、角度γ2を取得した△の結果の近似直線の決定係数R2は0.680であった。参考とした、角度γ1と角度γ2の和を取得した場合の×の結果の近似直線の決定係数R2は0.826であった。このことから、基準線57と直線55bとがなす角度γ1または基準線57と直線56bとがなす角度γ2からルーメンサイズスコアを特定した場合でも、ルーメンサイズスコアを精度良く特定できることが分かる。
As shown in FIG. 19, the larger the lumen size score, the larger the angle γ1, the angle γ2, and the sum of the angles γ1 and γ2 all were. The coefficient of determination R2 of the approximation line of the result of ○ where the angle γ1 was obtained was 0.767, and the coefficient of determination R2 of the approximation line of the result of △ where the angle γ2 was obtained was 0.680. The coefficient of determination R2 of the approximation line of the result of × where the sum of the angles γ1 and γ2 was obtained for reference was 0.826. From this, it can be seen that the lumen size score can be determined with high accuracy even when the lumen size score is determined from the angle γ1 between the reference line 57 and the straight line 55b or the angle γ2 between the reference line 57 and the straight line 56b.
本第3の実施形態によれば、角度取得部26は、基準線57と直線55bとがなす角度γ1、または、基準線57と直線56bとがなす角度γ2を取得する(図18参照)。スコア特定部27は、角度取得部26が取得した角度γ1またはγ2からルーメンサイズスコアを特定する。この場合でも、図19で説明したように、ルーメンサイズスコアを精度良く特定することができる。角度取得部26は、角度γ1と角度γ2のどちらを取得する場合でもよいが、第1胃(ルーメン)は左腹部に位置するため、ルーメンサイズスコアを精度良く特定する観点から、角度γ1を取得する場合が好ましい。これは、図19において、角度γ2を取得した△の結果の近似直線の決定係数R2は0.680であったのに対し、角度γ1を取得した〇の結果の近似直線の決定係数R2は0.767であったことからも言える。
According to the third embodiment, the angle acquisition unit 26 acquires the angle γ1 between the reference line 57 and the straight line 55b, or the angle γ2 between the reference line 57 and the straight line 56b (see FIG. 18). The score determination unit 27 determines the rumen size score from the angle γ1 or γ2 acquired by the angle acquisition unit 26. Even in this case, as described in FIG. 19, the rumen size score can be determined with high accuracy. The angle acquisition unit 26 may acquire either the angle γ1 or the angle γ2, but since the first stomach (rumen) is located in the left abdominal region, it is preferable to acquire the angle γ1 from the viewpoint of determining the rumen size score with high accuracy. This can also be seen from the fact that, in FIG. 19, the coefficient of determination R 2 of the approximation line of the result of △ in which the angle γ2 was acquired was 0.680, whereas the coefficient of determination R 2 of the approximation line of the result of ◯ in which the angle γ1 was acquired was 0.767.
図20は、第3の実施形態の変形例における角度取得部26が実行する処理を説明するための図である。図20に示すように、本第3の実施形態の変形例では、角度取得部26は、基準点60を通る抽出画像31内の略水平線である基準線57aと直線55bとがなす角度γ3、または、基準線57aと直線56bとがなす角度γ4、のいずれか一方を取得する。角度γ3は、例えば基準線57aと直線55bが交差することで形成される複数の角度のうち基準点60に対して左下または右上の角度とする。角度γ4は、例えば基準線57aと直線56bが交差することで形成される複数の角度のうち基準点60に対して右下または左上の角度とする。なお、図20においては、理解の容易性のため、角度γ3、γ4の両方を図示している。
20 is a diagram for explaining the process executed by the angle acquisition unit 26 in the modified example of the third embodiment. As shown in FIG. 20, in the modified example of the third embodiment, the angle acquisition unit 26 acquires either the angle γ3 between the reference line 57a, which is a substantially horizontal line in the extracted image 31 passing through the reference point 60, and the straight line 55b, or the angle γ4 between the reference line 57a and the straight line 56b. The angle γ3 is, for example, an angle on the lower left or upper right side with respect to the reference point 60 among the multiple angles formed by the intersection of the reference line 57a and the straight line 55b. The angle γ4 is, for example, an angle on the lower right or upper left side with respect to the reference point 60 among the multiple angles formed by the intersection of the reference line 57a and the straight line 56b. Note that, in FIG. 20, both angles γ3 and γ4 are illustrated for ease of understanding.
上記第3の実施形態では、抽出画像31内の略垂線を基準線57とする場合を例に示したが、上記第3の実施形態の変形例のように、抽出画像31内の略水平線を基準線57aとしてもよい。抽出画像31内の略垂線または略水平線を基準線57、57aとすることで、基準線57、57aの決定が容易であるとともに、基準線57、57aと直線55bとがなす角度γ1、γ3および基準線57、57aと直線56bとがなす角度γ2、γ4を容易に取得することができる。なお、上記第3の実施形態の変形例では、角度取得部26が取得する角度γ3、γ4は第1胃(ルーメン)の充満度が高いほど小さくなる。基準線57が抽出画像31内の略垂線とは、完全な垂線の場合に限られず、ルーメンサイズスコアの特定に支障が出ない程度に傾いている場合でもよく、垂線から±5°程度で傾いている場合でもよい。同様に、基準線57aが抽出画像31内の略水平線とは、完全な水平線の場合に限られず、ルーメンサイズスコアの特定に支障が出ない程度に傾いている場合でもよく、水平線から±5°程度で傾いている場合でもよい。また、基準線は、山部41aの頂点42aと山部41bの頂点42bとを通る直線、または、山部41aの頂点42aと山部41bの頂点42bとを通る直線に略直交する直線であってもよい。
In the third embodiment, the reference line 57 is an approximately perpendicular line in the extracted image 31. However, as in the modified example of the third embodiment, the reference line 57a may be an approximately horizontal line in the extracted image 31. By using the approximately perpendicular or horizontal lines in the extracted image 31 as the reference lines 57 and 57a, it is easy to determine the reference lines 57 and 57a, and it is also easy to obtain the angles γ1 and γ3 between the reference lines 57 and 57a and the straight line 55b and the angles γ2 and γ4 between the reference lines 57 and 57a and the straight line 56b. In the modified example of the third embodiment, the angles γ3 and γ4 obtained by the angle acquisition unit 26 become smaller as the degree of fullness of the first stomach (rumen) increases. The reference line 57 is not limited to being a completely perpendicular line in the extracted image 31, and may be inclined to a degree that does not interfere with the identification of the rumen size score, or may be inclined at about ±5° from the perpendicular line. Similarly, the reference line 57a being an approximately horizontal line in the extracted image 31 does not necessarily have to be a completely horizontal line, but may be tilted to an extent that does not interfere with the identification of the lumen size score, or may be tilted at about ±5° from the horizontal line. In addition, the reference line may be a straight line passing through the apex 42a of the peak 41a and the apex 42b of the peak 41b, or a straight line approximately perpendicular to the straight line passing through the apex 42a of the peak 41a and the apex 42b of the peak 41b.
上記第3の実施形態において、基準点特定部22は、山部41aの頂点42aと山部41bの頂点42bとを結ぶ線分50の略中点を基準点60と特定する場合を例に示したが、上記第2の実施形態のように、輪郭線40の最も上側の点を基準点60aと特定する場合でもよい。また、寸法特定部23は、上記第1の実施形態と同様に、基準点60または60aと、輪郭線40の下部に位置する先端43a、43bのいずれか一方を通る抽出画像31内の略水平線と、の間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合でもよい。
In the third embodiment, the reference point identification unit 22 identifies the approximate midpoint of the line segment 50 connecting the vertex 42a of the crest 41a and the vertex 42b of the crest 41b as the reference point 60. However, as in the second embodiment, the reference point identification unit 22 may identify the uppermost point of the contour line 40 as the reference point 60a. Also, as in the first embodiment, the dimension identification unit 23 may identify the distance between the reference point 60 or 60a and the approximately horizontal line in the extracted image 31 that passes through one of the tips 43a, 43b located at the bottom of the contour line 40 as the dimension indicating the size of the cow's body in the vertical direction.
《第4の実施形態》
第1の実施形態から第3の実施形態では牛の輪郭線40から基準点60、60aなどを制御部15が自動で特定する場合を例に示したが、第4の実施形態では作業者の指定に基づいて特定する場合について説明する。第4の実施形態に係る牛の評価装置の機能構成およびハードウェア構成は、第1の実施形態の図1および図13と同じである。第4の実施形態における制御部15の機能構成は第1の実施形態の図2と同じであるが、基準点特定部22、寸法特定部23、および算出部24が実行する処理が第1の実施形態と異なっている。以下においては、第4の実施形態における基準点特定部22、寸法特定部23、算出部24、直線決定部25、角度取得部26、およびスコア特定部27が実行する処理について説明する。画像取得部20および抽出部21が実行する処理は第1の実施形態と同じであるため説明を省略する。
Fourth embodiment
In the first to third embodiments, the control unit 15 automatically identifies the reference points 60, 60a, etc. from the cow's contour line 40, but in the fourth embodiment, a case where the reference points are identified based on the operator's designation will be described. The functional configuration and hardware configuration of the cow evaluation device according to the fourth embodiment are the same as those in FIG. 1 and FIG. 13 of the first embodiment. The functional configuration of the control unit 15 in the fourth embodiment is the same as that in FIG. 2 of the first embodiment, but the processes executed by the reference point identification unit 22, the dimension identification unit 23, and the calculation unit 24 are different from those in the first embodiment. In the following, the processes executed by the reference point identification unit 22, the dimension identification unit 23, the calculation unit 24, the straight line determination unit 25, the angle acquisition unit 26, and the score identification unit 27 in the fourth embodiment will be described. The processes executed by the image acquisition unit 20 and the extraction unit 21 are the same as those in the first embodiment, so their explanations will be omitted.
図21は、第4の実施形態における基準点特定部22および寸法特定部23が実行する処理を説明するための図である。図22は、第4の実施形態における基準点特定部22、寸法特定部23、直線決定部25、および角度取得部26が実行する処理を説明するための図である。図21は、画像取得部20が取得した牛の撮像画像30を示し、図22は、抽出部21が牛の輪郭線40を抽出した抽出画像31を示している。図21の撮像画像30と図22の抽出画像31は、例えば表示部10に並んで表示されてもよい。
Figure 21 is a diagram for explaining the processing executed by the reference point identification unit 22 and the dimension identification unit 23 in the fourth embodiment. Figure 22 is a diagram for explaining the processing executed by the reference point identification unit 22, the dimension identification unit 23, the straight line determination unit 25, and the angle acquisition unit 26 in the fourth embodiment. Figure 21 shows a captured image 30 of a cow acquired by the image acquisition unit 20, and Figure 22 shows an extracted image 31 in which the extraction unit 21 has extracted the cow's contour line 40. The captured image 30 in Figure 21 and the extracted image 31 in Figure 22 may be displayed side by side on the display unit 10, for example.
図21に示すように、作業者は、表示部10に表示された撮像画像30の牛に対して入力部11を操作して牛の左右方向中央部近傍かつ上端部近傍の箇所80を指定する。牛の左右方向中央部近傍かつ上端部近傍の箇所80は、例えば牛の肛門付近に位置する箇所である。基準点特定部22は、図22に示すように、作業者による入力部11の操作に基づいて、牛の左右方向中央部近傍かつ上端部近傍の箇所80に対応する基準点60bを特定する。
As shown in FIG. 21, the operator operates the input unit 11 to specify a location 80 near the left-right center and near the top end of the cow in the captured image 30 displayed on the display unit 10. The location 80 near the left-right center and near the top end of the cow is, for example, a location near the cow's anus. As shown in FIG. 22, the reference point identification unit 22 identifies a reference point 60b that corresponds to the location 80 near the left-right center and near the top end of the cow based on the operator's operation of the input unit 11.
なお、作業者が表示部10に表示された撮像画像30の牛に対して入力部11を操作して牛の左右の腰角の頂点を指定した場合、基準点特定部22は、作業者が指定した左右の腰角の頂点を結ぶ線分の略中点を基準点60bと特定してもよい。
When the worker operates the input unit 11 to specify the vertices of the left and right hip angles of the cow in the captured image 30 displayed on the display unit 10, the reference point identification unit 22 may identify the approximate midpoint of the line segment connecting the vertices of the left and right hip angles specified by the worker as the reference point 60b.
図21に示すように、作業者は、表示部10に表示された撮像画像30の牛に対して左右方向中央部近傍かつ上端部近傍の箇所80を指定するのに続いて、牛の踵の箇所81a、81bを指定する。寸法特定部23は、図22に示すように、作業者が指定した牛の踵の箇所81a、81bに対応する点63a、63bを特定し、点63a、63bを通る直線53bを特定する。次いで、寸法特定部23は、基準点60bと直線53bとの間の距離L7を、牛の上下方向に関する身体の大きさを示す寸法として特定する。すなわち、寸法特定部23は、基準点60bと、基準点60bを通る抽出画像31内の垂線59bが直線53bと交差する交点61bと、の間の距離L7を、牛の上下方向に関する身体の大きさを示す寸法として特定する。
As shown in FIG. 21, the operator specifies a location 80 near the center and near the top of the cow in the captured image 30 displayed on the display unit 10, and then specifies the locations 81a and 81b of the cow's heel. As shown in FIG. 22, the dimension specification unit 23 specifies points 63a and 63b corresponding to the locations 81a and 81b of the cow's heel specified by the operator, and specifies a straight line 53b passing through the points 63a and 63b. Next, the dimension specification unit 23 specifies the distance L7 between the reference point 60b and the straight line 53b as a dimension indicating the size of the cow's body in the vertical direction. In other words, the dimension specification unit 23 specifies the distance L7 between the reference point 60b and the intersection point 61b where the perpendicular line 59b in the extracted image 31 passing through the reference point 60b intersects with the straight line 53b as a dimension indicating the size of the cow's body in the vertical direction.
算出部24は、寸法特定部23が特定した寸法L7に所定の係数を掛けた寸法L8を算出する。本第4の実施形態では、所定の係数は例えば0.25以上0.55以下の範囲内の値である。
The calculation unit 24 calculates the dimension L8 by multiplying the dimension L7 identified by the dimension identification unit 23 by a predetermined coefficient. In the fourth embodiment, the predetermined coefficient is, for example, a value in the range of 0.25 to 0.55.
直線決定部25は、図22に示すように、まず、算出部24が算出した寸法L8だけ基準点60bから下側に離れた(例えば真下に位置する)点62cを特定し、点62cを通る抽出画像31内の略水平線54cが輪郭線40に交わる交点である点44c、45cを特定する。次いで、直線決定部25は、点44cと基準点60bとを通る直線55cおよび点45cと基準点60bとを通る直線56cを決定する。角度取得部26は、直線55cと直線56cとがなす角度θを取得する。
As shown in FIG. 22, the straight line determination unit 25 first identifies point 62c that is located downward from reference point 60b (e.g., directly below) by the dimension L8 calculated by the calculation unit 24, and identifies points 44c and 45c that are intersections where a substantially horizontal line 54c in the extracted image 31 that passes through point 62c intersects with the contour line 40. Next, the straight line determination unit 25 determines a straight line 55c that passes through point 44c and reference point 60b, and a straight line 56c that passes through point 45c and reference point 60b. The angle acquisition unit 26 acquires the angle θ that is formed between straight lines 55c and 56c.
スコア特定部27は、角度取得部26が取得した角度θから、撮像画像30に写された牛のルーメンサイズスコアを特定する。
The score determination unit 27 determines the rumen size score of the cow captured in the captured image 30 from the angle θ acquired by the angle acquisition unit 26.
第4の実施形態に係る牛の評価方法は、基準点特定部22が特定する基準点60b、寸法特定部23が特定する寸法L7、および算出部24が算出する寸法L8が異なる点以外は第1の実施形態の図14のフローチャートと同様であるため図示および説明を省略する。
The cattle evaluation method according to the fourth embodiment is similar to the flowchart of FIG. 14 of the first embodiment, except that the reference point 60b identified by the reference point identification unit 22, the dimension L7 identified by the dimension identification unit 23, and the dimension L8 calculated by the calculation unit 24 are different, and therefore will not be illustrated or described.
[実験4]
非特許文献1に記載されている判定シートを用いて専門家が特定したルーメンサイズスコアと、角度取得部26が取得した角度θの大きさと、の相関を調査する実験を行った。図23には、ルーメンサイズスコアと角度取得部26が取得した角度θとの相関を調査した実験結果が示されている。図23の横軸(x軸)は専門家が判定シートを用いて特定したルーメンサイズスコアであり、縦軸(y軸)は角度取得部26が取得した角度θである。図23中の○、△、□、●、▲、■、×、◇の各点は実験を行った乳牛1頭1頭を示していて、直線は近似直線を示している。また、○、△、□、●、▲、■、×、◇は、算出部24が寸法L8の算出に用いた係数が互いに異なる場合を示している。寸法L8の算出に用いた係数は、○は0.25、△は0.3、□は0.35、●は0.4、▲は0.416、■は0.45、×は0.5、◇は0.55である。
[Experiment 4]
An experiment was conducted to investigate the correlation between the rumen size score determined by an expert using the judgment sheet described in Non-Patent Document 1 and the magnitude of the angle θ acquired by the angle acquisition unit 26. FIG. 23 shows the results of an experiment investigating the correlation between the rumen size score and the angle θ acquired by the angle acquisition unit 26. The horizontal axis (x-axis) of FIG. 23 is the rumen size score determined by an expert using the judgment sheet, and the vertical axis (y-axis) is the angle θ acquired by the angle acquisition unit 26. Each point of ○, △, □, ●, ▲, ■, ×, and ◇ in FIG. 23 indicates each dairy cow in the experiment, and the straight line indicates an approximation line. In addition, ○, △, □, ●, ▲, ■, ×, and ◇ indicate cases where the coefficients used by the calculation unit 24 to calculate the dimension L8 are different from each other. The coefficients used in calculating the dimension L8 are 0.25 for ○, 0.3 for △, 0.35 for □, 0.4 for ●, 0.416 for ▲, 0.45 for ■, 0.5 for ×, and 0.55 for ◇.
図23に示すように、寸法L8の算出に用いた係数が0.25以上0.55以下の範囲の場合では、いずれにおいても、ルーメンサイズスコアが大きいほど、角度θは大きくなる結果であった。○の結果における近似直線はy=7.45x+80.94であり、決定係数R2は0.620であった。△の結果における近似直線はy=11.11x+61.57であり、決定係数R2は0.827であった。□の結果における近似直線はy=13.01x+47.96であり、決定係数R2は0.867であった。●の結果における近似直線はy=13.73x+37.98であり、決定係数R2は0.848であった。▲の結果における近似直線はy=13.29x+37.09であり、決定係数R2は0.860であった。■の結果における近似直線はy=13.52x+30.98であり、決定係数R2は0.836であった。×の結果における近似直線はy=12.17x+27.03であり、決定係数R2は0.802であった。◇の結果における近似直線はy=8.57x+29.57であり、決定係数R2は0.700であった。
As shown in Fig. 23, when the coefficient used to calculate the dimension L8 was in the range of 0.25 to 0.55, the angle θ increased as the lumen size score increased. The approximate line for the results of ○ was y = 7.45x + 80.94, and the coefficient of determination R2 was 0.620. The approximate line for the results of △ was y = 11.11x + 61.57, and the coefficient of determination R2 was 0.827. The approximate line for the results of □ was y = 13.01x + 47.96, and the coefficient of determination R2 was 0.867. The approximate line for the results of ● was y = 13.73x + 37.98, and the coefficient of determination R2 was 0.848. The approximate line for the results of ▲ was y = 13.29x + 37.09, and the coefficient of determination R2 was 0.860. The approximate line for the results of (2) was y = 13.52x + 30.98, and the coefficient of determination R2 was 0.836. The approximate line for the results of × was y = 12.17x + 27.03, and the coefficient of determination R2 was 0.802. The approximate line for the results of ◇ was y = 8.57x + 29.57, and the coefficient of determination R2 was 0.700.
図24は、図23の実験結果から得られた、算出部24が寸法L8の算出に用いた係数と決定係数との相関を示す図である。図24の横軸は寸法L8の算出に用いた係数であり、縦軸は決定係数である。図24に示すように、寸法L8の算出に用いた係数が0.4のときに、決定係数が最も大きくなった。また、係数を0.25以上0.55以下の範囲内の値とすることで0.65程度以上の決定係数が得られる結果であった。
Figure 24 is a diagram showing the correlation between the coefficient used by the calculation unit 24 to calculate the dimension L8 and the coefficient of determination obtained from the experimental results of Figure 23. The horizontal axis of Figure 24 is the coefficient used to calculate the dimension L8, and the vertical axis is the coefficient of determination. As shown in Figure 24, the coefficient of determination was largest when the coefficient used to calculate the dimension L8 was 0.4. Furthermore, the results showed that a coefficient of determination of approximately 0.65 or more could be obtained by setting the coefficient to a value within the range of 0.25 to 0.55.
図23および図24の結果から、基準点60bと牛の踵の箇所に対応した点63a、63bを通る直線53bとの間の距離L7を牛の上下方向の身体の大きさを示す寸法と特定した場合では、特定した寸法L7に0.25以上0.55以下の範囲内の係数を掛けて寸法L8を算出し、算出した寸法L8だけ基準点60bから下側に離れた点62cの略左右両側に位置する牛の表面は腹部の表面であることが言える。したがって、基準点60bから寸法L8だけ下側に離れた点の略左右両側に位置する牛の表面上の点を特定することで牛の腹部に位置する点を特定でき、その結果、角度θからルーメンサイズスコアを精度良く特定することができる。
23 and 24, if the distance L7 between the reference point 60b and the straight line 53b passing through the points 63a and 63b corresponding to the cow's heels is identified as the dimension indicating the vertical body size of the cow, the identified dimension L7 is multiplied by a coefficient in the range of 0.25 to 0.55 to calculate the dimension L8, and it can be said that the surface of the cow located approximately on both sides of the point 62c located downward from the reference point 60b by the calculated dimension L8 is the surface of the abdomen. Therefore, by identifying points on the surface of the cow located approximately on both sides of the point located downward from the reference point 60b by the dimension L8, it is possible to identify points located in the cow's abdomen, and as a result, it is possible to accurately identify the rumen size score from the angle θ.
本第4の実施形態によれば、寸法特定部23は、基準点60bと、牛の2つの後足の両方の踵を通る直線53bと、の間の距離L7を、牛の上下方向に関する身体の大きさを示す寸法と特定する。このような場合でも、図23および図24で説明したように、ルーメンサイズスコアを精度良く特定することができる。
According to the fourth embodiment, the dimension specification unit 23 specifies the distance L7 between the reference point 60b and the straight line 53b passing through both heels of the cow's two hind legs as the dimension indicating the cow's body size in the vertical direction. Even in such a case, the rumen size score can be specified with high accuracy, as described in Figures 23 and 24.
また、本第4の実施形態では、算出部24は、寸法特定部23が特定した寸法L7に0.25以上0.55以下の範囲内の値である係数を掛けて寸法L8を算出する。すなわち、寸法L8は寸法L7に0.25以上0.55以下の係数を掛けた値である。寸法特定部23が、牛の肛門付近の基準点60bと、牛の2つの後足の両方の踵を通る直線53bと、の間の距離L7を牛の上下方向に関する身体の大きさを示す寸法と特定する場合では、図24のように、係数を0.25以上0.55以下の値とすることで、ルーメンサイズスコアを精度良く特定することができる。ルーメンサイズスコアの特定の精度を向上させる点から、係数は0.28以上0.52以下の場合が好ましく、0.3以上0.5以下の場合がより好ましく、0.35以上0.45以下の場合が更に好ましい。
In addition, in this fourth embodiment, the calculation unit 24 calculates the dimension L8 by multiplying the dimension L7 identified by the dimension identification unit 23 by a coefficient that is a value in the range of 0.25 to 0.55. That is, the dimension L8 is a value obtained by multiplying the dimension L7 by a coefficient that is 0.25 to 0.55. When the dimension identification unit 23 identifies the distance L7 between the reference point 60b near the cow's anus and the straight line 53b that passes through both heels of the cow's two hind legs as a dimension that indicates the body size in the vertical direction of the cow, the rumen size score can be accurately identified by setting the coefficient to a value of 0.25 to 0.55 as shown in FIG. 24. In order to improve the accuracy of identifying the rumen size score, the coefficient is preferably 0.28 to 0.52, more preferably 0.3 to 0.5, and even more preferably 0.35 to 0.45.
なお、上記第4の実施形態において、寸法特定部23は、基準点60bと牛の両方の踵を通る直線53bとの間の距離L7を牛の上下方向に関する身体の大きさを示す寸法と特定する場合に限られず、基準点60bと牛の2つの後脚のうちの一方の踵を通る撮像画像30内の略水平線との間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合でもよい。この場合でも、牛の上下方向に関する身体の大きさを示す寸法は大きく変わらないことから、算出部24が用いる係数は0.25以上0.55以下であればよく、0.28以上0.52以下が好ましく、0.3以上0.5以下がより好ましく、0.35以上0.45以下が更に好ましい。
In the fourth embodiment, the dimension specification unit 23 is not limited to specifying the distance L7 between the reference point 60b and the straight line 53b passing through both heels of the cow as the dimension indicating the size of the body in the vertical direction of the cow, but may specify the distance between the reference point 60b and an approximately horizontal line in the captured image 30 passing through the heel of one of the two hind legs of the cow as the dimension indicating the size of the body in the vertical direction of the cow. Even in this case, the dimension indicating the size of the body in the vertical direction of the cow does not change significantly, so the coefficient used by the calculation unit 24 may be 0.25 to 0.55, preferably 0.28 to 0.52, more preferably 0.3 to 0.5, and even more preferably 0.35 to 0.45.
なお、上記第4の実施形態において、作業者が牛の踵を指定することで、寸法特定部23は、基準点60bと牛の両方の踵を通る直線53bとの間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合を示したが、この場合に限られない。作業者が牛の後足の蹄を指定することで、寸法特定部23は、基準点60bと、牛の2つの後足の蹄のうちの一方の蹄を通る撮像画像30内の略水平線、または、2つの後足の両方の蹄を通る直線と、の間の距離を牛の上下方向に関する身体の大きさを示す寸法と特定する場合でもよい。略水平線とは、完全な水平線の場合に限られず、ルーメンサイズスコアの特定に支障がない程度に傾いている場合でもよく、水平線から±5°の範囲内で傾いている場合でもよい。
In the fourth embodiment, the operator specifies the heel of the cow, and the dimension specifying unit 23 specifies the distance between the reference point 60b and the straight line 53b passing through both heels of the cow as the dimension indicating the size of the body in the vertical direction of the cow. However, this is not limited to this case. The operator may specify the hoof of the cow's hind leg, and the dimension specifying unit 23 may specify the distance between the reference point 60b and an approximately horizontal line in the captured image 30 passing through one of the hooves of the cow's two hind legs, or a straight line passing through both hooves of the two hind legs, as the dimension indicating the size of the body in the vertical direction of the cow. The approximately horizontal line is not limited to a completely horizontal line, and may be inclined to an extent that does not interfere with the determination of the rumen size score, or may be inclined within a range of ±5° from the horizontal line.
また、上記第4の実施形態において、作業者が指定した、牛の左右方向中央部近傍かつ上端部近傍の箇所80は牛の肛門付近である場合を例に示したが、その他の箇所でもよい。例えば牛の尻尾の付け根付近である場合でもよい。また、角度取得部26は、上記第3の実施形態およびその変形例のように、基準線57、57aと直線55cとがなす角度、または、基準線57、57aと直線56cとがなす角度を取得する場合でもよい。
In the fourth embodiment, the location 80 near the left-right center and near the top end of the cow specified by the operator is near the cow's anus, but it may be another location. For example, it may be near the base of the cow's tail. The angle acquisition unit 26 may also acquire the angle between the reference lines 57, 57a and the straight line 55c, or the angle between the reference lines 57, 57a and the straight line 56c, as in the third embodiment and its modified examples.
《第5の実施形態》
第1の実施形態から第4の実施形態では、直線決定部25は、算出部24が算出した寸法だけ基準点から下側に離れた点を通る略水平線が輪郭線40と交わる交点である2つの点と基準点とを通る直線を決定する場合を例に示した。本第5の実施形態では、直線決定部25は、算出部24が算出した寸法だけ基準点から下側に離れた点を用いて抽出画像31内で左右方向に伸びた着目範囲を特定し、特定した着目範囲に位置する輪郭線40において最も左側に位置する点および最も右側に位置する点と基準点とを通る直線を決定する場合について説明する。
Fifth embodiment
In the first to fourth embodiments, a case has been described in which the straight line determination unit 25 determines a straight line that passes through the reference point and two points that are intersections at which an approximately horizontal line that passes through a point that is separated downward from the reference point by the dimension calculated by the calculation unit 24 intersects with the contour line 40. In the present fifth embodiment, a case will be described in which the straight line determination unit 25 specifies a range of interest that extends in the left-right direction in the extracted image 31 using a point that is separated downward from the reference point by the dimension calculated by the calculation unit 24, and determines straight lines that pass through the reference point and the leftmost and rightmost points on the contour line 40 that are located in the specified range of interest.
第5の実施形態に係る牛の評価装置の機能構成およびハードウェア構成は、第1の実施形態の図1および図13と同じである。第5の実施形態における制御部15の機能構成は第1の実施形態の図2と同じであるが、算出部24および直線決定部25が実行する処理が第1の実施形態と異なっている。以下において、第5の実施形態における算出部24、直線決定部25、角度取得部26、およびスコア特定部27が実行する処理について説明する。画像取得部20、抽出部21、基準点特定部22、および寸法特定部23が実行する処理は第1の実施形態と同じであるため説明を省略する。
The functional configuration and hardware configuration of the cattle evaluation device according to the fifth embodiment are the same as those of the first embodiment, shown in Figs. 1 and 13. The functional configuration of the control unit 15 in the fifth embodiment is the same as that of the first embodiment, shown in Fig. 2, but the processes performed by the calculation unit 24 and the straight line determination unit 25 differ from those in the first embodiment. The processes performed by the calculation unit 24, straight line determination unit 25, angle acquisition unit 26, and score determination unit 27 in the fifth embodiment are described below. The processes performed by the image acquisition unit 20, extraction unit 21, reference point determination unit 22, and dimension determination unit 23 are the same as those in the first embodiment, and therefore will not be described.
図25は、第5の実施形態における直線決定部25および角度取得部26が実行する処理を説明するための図である。まず、算出部24は、寸法特定部23が特定した寸法L1に0.2以上0.4以下の範囲内の異なる係数を掛けて2つの寸法L21と寸法L22を算出する。例えば、寸法L21の算出に用いる係数は、0.2以上0.3未満の値が好ましく、0.2以上0.25以下の値がより好ましく、0.2以上0.22以下の値が更に好ましい。寸法L22の算出に用いる係数は、0.3より大きく0.4以下の値が好ましく、0.35以上0.4以下の値がより好ましく、0.38以上0.4以下の値が更に好ましい。
Figure 25 is a diagram for explaining the processing executed by the straight line determination unit 25 and the angle acquisition unit 26 in the fifth embodiment. First, the calculation unit 24 calculates two dimensions L21 and L22 by multiplying the dimension L1 identified by the dimension identification unit 23 by different coefficients in the range of 0.2 to 0.4. For example, the coefficient used to calculate the dimension L21 is preferably a value of 0.2 to less than 0.3, more preferably a value of 0.2 to 0.25, and even more preferably a value of 0.2 to 0.22. The coefficient used to calculate the dimension L22 is preferably a value of more than 0.3 to 0.4, more preferably a value of 0.35 to 0.4, and even more preferably a value of 0.38 to 0.4.
直線決定部25は、図25に示すように、算出部24が算出した寸法L21だけ基準点60から下側に離れた(例えば真下に位置する)点62dと、算出部24が算出した寸法L22だけ基準点60から下側に離れた(例えば真下に位置する)点62eと、を特定する。次いで、直線決定部25は、点62dを通る抽出画像31内の略水平線54dと、点62eを通る抽出画像31内の略水平線54eと、により挟まれた、抽出画像31内で左右方向に伸びた着目範囲82(図25の斜線部分)を特定する。着目範囲82内には、上記第1の第1の実施形態で説明した、基準点60から寸法L2だけ下側に離れた点62が含まれる。次いで、直線決定部25は、特定した着目範囲82に位置する輪郭線40において最も左側に位置する点44dと最も右側に位置する点45dとを特定する。最も左側に位置する点44dの特定は、例えば、抽出画像31内の垂線を輪郭線40の左側から輪郭線40に向けて近づけて行き、着目範囲82に位置する輪郭線40に最初に接した点を最も左側に位置する点44dと特定してもよい。また、抽出画像31をX-Y座標系に変換し、着目範囲82に位置する輪郭線40の各画素のX、Y座標から最も左側の点44dを特定してもよい。最も右側の点45dの特定も同様である。次いで、直線決定部25は、点44dと基準点60とを通る直線55dおよび点45dと基準点60とを通る直線56dを特定する。角度取得部26は、直線55dと直線56dとがなす角度δを取得する。スコア特定部27は、角度取得部26が取得した角度δからルーメンサイズスコアを特定する。
25, the straight line determination unit 25 specifies a point 62d that is separated downward from the reference point 60 by the dimension L21 calculated by the calculation unit 24 (e.g., directly below), and a point 62e that is separated downward from the reference point 60 by the dimension L22 calculated by the calculation unit 24 (e.g., directly below). Next, the straight line determination unit 25 specifies a focus range 82 (diagonal line portion in FIG. 25) extending in the left-right direction in the extracted image 31, sandwiched between an approximately horizontal line 54d in the extracted image 31 that passes through the point 62d and an approximately horizontal line 54e in the extracted image 31 that passes through the point 62e. The focus range 82 includes the point 62 that is separated downward from the reference point 60 by the dimension L2, as described in the first embodiment above. Next, the straight line determination unit 25 specifies the leftmost point 44d and the rightmost point 45d on the contour line 40 that is located in the specified focus range 82. The leftmost point 44d may be determined, for example, by moving a perpendicular line in the extracted image 31 from the left side of the contour line 40 toward the contour line 40, and determining the first point that touches the contour line 40 located in the range of interest 82 as the leftmost point 44d. Alternatively, the extracted image 31 may be converted into an X-Y coordinate system, and the leftmost point 44d may be determined from the X and Y coordinates of each pixel of the contour line 40 located in the range of interest 82. The rightmost point 45d may be determined in a similar manner. Next, the straight line determination unit 25 determines a straight line 55d that passes through the point 44d and the reference point 60, and a straight line 56d that passes through the point 45d and the reference point 60. The angle acquisition unit 26 acquires the angle δ formed by the straight lines 55d and 56d. The score determination unit 27 determines the lumen size score from the angle δ acquired by the angle acquisition unit 26.
本第5の実施形態によれば、直線決定部25は、寸法L2(第2の寸法)よりも短い寸法L21(第3の寸法)だけ基準点60から下側に離れた点62d(第2の点)と、寸法L2より長い寸法L22(第4の寸法)だけ基準点60から下側に離れた点62e(第3の点)と、を特定する。そして、直線決定部25は、点62dを通る抽出画像31内の略水平線54dと点62eを通る抽出画像31内の略水平線54eとに挟まれる範囲を着目範囲82と特定し、着目範囲82に位置する輪郭線40において最も左側に位置する点44dと基準点60とを通る直線を直線55dと決定する。また、直線決定部25は、着目範囲82に位置する輪郭線40において最も右側に位置する点45dと基準点60とを通る直線を直線56dと決定する。これにより、牛の腹部の表面のうちの外側に張り出した点44d、45dと基準点60とを通る直線55d、56dが決定されるため、直線55dと直線56dとがなす角度δから牛のルーメンサイズスコアを特定することで、ルーメンサイズスコアを精度良く特定することができる。
According to the fifth embodiment, the straight line determination unit 25 identifies a point 62d (second point) that is separated downward from the reference point 60 by a dimension L21 (third dimension) that is shorter than the dimension L2 (second dimension), and a point 62e (third point) that is separated downward from the reference point 60 by a dimension L22 (fourth dimension) that is longer than the dimension L2. The straight line determination unit 25 then identifies the range between the approximately horizontal line 54d in the extracted image 31 that passes through the point 62d and the approximately horizontal line 54e in the extracted image 31 that passes through the point 62e as the range of interest 82, and determines the straight line that passes through the point 44d located at the leftmost position on the contour line 40 located in the range of interest 82 and the reference point 60 as the straight line 55d. The straight line determination unit 25 also determines the straight line that passes through the point 45d located at the rightmost position on the contour line 40 located in the range of interest 82 and the reference point 60 as the straight line 56d. This determines straight lines 55d and 56d that pass through points 44d and 45d that protrude outward from the surface of the cow's abdomen and reference point 60, and the rumen size score of the cow can be determined from the angle δ formed by lines 55d and 56d, making it possible to accurately determine the rumen size score.
図26は、第5の実施形態の変形例における直線決定部25および角度取得部26が実行する処理を説明するための図である。図26に示すように、本第5の実施形態の変形例では、直線決定部25は、算出部24が算出した寸法L2だけ基準点60から下側に離れた点62を特定し、点62を基準に上下に所定の長さ離れた抽出画像31内の略水平線54f、54gにより挟まれた範囲を着目範囲82a(図25の斜線部分)と特定する。着目範囲82a内には、基準点60から寸法L2だけ下側に離れた点62が含まれる。そして、直線決定部25は、着目範囲82aに位置する輪郭線40において最も左側に位置する点44eと最も右側に位置する点45eとを特定する。次いで、直線決定部25は、点44eと基準点60とを通る直線55eおよび点45eと基準点60とを通る直線56eを特定する。角度取得部26は、直線55eと直線56eとがなす角度εを取得する。スコア特定部27は、角度取得部26が取得した角度εからルーメンサイズスコアを特定する。
26 is a diagram for explaining the processing executed by the straight line determination unit 25 and the angle acquisition unit 26 in the modified example of the fifth embodiment. As shown in FIG. 26, in the modified example of the fifth embodiment, the straight line determination unit 25 specifies a point 62 that is separated downward from the reference point 60 by the dimension L2 calculated by the calculation unit 24, and specifies the range sandwiched between the approximately horizontal lines 54f and 54g in the extracted image 31 that is separated by a predetermined length above and below the point 62 as the focus range 82a (the diagonal line portion in FIG. 25). The focus range 82a includes the point 62 that is separated downward from the reference point 60 by the dimension L2. Then, the straight line determination unit 25 specifies the leftmost point 44e and the rightmost point 45e on the contour line 40 located in the focus range 82a. Next, the straight line determination unit 25 specifies a straight line 55e that passes through the point 44e and the reference point 60, and a straight line 56e that passes through the point 45e and the reference point 60. The angle acquisition unit 26 acquires the angle ε between the straight lines 55e and 56e. The score determination unit 27 determines the lumen size score from the angle ε acquired by the angle acquisition unit 26.
本第5の実施形態の変形例によれば、直線決定部25は、基準点60から寸法L2(第2の寸法)だけ下側に離れた点62(第1の点)を特定するとともに、点62を基準に上下に所定の長さ離れた抽出画像31内の略水平線54f、54gにより挟まれた範囲を着目範囲82aと特定する。そして、直線決定部25は、着目範囲82aに位置する輪郭線40において最も左側に位置する点44eと基準点60とを通る直線を直線55eと決定する。また、直線決定部25は、着目範囲82aに位置する輪郭線40において最も右側に位置する点45eと基準点60とを通る直線を直線56eと決定する。この場合でも、上記第5の実施形態と同様に、ルーメンサイズスコアを精度良く特定することができる。
According to a modified example of the fifth embodiment, the straight line determination unit 25 identifies a point 62 (first point) that is located downward from the reference point 60 by the dimension L2 (second dimension), and identifies the range sandwiched between the approximately horizontal lines 54f and 54g in the extracted image 31 that are located a predetermined distance above and below the point 62 as the focus range 82a. The straight line determination unit 25 then determines the straight line passing through the reference point 60 and the leftmost point 44e on the contour line 40 located in the focus range 82a as the straight line 55e. The straight line determination unit 25 also determines the straight line passing through the reference point 60 and the rightmost point 45e on the contour line 40 located in the focus range 82a as the straight line 56e. Even in this case, the lumen size score can be accurately determined, as in the fifth embodiment.
上記第5の実施形態の変形例において、略水平線54f、54gは、算出部24が0.2の係数を用いて算出した寸法だけ基準点60から下側に離れた点を通る抽出画像31内の略水平線と、0.4の係数を用いて算出した寸法だけ基準点60から下側に離れた点を通る抽出画像31内の略水平線と、の間に位置することが好ましい。略水平線54f、54gは、点62を通る抽出画像31内の略水平線から等距離に位置していてもよいし、異なる距離に位置していてもよい。
In a modification of the fifth embodiment, the approximately horizontal lines 54f and 54g are preferably located between an approximately horizontal line in the extracted image 31 that passes through a point that is separated downward from the reference point 60 by a dimension calculated by the calculation unit 24 using a coefficient of 0.2, and an approximately horizontal line in the extracted image 31 that passes through a point that is separated downward from the reference point 60 by a dimension calculated using a coefficient of 0.4. The approximately horizontal lines 54f and 54g may be located at equal distances from the approximately horizontal line in the extracted image 31 that passes through point 62, or may be located at different distances.
上記第5の実施形態およびその変形例のように、直線決定部25は、抽出画像31内の2本の略水平線で挟まれた範囲であり、基準点60から寸法L2だけ離れた点62を含む範囲を着目範囲82、82aと特定し、着目範囲82、82aに位置する輪郭線40において最も左側に位置する点44d、44eと基準点60とを通る直線を直線55d、55eと決定する。また、直線決定部25は、着目範囲82、82aに位置する輪郭線40において最も右側に位置する点45d、45eと基準点60とを通る直線を直線56d、56eと決定する。このようにすることで、ルーメンサイズスコアを精度良く特定することができる。
As in the fifth embodiment and its modified example, the straight line determination unit 25 identifies the range between two substantially horizontal lines in the extracted image 31, including point 62 that is a distance L2 from the reference point 60, as the range of interest 82, 82a, and determines the straight lines passing through the leftmost points 44d, 44e on the contour line 40 located in the range of interest 82, 82a and the reference point 60 as straight lines 55d, 55e. In addition, the straight line determination unit 25 determines the straight lines passing through the rightmost points 45d, 45e on the contour line 40 located in the range of interest 82, 82a and the reference point 60 as straight lines 56d, 56e. In this way, the lumen size score can be determined with high accuracy.
なお、上記第5の実施形態およびその変形例において、基準点特定部22は、上記第2の実施形態の図15のような基準点60aを特定してもよいし、上記第4の実施形態の図22のような基準点60bを特定してもよい。寸法特定部23は、上記第2の実施形態の図15のような寸法L3を特定してもよいし、上記第3の実施形態の図18のような寸法L5を特定してもよいし、上記第4の実施形態の図22のような寸法L7を特定してもよい。角度取得部26は、上記第3の実施形態の図18のような角度γ1またはγ2を取得してもよいし、上記第3の実施形態の変形例の図20のような角度γ3またはγ4を取得してもよい。
In the fifth embodiment and its modified example, the reference point identification unit 22 may identify the reference point 60a as shown in FIG. 15 of the second embodiment, or may identify the reference point 60b as shown in FIG. 22 of the fourth embodiment. The dimension identification unit 23 may identify the dimension L3 as shown in FIG. 15 of the second embodiment, may identify the dimension L5 as shown in FIG. 18 of the third embodiment, or may identify the dimension L7 as shown in FIG. 22 of the fourth embodiment. The angle acquisition unit 26 may acquire the angle γ1 or γ2 as shown in FIG. 18 of the third embodiment, or may acquire the angle γ3 or γ4 as shown in FIG. 20 of the modified example of the third embodiment.
《第6の実施形態》
第6の実施形態では、制御部15の寸法特定部23が牛の左右の腰角の頂点間の距離から牛の上下方向に関する身体の大きさを示す寸法を特定する場合について説明する。図27は、牛の左右の腰角の頂点間の距離と牛の体高との関係を示す図である。図27の横軸(x軸)は牛の腰角の頂点間の距離であり、図5における山部41aの頂点42aと山部41bの頂点42bとの間の距離に対応する。図27の縦軸(y軸)は牛の体高であり、図15の基準点60aと交点61aとの間の距離L3に対応する。なお、図27の横軸および縦軸は作図上の長さであり、実際の牛の対象部位の長さを表しているものではない。図27中の●は乳牛1頭1頭を示していて、直線は近似直線を示している。図27に示すように、牛の腰角の頂点間の距離と牛の体高とには相関関係があり、近似直線はy=1.17x+128.73であり、決定係数R2は0.623であった。
Sixth embodiment
In the sixth embodiment, a case will be described in which the dimension specifying unit 23 of the control unit 15 specifies the dimension indicating the size of the body in the vertical direction of the cow from the distance between the vertices of the left and right hip angles of the cow. FIG. 27 is a diagram showing the relationship between the distance between the vertices of the left and right hip angles of the cow and the cow's withers height. The horizontal axis (x-axis) of FIG. 27 is the distance between the vertices of the cow's hip angles, and corresponds to the distance between the vertex 42a of the peak 41a and the vertex 42b of the peak 41b in FIG. 5. The vertical axis (y-axis) of FIG. 27 is the cow's withers height, and corresponds to the distance L3 between the reference point 60a and the intersection point 61a in FIG. 15. Note that the horizontal and vertical axes of FIG. 27 are lengths on the drawing, and do not represent the length of the target part of the actual cow. In FIG. 27, the circles indicate each dairy cow, and the straight lines indicate approximate straight lines. As shown in FIG. 27, there is a correlation between the distance between the vertices of the cow's hip angle and the cow's withers height, and the approximate straight line is y = 1.17x + 128.73, with a coefficient of determination R2 of 0.623.
図27の結果から、図5における山部41aの頂点42aと山部41bの頂点42bとの間の距離を求めることで、牛の上下方向に関する身体の大きさを示す寸法である図15の距離L3を特定できることが分かる。
From the results in Figure 27, it can be seen that by determining the distance between apex 42a of peak 41a and apex 42b of peak 41b in Figure 5, it is possible to determine distance L3 in Figure 15, which is a dimension indicating the size of the cow's body in the vertical direction.
[実験5]
実験5では、制御部15の寸法特定部23は、牛の輪郭を抽出した輪郭線40の山部41aの頂点42aと山部41bの頂点42bとの間の距離を求め、この距離と図27における近似直線とから、牛の上下方向に関する身体の大きさを示す寸法として図15における距離L3を特定した。そして、図16に示すように、直線決定部25は、寸法特定部23が特定した寸法L3を用いて直線55aと直線56aを決定し、角度取得部26は直線55aと直線56aとがなす角度βを取得した。図28には、ルーメンサイズスコアと角度取得部26が取得した角度βとの相関を調査した実験結果が示されている。図28の横軸(x軸)は専門家が判定シートを用いて特定したルーメンサイズスコアであり、縦軸(y軸)は角度取得部26が取得した角度βである。図28中の○、△、□の各点は実験を行った乳牛1頭1頭を示していて、直線は近似直線を示している。また、○、△、□は、算出部24が寸法L4の算出に用いた係数が互いに異なる場合を示している。寸法L4の算出に用いた係数は、○は0.3、△は0.35、□は0.4である。
[Experiment 5]
In experiment 5, the dimension specification unit 23 of the control unit 15 determined the distance between the apex 42a of the peak 41a and the apex 42b of the peak 41b of the contour line 40 obtained by extracting the contour of the cow, and specified the distance L3 in FIG. 15 as the dimension indicating the size of the body in the vertical direction of the cow from this distance and the approximation line in FIG. 27. Then, as shown in FIG. 16, the line determination unit 25 determined the lines 55a and 56a using the dimension L3 specified by the dimension specification unit 23, and the angle acquisition unit 26 acquired the angle β formed by the lines 55a and 56a. FIG. 28 shows the results of an experiment investigating the correlation between the rumen size score and the angle β acquired by the angle acquisition unit 26. The horizontal axis (x-axis) of FIG. 28 is the rumen size score specified by an expert using a judgment sheet, and the vertical axis (y-axis) is the angle β acquired by the angle acquisition unit 26. Each point of ○, △, and □ in FIG. 28 indicates each dairy cow in the experiment, and the straight line indicates an approximation line. Moreover, ◯, △, and □ indicate cases where the coefficients used by the calculation unit 24 to calculate the dimension L4 are different from one another. The coefficients used to calculate the dimension L4 are ◯: 0.3, △: 0.35, and □: 0.4.
図28に示すように、輪郭線40の山部41aの頂点42aと山部41bの頂点42bとの間の距離から、牛の上下方向に関する身体の大きさを示す寸法L3を特定した場合でも、ルーメンサイズスコアが大きいほど角度βは大きくなり、ルーメンサイズスコアと角度βは相関関係がある結果であった。○の結果における近似直線はy=5.88x+54.65であり、決定係数R2は0.754であった。△の結果における近似直線はy=7.23x+43.00であり、決定係数R2は0.687であった。□の結果における近似直線はy=5.15x+39.61であり、決定係数R2は0.439であった。
As shown in Fig. 28, even when the dimension L3 indicating the size of the cow's body in the vertical direction was determined from the distance between the apex 42a of the crest 41a and the apex 42b of the crest 41b of the contour line 40, the larger the rumen size score, the larger the angle β, and the result showed a correlation between the rumen size score and the angle β. The approximate line for the results of ○ was y = 5.88x + 54.65, and the coefficient of determination R2 was 0.754. The approximate line for the results of △ was y = 7.23x + 43.00, and the coefficient of determination R2 was 0.687. The approximate line for the results of □ was y = 5.15x + 39.61, and the coefficient of determination R2 was 0.439.
本第6の実施形態によれば、寸法特定部23は、輪郭線40の上部の左右両側に存在する2つの山部41a、41bの頂点42a、42bの間の距離から、牛の上下方向に関する身体の大きさを示す寸法を特定する。この場合でも、図28で説明したように、ルーメンサイズスコアを精度良く特定することができる。
According to the sixth embodiment, the dimension determination unit 23 determines the dimension indicating the vertical body size of the cow from the distance between the vertices 42a, 42b of the two peaks 41a, 41b on both the left and right sides of the upper part of the contour line 40. Even in this case, the rumen size score can be determined with high accuracy, as described in FIG. 28.
なお、上記第6の実施形態において、作業者が入力部11を操作して牛の左右の腰角の頂点を指定し、寸法特定部23は、作業者が指定した左右の腰角の頂点間の距離から、牛の上下方向に関する身体の大きさを示す寸法を特定してもよい。
In the sixth embodiment, the worker may operate the input unit 11 to specify the vertices of the left and right hip angles of the cow, and the dimension specification unit 23 may specify a dimension indicating the size of the cow's body in the vertical direction from the distance between the vertices of the left and right hip angles specified by the worker.
なお、上記各実施形態では、牛のルーメンサイズスコアを特定する評価装置が、作業者が携帯して利用される、撮像部13を備える携帯型情報機器である場合を例に示したが、その他の場合でもよい。例えば、ネットワークに接続された他の機器と通信可能なサーバなどの据置型情報機器の場合でもよい。この場合、作業者は例えばスマートフォンなどの携帯型情報機器を用いて撮像した牛の撮像画像をネットワークを介してサーバなどの据置型情報機器に送信する。据置型情報機器では、評価装置100と同様の処理を行ってルーメンサイズスコアを特定する。そして、据置型情報機器は、特定したルーメンサイズスコアをネットワークを介して作業者が携帯する携帯型情報機器に送信する。これにより、スマートフォンに掛かる負荷を低減できる。また、牛舎内に固定または移動可能にカメラを設置し、スマートフォンなどの携帯型情報機器およびサーバなどの据置型情報機器は、牛舎内に設置されたカメラが撮像した立位にある牛の略真後ろからの撮像画像を取得してもよい。
In the above embodiments, the evaluation device that determines the rumen size score of the cow is a portable information device that is carried by the worker and has an image capturing unit 13. However, other cases are also possible. For example, a stationary information device such as a server that can communicate with other devices connected to a network may be used. In this case, the worker transmits the image of the cow captured using a portable information device such as a smartphone to a stationary information device such as a server via a network. The stationary information device performs the same process as the evaluation device 100 to determine the rumen size score. Then, the stationary information device transmits the determined rumen size score to a portable information device carried by the worker via a network. This reduces the load on the smartphone. In addition, a camera may be installed in the cowshed so that it can be fixed or moved, and the portable information device such as a smartphone and the stationary information device such as a server may acquire an image captured from approximately directly behind the cow in a standing position by the camera installed in the cowshed.
なお、上記の実験1から実験5は、乳牛に対して行ったが、同様の骨格を有する肉牛も同様の結果になると考えられる。したがって、上記各実施形態は乳牛だけでなく肉牛にも適用できる。
Note that the above experiments 1 to 5 were conducted on dairy cows, but it is believed that similar results would be obtained for beef cows, which have similar skeletal structures. Therefore, the above embodiments can be applied not only to dairy cows but also to beef cows.
以上、本願発明の実施形態について詳述したが、本願発明はかかる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本願発明の要旨の範囲内において、種々の変形・変更が可能である。
Although the embodiment of the present invention has been described in detail above, the present invention is not limited to such a specific embodiment, and various modifications and variations are possible within the scope of the gist of the present invention as described in the claims.