LSIS 400i - Leuze electronic
Transcrição
LSIS 400i - Leuze electronic
LSIS 400i Pocket Guide P R O D U K T I N F O R M AT I O N Hellseherin Die neue Smart Kamera LSIS 400i ist ein echtes Highlight in der industriellen Bildverarbeitung. Extrem lichtstarke, homogene ObjektBeleuchtung Automatisierte motorische Fokusverstellung Einfachste Online Bedienung mit webConfig Einzigartiges Spektrum der Objekterkennung durch spezialisierte BLOB-Analyse Leuze electronic GmbH + Co. KG – In der Braike 1 – D-73277 Owen www.leuze.de Inhaltsverzeichnis: 1. Industrielle Bildverarbeitung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 1.2 Geräteklassifizierung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vorteile moderner Smart Kameras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 6 2. Beleuchtung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3. LSIS 41x: Die BLOB-Analyse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 12 13 14 3.1 Die Bildfilter der BLOB-Analyse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Der Glättungsfilter – ein auf das Grauwertbild wirkender Filter . . . . . . . . . . . . . . 3.1.2 Auf das erzeugte Binärbild wirkende Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4. Applikationen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vollständigkeit: Kastenvollgutkontrolle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vollständigkeit: Füllhöhenkontrolle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Anwesenheit: Druckkontrolle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typenerkennung: Kronenkorken . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Position und Orientierung unsortierter Objekte . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 18 20 22 24 5. Anhang: Checkliste für Bildverarbeitungsapplikationen . . . . . . . . . 26 1. Industrial image processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Device classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advantages of modern smart cameras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 28 30 2. Illumination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3. LSIS 41x: BLOB analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 36 37 38 4.1 4.2 4.3 4.4 4.5 1.1 1.2 3.1 The BLOB-analysis image filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 The smoothing filter—a filter that acts on the gray-value image . . . . . . . . . . . . . 3.1.2 Filters that act on the generated binary image . . . . . . . . . . . . . . . . . . . . . . . . . . 4. Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Completeness mode: full-crate monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . Completeness mode: fill-level monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Presence: print monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Type detection: crown caps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Position and orientation of unsorted objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 40 42 44 46 48 5. Appendix: checklist for image processing applications . . . . . . . . . 50 4.1 4.2 4.3 4.4 4.5 3 1. Industrielle Bildverarbeitung: Geräteklassifizierung Kosten, Integrationsaufwand 1.1 Vision Systeme (PC- oder Controllerbasiert) Smart Kameras/ Kompakt Vision Systeme Vision Sensoren Leistungsvermögen, Flexibilität 4 Beim Zentralverband Elektrotechnik- und Elektronikindustrie (ZVEI) werden Geräte der industriellen Bildverarbeitung in drei Klassen eingeteilt: Vision Sensoren Smart Kameras / Kompakt Vision Systeme Vision Systeme Der LSIS 400i ist bezüglich Flexibilität und Integrationsaufwand im Bereich zwischen Vision Sensoren und Smart Kameras einzuordnen. Das Aufgaben-/Leistungsspektrum ist deutlich größer als das von Vision Sensoren und reicht an die Leistungsfähigkeit von einfachen PC-basierten Systemen heran. Im Gegenzug ist der LSIS 400i preislich deutlich attraktiver als PC-basierte Systeme. 5 1.2 Vorteile moderner Smart Kameras am Beispiel des LSIS 400i Die Vorteile im Detail Komfortable Parametrierung über das integrierte LSIS 400i webConfig-Tool, erleichtert und vereinfacht das Einrichten der Applikation. Homogene Ausleuchtung des kompletten Bildfelds für deutlich bessere Ergebnisse als bei konventioneller LED Beleuchtung. Komfortable Inbetriebnahme und Anschluss durch M12-Anschlusstechnik und intelligentes Befestigungskonzept. Integrierte Connectivity bietet komfortable Parametrierung mit Ethernetschnittstelle, Prozessdatenaustausch über RS 232 Schnittstelle und 8 digitale, konfigurierbare Ein-/Ausgänge. Industrietauglich: Metallgehäuse mit Glasfenster und Schutzart IP 65. Flexibilität durch motorische Fokusverstellung und Speicherung des chargenspezifischen Kameraabstands im Prüfprogramm, dadurch ist keine manuelle Fokussierung am Gerät notwendig. Einfache Diagnose durch mehrsprachiges Display mit Tasten und LED Statusanzeigen. Umfangreiches Zubehör erleichtert die Installation, Verkabelung und Befestigung. 6 Schnellere Integration durch webConfig Parametrierung direkt über den Webbrowser. Schneller und einfacher Zugang zum Gerät via Ethernet Schnittstelle. Auf dem PC muss keine Parametrier-Software installiert werden, die Kompatibilität ist somit immer gewährleistet. Flexiblerer Einsatz durch motorische Fokusverstellung Beim Chargenwechsel wird das neue Prüfprogramm mit der Fokuseinstellung für den spezifischen Kameraabstand geladen. Über die motorische Fokusverstellung wird die entsprechende Fokusposition angefahren, d. h. es ist keine manuelle Fokussierung am Gerät notwendig. Die motorische Fokusverstellung ist auch dann von Vorteil, wenn die Einbausituation in der Maschine sehr beengt ist oder die Smart Kamera so verbaut wurde, dass sie im normalen Betrieb von außen nicht zugänglich ist. Bessere Ergebnisse durch homogene Beleuchtung Sehr gleichmäßig rechteckig ausgeleuchtetes Bildfeld im Bereich von 50 mm bis 250 mm Entfernung zum Prüfobjekt. Verglichen mit einer konventionellen LED Beleuchtung ist das aufgenommene Bild wesentlich homogener ausgeleuchtet und detailreicher. Dadurch ist es für die Bildverarbeitung besser, schneller und sicherer auswertbar. 7 2. Beleuchtung Prinzipielle Beleuchtungsvarianten Durchlicht: Beleuchtungsart, bei der sich das Objekt zwischen Kamera und Lichtquelle befindet. Hiermit lassen sich „Schattenbilder“ mit scharfen Kanten und sehr gutem Kontrast erzeugen. Wird häufig verwendet für: Beispiel Durchlicht: Münze im Durchlicht Erkennung der Außenkontur relativ flacher Objekte. Ideal für präzise Messungen. Fehlererkennung in transparenten Objekten. 8 Auflicht im Hellfeld: Beleuchtungsart, bei der die Kamera das von der Objektoberfläche direkt reflektierte Licht erfasst. Diffuse (streuende) Objekte sieht man immer, während glänzende Objekte nur bei geeignetem Winkel zum Objektiv sichtbar werden. Häufig geeignet als: Beispiel Auflicht: Münze im Hellfeld Direktes Auflicht bei matten Oberflächen, höchste Intensität erreichbar. Diffuses Auflicht zur Minimierung von Überstrahlungserscheinungen durch Reflexionen, hat geringsten Schattenwurf, allerdings auch die größte Bauform. Auflicht im Dunkelfeld: Beleuchtungsart, bei der die Kamera das von der Objekt-Oberfläche gestreute Licht erfasst (i.w.). Die streuenden Oberflächen erscheinen hell während reflektierende Flächen dunkel erscheinen. Beispiel Auflicht: Münze im Dunkelfeld Flach einstrahlendes Licht. Kanten- und Höhenstrukturen auf Objekten werden hervorgehoben. 9 3. LSIS 41x: Die BLOB-Analyse Die BLOB-Analyse BLOB ist die Abkürzung von „Binary Large Object“ und kennzeichnet einen zusammenhängenden Pixelbereich im Bild. Generell werden als BLOBs einzelne Pixelhaufen bezeichnet, deren Lichtintensität zwischen definierten Grenzwerten liegt. Durch Eingrenzen von BLOB-Merkmalen wie Fläche, Umfang, Formfaktor usw., können einzelne Objekte oder Objektgruppen gezielt erkannt werden (z.B. Kreise, Rechtecke, Quadrate, ...). Damit lassen sich Aufgaben wie z.B. Vollständigkeitskontrollen, Anwesenheitskontrollen oder Positionsbestimmungen lösen. Fläche: Summierung der in einem BLOB eingeschlossenen Pixel. Umfang: Länge der äußeren Konturlinie eines BLOBs in Pixel. Formfaktor: Verhältnis zwischen Fläche und Umfang des BLOBs, auf Werte zwischen 0 und 100 normiert. Der Formfaktor klassifiziert die geometrische Gestalt eines BLOBs: „100“ steht für einen perfekten Kreis, „0“ für eine perfekte Linie. Die Formel lautet „4 * Fläche/Umfang² * 100“. Umschreibendes Rechteck: Höhe und Breite des kleinsten Rechtecks, welches das BLOB umschließt mit Seiten parallel zur X- und Y- Achse. 10 Länge der Hauptachse (1): Länge des kleinsten gedrehten Rechtecks, welches das BLOB umschließt. Länge der Nebenachse (2): Höhe des kleinsten gedrehten Rechtecks, welches das BLOB umschließt. Orientierung der Hauptachse (3): Winkellage der Hauptachse – gemessen zur „schwereren“ Seite des BLOBs, bezogen auf die X-Achse (0° ... 360°). Schwerpunkt: X- und Y-Koordinaten des Flächenschwerpunktes des BLOBs. Durch Variieren der Parameter der BLOB-Analyse kann gezielt nach einem bestimmten Objekt gesucht werden bzw. dessen Vorhandensein überprüft werden. 11 3.1 Die Bildfilter der BLOB-Analyse Übersicht der wichtigsten Filter Die BLOB-Analyse hat Filter, welche auf das aufgenommene Originalbild (Grauwertbild) wirken und Filter, welche auf das nach der Segmentierung erzeugte Binärbild wirken. Auf das Grauwertbild wirkende Filter: Glättungsfilter. Auf das erzeugte Binärbild wirkende Filter: Erodieren (Vergrößerung dunkler Strukturen). Weiten (Vergrößerung heller Strukturen). Öffnen (Schließen von Lücken in dunklen Objekten ohne Veränderung der Objektgröße). Schließen (Schließen von Lücken in hellen Objekten ohne Veränderung der Objektgröße). 12 3.1.1 Der Glättungsfilter – ein auf das Grauwertbild wirkender Filter Nach der Bildaufnahme und vor der Segmentierung kann auf das Grauwertbild ein Glättungsfilter angewendet werden. Glättungsfilter Verrauschtes Originalbild. Mit dem Glättungsfilter vorverarbeitetes Bild. Das Rauschen ist weitestgehend eliminiert. 13 3.1.2 Auf das erzeugte Binärbild wirkende Filter Nach der Segmentierung können auf das erzeugte Binärbild verschiedene morphologische Filter angewendet werden: Original Das nach der Segmentierung erzeugte Binärbild. Störpixel dargestellt durch helle/dunkle Stege. Erodieren Damit wird eine Vergrößerung dunkler Strukturen im Bild erreicht, helle Störpixel werden eliminiert. Weiten Damit wird eine Vergrößerung heller Strukturen im Bild erreicht, dunkle Störpixel werden eliminiert. 14 Original Das nach der Segmentierung erzeugte Binärbild. Öffnen Es wird eine Erosion gefolgt von einer Dilatation durchgeführt: Dadurch werden Lücken in dunklen Objekten geschlossen, ohne die Objektgröße zu verändern. Schließen Es wird eine Dilatation gefolgt von einer Erosion durchgeführt: Dadurch werden Lücken in hellen Objekten geschlossen, ohne die Objektgröße zu verändern. 15 4. 4.1 Applikationen Vollständigkeit: Kastenvollgutkontrolle Branche: Getränkeindustrie Aufgabenstellung und spezielle Anforderungen: Kastenvollgutkontrolle über die Erkennung von reflektierenden Kronenkorken auf Flaschen. Realisierung: Reflektierende Kronenkorken von Flaschen in einer Getränkekiste werden als helle BLOBs erkannt. Über die Anzahl der gefundenen BLOBs wird die korrekte Befüllung der Getränkekiste überprüft. Kundennutzen: Schnelle und sichere Qualitätssicherung. Schneller Chargenwechsel möglich. 16 17 4.2 Vollständigkeit: Füllhöhenkontrolle Branche: Getränkeindustrie Aufgabenstellung und spezielle Anforderungen: Kontrolle des Füllstands bzw. der Füllhöhe der Flüssigkeit in den Flaschen. Realisierung: Bei dunklen Flüssigkeiten in transparenten Flaschen kann über eine „dunkel/hell“-Auswertung des unteren Bildbereichs auf ausreichenden Füllstand kontrolliert werden. Kundennutzen: Schnelle Qualitätssicherung. Es wird sichergestellt, dass nur ausreichend befüllte Flaschen den Handel und somit den Kunden erreichen, das erhöht die Kundenzufriedenheit. 18 19 4.3 Anwesenheit: Druckkontrolle Branche: Druckindustrie Aufgabenstellung und spezielle Anforderungen: Auf Losen oder Dokumenten soll das Vorhandensein des Aufdrucks geprüft werden. Realisierung: Gedruckte Ziffern auf Losen oder Dokumenten werden als dunkle BLOBs erkannt. Über die Anzahl der gefundenen BLOBs wird die korrekte Anzahl der Ziffern überprüft. Kundennutzen: Schnelle Qualitätssicherung mit hohem Durchsatz. Es wird sicher gestellt, dass nur Lose mit einwandfreien Losnummern in Umlauf kommen, so dass keine unvollständigen Gewinnzahlen die Lotteriefreude trüben. 20 21 4.4 Typerkennung: Kronenkorken Branche: Getränkeindustrie Aufgabenstellung und spezielle Anforderungen: Kronenkorken sollen vor dem Aufbringen auf die gefüllten Getränkeflaschen auf Sortenreinheit geprüft werden. Realisierung: Über das Vorhandensein eine Objekts (BLOB) mit den charakteristischen, geometrischen Eigenschaften werden die richtigen Kronenkorken erkannt. Kundennutzen: Keine Untermischung. Korrekte Produktkennzeichnung. Drehlagenunabhängige Prüfung. 22 23 4.5 Position und Orientierung unsortierter Objekte Branche: Fertigungsindustrie/Robotik Aufgabenstellung und spezielle Anforderungen: Schrauben werden auf ihre Position und Winkellage geprüft. Realisierung: Position und Winkellage kann über die serielle Schnittstelle an eine übergeordnete Steuerung übertragen werden (Pick and Place Applikation). Optional kann das Gut-/Schlechtergebnis der Prüfung z.B. vom ermittelten Winkelwert abhängig gemacht werden. Kundennutzen: Keine Untermischung. Prüfung auf Sortenreinheit. 24 25 6. Anhang: Checkliste für Bildverarbeitungsapplikationen Fragebogen Bildverarbeitung Firma: Ort: Datum: Projekt: Name: Bearbeiter Leuze: Beschreibung: Bearbeitungshinweise Angebot Machbarkeitsbewertung Demovorführung Testinstallation Montage / Inbetriebnahme Service und Wartung Prüfaufgabe 2D-Code 1 3 4 5 1D-Code 1 3 4 5 Stacked-Codes 1 4 5 Pharma-Codes 4 5 Anwesenheit 2 3 4 5 Vollständigkeit 2 3 4 5 Position 2 3 4 5 Typenerkennung Drehlage 2 3 4 5 Mustererkennung 3 4 5 2345 Dimensionskontrolle 2 3 4 5 Messen mit Kalibrierung 3 4 5 Farbkontrolle 3 4 5 Druckbildkontrolle 3 4 5 Zeichenlesung (OCR) 3 4 5 Zeichenverifikation (OCV) 3 4 5 Prüfobjekte kleinstes Prüfmerkmal Höhendifferenz [mm] Schärfentiefe Objekte / Chargen Anzahl Material Farbe Oberfläche glänzend / matt Form Prozessanbindung Zubehör Prüfumgebung Befestigung Bildfeld gesamt RS232 Kabel Kameraabstand min / max Profibus Beleuchtung Prüfhintergrund Farbe / glänzend Ethernet Blitzcontroller Fremdlicht - Art Fehlerbilder Trigger-Sensor Prüfposition DIG I/O Anzahl min / max Bauraum Umgebungstemperatur Ausführung Schutzart Probentransport 24 VDC kontinuierlich Geschwindigkeit getaktetet Takt- / Stillstandzeit Nennleistung Projekt Prüfzeit Hauptinteresse Stückzahl Preis Budget je Std. / je Tag Trigger bis zum Ergebnis einzelnes Objekt im Bildfeld mehrere Objekte gleichzeitig im Bildfeld Objekte berühren sich je Stück Objekte sind überlappend vorhanden Bedarf jährlich Objekte mit fixer Orientierung Bewertung geplant Objekte mit variabler Orientierung Beschaffung geplant Positionstoleranz -x / -y min / max Drehlagentoleranz min / max Wahrscheinlichkeit KO-Kriterium Mitbewerber Vorteile Leuze aktuelle Prüfmethode Legende: Anlage: Seite 1 von 3 26 1 LSIS 120 Musterteile 2 LSIS 400 3 visionFIREBOX Bilder Prüfobjekte Bilder Anlage 4 visionPOWERBOX Fehlerkatalog 5 proCHECK Lastenheft Fortsetzung siehe Rückseite Fragebogen Bildverarbeitung Leuze electronic.xls 20.05.2009 Fragebogen Bildverarbeitung Firma: Ort: Datum: Projekt: Name: Bearbeiter Leuze: Skizze: Fragebogen Bildverarbeitung Firma: Beschreibung: Projekt: Ort: Datum: Name: Bearbeiter Leuze: Beschreibung: Bearbeitungshinweise Angebot Machbarkeitsbewertung Demovorführung Testinstallation Montage / Inbetriebnahme Service und Wartung Prüfaufgabe 2D-Code 1 3 4 5 1D-Code 1 3 4 5 Stacked-Codes 1 4 5 Pharma-Codes 4 5 Anwesenheit 2 3 4 5 Vollständigkeit 2 3 4 5 Position 2 3 4 5 Typenerkennung Drehlage 2 3 4 5 Mustererkennung 3 4 5 2345 Dimensionskontrolle 2 3 4 5 Messen mit Kalibrierung 3 4 5 Farbkontrolle 3 4 5 Druckbildkontrolle 3 4 5 Zeichenlesung (OCR) 3 4 5 Zeichenverifikation (OCV) 3 4 5 Prüfobjekte kleinstes Prüfmerkmal Höhendifferenz [mm] Schärfentiefe Objekte / Chargen Anzahl Material Farbe Oberfläche glänzend / matt Form Prozessanbindung Seite 3 von 3DIG I/O Zubehör Prüfumgebung Fragebogen Bildverarbeitung electronic.xls Bildfeld gesamt Leuze min / max Befestigung Anzahl RS232 Kabel Kameraabstand min / max Profibus Beleuchtung Prüfhintergrund Farbe / glänzend 20.05.2009 Um ein Bildverarbeitungsprojekt erfolgreich abzuwickeln, muss schon im Vorfeld die Applikation eindeutig definiert sein: Ethernet Blitzcontroller Fremdlicht - Art Fehlerbilder Trigger-Sensor Prüfposition Bauraum Umgebungstemperatur Detaillierte Beschreibung der Prüfaufgabe. Ausführung Schutzart Geforderte Genauigkeit der Prüfung. Probentransport 24 VDC kontinuierlich Prüfzeit Hauptinteresse Stückzahl je Std. / je Tag Trigger bis zum Ergebnis einzelnes Objekt im Bildfeld mehrere Objekte gleichzeitig im Bildfeld Kundenanforderungen bezüglich Kameraabstand. Preis Takt- / Stillstandzeit Nennleistung Projekt Budget Geschwindigkeit getaktetet Erforderliche Bildfeldgröße. Objekte berühren sich je Stück Objekte sind überlappend vorhanden Bedarf jährlich Objekte mit fixer Orientierung Bewertung geplant Objekte mit variabler Orientierung Beschaffung geplant Positionstoleranz -x / -y min / max Drehlagentoleranz min / max Prüfung im Stillstand? Wenn ja: welche Taktzeit. Wahrscheinlichkeit Prüfung in Bewegung? Wenn ja: welche Geschwindigkeit. KO-Kriterium Mitbewerber Vorteile Leuze Maximale Prüfdauer. aktuelle Prüfmethode Anzahl Prüfungen pro Sekunde, Minute oder Stunde. Legende: Anlage: Seite 1 von 3 1 LSIS 120 Musterteile 2 LSIS 400 3 visionFIREBOX Bilder Prüfobjekte Bilder Anlage 4 visionPOWERBOX Fehlerkatalog 5 proCHECK Lastenheft Fortsetzung siehe Rückseite Fragebogen Bildverarbeitung Leuze electronic.xls 20.05.2009 27 1. Industrial image processing: Device classification Costs, ease of integration 1.1 Vision systems (PC or controller based) Smart cameras / Compact vision systems Vision sensors Performance, flexibility 28 The Zentralverband Elektrotechnik- und Elektronikindustrie (ZVEI) classifies industrial image processing devices in three different classes: Vision sensors Smart cameras / compact vision systems Vision systems With respect to flexibility and ease of integration, the LSIS 400i is classified between vision sensors and smart cameras. The task/performance spectrum is considerably broader than that of vision sensors and approaches the performance level of simple, PC-based systems. With regard to price, the LSIS 400i is, in turn, considerably more attractive than PC-based systems. 29 1.2 Advantages of modern smart cameras, using the LSIS 400i as an example The advantages in detail Convenient configuration via the integrated LSIS 400i webConfig tool, simplifies application setup. Homogeneous illumination of the entire image field for considerably better results than with conventional LED illumination. Convenient commissioning and connection with M12 connection technology and intelligent fastening concept. Integrated connectivity offers convenient configuration with Ethernet interface, process-data exchange via RS 232 interface and 8 digital, configurable inputs and outputs. Suitable for industrial use: metal housing with glass window and protection class IP 65. Flexibility through motor-driven focus adjustment and storage of the lot-specific camera distance in the test program. As a result, no manual focusing is necessary on the device. Simple diagnostics by means of multi-language display with buttons and LED status displays. Wide range of accessories simplifies installation, wiring and fastening. 30 Faster integration with webConfig Configuration directly via a web browser. Faster and easier access to the device via Ethernet interface. No configuration software needs to be installed on the PC, thereby ensuring compatibility. More-flexible use through motor-driven focus adjustment On lot changes, the new test program is loaded with the focus setting for the specific camera distance. By means of the motor-driven focus adjustment, the device moves to the appropriate focus position, i.e. no manual focusing is necessary on the device. The motor-driven focus adjustment is also an advantage if the installation space in the machine is very limited or if the smart camera was mounted in such a way that it cannot be accessed from the outside in normal operation. Better results through homogeneous illumination Very uniform, rectangularly illuminated image field in the distance range from 50 mm to 250 mm to the test object. Compared with conventional LED illumination, the image recorded is considerably more homogenous and more detailed. This results in better, faster and more reliable image processing. 31 2. Illumination Principle illumination variants Rear illumination: Illumination type in which the object is located between the camera and the light source. This can be used to create silhouettes with sharp edges and very good contrast. Often used for: Example of rear illumination: coin illuminated from rear 32 the detection of the outer contour of relatively flat objects. ideal for precise measurements. fault detection in transparent objects. Front illumination in the bright field: illumination type in which the camera detects the light directly reflected by the object surface. Diffuse (scattering) objects are always seen, while glossy objects are only seen at an appropriate angle relative to the objective. Often suitable as: Example of front illumination: coin in bright field direct front illumination for matt surfaces; maximum intensity can be achieved. diffuse front illumination for minimizing the effects of overexposure through reflection; has the lowest shadowing, but the largest device size. Front illumination in the dark field: Illumination type in which the camera detects the scattered light reflected by the object surface (i.w.). The scattering surfaces appear bright, while the reflecting surfaces appear dark. Example of front illumination: coin in dark field Flatly irradiated light. Edge and height structures on objects are emphasized. 33 3. LSIS 41x: BLOB analysis BLOB analysis BLOB stands for “Binary Large Object” and identifies a contiguous area of pixels in an image. In general, BLOBs refer to individual groups of pixels whose light intensity lies between defined limit values. By limiting BLOB features, such as area and circumference, individual objects or object groups can be specifically detected (e.g. circles, rectangles, squares, ...). As a result, tasks such as completeness checks, presence checks or position determinations can be performed. Area: Summation of the pixels enclosed in a BLOB. Circumference: Length of the outer contour line of a BLOB in pixels. Shape factor: Ratio between area and circumference of the blob; normalized to values between 0 and 100. The shape factor is used to classify the geometric shape of a blob: “100” represents a perfect circle; “0” represents a perfect line. The formula is “4 * area/circumference² * 100”. Circumscribing rectangle: Height and width of the smallest rectangle that encloses the blob with sides parallel to the X and Y axes. 34 Length of the primary axis (1): length of the smallest rotated rectangle that encloses the BLOB. Length of the secondary axis (2): height of the smallest rotated rectangle that encloses the BLOB. Orientation of the primary axis (3): angular orientation of the primary axis—measured towards the “heavy” side of the BLOB relative to the X axis (0° ... 360°). Center of gravity: X and Y coordinates of the center of area of the BLOB. By varying the parameters of the BLOB analysis, it is possible to search for a specific object or check whether it is present. 35 3.1 The BLOB-analysis image filters Overview of the most important filters The BLOB analysis has filters that act on the recorded original image (gray-value image) and filter that act on the generated binary image following segmentation. Filters that act on the gray-value image: Smoothing filter. Filters that act on the generated binary image: Erosion (enlarging of dark structures). Widening (enlarging of bright structures). Opening (closing of gaps in dark objects without changing the object size). Closing (closing of gaps in bright objects without changing the object size). 36 3.1.1 The smoothing filter — a filter that acts on the gray-value image After the image is recorded and before segmentation, a smoothing filter can be applied to the gray-value image. Smoothing filter Noisy original image. Image that has been processed with the smoothing filter. The noise is largely eliminated. 37 3.1.2 Filters that act on the generated binary image Following segmentation, various morphologic filters can be applied to the generated binary image: Original The binary image generated after segmentation. Interfering pixels represented by light/dark bars. Erosion This is used to enlarge dark structures in the image and thereby eliminate bright, interfering pixels. Widening This is used to enlarge bright structures in the image and thereby eliminate dark, interfering pixels. 38 Original The binary image generated after segmentation. Open Erosion is performed followed by dilation: this results in the closure of gaps in dark objects without changing the object size. Close Dilation is performed followed by erosion: this results in the closure of gaps in bright objects without changing the object size. 39 4. 4.1 Applications Completeness mode: full-crate monitoring Industry: Beverage industry Applications and special requirements: Full-crate monitoring through the detection of reflective crown caps on bottles. Implementation: Reflective crown caps on bottles in a beverage crate are detected as bright BLOBs. Based on the number of BLOBs that are found, the correct filling of the beverage crate is monitored. Customer benefits: Fast and secure object detection. Fast lot changes possible. 40 41 4.2 Completeness mode: fill-level monitoring Industry: Beverage industry Applications and special requirements: Monitoring the level or filling height of the liquid in the bottles. Implementation: For dark liquids in transparent bottles, a “dark/light” evaluation can be performed in the lower part of the image to monitor for sufficient level. Customer benefits: Fast quality assurance. It is ensured that only sufficiently filled bottles reach the retail stores and, thus, the customer. This improves customer satisfaction. 42 43 4.3 Presence: print monitoring Industry: Printing industry Applications and special requirements: On lottery tickets or documents, the presence of printing needs to be monitored. Implementation: Printed numbers on lottery tickets or documents are detected as dark BLOBs. The number of found BLOBs is used to check the correct number of digits. Customer benefits: Fast quality assurance with high throughput. It is ensured that only lottery tickets with a fault-free lottery number go into circulation, thereby preventing incomplete winning numbers from damping lottery joy. 44 45 4.4 Type detection: crown caps Industry: Beverage industry Applications and special requirements: Before placed on the filled beverage bottles, crown caps are checked to ensure that they are of the correct type. Implementation: By checking for the presence of an object (BLOB) with the characteristic, geometric properties, the correct crown caps are detected. Customer benefits: No mixing of different types. Correct product labeling. Rotation-independent inspection. 46 47 4.5 Position and orientation of unsorted objects Industry: Manufacturing industry/robotics Applications and special requirements: Screws are checked for correct position and angle position. Implementation: Position and angle position can be transferred to a primary control via the serial interface (pick-and-place application). The pass/fail result of the check can optionally be made dependent on e.g the ascertained angle value. Customer benefits: No mixing of different types. Inspection for purity of variety. 48 49 6. Appendix: Checklist for image processing applications Questionnaire Image processing Company: City: Project: Name: Date: Responsible Leuze Description: Processing instructions Offer Feasibility assessment Demo presentation Test installation Mounting / commissioning Service and maintenance Inspection task 1D code 1 3 4 5 2D code 1 3 4 5 Stacked codes 1 4 5 Pharma codes 4 5 Presence 2 3 4 5 Completeness 2 3 4 5 Position 2 3 4 5 Type detection Angle 2 3 4 5 Pattern detection 2345 Dimension inspection 345 Measure with calibration 3 4 5 2345 Color inspection 3 4 5 Printout inspection Character reading (OCR) 3 4 5 Character verification (OCV) 3 4 345 Test objects Smallest inspection char [mm] Height difference depth of field Objects / lots quantity Material Color Surface glossy / matt Shape Process integration Accessories Inspection environment Attachment Total image field min. / max. RS232 Cable Camera distance min. / max. Profibus Illumination Inspection background color / glossy Ethernet Flash controller Ambient light - type Fault images Trigger sensor Inspection position DIG I/O quantity Installation space Ambient temperature Version Protection class Sample transport 24 VDC Continuous speed Cyclical cycle / standstill time Rated output Project per hour / per day Test time Main interest triggers before result Single object Quantity Multiple objects Price in image field simultaneously in image field Objects touch one another per piece Budget Objects are overlapping exists Required quantityyearly Objects with fixed orientation Evaluation planned Objects with variable orientation Purchasing planned Position tolerance -x / -y min. / max. Angular tolerance min. / max. Probability KO criterion Competitors Leuze advantages Current inspection method Legend: System: Page 1 of 3 50 1 LSIS 120 Sample parts 2 LSIS 400 3 visionFIREBOX Images of test objects 4 visionPOWERBOX Images of system Error catalog 5 proCHECK Specification Continued on reverse Fragebogen Bildverarbeitung Leuze electronic.xls 08.06.2009 Questionnaire Image processing Company: City: Date: Project: Name: Responsible Leuze Sketch: Questionnaire Image processing Company: City: Description: Project: Date: Name: Responsible Leuze Description: Processing instructions Offer Feasibility assessment Demo presentation Test installation Mounting / commissioning Service and maintenance Inspection task 1D code 1 3 4 5 2D code 1 3 4 5 Stacked codes 1 4 5 Pharma codes 4 5 Presence 2 3 4 5 Completeness 2 3 4 5 Position 2 3 4 5 Type detection Angle 2 3 4 5 Pattern detection 2345 Dimension inspection 345 Measure with calibration 3 4 5 2345 Color inspection 3 4 5 Printout inspection Character reading (OCR) 3 4 5 Character verification (OCV) 3 4 345 Test objects Smallest inspection char [mm] Height difference depth of field Objects / lots quantity Material Color Surface glossy / matt Shape Process integration Page 3 of 3 DIG I/O Accessories Inspection environment Fragebogen Bildverarbeitung electronic.xls Total image field Leuze min. / max. Attachment quantity RS232 Cable Camera distance Profibus Illumination Inspection background color / glossy 08.06.2009 min. / max. To successfully complete an image processing project, the application must be clearly defined in advance: Ethernet Flash controller Ambient light - type Fault images Trigger sensor Inspection position Installation space Ambient temperature Detailed description of the inspection task. Version Protection class Required accuracy of the inspection. Sample transport 24 VDC Continuous speed Cyclical Required image field size. cycle / standstill time Rated output Project per hour / per day Test time Main interest triggers before result Single object Quantity Multiple objects in image field Customer requirements with respect to camera distance. Price simultaneously in image field Objects touch one another per piece Budget Objects are overlapping exists Required quantityyearly Objects with fixed orientation Evaluation planned Objects with variable orientation Purchasing planned Position tolerance -x / -y min. / max. Angular tolerance min. / max. Inspection while at a standstill? If yes, with what cycle time. Probability Inspection while moving? If yes: at what speed. KO criterion Competitors Leuze advantages Maximum inspection duration. Current inspection method Number of inspections per second, minute or hour. Legend: System: Page 1 of 3 1 LSIS 120 Sample parts 2 LSIS 400 3 visionFIREBOX Images of test objects 4 visionPOWERBOX Images of system Error catalog 5 proCHECK Specification Continued on reverse Fragebogen Bildverarbeitung Leuze electronic.xls 08.06.2009 51 Optoelektronische Sensoren Kubische Baureihen Rundhülsen, Mini-Lichtschranken, Lichtleiterverstärker Messende Sensoren Spezial-Sensorik Lichtvorhänge Gabel-Sensoren Doppelbogenkontrolle, Klebestellenerkennung Induktive Sensoren Zubehör Identifikationssysteme Datenübertragungssyteme Distanzmessung Barcodelesegeräte RF-IDent-Systeme Modulare Anschalteinheiten Industrielle Bildverarbeitungssysteme Optische Datenübertragungssysteme Optische Entfernungsmessung/Positionierung Mobile Codelesegeräte Sicherheits-Sensoren Sicherheits-Systeme Sicherheits-Dienstleistungen Leuze electronic GmbH + Co. KG In der Braike 1 D-73277 Owen Telefon +49 (0) 7021 573-0 Telefax +49 (0) 7021 573-199 E-Mail: [email protected] www.leuze.com 52 DE/GB 00-06/09 50111869 Sicherheits-Laserscanner Sicherheits-Lichtvorhänge Transceiver und Mehrstrahl-Sicherheits-Lichtschranken Einstrahl-Sicherheits-Lichtschranken AS-i-Safety-Produktprogramm Sicherheits-Sensorik für den PROFIBUS DP Sicherheits-Schalter, -Zuhaltungen, -Befehlsgeräte Sicherheits-Schaltgeräte Sensor-Zubehör und Signalgeräte Sicherheits-Engineering-Software Machine Safety Services