SE516384C2 - Apparatus for locating the teats of a milk animal using light sources to illuminate two areas on a teat at different angles and an image capture device to supply information to a processor - Google Patents
Apparatus for locating the teats of a milk animal using light sources to illuminate two areas on a teat at different angles and an image capture device to supply information to a processorInfo
- Publication number
- SE516384C2 SE516384C2 SE516384DA SE516384C2 SE 516384 C2 SE516384 C2 SE 516384C2 SE 516384D A SE516384D A SE 516384DA SE 516384 C2 SE516384 C2 SE 516384C2
- Authority
- SE
- Sweden
- Prior art keywords
- teat
- image
- images
- device support
- light source
- Prior art date
Links
Classifications
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01J—MANUFACTURE OF DAIRY PRODUCTS
- A01J5/00—Milking machines or devices
- A01J5/017—Automatic attaching or detaching of clusters
- A01J5/0175—Attaching of clusters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
- G06T7/586—Depth or shape recovery from multiple images from multiple light sources, e.g. photometric stereo
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30128—Food products
Abstract
Description
lO 15 20 516 384 ' , . ; - ø - - u .v 2 En fördelaktig lösning av problemen för att erhålla en helt automatisk mjölknings- process enligt ovan, beskrivs i den ovannämnda WO97/ 15900. Även om det har visat sig att vid användande av bildanalyser av den tagna bilden av området definierat av de möjliga spenkandidatema hos ett mjölkdjur, kan reflexio- ner från andra ljuskällor, såsom lampor och fönster, andra än den speciellt använda för att belysa nämnda område, och från belyst utrustning i ett bås, såsom ramar och grindar, orsaka problem. 10 15 20 516 384 ',. ; - ø - - u .v 2 An advantageous solution of the problems for obtaining a fully automatic milking process as above, is described in the above-mentioned WO97 / 15900. Although it has been found that when using image analyzes of the taken image of the area In addition to the possible teat candidates in a dairy animal, reactions from other light sources, such as lamps and windows, other than those specifically used to illuminate said area, and from illuminated equipment in a stall, such as frames and gates, can cause problems.
UPPFINNINGENS SYFTE Det är ett syfte med uppfinningen att tillhandahålla en förbättrad spenlokaliserings- teknik för att styra en apparat mot åtminstone en spene hos ett mjölkdjur.OBJECT OF THE INVENTION It is an object of the invention to provide an improved teat locating technique for guiding an apparatus towards at least one teat of a dairy animal.
SAMMANFATTNING AV UPPFINNINGEN Syftet med uppfinningen har uppnåtts genom en metod av den inledningsvis definie- rade typen, som kännetecknas av - aktivering av en första ljuskälla och tagande av bilder med den bildtagande an- ordningen, - deaktivering av den första ljuskällan, - aktivering av en andra ljuskälla placerad vid en annan plats än den första ljus- källan och tagande av bilder med den bildtagande anordnin gen efter eller vid samma tidpunkt som aktivering av den första ljuskällan, - deaktivering av den andra ljuskällan, - förflyttning av anordningsstödet från ett första läge till ett andra läge, efter er- hållande av en första grupp bilder, - upprepning av stegen för aktivering och deaktivering av ljuskällorna och tagande av en andra grupp bilder vid det andra läget, 10 15 20 25 30 516 384 . ° : .: . . - - -- . 3 - fastställande av skillnadema mellan de tagna bilderna i tidigare steg och använd- ning av skillnadema for att beräkna läget för spenen. Härigenom elimineras störande reflexioner från de tagna bildema och en effektiv, målsökande process uppnås.SUMMARY OF THE INVENTION The object of the invention has been achieved by a method of the initially fi nied type, characterized by - activating a first light source and taking pictures with the imaging device, - deactivating the first light source, - activating a second light source located at a place other than the first light source and taking pictures with the imaging device after or at the same time as activating the first light source, - deactivating the second light source, - moving the device support from a first position to a second position, after obtaining a first group of images, - repeating the steps for activating and deactivating the light sources and taking a second group of images at the second position, 10 15 20 25 30 516 384. °:.:. . - - -. 3 - determining the differences between the images taken in previous steps and using the differences to calculate the position of the teat. This eliminates disturbing reactions from the images taken and an efficient, goal-seeking process is achieved.
Företrädesvis, efter tagandet av en bild då den första ljuskällan är aktiverad och en andra bild då den andra ljuskällan är aktiverad, kombineras dessa två bilder for att ge en tvådimensionell differensbild, och därefter identifieras spenarna. Då detta steg har upprepats åtminstone en gång, fastställs skillnader genom att bestämma de rela- tiva skillnaderna i spenlägen i åtminstone två skapade tvådimensionella bilder.Preferably, after taking a picture when the first light source is activated and a second picture when the second light source is activated, these two pictures are combined to give a two-dimensional difference picture, and then the teats are identified. When this step has been repeated at least once, differences are determined by determining the relative differences in teat positions in at least two created two-dimensional images.
Härigenom kan positioneringen av spenama göras kontinuerligt när anordningsstö- det närmar sig spenama. f, Lämpligtvis används skillnadema för beräkning av en tredimensionell bild och där- med bestämmandet av lägena för spenama. Härigenom kan ett avstånd till vilka spe- cifika objekt som helst i bilden bestämmas.In this way, the positioning of the teats can be done continuously when the device support approaches the teats. f, Suitably, the differences are used to calculate a three-dimensional image and thus to determine the positions of the teats. In this way, a distance to any specific objects in the image can be determined.
En föredragen metod innefattar stegen skapande av en tvådimensionell delbild av nämnda åtminstone en spene som skall analyseras, - mätning av en första sektion av åtminstone en av spenama i den första gruppen av bilder, och således erhålla ett värde för den forsta sektionen vid det forsta lä- gel, - fórflyttning av anordningsstödet till det andra läget, - mätning av en andra sektion av åtminstone en spene i den andra gruppen av bil- der och således erhålla ett värde för den andra sektionen, - mätning, samtidigt eller strax efter mätningen av sektionerna. av sträckan tillryg- galagd av anordningsstödet från det första till det andra läget, - bestämning av det absoluta avståndet från anordningsstödet till spenen på basis av de uppmätta sektionerna och den tillryggalagda sträckan. Härigenom uppnås 10 15 20 25 30 516 384 4 en snabb metod för att analysera hela bilden genom användning av ett minimum av två bilder.A preferred method comprises the steps of creating a two-dimensional sub-image of the at least one teat to be analyzed, measuring a first section of at least one of the teats in the first group of images, and thus obtaining a value for the first section at the first load. - gel, - moving the device support to the second position, - measuring a second section of at least one teat in the second group of images and thus obtaining a value for the second section, - measuring, simultaneously or shortly after the measurement of the sections . of the distance traveled by the device support from the first to the second position, - determination of the absolute distance from the device support to the teat on the basis of the measured sections and the distance traveled. In this way a fast method is achieved for analyzing the whole image by using a minimum of two images.
Syftet med uppfinningen har vidare uppnåtts genom en anordning av den inled- ningsvis definierade typen, som kännetecknas av att den innefattar en styrapparat anordnad att alternerande slå på och av ljuskällorna, där ljuskälloma är placerade så att spenama belyses från olika vinklar i förhållande till den bildtagande anordning- en, och det bildtolkande organet är anordnat att använda skillnadema skapade ge- nom belysningen från ljuskällorna för att ge en tvådimensionell differensbild. Här- igenom är det möjligt att använda en enklare form än tidigare. Till exempel kan enkla bildtolkningsorgan och dioder användas, vilket resulterar i en mer kostnadsef- fektiv form. f.The object of the invention has further been achieved by a device of the initially defined type, which is characterized in that it comprises a control device arranged to alternately switch on and off the light sources, where the light sources are placed so that the teats are illuminated from different angles relative to the imaging the device, and the image interpreting means is arranged to use the differences created by the illumination from the light sources to give a two-dimensional difference image. This makes it possible to use a simpler form than before. For example, simple image interpretation means and diodes can be used, which results in a more cost-effective form. f.
Lämpligtvis innefattar det bildtolkande organet vidare identifieringsorgan anordna- de att identifiera möjliga spenkandidater och för att välja en målspene, varvid det bildtolkande organet är anordnat att bestämma läget for målspenen och for att sända signaler för att målsöka anordningsstödet och vilken annan stödd anordning som helst till målspenen.Suitably, the image interpreting means further comprises identifying means arranged to identify possible teat candidates and for selecting a target teat, the image interpreting means being arranged to determine the position of the target teat and to send signals to target the device support and any other supported device to the target teat .
Företrädesvis finns en första och en andra ljuskälla, placerade vid den vänstra resp. högra sidan av den bildtagande anordningen för att generera en första bild och en andra bild. Härigenom uppnås en differensvinkel med optimal belysning.Preferably there is a first and a second light source, located at the left resp. right side of the imaging device to generate a first image and a second image. This achieves a difference angle with optimal lighting.
Lämpligtvis är det bildtolkande organet anordnat att överlagra typerna av tagna bil- der för att ta boit detaljer som förekommer på ett flertal av bilderna. Härigenom isoleras spenens former och identifieras därefter.Suitably, the image interpreting means is arranged to superimpose the types of images taken in order to capture the details that appear on a plurality of the images. In this way, the shapes of the teat are isolated and subsequently identified.
Lämpligtvis är det bildtolkande organet anordnat att skapa en tvådimensionell del- bild och innefatta elektroniska organ anordnade att behandla elektriska signaler i delbilden, varvid de elektriska signalerna representerar tagna delar av bilder belysta 10 15 20 516 384 .s o , , , . ; o a I u: 5 av de första ljuskälloma subtraherade från signalen som representerar andra tagna delar av bilder belysta av den andra ljuskällan. Härigenom uppnås en kompakt bild att analysera, vilket tillåter en snabb analys. Föremål upplysta i båda bilderna kom- mer således att upphäva varandra, resulterande i en bild som är okänslig för bak- grundsbelysning.Suitably, the image interpreting means is arranged to create a two-dimensional sub-image and comprises electronic means arranged to process electrical signals in the sub-image, the electrical signals representing taken parts of images illuminated. ; o a In u: 5 of the first light sources subtracted from the signal representing second taken portions of images illuminated by the second light source. This achieves a compact image to analyze, which allows a quick analysis. Objects illuminated in both images will thus cancel each other out, resulting in an image that is insensitive to backlighting.
F öreträdesvis innefattar det bildtolkande organet vidare positioneringsorgan anord- nade att mäta sträckan tillryggalagd av anordningsstödet och är anordnat att använda en förut-bestämd ekvation, som innefattar faktorer som representerar den uppmätta sträckan och en uppmätt sektion av delbilden, mätt vid åtminstone två tillfällen, och därmed bestämning av avståndet till åtminstone en spene. Härigenom är använd- ningen av en snabb analyserande metod för positionering av spenama möjlig.Preferably, the image interpreting means further comprises positioning means arranged to measure the distance traveled by the device support and is arranged to use a predetermined equation, which comprises factors representing the measured distance and a measured section of the sub-image, measured on at least two occasions, and thereby determining the distance to at least one teat. In this way, the use of a fast analyzing method for positioning the teats is possible.
Genom att slå på och av ljuskällor mellan olika tagna bilder är det möjligt att filtrera ut störande reflexioner och att uppta reflexionema som skiljer mellan bildema.By switching light sources on and off between different pictures taken, it is possible to filter out disturbing reactions and to record the reactions that differentiate between the pictures.
En bildtagande anordning, företrädesvis en videokamera, är riktad mot spenarna.An imaging device, preferably a video camera, is aimed at the teats.
Lämpligen tittar kameran på spenama som är belysta av ljuskällorna. Ljuskälloma och kameran är fixerade i förhållande 'till varandra och rör sig som en enhet, som är monterad på ett stöd hos en mjölkningsanordning.Preferably, the camera looks at the teats that are illuminated by the light sources. The light sources and the camera are fixed in relation to each other and move as a unit, which is mounted on a support of a milking device.
Kameran mottar en bild liknande den som ses med ögat. För att underlätta förståel- sen, betraktas en svartvit kamera. Då bilden behandlas för att identifiera spenama, t.ex. en första bild tas då en ljuskälla till vänster är aktiverad och en andra då en ljuskälla till höger är aktiverad. En tvådimensionell differensbild produceras sedan genom jämförelse, bildpunkt för bildpunkt, av skillnaden i belysning mellan de två bilderna. (Notera: termen bild används även om en bild inte visas under drift.) En spene från bilden väljs, lämpligtvis den främre, högra spenen då en mjölkrobot när- mar si gjuvret från höger framsida på djuret, och ljuskällan och kameran förflyttas. 10 15 20 25 516 384 u» I . ø ~ o w 0 U ' " 6 under styrning av information härrörande från bildbehandlingen, för att närma sig den utvalda spenen genom förflyttning mot respektive spene.The camera receives an image similar to that seen with the eye. To facilitate understanding, a black and white camera is considered. When the image is processed to identify the teats, e.g. a first image is taken when a light source on the left is activated and a second when a light source on the right is activated. A two-dimensional difference image is then produced by comparing, pixel by pixel, the difference in illumination between the two images. (Note: the term image is used even if an image is not displayed during operation.) A teat from the image is selected, preferably the front, right teat as a milking robot approaches the udder from the right front of the animal, and the light source and camera move. 10 15 20 25 516 384 u »I. ø ~ o w 0 U '"6 under the control of information arising from the image processing, in order to approach the selected teat by moving towards the respective teat.
Denna teknik urskiljer tillförlitligt en spene från en annan genom relativa lägen i bilden vid kända lägen. På samma sätt kan den urskilja spenar från bakgrundsföre- mål, såsom ett ben eller en svans eller del av ett bås eller till och med skräp, såsom halm eller annan växtlighet som kan finnas i området för spenarna, genom storlek eller form eller orealistiska lägen.This technique reliably distinguishes one teat from another by relative positions in the image at known positions. In the same way, it can distinguish teats from background objects, such as a bone or a tail or part of a stall or even debris, such as straw or other vegetation that can be found in the area of the teats, by size or shape or unrealistic positions.
Genom att altemerande slå på och av ljuskälloriia enligt föreliggande uppfinning är teknikerna helt immuna mot tillfälligt ljus och olika nivåer av omgivande belysning som genererar störande reflexioner i de tagnabildema, eftersom alla de störande re- flexionema filtreras ut och endast reflexionerna från den altemerat belysta spenen återstår och levereras till identifieringsorgan.By alternately turning on and off the light source according to the present invention, the techniques are completely immune to temporary light and different levels of ambient lighting that generate disturbing reactions in the tag images, since all the disturbing reactions are filtered out and only the reactions from the alternately illuminated teat remain. and delivered to identification bodies.
Genom upprepad användning av tekniken på varje återstående spene kan en respek- tive kopp anbringas på varje spene. Annars kan läget för den återstående spenen el- ler spenarna uppskattas från det fastställda läget för den valda spenen och sparad in- formation för djuret ifråga, innefattande mjölkningshistoria, för spenkoppsanbring- ande utan att använda tekniken när väl den första spenkoppen framgångsrikt har an- bringats.By repeatedly using the technique on each remaining teat, a respective cup can be applied to each teat. Otherwise, the position of the remaining teat or teats can be estimated from the determined position of the selected teat and saved information for the animal in question, including milking history, for teat cup application without using the technique once the first teat cup has been successfully placed. .
Användningen av termen mjölkdjur i denna ansökan är avsedd att indikera alla slags mjölkdjur, såsom kor, får, getter, bufflar och hästar.The use of the term dairy animal in this application is intended to indicate all kinds of dairy animals, such as cows, sheep, goats, buffalo and horses.
RITNINGSSAMMANDRAG Utföringsformer av uppfinningen kommer nu att beskrivas mer i detalj med hänvis- ning till de medföljande ritningarna, i vilka 10 15 20 25 30 516 384 7 Fi g. 1 illustrerar en schematisk ritning av en anordning för att skapa en spen- urskiljande bild enligt uppfinningen, Fig. 2 Fig. 3 illustrerar ett blockschema för bildbehandlingshårdvaran, illustrerar ett flödesschema för styraktiviteten, Fig. 4 och 5 illustrerar framställningar av bilder tagna av en kamera vid påslagna resp. avslagna dioder, Fig. 6 illustrerar en behandlad differensbild, Fig. 7 illustrerar en behandlad delbild, och illustrerar en metod för att beräkna avståndet till spenen.DRAWING SUMMARY Embodiments of the invention will now be described in more detail with reference to the accompanying drawings, in which Fig. 1 illustrates a schematic drawing of a device for creating a voltage-distinguishing image according to Fig. 2 Fig. 3 illustrates a block diagram of the image processing hardware, illustrates a fate diagram of the control activity, Figs. 4 and 5 illustrate representations of images taken by a camera when switched on and off, respectively. turned off diodes, Fig. 6 illustrates a processed difference image, Fig. 7 illustrates a processed sub-image, and illustrates a method for calculating the distance to the teat.
Fig. 8 DETALJERAD BESKRIVNING AV FÖREDRAGNA UTFÖRINGSFORMER En särskild utföringsform av föreliggande uppfinning kommer nu att beskrivas mer i deiaij.Fig. 8 DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS A particular embodiment of the present invention will now be described in more detail.
I installationer för automatisk mjölkning tillhandahålls ett mjölkanordningsstöd ge- nom vilket särskild utrustning, såsom spenkoppar, för att utföra djurrelaterade ope- rationer kan föras till ett lämpligt driftsläge. I fig. 1 visas ett sådant mjölkanord- ningsstöd ll enligt uppfinningen, inkorporerad i en installation för automatisk mjölkning. Ljuskällor 12, 13 är belägna på bägge sidor av en bildtagande anordning 14 för att rikta ljus mot en spene (ej visad), ovanför och runt mynningen 15 på en spenkopp 16 då den är i en hållare 17 hos en robotarm 18. Belysningsorganen och det bildtagande organet är inte någon allvarlig ytterligare belastning för en robotarm 18 med spenkoppshållare, även då de är monterad på den yttre änden av robotarrrien.In installations for automatic milking, a milking device support is provided through which special equipment, such as teat cups, for performing animal-related operations can be moved to a suitable operating position. Fig. 1 shows such a milking device support 11 according to the invention, incorporated in an installation for automatic milking. Light sources 12, 13 are located on both sides of an imaging device 14 for directing light towards a teat (not shown), above and around the mouth 15 of a teat cup 16 when it is in a holder 17 of a robot arm 18. The lighting means and the the imaging means is not a serious additional load for a robot arm 18 with teat cup holders, even when mounted on the outer end of the robot arrier.
I den föredragna utföringsforinen är ljuskälloma 12, 13 ett par dioder som sänder ut synligt ljus i rödfrekvensområdet. Den bildtagande anordningen 14 är Lex. en kom- pakt stillbildskamera som mottar det röda frekvensområdet. Kameran och diodema är monterade på hållaren 17. Kameran som används är en V2 inch (12 mm) kamera med laddningskopplat minne (CCD) försedd med en lins för att ge en 90° bildvinkel 10 15 20 30 516 384 u u .. nu: 8 i horisontalplanet. Kameran är placerad så att den är riktad mot mynningen av spen- koppen 15 för att fånga ljuset som sänds ut av diodema. Positioneringen av kame- rans bildvinkel hjälper till att särskilja objekt på olika avstånd från kameran. Kame- rans videoprestanda ger företrädesvis en upplösning på approximativt 1 mm på ett avstånd av 200 mm med ett 450 mm bildfält. De ovan nämnda specifikationerna an- vänds i den föredragna utföringsfonnen, men skulle, såsom lätt inses av fackman- nen, kunna ändras på olika sätt.In the preferred embodiment, the light sources 12, 13 are a pair of diodes that emit visible light in the red frequency range. The imaging device 14 is Lex. a compact still camera that receives the red frequency band. The camera and diodes are mounted on the holder 17. The camera used is a V2 inch (12 mm) camera with charge-coupled memory (CCD) equipped with a lens to give a 90 ° viewing angle 10 15 20 30 516 384 uu .. now: 8 in the horizontal plane. The camera is positioned so that it is directed towards the mouth of the teat cup 15 to capture the light emitted by the diodes. The positioning of the camera's viewing angle helps to distinguish objects at different distances from the camera. The camera's video performance preferably provides a resolution of approximately 1 mm at a distance of 200 mm with a 450 mm field of view. The above specifications are used in the preferred embodiment, but could, as will be readily appreciated by those skilled in the art, be modified in various ways.
I fig. 2 är två dioder representerade av 21a och 2lb, och en omkopplare för att alter- nerande slå på och av diodema representeras av 2lc. En bildtagande anordning, så- som en kamera, som skall riktas mot det av diodema upplysta ornrådet representeras av 22. En krafttillförselenhet 23 ger kraft åt elektroniska kretsenheter 24 och 25 och kameran 22. Det bildtolkande organet 25 behandlar bildinforrnationen från kameran 22 och ger bildlägesinformation till enheten 24 som tillhandahåller styrinformation vid utmatning 27 för roboten (ej visad).In Fig. 2, two diodes are represented by 21a and 2lb, and a switch for alternately turning on and off the diodes is represented by 2lc. An imaging device, such as a camera, to be directed toward the diode illuminated by the diodes is represented by 22. A power supply unit 23 supplies power to electronic circuit units 24 and 25 and the camera 22. The image interpreting means 25 processes the image information from the camera 22 and provides image position information. to the unit 24 which provides control information at output 27 of the robot (not shown).
Krafttillförselenheten 23 ger också kraft åt diodema 21. Detta kraftgivande är emellertid tidsstyrt genom en tidskrets 26 för att erhålla tagna bilder från kameran 22 då delar av ett djur (ej visat) belyses av diodema 21 från olika vinklar, under om- koppling av krafttillförseln altemerande från en diod till den andra.The power supply unit 23 also supplies power to the diodes 21. However, this power supply is time controlled by a timing circuit 26 to obtain images taken from the camera 22 when parts of an animal (not shown) are illuminated by the diodes 21 from different angles, while switching the power supply alternately from one diode to the other.
Pig. 3 är ett flödesschema för metoden för att styra ett mjölkanordningsstöd mot en spene hos ett mjölkdjur enligt föreliggande uppfinning. Metoden börjar vid block 31. Vid block 32 fortsätter metoden med att flytta anordningsstödet (1 l, fig. 1) till ett fixerat startläge, med eller utan referens till djuret. Detta fixerade startläge kan vara vilket lämpligt läge som helst. Metoden fortsätter vid block 33 med belysning av, genom att en av diodema sätts på, en region som förväntas innehålla ettjuver.Pig. 3 is a flow chart of the method of directing a milking device support against a teat of a dairy animal according to the present invention. The method starts at block 31. At block 32, the method continues with fl moving the device support (1 l, fig. 1) to a fixed starting position, with or without reference to the animal. This optional start mode can be any suitable mode. The method continues at block 33 with illumination of, by turning on one of the diodes, a region which is expected to contain one thief.
Nästa steg, vid block 34, är att med kameran ta (17, tig. 1; 22, lig. 2) en grupp bil- der, åtminstone en erhållen av kameran, då den är riktad mot den belysta regionen. 10 15 20 25 30 516 384 .- u . - n a o I ' ' " 9 Sedan fortsätter aktiviteten vid block 35 genom att dioden slås av och den andra dioden slås på. Med kameran tas en annan grupp bilder, som är åtminstone en, på den nu av dioden upplysta regionen, block 36.The next step, at block 34, is to take with the camera (17, fig. 1; 22, lig. 2) a group of pictures, at least one obtained by the camera, as it is directed towards the illuminated region. 10 15 20 25 30 516 384 .- u. - n a o I '' "9 Then the activity continues at block 35 by switching off the diode and switching on the other diode. The camera takes another group of pictures, which is at least one, in the region now illuminated by the diode, block 36.
De från block 34 och 36 tagna bildema jämförs med varandra i block 37 för att eli- minera störande reflexioner som finns på var och en av de tagna bildema, såsom be- skrivs mer i detalj nedan med hänvisning till fig. 4 och 5. Den resulterande diffe- rensbilden erhållen i block 37 (visad i fig. 6) analyseras sedan i block 38 för att identifiera möjliga spenkandidater. Nästa steg, vid block 39, består i att bestämma om någon av spenkandidatema har hittats. Om svaret är negativt, dvs. inga spenkan- didater har hittats, fortsätter metoden vid block 40 med att förflytta anordningsstödet och repetera stegen som startar med block 33:-.The images taken from blocks 34 and 36 are compared with each other in block 37 to eliminate disturbing reactions found on each of the images taken, as described in more detail below with reference to fi g. 4 and 5. The resulting differential image obtained in block 37 (shown in fi g. 6) is then analyzed in block 38 to identify possible teat candidates. The next step, at block 39, is to determine if any of the teat candidates have been found. If the answer is negative, ie. no teat candidates have been found, the method continues at block 40 by leveling the device support and repeating the steps starting with block 33: -.
Om å andra sidan svaret är positivt, fortsätter metoden vid block 41. Detta steg be- står i att välja en av spenkandidatema som en målspene. Metoden fortsätter vid block 42 med att bestämma läget för målspenen; detta steg förklaras med hänvisning till fig. 7 och 8. Nästa steg, vid block 43, är att medelst målsökning föra nämnda stöd och vilken stödd anordning som helst till målspenen. Nästa steg, vid block 44, består i att bestämma om alla mjölkdjurets fyra spenar har valts som en målspene och anordningsstödet och vilken stödd mjölkanordning som helst har hittat och förts till var och en av de fyra spenama. Om svaret är negativt, repeteras stegen som startar med block 33. Om å andra sidan svaret är positivt, fortsätter metoden vid block 45, där den avslutas.If, on the other hand, the answer is positive, the method continues at block 41. This step consists of selecting one of the teat candidates as a target teat. The method continues at block 42 in determining the position of the target teat; this step is explained with reference to fi g. 7 and 8. The next step, at block 43, is to bring said support and any supported device to the target teat by means of target search. The next step, at block 44, is to determine if all of the four teats of the dairy animal have been selected as a target teat and the device support and any supported milking device has been found and passed to each of the four teats. If the answer is negative, the steps starting with block 33 are repeated. If, on the other hand, the answer is positive, the method continues at block 45, where it ends.
Fig. 4 och 5 visar tagna bilder frammatade av kameran 14 (fig. 1) eller 22 (fig. 2) då dioderna 12, 13 eller 21 (fig. 2) altemerande slås på och av. I fig. 4 är dioden 12 av- slagen och dioden 13 på vänster sida om kameran är påslagen, varvid ljuset riktas motjuvret hos ett djur, varvid spenarna mest belyses på den vänstra sidan. Fig. 5 vi- sar en omvänd situation då dioden 13, placerad på den högra sidan av kameran, är avslagen och dioden 12 är påslagen, vilket ljus riktas mot juvret hos ett djur, varvid 10 15 20 25 30 516 384 v o ø » a o ° ' ' " 10 spenama belyses på sina högra sidor. Några ljusa bildpixlar 50, 5 l, 52, 53 och 54 observeras av kameran i båda bildema när ljuset träffar olika delar på djuret, såsom de från vänster belysta vänstra delama av spenarna 50, 51 i fig. 4, och i fig. 5 de från höger belysta högra delama av spenarna 50, 51. Även andra detaljer, såsom stolpar i ett bås (ej visat), som träffas av ljusplanet, kan generera liknande bíldpixlar.Figs. 4 and 5 show images taken by the camera 14 (fi g. 1) or 22 (fi g. 2) when diodes 12, 13 or 21 (fi g. 2) are alternately switched on and off. I fi g. 4, the diode 12 is switched off and the diode 13 on the left side if the camera is switched on, the light being directed towards the udder of an animal, the teats being mostly illuminated on the left side. Fig. 5 shows an inverted situation when the diode 13, located on the right side of the camera, is switched off and the diode 12 is switched on, which light is directed towards the udder of an animal, whereby 10 15 20 25 30 516 384 vo ø »ao The 10 teats are illuminated on their right sides. Some bright image pixels 50, 5 l, 52, 53 and 54 are observed by the camera in both images when the light strikes different parts of the animal, such as the left illuminated left parts of the teats 50, 51 in Fig. 4, and in Fig. 5 the right-hand parts of the teats 50, 51. Illuminated from the right. Other details, such as posts in a booth (not shown), which are struck by the light plane, can generate similar image pixels.
Vidare kan andra ljuskällor, t.ex. fönster och de vanliga båsbelysningslampoma, ge en del oönskade reflexioner i de tagna bildema, såsom visas genom hänvisningarna 55 i fig. 4 och 56 i fig. 5. Dessa oönskade reflexioner 55, 56 är desamma i bägge bilderna och hänvisas till som störande reflexionerdå de diskuteras nedan, i motsats till de verkliga reflexionerna från spenar 50/52, 51/53 eller ben 54, genererade av ljuset som kommer från diodema. f, .Såsom klargörs av fig. 5 finns även de störande reflexionema 55, 56 då dioden 13 är av och dioden 12 är på.Furthermore, other light sources, e.g. windows and the usual booth lighting lamps, give some unwanted reactions in the captured images, as shown by the references 55 in fi g. 4 and 56 in fi g. 5. These undesirable reactions 55, 56 are the same in both pictures and are referred to as disturbing reactions when discussed below, as opposed to the actual reactions from teats 50/52, 51/53 or legs 54, generated by the light coming from the diodes. f, .As clarified by fi g. The interfering responses 55, 56 are also present when the diode 13 is off and the diode 12 is on.
I fig. 4 och 5 visas ett annat par spenar 57, 58 men diskuteras inte i detalj, eftersom endast två spenar är nödvändiga för att förklara metoden.I fi g. Figures 4 and 5 show another pair of teats 57, 58 but are not discussed in detail, as only two teats are necessary to explain the method.
Genom att använda metoden enligt föreliggande uppfinning, dvs. att alternerande slå på och slå av diodema, kan man erhålla de två olika tagna bilderna som visas i fig. 4 och 5. Vid behandling av de två tagna bildema enligt den uppfunna metoden, visad genom flödesschemat i fig. 3 och beskrives ovan, elimineras eller upphävs de störande reflexionema 55, 56. På sådant sätt erhålls en differensbild 61 såsom visas i fig. 6, innefattande de utsorterade bildpunkterna som skall behandlas för utvärde- ring av närvaron av en målspene, t.ex. spenama 51, 53 och for att reglera stymingen av roboten och dess hållare l7 (fig. 1).By using the method according to the present invention, ie. to alternately turn on and off the diodes, one can obtain the two different captured images shown in fi g. 4 and 5. When processing the two images taken according to the invented method, shown by the fl fate diagram in fi g. 3 and described above, the interfering reactions 55, 56 are eliminated or canceled. In this way a difference image 61 is obtained as shown in fi g. 6, comprising the sorted pixels to be processed for evaluating the presence of a target teat, e.g. the teats 51, 53 and to regulate the control of the robot and its holder 17 (fi g. 1).
Sålunda granskas differensbilden 6l, primärt for identifiering av de olika objekten representerade på bilden, genom att jämföra skillnadema i grupperna av bilder er- 10 15 20 25 30 516 z 84 .tjjäiïä-'Išïaß ll hållna genom diodema och genom att skanna bildpixlama i kolumnerna mellan top- pen och botten (eller vice versa) på bilden, tvärs över bilden. Dioderna och kameran är stationärt anordnade på robotarmen. Den ljusaste gruppen av bildpunkter för varje kolumn i varje bild noteras. En grupp 51/53 av sådana bildpunkter sida vid sida i in- tilliggande kolumner upprätthållna i efterföljande altemerande belysning bildar till- sammans formen av en spene. Gruppen 51/53 skulle identifieras som en möjlig spenkandidat, t.ex. genom att jämföra en lagrad lista med olika objekt, medan grup- pema 55, 56 skulle avfärdas som icke förändrade objekt, eftersom belysningen från dioderna är för svag fór att påverka dem, och uppstår till exempel från ett ben långt bort sombelyses av yttre ljuskällor (ej visade). Gruppen 54, som t.ex. är ett ben be- läget mycket nära, undantas eftersom det har för stor dimension. Gruppen 51, 53 skulle därefter väljas som målspene, såsom varande den närmaste spenen, medan gruppen 50/52, som är en arman spene, utväljs för att behandlas senare. Andra bild- punkter som representerar reflexioner från slangar, delar av båset etc. skulle kunna avfärdas på liknande sätt eller genom andra mjukvarutekniker kända inom området.Thus, the difference image 61, primarily for identifying the different objects represented in the image, is examined by comparing the differences in the groups of images obtained by the diodes and by scanning the image pixels in the columns. between the top and the bottom (or vice versa) of the image, across the image. The diodes and the camera are stationary on the robot arm. The brightest group of pixels for each column in each image is noted. A group 51/53 of such pixels side by side in adjacent columns maintained in subsequent alternating illumination together form the shape of a teat. Group 51/53 would be identified as a possible teat candidate, e.g. by comparing a stored list with different objects, while groups 55, 56 would be dismissed as unchanged objects, since the illumination from the diodes is too weak to affect them, and arises, for example, from a leg far away illuminated by external light sources ( not shown). Group 54, such as is a leg located very close, excepted because it has too large a dimension. Groups 51, 53 would then be selected as the target teat, as being the nearest teat, while group 50/52, which is a poor teat, would be selected for later treatment. Other pixels representing reactions from hoses, parts of the booth, etc. could be disposed of in a similar manner or by other software techniques known in the art.
När väl en lämplig grupp 51/53 av ljusa bildpunkter, summan av variationema hos båda bildema, har identifierats som representerande en intressant spene, en målspe- ne, definieras en delbild 71, såsom visas i fig. 7, av bilddelen och innehållande den identifierade bildpunktsgruppen 51/53, och endast denna differensbild skannas där- efter och behandlas för att ge vägledande information till roboten att förflytta den stödda spenkoppen eller annan anordning mot det från bildpunkts gruppen härledda läget. Bildpunktema hos differensbilden är de som är variationer från fig. 4, där en diod är på och de variationer från fig. 5 där den andra dioden är på. Här visas de till- sammans och bidrar till en hel bild av en målspene. Bildpunktema från fig. 4 är här den högra delen 53 och bildpunktema från fig. 5 är här den vänstra delen 51.Once a suitable group 51/53 of bright pixels, the sum of the variations of both images, has been identified as representing an interesting teat, a target teat, a sub-image 71 is defined, as shown in fi g. 7, of the image portion and containing the identified pixel group 51/53, and only this difference image is subsequently scanned and processed to provide guidance information to the robot to move the supported teat cup or other device toward the position derived from the pixel group. The pixels of the difference image are those which are variations from Fig. 4, where a diode is on, and those variations from fi g. 5 where the other diode is on. Here they are shown together and contribute to a whole picture of a target teat. The pixels from Fig. 4 here are the right part 53 and the pixels from fi g. 5 here is the left part 51.
Vid en ytterligare utfóringsforrn (ej visad) genererar två ljuskällor två ljusplan som täcker varandra, varigenom det är möjligt att erhålla en säker generering av tagna bilder. 10 15 20 25 30 516 384 u nu so: 12 Metoden och anordningen enligt uppfinningen kommer att förbättra spenlokalise- ringsprocessen genom att använda ett tillförlitlig robotstyrsystem, som är säkert för djur.In a further embodiment (not shown), two light sources generate two light planes which cover each other, whereby it is possible to obtain a secure generation of captured images. The method and device of the invention will improve the teat locating process by using a reliable robotic control system which is safe for animals.
Metoden för att bestämma läget för en spene kommer nu att förklaras ytterligare med hänvisning till fig. 8, där målet på vilket det skall målsökas är spene 51/53.The method for determining the position of a teat will now be further explained with reference to fi g. 8, where the target on which it is to be sued is teat 51/53.
Målsökningen görs genom att bestämma avståndet x från kameran till spenen. Mål- sökningen enligt uppfinningen görs genom att förflytta anordningsstödet och mäta den till-ryggalagda sträckan och samtidigt mäta vinkeln upptagen av målspenen vid åtminstone två tillfällen. Anordningsstödet startar vid ett första kameraläge och närmar sig målspenen till det andra läget. I endatorbehandlad differensbild, förkla- rad i fig. 6, växer spenen, vinkeln en förutbestämd höjd h från spetsen av spenen, såsom visas i fig. 6. Vid det första läget mäts vinkeln cp och vid det andra läget kan den andra vinkeln tiden kameran närmar sig målspenen mäts sträckan AX tillryggalagd av anordnings- stödet genom ett distansförflyttningsorgan (ej visat). Genom att beräkna skillnader- na i vinkelstorlek och sträckan tillryggalagd av anordningsstödet kan avståndet till spenen beräknas. Beräkningen görs upprepade gånger då anordningsstödet närmar sig målspenen.The target search is done by determining the distance x from the camera to the teat. The target search according to the invention is performed by moving the device support and measuring the distance traveled and at the same time measuring the angle occupied by the target teat on at least two occasions. The device support starts at a first camera position and approaches the target teat to the second position. In the computerized differential image, explained in Fig. 6, the teat, the angle, grows a predetermined height h from the tip of the teat, as shown in Fig. 6. In the first position the angle cp is measured and in the second position the second angle can time the camera approaching the target teat, the distance AX traveled by the device support is measured by a spacer (not shown). By calculating the differences in angular size and the distance traveled by the device support, the distance to the teat can be calculated. The calculation is made repeatedly as the device support approaches the target teat.
Vilken störande förflyttning som helst av målspenen beaktas, men mätningarna görs med så korta intervall och i ett sådant antal, att störande förflyttningar har liten på- verkan. Syftet är att närma sig spenen så att en mittpunkt på spenen är i bildens mitt.Any disturbance to the surface of the target teat is taken into account, but the measurements are made at such short intervals and in such a number that disturbance to the surface has little effect. The purpose is to approach the teat so that a midpoint of the teat is in the center of the image.
Då spenen är på det förutbestämda avståndet för utförande av operationen, stoppar anordningsstödet. Spenen upptar nu en förutbestämd del av bilden.When the teat is at the predetermined distance for performing the operation, the device support stops. The teat now occupies a predetermined part of the image.
Beräkningen i förhållande till fig. 8 använder de följande faktorerna: x = avståndet, som skall beräknas, mellan kamerans startläge och spenen, (p = den av spenen upptagna vinkeln i det första kameraläget. rp' = den av spenen upptagna vinkeln i det andra kameraläget, 10 15 20 25 30 35 no man 5 16 3 84 13 Ax = sträckan mellan kameralägena, y = spenens bredd.The calculation in relation to Fig. 8 uses the following factors: x = the distance to be calculated between the starting position of the camera and the teat, (p = the angle occupied by the teat in the first camera position. Rp '= the angle occupied by the teat in the second camera position, 10 15 20 25 30 35 no man 5 16 3 84 13 Ax = the distance between the camera positions, y = the width of the teat.
Beräkningen for operationen är som följer: .V tan q: = - (1) x y tan çø' = (2) x-Ax För små vinklar cp och cp” kan ekvationema (1) och (2), med användning av Taylors serieutveckling av funktionen tanø , skrivas ,,_ y <ß=~ ~ (v) x Y «f= m x-Ax (3) Härigenom kan avståndet till spenen beräknas genom användning av endast tre fak- torer: vinklama go och ço' och sträckan A x tillryggalagd mot spenen. En sådan enkel ekvation, som skall beräknas av behandlingsorganet, resulterar i en snabb mål- sökningsprocess, eftersom korrektioner i positioneringen görs snabbt. 10 15 20 25 516 384 14 I en annan utföringsforrn av uppfinningen görs målsökningen på spenen utan beräk- ning av avståndet enligt föreliggande uppfinning. I stället riktas kamerans centrum mot den identifierade målspenen. Anordningsstödet rör sig mot spenen och i diffe- rensbilden beräknas antalet bildpunkter. Då antalet överskrider ett förutbestämt an- tal, minskas hastigheten och då antalet bildpunkter når ytterligare ett förutbestämt antal, stoppas kameran. Om målet rör sig efter det, rör sig också kameran och håller avståndet, till följd av ökningen och minskningen av bildpunkter som representerar rörelserna hos målspenen. Mittpunkten hos spenen kvarhålls således i bildens mitt.The calculation for the operation is as follows: .V tan q: = - (1) xy tan çø '= (2) x-Ax For small angles cp and cp ”, equations (1) and (2), using Taylor's series development of the function tanø, is written ,, _ y <ß = ~ ~ (v) x Y «f = m x-Ax (3) Hereby the distance to the teat can be calculated by using only three factors: the angles go and ço 'and distance A x covered against the teat. Such a simple equation, which is to be calculated by the processing means, results in a fast target search process, since corrections in the positioning are made quickly. In another embodiment of the invention, the target search is performed on the teat without calculating the distance according to the present invention. Instead, the center of the camera is aimed at the identified target teat. The device support moves towards the teat and in the differential image the number of pixels is calculated. When the number exceeds a predetermined number, the speed decreases and when the number of pixels reaches another predetermined number, the camera stops. If the target moves after it, the camera also moves and maintains the distance, due to the increase and decrease of pixels representing the movements of the target teat. The center of the teat is thus retained in the middle of the image.
Det kan också vara lämpligt att producera en tredimensionell bild genom att använ- da bilder från åtminstone två lägen. Till exempel kan spenkoppar anbringas genom användning av en tredimensionell bild som referens för styrningen av anordnings- stödet.It may also be appropriate to produce a three-dimensional image using images from at least two modes. For example, teat cups can be fitted by using a three-dimensional image as a reference for the control of the device support.
I en ytterligare utföringsforrn för att styra ett anordningsstöd görs mätningen genom mätning av antalet bildpunkter i bilderna som tagits av den bildtagande anordning- CH.In a further embodiment for controlling a device support, the measurement is made by measuring the number of pixels in the images taken by the imaging device-CH.
I ännu en utföringsform läggs en mittbild till, där ingen av diodema aktiveras. Med andra ord aktiveras först den vänstra dioden, sedan ingen och därefter den högra.In yet another embodiment, a center image is added, where none of the diodes are activated. In other words, first the left diode is activated, then none and then the right.
Härigenom uppnås en bild utan belysning hänförd till anordningsstödet.In this way, an image without lighting related to the device support is obtained.
I en ytterligare utföringsform är belysningsorganet ett kluster av dioder, kopplade för att bilda ett belysningsorgan med samma belysningseffekt som en vanlig glöd- lampa.In a further embodiment, the lighting means is a cluster of diodes, connected to form a lighting means with the same lighting effect as an ordinary light bulb.
Det noteras att endast två spenar nämns i beskrivningen. Samma procedur kan utfö- ras på vilket antal spenar som helst, men här är det enklaste valet förklarat, nämligen mellan två spenar. Fyra spenar är synliga i fig. 4 och 5.It is noted that only two teats are mentioned in the description. The same procedure can be performed on any number of teats, but here the simplest choice is explained, namely between two teats. Four teats are visible in Figs. 4 and 5.
Claims (33)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SE516384T |
Publications (1)
Publication Number | Publication Date |
---|---|
SE516384C2 true SE516384C2 (en) | 2002-01-08 |
Family
ID=38434984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SE516384D SE516384C2 (en) | Apparatus for locating the teats of a milk animal using light sources to illuminate two areas on a teat at different angles and an image capture device to supply information to a processor |
Country Status (1)
Country | Link |
---|---|
SE (1) | SE516384C2 (en) |
-
0
- SE SE516384D patent/SE516384C2/en unknown
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2001052633A1 (en) | A method and an apparatus for locating the teats of an animal | |
EP0989800B1 (en) | Apparatus and method for recognising and determining the position of a part of an animal | |
RU2415567C2 (en) | Machine milking system (versions) and method of machine milking | |
JP3916255B2 (en) | Method and apparatus for guiding a milking device support | |
US6227142B1 (en) | Apparatus and method for recognizing and determining the position of a part of an animal | |
SE9802923D0 (en) | A method and apparatus for lacating the teats of an animal | |
CN104094594B (en) | 3D scales imager | |
EP1656014B1 (en) | Improvements in or relating to milking machines | |
EP2685811B1 (en) | System and method for three dimensional teat modeling for use with a milking system | |
US5072127A (en) | Engineered video inspecting lighting array | |
DE60012544D1 (en) | DEVICE AND METHOD FOR IMPROVING THE APPLICATION OF A MILK CUP, USING LIGHTING AND IMAGING AGENTS | |
SE522443C2 (en) | Method and apparatus for recognizing and determining a position and a robot including such a device | |
ATE369734T1 (en) | APPARATUS AND METHOD FOR MILKING ANIMALS | |
CN105308649B (en) | Inspection of profiled surfaces of motor vehicle underbody | |
GB2610734A (en) | Barcode readers with 3D camera(s) | |
US11409094B2 (en) | System and method for template-based image analysis | |
EP1460892A1 (en) | Method and apparatus for detection of teats | |
WO2000011940A1 (en) | An apparatus and a method for monitoring an animal related area | |
SE512611C2 (en) | Apparatus for automatic application of a teat cup to an animal teat | |
WO2010023122A2 (en) | Arrangement and method for determining positions of the teats of a milking animal | |
SE516384C2 (en) | Apparatus for locating the teats of a milk animal using light sources to illuminate two areas on a teat at different angles and an image capture device to supply information to a processor | |
JPH11211738A (en) | Speed measurement method of traveling body and speed measuring device using the method | |
KR102386673B1 (en) | Method and Apparatus for Detecting Object | |
US20220207769A1 (en) | Dual distanced sensing method for passive range finding | |
JPH10170622A (en) | Automatic follow-up method and automatic follow-up device |