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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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
Landscapes
- Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Animal Husbandry (AREA)
- Environmental Sciences (AREA)
- Length Measuring Devices By Optical Means (AREA)
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. lO 15 20 516 384 ' , . ; - ø - - u .v 2 An advantageous solution to 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 analysis of the captured image of the area defined by the possible teat candidates of a dairy animal, reflections from other light sources, such as lamps and windows, other than the one 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 localization technique for directing 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 type initially defined, which is characterized by - activating a first light source and taking images with the image-taking device, - deactivating the first light source, - activating a second light source located at a different location than the first light source and taking images with the image-taking 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 reflections from the images taken and achieves an efficient, target-finding process.
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 an image when the first light source is activated and a second image when the second light source is activated, these two images are combined to provide a two-dimensional difference image, 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.Hereby the positioning of the teats can be done continuously as the device support approaches the teats. f. Suitably the differences are used for calculating a three-dimensional image and thereby determining the positions of the teats. Hereby 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 partial image of said 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 position, - 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 covered by the device support from the first to the second position, - determining the absolute distance from the device support to the teat on the basis of the measured sections and the distance covered. This achieves a rapid method for analyzing the entire image 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 type defined in the introduction, which is characterized in that it comprises a control apparatus arranged to alternately switch on and off the light sources, where the light sources are positioned so that the teats are illuminated from different angles in relation to the image-taking device, and the image-interpreting means is arranged to use the differences created by the illumination from the light sources to provide a two-dimensional difference image. Hereby it is possible to use a simpler form than before. For example, simple image-interpreting means and diodes can be used, resulting 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 identification means arranged to identify possible teat candidates and to select 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 are a first and a second light source, located at the left and right sides of the imaging device, respectively, to generate a first image and a second image. This achieves a difference angle with optimal illumination.
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 interpretation means is arranged to superimpose the types of images taken to capture details that occur in 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 partial image and comprises electronic means arranged to process electrical signals in the partial image, the electrical signals representing captured parts of images illuminated by the first light sources subtracted from the signal representing other captured parts of images illuminated by the second light source. This achieves a compact image to analyze, which allows for rapid analysis. Objects illuminated in both images will thus cancel each other out, resulting in an image that is insensitive to background illumination.
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 covered by the device support and is arranged to use a predetermined equation, which includes factors representing the measured distance and a measured section of the partial image, measured on at least two occasions, and thereby determine the distance to at least one teat. This enables the use of a rapid analysis method for positioning the teats.
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 turning light sources on and off between different images taken, it is possible to filter out disturbing reflections and to capture the reflections that differ between the images.
En bildtagande anordning, företrädesvis en videokamera, är riktad mot spenarna.An image capturing device, preferably a video camera, is directed towards 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.Conveniently, the camera views the teats illuminated by the light sources. The light sources and the camera are fixed in relation to each other and move as a unit, 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 by the eye. For ease of 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, suitably the front, right teat as a milking robot approaches the udder from the right front of the animal, and the light source and camera are moved. 10 15 20 25 516 384 u» I . ø ~ o w 0 U ' " 6 under the control of information derived from the image processing, 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 locations. Similarly, it can distinguish teats from background objects, such as a leg or a tail or part of a stall or even debris, such as straw or other vegetation that may be present 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 sources according to the present invention, the techniques are completely immune to incidental light and different levels of ambient lighting that generate disturbing reflections in the captured images, since all the disturbing reflections are filtered out and only the reflections from the alternately illuminated teat remain and are delivered to the identification means.
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 applied.
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 types of dairy animals, such as cows, sheep, goats, buffaloes 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.SUMMARY OF THE DRAWINGS Embodiments of the invention will now be described in more detail with reference to the accompanying drawings, in which 10 15 20 25 30 516 384 7 Fig. 1 illustrates a schematic drawing of a device for creating a teat-discriminating image according to the invention, Fig. 2 Fig. 3 illustrates a block diagram of the image processing hardware, illustrates a flow chart of the control activity, Figs. 4 and 5 illustrate representations of images taken by a camera with diodes turned on and off, respectively, Fig. 6 illustrates a processed difference image, Fig. 7 illustrates a processed partial 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 automatic milking installations, a milking device support is provided by which special equipment, such as teat cups, for performing animal-related operations can be brought into a suitable operating position. In Fig. 1, such a milking device support 11 according to the invention is shown, incorporated in an automatic milking installation. Light sources 12, 13 are located on both sides of an image capturing device 14 for directing light onto 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 image capturing means are not a serious additional load for a robot arm 18 with teat cup holders, even when mounted on the outer end of the robot arm.
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 emitting visible light in the red frequency range. The image capturing device 14 is, for example, a compact still camera receiving the red frequency range. The camera and diodes are mounted on the holder 17. The camera used is a 12 inch (12 mm) charge coupled device (CCD) camera equipped with a lens to provide a 90° field of view 10 15 20 30 516 384 u u .. nu: 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 field of view of the camera helps to distinguish objects at different distances from the camera. The video performance of the camera 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 21b, and a switch for alternately turning the diodes on and off is represented by 21c. An image capturing device, such as a camera, to be directed towards the area 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 for 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 provides power to the diodes 21. However, this power supply is timed by a timing circuit 26 to obtain captured images from the camera 22 as 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.Fig. 3 is a flow chart of the method for guiding a milking device support towards a teat of a dairy animal according to the present invention. The method begins at block 31. At block 32 the method continues by moving the device support (11, Fig. 1) to a fixed starting position, with or without reference to the animal. This fixed starting position may be any suitable position. The method continues at block 33 by illuminating, by turning on one of the diodes, a region expected to contain an udder.
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 images, at least one obtained by the camera, when 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 turning off the diode and turning on the other diode. Another group of images, which is at least one, is taken with the camera on 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 interfering reflections present on each of the taken images, as described in more detail below with reference to Figs. 4 and 5. The resulting difference image obtained in block 37 (shown in Fig. 6) is then analyzed in block 38 to identify possible teat candidates. The next step, at block 39, consists of determining whether any of the teat candidates have been found. If the answer is negative, i.e. no teat candidates have been found, the method continues at block 40 by moving 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 by determining the position of the target teat; this step is explained with reference to Figs. 7 and 8. The next step, at block 43, is to guide said support and any supported device to the target teat by means of target search. The next step, at block 44, consists of determining whether all four teats of the dairy animal have been selected as a target teat and the device support and any supported milking device have been found and guided 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.Fig. 4 and 5 show captured images fed by the camera 14 (Fig. 1) or 22 (Fig. 2) when the diodes 12, 13 or 21 (Fig. 2) are alternately switched on and off. In Fig. 4, the diode 12 is switched off and the diode 13 is on the left side of the camera when switched on, whereby the light is directed towards the udder of an animal, whereby the teats are mostly illuminated on the left side. Fig. 5 shows a reverse situation when the diode 13, placed on the right side of the camera, is turned off and the diode 12 is turned on, which light is directed towards the udder of an animal, whereby the teats are illuminated on their right sides. Some bright image pixels 50, 51, 52, 53 and 54 are observed by the camera in both images when the light hits different parts of the animal, such as the left parts of the teats 50, 51 illuminated from the left in Fig. 4, and in Fig. 5 the right parts of the teats 50, 51 illuminated from the right. Other details, such as posts in a stall (not shown), which are hit by the light plane, can also 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 stall lighting lamps, can give some unwanted reflections in the captured images, as shown by the references 55 in Fig. 4 and 56 in Fig. 5. These unwanted reflections 55, 56 are the same in both images and are referred to as interfering reflections when discussed below, in contrast to the real reflections from teats 50/52, 51/53 or legs 54, generated by the light coming from the diodes. f, .As is made clear by Fig. 5, the interfering reflections 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.In Fig. 4 and 5 another pair of teats 57, 58 is shown but is 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, i.e. by alternately switching the diodes on and off, the two different captured images can be obtained as shown in Fig. 4 and 5. When processing the two captured images according to the invented method, shown by the flow chart in Fig. 3 and described above, the interfering reflections 55, 56 are eliminated or cancelled. In such a way, a difference image 61 is obtained as shown in Fig. 6, comprising the sorted out pixels to be processed for evaluating the presence of a target teat, e.g. teats 51, 53 and for regulating the control of the robot and its holder 17 (Fig. 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 is examined, primarily for identification of the different objects represented in the image, 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 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 forms the shape of a teat. The group 51/53 would be identified as a possible teat candidate, e.g. by comparing a stored list of different objects, while groups 55, 56 would be discarded as unchanged objects, since the illumination from the diodes is too weak to affect them, and arise for example from a far away leg illuminated by external light sources (not shown). Group 54, which is for example a leg located very close, is excluded because it has too large a dimension. Group 51, 53 would then be selected as the target teat, as being the closest teat, while group 50/52, which is another teat, is selected for later processing. Other pixels representing reflections from hoses, parts of the stall, etc. could be discarded 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 a teat of interest, a target teat, a sub-image 71, as shown in Fig. 7, is defined by the image portion and containing the identified pixel group 51/53, and only this difference image is then scanned and processed to provide guiding information to the robot to move the supported teat cup or other device towards the position derived from the pixel group. The pixels of the difference image are those which are variations from Fig. 4, where one diode is on and those variations from Fig. 5 where the other diode is on. Here they are shown together and contribute to a complete image of a target teat. The pixels from Fig. 4 are here the right part 53 and the pixels from Fig. 5 are here 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 that overlap each other, whereby it is possible to obtain a reliable generation of captured images. 10 15 20 25 30 516 384 u nu so: 12 The method and device according to the invention will improve the teat localization process by using a reliable robot control system that 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 Fig. 8, where the target to be targeted 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 done by moving the device support and measuring the distance covered and simultaneously measuring the angle taken up 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 a computer-processed difference image, explained in Fig. 6, the teat grows, the angle a predetermined height h from the tip of the teat, as shown in Fig. 6. At the first position, the angle cp is measured and at the second position, the second angle can be measured. When the camera approaches the target teat, the distance AX covered by the device support is measured by a distance displacement means (not shown). By calculating the differences in the angular size and the distance covered 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 disturbing movement of the target teat is taken into account, but the measurements are made at such short intervals and in such a number that disturbing movements have little effect. The aim is to approach the teat so that a midpoint of the teat is in the centre 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 camera's starting position and the teat, (p = the angle taken by the teat in the first camera position. rp' = the angle taken 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) x y tan çø' = (2) x-Ax For small angles cp and cp" equations (1) and (2), using Taylor's series expansion of the function tanø , can be written ,,_ y <ß=~ ~ (v) x Y «f= m x-Ax (3) Hereby the distance to the teat can be calculated using only three factors: the angles go and çø' and the distance A x traveled towards the teat. Such a simple equation, to be calculated by the processing means, results in a fast target search process, since corrections in the positioning are made quickly. 10 15 20 25 516 384 14 In another embodiment of the invention, the target search is done on the teat without calculating the distance according to the present invention. Instead, the center of the camera is directed towards the identified target teat. The device support moves towards the teat and in the difference image the number of pixels is calculated. When the number exceeds a predetermined number, the speed is reduced and when the number of pixels reaches another predetermined number, the camera is stopped. If the target moves after it, the camera also moves and keeps the distance, due to the increase and decrease of pixels representing the movements of the target teat. The center of the teat is thus maintained in the center 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 by using images from at least two positions. For example, teat cups may be applied using a three-dimensional image as a reference for guiding 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 image taking 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 middle 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 one.
Härigenom uppnås en bild utan belysning hänförd till anordningsstödet.This achieves an image without illumination related to the device support.
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 a conventional incandescent lamp.
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 Fig. 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 | |
| US5934220A (en) | Teat location for milking | |
| US6234109B1 (en) | Apparatus and method for recognizing and determining the position of a part of an animal | |
| EP1656014B1 (en) | Improvements in or relating to milking machines | |
| EP1460892B1 (en) | Method and apparatus for detection of teats | |
| SE9802923D0 (en) | A method and apparatus for lacating the teats of an animal | |
| JP3919825B2 (en) | Apparatus and method for recognizing and determining the position of an animal part | |
| US8794181B2 (en) | System and method for three dimensional teat modeling for use with a milking system | |
| CN107485455B (en) | Efficient interactive bleeding detection in surgical systems | |
| CN100373394C (en) | Detection method of moving target based on bionic compound eye | |
| DK1211928T3 (en) | An apparatus and method for improving teat cup attachment using lighting and imaging devices | |
| WO2000011940A1 (en) | An apparatus and a method for monitoring an animal related area | |
| SE9901385L (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 | |
| EP4154169A1 (en) | Systems and methods for annotating image sequences with landmarks | |
| US20110155067A1 (en) | System for connecting a teat cup | |
| US20130239898A1 (en) | Dairy animal treatment system | |
| 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 | |
| WO2014014341A1 (en) | Milking arrangement | |
| RU2704715C2 (en) | Device for optically identifying sex of slaughter pig | |
| US20240171708A1 (en) | Electro-optical observation system for hunting | |
| NO330423B1 (en) | Device and method for fish counting or biomass determination | |
| KR102386673B1 (en) | Method and Apparatus for Detecting Object | |
| JP2010271604A (en) | Imaging device | |
| JPH08271222A (en) | Device for detecting human head position |