CZ2019167A3 - A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for the method - Google Patents

A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for the method Download PDF

Info

Publication number
CZ2019167A3
CZ2019167A3 CZ2019-167A CZ2019167A CZ2019167A3 CZ 2019167 A3 CZ2019167 A3 CZ 2019167A3 CZ 2019167 A CZ2019167 A CZ 2019167A CZ 2019167 A3 CZ2019167 A3 CZ 2019167A3
Authority
CZ
Czechia
Prior art keywords
image
module
algorithm
pixels
digital
Prior art date
Application number
CZ2019-167A
Other languages
Czech (cs)
Other versions
CZ308988B6 (en
Inventor
Robert Frischer
Ondřej Krejcar
Kamil KuÄŤa
Petra Marešová
Original Assignee
Univerzita Hradec Králové
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univerzita Hradec Králové filed Critical Univerzita Hradec Králové
Priority to CZ2019167A priority Critical patent/CZ308988B6/en
Publication of CZ2019167A3 publication Critical patent/CZ2019167A3/en
Publication of CZ308988B6 publication Critical patent/CZ308988B6/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20182Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30136Metal

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

Vynález je z oblasti digitálního zpracování obrazu. Jedná se o metodu čištění obrazu, která má za cíl odstranit z něj nedůležité pozadí, šumy a ponechat pouze anomálie vhodné k dalšímu zpracování. Metoda spočívá v provedení následujících kroků:a) je vytvořen digitální obraz oblasti zájmu s možnou povrchovou vadou, anomálií,b) digitální obraz je převeden do maticové podoby,c) je provedena redukce rozlišení obrazu pomocí průměrování pixelů v uživatelsky definovaném čtvercovém okně,d) v redukovaném snímku je poté ve směru osy X, nebo Y, provedena derivace jasových hodnot pixelů a pomocí prahování vytvořen nový binarizovaný snímek ae) v derivovaném obraze je provedeno vyhledání osamocených pixelů a tyto jsou z obrazu odstraněny.V obraze zůstávají pouze oblasti, které jsou žádoucí z pohledu dalšího zpracování. Vynález se také týká zařízení (1) pro zpracování obrazu, které odhaduje pozici hledaných objektů v obraze. Zařízení (1) je tvořeno digitální kamerou (2) a výpočetní částí (3). Digitální kamera (2) obsahuje přizpůsobovací obvody (4) analogové části CCD nebo CMOS a komunikační rozhraní (5) pro přenos digitalizovaných dat a výpočetní část (3) je tvořena jednotkou (7) zpracování dat s CPU, vyhodnocovacím a diagnostickým modulem (8), rozhraním (9) pro styk s okolím a řídícím a ovládacím modulem (10). V modulu (8) jsou integrovány algoritmus zmenšení obrazu průměrováním dle velikosti čtvercového okna, algoritmus derivace bezprostředně sousedících pixelů a binarizace obrazu, algoritmus filtru osamocených pixelů v obraze s definovaným detekčním rádiem, algoritmus histogramu výskytu anomálií v obraze a algoritmus odhadu pozice hledaných objektů, v modulu (10) je integrován obecný ovládací a řídicí software pro chod zařízení (1). Digitální kamera (2) je s výpočetní částí (3) jednosměrně propojena prostřednictvím přenosového média (6), přizpůsobovací obvod (4) je jednosměrně propojen s komunikačním rozhraním (5) a jednotka (7) je obousměrně propojena s modulem (8), rozhraním (9) a modulem (10).The invention is in the field of digital image processing. This is a method of image cleaning, which aims to remove unimportant background, noise and leave only anomalies suitable for further processing. The method consists of performing the following steps: a) a digital image of the area of interest with a possible surface defect, anomaly is created, b) the digital image is converted into a matrix form, c) the image resolution is reduced by averaging pixels in a user-defined square window, in the reduced image, the pixel brightness values are then derivated in the X or Y direction, and a new binarized image is created by thresholding and e) the orphaned image is searched for in the derived image and these are removed from the image. desirable from the perspective of further processing. The invention also relates to an image processing device (1) which estimates the position of the objects sought in the image. The device (1) consists of a digital camera (2) and a computing part (3). The digital camera (2) comprises adaptation circuits (4) of the analog part of the CCD or CMOS and a communication interface (5) for the transmission of digitized data and the computing part (3) is formed by a data processing unit (7) with CPU, evaluation and diagnostic module (8). , an interface (9) for contact with the environment and a control and control module (10). The module (8) integrates an image size averaging algorithm based on a square window size, an algorithm for derivation of immediately adjacent pixels and image binarization, a lone pixel filter algorithm with a defined detection radio, an anomaly histogram algorithm and an estimated object position estimation algorithm. The general control and control software for the operation of the device (1) is integrated in the module (10). The digital camera (2) is unidirectionally connected to the computing part (3) via a transmission medium (6), the matching circuit (4) is unidirectionally connected to the communication interface (5) and the unit (7) is bi-directionally connected to the module (8). (9) and module (10).

Description

Způsob zpracování obrazu metodou postupného gradientu jasu obrazových pixelů v podélné ose a zařízení k provádění tohoto způsobuA method of image processing by a method of successive gradient of brightness of image pixels in the longitudinal axis and an apparatus for carrying out this method

Oblast technikyField of technology

Vynález spadá do oblasti digitálního zpracování obrazu. Jedná se o prvotní úpravu obrazu před jeho další analýzou.The invention falls within the field of digital image processing. This is the initial modification of the image before its further analysis.

Dosavadní stav technikyPrior art

Zařízení pro zpracování digitálního obrazu, resp. zařízení, které pro svůj účel zpracovávají digitální obraz, je mnoho typů. Nejčastěji je možné se s nimi setkat v průmyslovém prostředí, kdy takové zařízení hodnotí například povrch výrobků a hledá povrchové vady, kontroluje průměr děr, pozici drážek, hloubku výbrusů, výslednou barvu výrobků apod. Cílem je obvykle nahradit lidský faktor při repetitivním hodnocení některého z ukazatelů kvality výrobků. Strojové hodnocení je „vždy“ objektivní, nezávislé na denní době a množství odpracovaných hodin. Bohužel strojové hodnocení je objektivní pouze a jen v případě, že pracuje v neměnných pracovních podmínkách, které se maximálně blíží podmínkám při kalibraci stroje. V případě změny například intenzity okolního osvětlení může dojít k posunu prahu jasností nastavených vnitřně algoritmem a zařízení začne např. přehlížet vady, nebo generovat falešné detekce apod. Taková stavy je poté nutné validovat ručně a opět se do procesu hodnocení kvality zapojuje lidský faktor. Tyto stavy jsou samozřejmě nechtěné a prodražují a zpomalují výrobu. V případě využití zařízení pro kontrolu kvality pomocí hodnocení digitálního obrazuje tedy vždy cíleno na co největší robustnost nejen mechanických prvků, ale i ovládacího a vyhodnocovacího algoritmu.Equipment for digital image processing, resp. There are many types of devices that process digital images for their purpose. They are most often encountered in industrial environments, where such equipment evaluates the surface of products and looks for surface defects, checks the diameter of holes, position of grooves, depth of cuts, the resulting color of products, etc. The goal is usually to replace the human factor in repetitive evaluation of any indicator product quality. Machine evaluation is "always" objective, independent of the time of day and the number of hours worked. Unfortunately, machine evaluation is objective only and only if it works in constant working conditions, which are as close as possible to the conditions when calibrating the machine. In the case of a change in the intensity of ambient light, for example, the brightness threshold set internally by the algorithm may shift and the device will begin to ignore defects or generate false detections, etc. Such conditions must then be validated manually and the human factor is involved in the quality assessment process. These conditions are, of course, unwanted and more expensive and slow down production. In the case of the use of equipment for quality control by means of digital image evaluation, it is always aimed at the greatest possible robustness not only of mechanical elements, but also of the control and evaluation algorithm.

Pod takovým zařízením je možné si představit digitální kameru s integrovaným vyhodnocovací prvkem, obvykle ve formě mikroprocesoru nebo embeded zařízení. Spojení digitální kamery a výpočetní jednotky umožní generovat informace o snímaných objektech a tyto validovat pro další použití. V současné době je neustále vyvíjen a vylepšován hardware pro zpracování obrazu, resp. pro paralelní výpočty využívané v hodnocení obrazu. Tento hardware umožňuje vyvíjet nové algoritmy, které jsou robustnější a mnohem přesnější než starší typy.Under such a device, it is possible to imagine a digital camera with an integrated evaluation element, usually in the form of a microprocessor or embedded device. The combination of a digital camera and a computing unit will make it possible to generate information about the scanned objects and validate it for further use. At present, the hardware for image processing is respected and improved, resp. for parallel calculations used in image evaluation. This hardware allows you to develop new algorithms that are more robust and much more accurate than older types.

Hodnocení kvality výrobků se skládá obvykle ze dvou částí. V první části je sejmut digitální obraz hodnocené oblasti a předzpracován. Ve druhé části je obvykle přítomná umělá inteligence ve formě neuronové sítě, která hodnotí předzpracovaný obraz a dává jednoznačný výsledek. Pokud se první část vynechá, neuronová síť podává horší výsledky a je obvykle nutný mnohem vyšší výkon procesorové části zařízení pro hodnocení kvality, aby se dosáhlo stejného výsledku.Product quality assessment usually consists of two parts. In the first part, a digital image of the evaluated area is taken and preprocessed. In the second part, artificial intelligence is usually present in the form of a neural network, which evaluates the preprocessed image and gives a clear result. If the first part is omitted, the neural network gives worse results and much higher performance of the processor part of the quality evaluation device is usually required to achieve the same result.

Podstata vynálezuThe essence of the invention

Podstatou vynálezu je způsob prvotní úpravy digitálního obrazu před jeho dalším zpracováním.The essence of the invention is a method of initial treatment of a digital image before its further processing.

Digitální obraz (obrázek 1) je obvykle nutné před jeho dalším zpracováním upravit, vyčistit. Pokud v obraze hledáme například text, vše ostatní je nežádoucí. Jakékoliv rušivé vlivy jako například podkladový motiv (obrázek 1), přechodové stíny, nebo také různé úrovně osvětlení, lišící se od referenčních podmínek jsou nežádoucí.It is usually necessary to adjust or clean the digital image (Figure 1) before further processing. For example, if we look for text in an image, everything else is undesirable. Any disturbing influences, such as the background motif (Figure 1), the transition shadows, or also the different lighting levels, which differ from the reference conditions, are undesirable.

Obvykle se v průmyslových aplikacích provádí stanovení okolních podmínek při pořizování obrazu. Pokud je vyhodnocována určitá oblast v obraze například průmyslovou kamerou, je kladen vysoký důraz na dodržení referenčních podmínek. Pokud se například změní intenzita osvětlení vlivem denní doby, změnou osvětlovacích těles apod., není obraz vyhodnocován správně a dochází k falešným detekcím, nebo naopak k detekcím nedochází. Detekcí je myšlenaUsually, in industrial applications, the determination of the ambient conditions during image acquisition is performed. If a certain area in the image is evaluated, for example by an industrial camera, great emphasis is placed on compliance with the reference conditions. For example, if the light intensity changes due to the time of day, a change in lighting fixtures, etc., the image is not evaluated correctly and false detections occur or, conversely, no detections occur. Detection is meant

- 1 CZ 2019 - 167 A3 informace, poskytnutá zařízením pro hodnocení kvality výrobků, která odpovídá vnitřní struktuře hodnotícího algoritmu a je obecného charakteru. Například rozsvícení signalizačního světla určité barvy, vygenerování akčního zásahu programovatelným automatem apod. Podstatou způsobu je tedy provedení následujících kroků:- 1 CZ 2019 - 167 A3 information provided by the product quality evaluation device, which corresponds to the internal structure of the evaluation algorithm and is of a general nature. For example, turning on a signal light of a certain color, generating an action by a programmable controller, etc. The essence of the method is to perform the following steps:

a) je vytvořen digitální obraz oblasti zájmu s možnou povrchovou vadou, anomálií,a) a digital image of the area of interest is created with a possible surface defect, anomaly,

b) digitální obraz je převeden do maticové podoby,b) the digital image is converted into a matrix form,

c) je provedena redukce rozlišení obrazu pomocí průměrování pixelů v uživatelsky definovaném čtvercovém okně,c) the image resolution is reduced by averaging the pixels in a user-defined square window,

d) v redukovaném snímku je poté ve směru osy X, nebo Y, provedena derivace jasových hodnot pixelů a pomocí prahování vytvořen nový binarizovaný snímek ad) in the reduced image, the brightness values of the pixels are then derived in the direction of the X or Y axis and a new binarized image is created by thresholding, and

e) v derivovaném obraze je provedeno vyhledání osamocených pixelů a tyto jsou z obrazu odstraněny.e) a single pixel search is performed in the derived image and these are removed from the image.

Výsledný obraz obsahuje pouze ty oblasti, které jsou vzhledem k původnímu obrazu jasovou složkou anomální, resp. obsahují ostrý jasový přechod. Uvedený algoritmus je imunní vůči plynulým změnám jasu v obraze a nedetekuje je jako anomálie.The resulting image contains only those areas that are anomalous with respect to the original image with the luminance component, resp. contain a sharp brightness transition. This algorithm is immune to smooth changes in brightness in the image and does not detect them as anomalies.

Způsob zpracování obrazu podle vynálezu využívá digitální interpretace zkoumaného obrazu. Tento digitální obraz je vstupem algoritmu a je ve formě dvourozměrné matice (Px(orig)) o rozměrech odpovídajících fýzickému rozlišení digitálního obrazu. Jednotlivé buňky matice představují jasovou složku obrazu, resp. pixelů. Pixely mají další parametr, který odpovídá jejich fýzické pozici v obraze. Tímto parametrem jsou souřadnice, obvykle dvourozměrné. Třetím rozměrem může být specifikována barevná složka pixelů. V popisovaném případě bude souřadnice pouze dvourozměrná. Pozice určité buňky v matici odpovídá pozici pixelů se stejnými souřadnicemi.The image processing method according to the invention uses digital interpretation of the examined image. This digital image is the input of the algorithm and is in the form of a two-dimensional matrix (Px (orig)) with dimensions corresponding to the physical resolution of the digital image. The individual cells of the matrix represent the luminance component of the image, resp. pixels. Pixels have another parameter that corresponds to their physical position in the image. This parameter is coordinates, usually two-dimensional. The third dimension can specify the color component of the pixels. In the case described, the coordinate will only be two-dimensional. The position of a particular cell in the matrix corresponds to the position of pixels with the same coordinates.

V následujícím textu budou často zmiňovány buňky matice a pixely. Jedná se v podstatě jen o jiný pohled na stejnou věc. Pixel vychází z anglického „picture element“ a představuje nejmenší jednotku digitální rastrové grafiky. Každý pixel má svou pevnou pozici a určitou barvu. Buňka matice je analogicky také dále nedělitelná, s pevně definovanou pozicí a vnitřní hodnotou. Pokud bude tedy v následujícím textu zmíněn pixel, bude tím myšlena obrazová interpretace určité buňky v matici.Matrix cells and pixels will often be mentioned in the following text. It's basically just a different view of the same thing. The pixel is based on the English "picture element" and is the smallest unit of digital raster graphics. Each pixel has its fixed position and a certain color. The matrix cell is analogically also indivisible, with a fixed position and internal value. Thus, if a pixel is mentioned in the following text, it will mean an image interpretation of a certain cell in the matrix.

Digitální obraz ve formě matice je zmenšen na uživatelsky definovanou velikost. Ke zmenšení je použit tzv. „okénkový“ mechanizmus, kdy je matice rozdělena na určitý počet menších, čtvercových matic s hodností h. Parametr h je uživatelsky nastavitelný. V každém okénku je vypočítána střední hodnota jasu jednotlivých pixelů a tato hodnota je poté umístěna do nové matice s redukovaným obrazem.The digital image in the form of a matrix is reduced to a user-defined size. To reduce, a so-called "window" mechanism is used, where the matrix is divided into a number of smaller, square matrices with rank h. The parameter h is user-adjustable. In each window, the mean brightness value of each pixel is calculated and this value is then placed in a new matrix with a reduced image.

Každý nový pixel redukovaného obrazu, je tedy průměrem jasových hodnot pixelů čtvercového okna originálního obrazu podle vzorce:Each new pixel of the reduced image is thus the average of the luminance values of the pixels of the square window of the original image according to the formula:

Ύ k ί h k ί hΎ k ί h k ί h

Px(reď)xy = -f^2-li-1Z-lj-1 PXrÍ3^iJ kde Px(red)x,y je nový pixel redukovaného obrazu na souřadnici x,y, h je rozměr čtvercového okénka a Pxfongíu představuje pixel originálního obrazu na souřadnici i,j.Px (red) xy = -f ^ 2- li - 1 Z- lj - 1 PX ^ ° rÍ3 ^ i J where Px (red) x, y is the new pixel of the reduced image at the coordinate x, y, h is the dimension of the square window and Pxfongíu represents the pixel of the original image at the i, j coordinate.

-2 CZ 2019 - 167 A3-2 CZ 2019 - 167 A3

V redukovaném snímku, resp. nové matici (Px(red)) je poté ve směru osy X, nebo Y, provedena derivace jasových hodnot jednotlivých pixelů a pomocí prahování vytvořena nová matice s binarizovaným obrazem. Diskrétní derivace jasových hodnot pixelů, resp. buněk matice Px(red) je výsledkem absolutní hodnoty rozdílu dvou vedlejších buněk v ose X, nebo Y:In the reduced image, resp. The new matrix (Px (red)) is then derived in the direction of the X or Y axis, the brightness values of the individual pixels are derived and a new matrix with a binarized image is created by thresholding. Discrete derivation of brightness values of pixels, resp. cells of the matrix Px (red) is the result of the absolute value of the difference of the two secondary cells in the X or Y axis:

dxx = \Px(orig)x — Px(prig)x+1\dx x = \ Px (orig) x - Px (prig) x + 1 \

Prahování je definováno uživatelsky nastavitelnou proměnnou, jejíž hodnota je rozhodovacím prahem pro definici nového pixelů. V případě, že je hodnota derivace jasových složek větší než prahová úroveň, má výsledný pixel hodnotu 1. V opačném případě má daný pixel hodnotu 0. Obrázek vzniklý derivací jasových hodnot v ose X, nebo Y, je uveden na obrázku 2. Nový obraz je reprezentován maticí dX, která má stejnou velikost jako Px(red).Threshold is defined by a user-adjustable variable, the value of which is the decision threshold for defining a new pixel. If the value of the derivative of the luminance components is greater than the threshold level, the resulting pixel has a value of 1. Otherwise, the pixel has a value of 0. The image created by deriving the luminance values in the X or Y axis is shown in Figure 2. represented by a matrix dX that has the same size as Px (red).

Dále je provedena detekce osamocených pixelů v obraze s uživatelsky definovaným detekčním rádiem. Detekční rádius je vhodné volit jako hodnotu odvozenou od jednoho z rozměrů matice dX. Empirickými pokusy jsme zjistili optimální hodnotu definovanou jako 1/30 toho rozměru matice dX, který odpovídá směru derivace jasových hodnot jednotlivých pixelů. Detekce osamocených pixelů probíhá tak, že v případě nalezení buňky s nenulovým obsahem matice dX jev okolí této buňky hledána další nenulová buňka.Furthermore, the detection of isolated pixels in the image with a user-defined detection radio is performed. The detection radius should be chosen as a value derived from one of the dimensions of the matrix dX. Empirical experiments have found the optimal value defined as 1/30 of the dimension of the matrix dX, which corresponds to the direction of derivation of the luminance values of individual pixels. The detection of orphaned pixels takes place in such a way that in the case of finding a cell with a non-zero content of the dX matrix, the phenomenon around this cell is searched for another non-zero cell.

Okolím buňky se rozumí čtvercové okno o délce strany 1/30 velikosti matice dX ve směru X, nebo Y (definice výše). Pokud jsou v okolí buňky s nenulovou hodnotou pouze buňky s nulovou hodnotou, je nenulová hodnota buňky nahrazena novou hodnotou nula. Hodnocení je prováděno prostřednictvím sumy obsahu všech buněk v okolí buňky s nenulovou hodnotou. Pokud je suma hodnot buněk v okolí buňky s nenulovou hodnotou vyšší než uživatelsky definované minimum, je původní buňka s nenulovým obsahem ponechána v původním stavu.Around the cell is meant a square window with a side length of 1/30 of the size of the matrix dX in the X or Y direction (definition above). If there are only cells with a zero value in the vicinity of a cell with a non-zero value, the non-zero value of the cell is replaced by a new value of zero. The evaluation is performed by the sum of the contents of all cells in the vicinity of the cell with a non-zero value. If the sum of the cell values around the cell with the non-zero value is higher than the user-defined minimum, the original cell with the non-zero content is left in its original state.

Uvedeným postupem vznikne nová matice Px(grad), která obsahuje buňky s nenulovým obsahem pouze na těch souřadnicích, které vyhověly všem krokům algoritmu zpracování obrazu metodou postupného gradientu jasu obrazových pixelů v podélné ose. Matice Px(grad) obsahuje pouze fragmenty původního obrazu. Z histogramu četností buněk s nenulovým obsahem, resp. pixelů, je možné odhadnout pozici hledaných objektů nacházejících se v původním obraze. Dalšímu zpracování, například pomocí umělé neuronové sítě, jsou tedy předloženy pouze ty části původního obrazu, které odpovídají pozici shluků buněk s nenulovém obsahem v matici Px(grad). Tímto postupem je digitální kamerou snímaný obraz upraven a jsou zněj vybrány pouze ty oblasti, které jsou z pohledu dalšího zpracování důležité.This procedure creates a new matrix Px (grad), which contains cells with non-zero content only at those coordinates that have met all the steps of the image processing algorithm by the method of gradual brightness gradient of image pixels in the longitudinal axis. The Px (grad) matrix contains only fragments of the original image. From the histogram of the frequency of cells with non-zero content, resp. pixels, it is possible to estimate the position of searched objects located in the original image. Thus, only those parts of the original image which correspond to the position of the clusters of cells with non-zero content in the Px (grad) matrix are presented for further processing, for example by means of an artificial neural network. In this way, the image captured by the digital camera is modified and only those areas that are important from the point of view of further processing are selected from it.

Data odpovídající vybrané oblasti zájmu mohou být dále poskytnuta například zařízení pro hodnocení kvality výrobků, které detekuje přítomnost vad, přičemž zařízení pro hodnocení kvality výrobků signalizuje zjištění vady například rozsvícením signalizačního světla určité barvy, vygenerováním akčního zásahu programovatelným automatem apod.Data corresponding to the selected area of interest may be further provided, for example, by a product quality evaluation device which detects the presence of defects, the product quality evaluation device signaling the detection of a defect, for example by lighting a signal light of a certain color, generating an action by a programmable controller, and so on.

Podstatou vynálezu je také zařízení pro zpracování digitálního obrazu, které z něj odstraňuje nedůležité pozadí, šumy a ponechává v něm pouze anomálie vhodné k dalšímu zpracování.The invention also relates to a device for processing a digital image, which removes unimportant background and noise and leaves only anomalies suitable for further processing.

Zařízení pro zpracování obrazu se skládá z digitální kamery a výpočetní části, které jsou spolu propojeny prostřednictvím přenosového média.The image processing device consists of a digital camera and a computing part, which are interconnected via a transmission medium.

Digitální kamera obsahuje přizpůsobovací obvody analogové části CCD nebo CMOS a komunikační rozhraní pro přenos digitalizovaných dat, které jsou spolu propojeny.The digital camera contains matching circuits of the analog part of the CCD or CMOS and a communication interface for the transmission of digitized data, which are interconnected.

Výpočetní část je tvořena jednotkou zpracování dat s CPU, rozhraním pro styk s okolím, řídicím a ovládacím modulem a vyhodnocovacím a diagnostickým modulem.The computing part consists of a data processing unit with a CPU, an interface for contact with the environment, a control and management module and an evaluation and diagnostic module.

-3 CZ 2019 - 167 A3-3 CZ 2019 - 167 A3

V modulu jsou integrovány algoritmus zmenšení obrazu průměrováním dle velikosti čtvercového okna, algoritmus derivace bezprostředně sousedících pixelů a binarizace obrazu, algoritmus filtru osamocených pixelů v obraze s definovaným detekčním rádiem, algoritmus histogramu výskytu anomálií v obraze a algoritmus odhadu pozice hledaných objektů. V modulu je integrován obecný ovládací a řídicí software pro chod zařízení.The module integrates the algorithm of image reduction by averaging according to the size of the square window, the algorithm of derivation of immediately adjacent pixels and image binarization, the algorithm of isolated pixels in the image with defined detection radius, the algorithm of histogram of image anomalies and the position estimation algorithm of searched objects. The module integrates general control and management software for device operation.

Způsob vyhodnocení obrazu podle vynálezu je velmi robustní a není významně ovlivněn uvedenými negativními vlivy, znehodnocujícími správnou analýzu obrazu.The method of image evaluation according to the invention is very robust and is not significantly affected by said negative influences, which devalue the correct analysis of the image.

Využití je možné například v prostředí automatizace, obecně při detekci povrchových vad při výrobě, v medicíně při hodnocení anomálií, při hledání určitých znaků na velké ploše, při hodnocení kvalitativních parametrů výrobků apod.It can be used, for example, in the environment of automation, generally in the detection of surface defects in production, in medicine in the evaluation of anomalies, in the search for certain features over a large area, in the evaluation of qualitative parameters of products, etc.

Objasnění výkresůExplanation of drawings

Vynález je blíže osvětlen s pomocí výkresů, na kterých je:The invention is further elucidated with the aid of the drawings, in which:

na obrázku 1 originální obraz z digitální kamery před úpravami, na obrázku 2 obraz upravený pomocí gradientu v ose X, na obrázku 3 výstupní obraz po aplikaci uvedené metody a na obrázku 4 blokové schéma zařízení pro zpracování obrazu.in Figure 1 an original image from a digital camera before adjustments, in Figure 2 an image adjusted with a gradient in the X-axis, in Figure 3 an output image after application of said method and in Figure 4 a block diagram of an image processing device.

Příklady uskutečnění vynálezuExamples of embodiments of the invention

Příklad 1Example 1

Zařízení 1 pro zpracování obrazu metodou postupného gradientu jasu obrazových pixelů v podélné ose je podle obrázku 4 tvořeno digitální kamerou 2, která je prostřednictvím přenosového média 6 jednosměrně propojena s výpočetní částí 3. Digitální kamera 2 obsahuje přizpůsobovací obvody 4 analogové části CCD nebo CMOS a komunikační rozhraní 5 pro přenos digitalizovaných dat. Přizpůsobovací obvod 4 je jednosměrně propojen s komunikačním rozhraním 5.The device 1 for processing the image by the method of gradual brightness gradient of image pixels in the longitudinal axis is according to Figure 4 formed by a digital camera 2, which is unidirectionally connected to the computing part 3 via a transmission medium 6. The digital camera 2 comprises matching circuits 4 of the analog CCD or CMOS part and communication interface 5 for transmission of digitized data. The matching circuit 4 is unidirectionally connected to the communication interface 5.

Výpočetní část 3 je tvořena jednotkou 7 zpracování dat s CPU, rozhraním 9 pro styk s okolím, řídicím a ovládacím modulem 10 a vyhodnocovacím a diagnostickým modulem 8.The computing part 3 consists of a data processing unit 7 with a CPU, an interface 9 for contact with the environment, a control module 10 and an evaluation and diagnostic module 8.

Jednotka 7 je s modulem 8, rozhraním 9 a modulem 10 spojena obousměrně.The unit 7 is connected to the module 8, the interface 9 and the module 10 in both directions.

V modulu 8 jsou integrovány algoritmus zmenšení obrazu průměrováním dle velikosti čtvercového okna, algoritmus derivace bezprostředně sousedících pixelů a binarizace obrazu, algoritmus filtru osamocených pixelů v obraze s definovaným detekčním rádiem, algoritmus histogramu výskytu anomálií v obraze a algoritmus odhadu pozice hledaných objektů.Module 8 integrates an algorithm for reducing the image by averaging according to the size of a square window, an algorithm for deriving immediately adjacent pixels and image binarization, an algorithm for isolated pixels in an image with a defined detection radius, an algorithm for histogram of image anomalies and position estimation algorithm.

V modulu 10 je integrován obecný ovládací a řídicí software pro chod zařízení LGeneral control and management software for the operation of the device L is integrated in the module 10

Zařízení 1 pro zpracování obrazu metodou postupného gradientu jasu obrazových pixelů v podélné ose pořídí prostřednictvím digitální kamey 2 obraz oblasti zájmu - vyražené číslo na ocelovém sochoru. Digitální obraz vzniká pomocí přizpůsobovacích obvodů 4 analogové části CCD nebo CMOS digitální kamery. Digitální obraz je převeden do maticové podoby, kdyThe image processing device 1 by the method of a gradual gradient of the brightness of the image pixels in the longitudinal axis acquires an image of the area of interest - the embossed number on the steel billet - by means of a digital camera 2. The digital image is created using the matching circuits 4 of the analog part of the CCD or CMOS of the digital camera. The digital image is converted to a matrix form when

-4 CZ 2019 - 167 A3 každému pixelu odpovídá vždy jedna konkrétní buňka matice. Digitální obraz má rozlišení 1920x1080, resp. velikost matice odpovídá hodnotě 1920 ve směru osy X a 1080 ve směru Y.-4 EN 2019 - 167 A3 Each pixel always corresponds to one specific cell of the matrix. The digital image has a resolution of 1920x1080, resp. the size of the matrix corresponds to 1920 in the X-axis direction and 1080 in the Y-direction.

Následně je obraz ve formě matice buněk přenesen pomocí komunikačního rozhraní 5 pro přenos digitalizovaných dat skrz přenosové médium 6, do výpočetní části 3 zařízení. Ve výpočetní části 3 je přítomná jednotka 7 zpracování dat s CPU, která iniciuje soustavu algoritmů obsažených ve vyhodnocovacím a diagnostickém modulu 8. V prvním kroku je provedena redukce rozlišení obrazu algoritmem pro zmenšení obrazu průměrováním, kdy je průměrování pixelů provedeno v uživatelsky definovaném čtvercovém okně. Pro redukci je použita velikost okna 5.Subsequently, the image in the form of a cell matrix is transmitted via a communication interface 5 for transmitting the digitized data through the transmission medium 6, to the computing part 3 of the device. In the computing part 3 there is a data processing unit 7 with a CPU, which initiates a set of algorithms contained in the evaluation and diagnostic module 8. In the first step, the image resolution is reduced by an image reduction algorithm by averaging, where the pixels are averaged in a user-defined square window. Window size 5 is used for reduction.

V redukovaném snímku je poté ve směru osy X provedena derivace jasových hodnot pixelů a pomocí prahování vytvořen binarizovaný snímek obsahující pouze černé a bílé pixely. Tento úkon je proveden pomocí algoritmu derivace bezprostředně sousedících pixelů a binarizace obrazu. Následně je provedeno prahování obrazu uživatelsky nastavitelnou hodnotou, kdy je tato hodnota prahem pro definici nového pixelu. V případě evaluace obrazu ocelového sochoru, který je snímán na přímém slunečním světle bude zvolena hodnota prahování 180. Tento úkon je proveden pomocí algoritmu derivace bezprostředně sousedících pixelů a binarizace obrazu.In the reduced image, the brightness values of the pixels are then derived in the X-axis direction, and a binarized image containing only black and white pixels is created by thresholding. This operation is performed using the algorithm of derivation of immediately adjacent pixels and image binarization. Subsequently, the image is thresholded by a user-adjustable value, which value is the threshold for defining a new pixel. In the case of evaluating the image of a steel billet, which is scanned in direct sunlight, a threshold value of 180 will be selected. This operation is performed using the algorithm of derivation of immediately adjacent pixels and binarization of the image.

Dále je provedena detekce osamocených pixelů v obraze, kdy je nastavena hodnota detekčního rádiusu 64. Tento úkon je proveden pomocí algoritmu filtrace osamocených pixelů v obraze.Furthermore, the detection of orphaned pixels in the image is performed, when the value of the detection radius is set to 64. This operation is performed using the algorithm of filtering orphaned pixels in the image.

Uvedeným postupem vznikne upravený obraz, který obsahuje pouze fragmenty původního originálního obrazu získaného pomocí digitální kamery 2.This procedure creates a modified image that contains only fragments of the original image obtained with the digital camera 2.

Dále je proveden výpočet histogramu četností světlých pixelů za účelem nalezení hledaných čísel na čele sochoru pomocí algoritmu histogram výskytu anomálií. Vznikne obdélníková oblast s největší pravděpodobností výskytu ražených čísel. Obdélníková oblast je poté transponována na originální obraz a odpovídající pixely jsou předloženy umělé neuronové síti k dalšímu posouzení. Obdélníková oblast pravděpodobného výskytu čísel je nalezena pomocí algoritmu odhad pozice hledaných objektů.Furthermore, a histogram of bright pixel frequencies is calculated in order to find the searched numbers at the face of the billet using the histogram algorithm of anomalies. The rectangular area with the highest probability of the occurrence of embossed numbers is created. The rectangular area is then transposed into the original image and the corresponding pixels are presented to the artificial neural network for further consideration. The rectangular area of probable occurrence of numbers is found using the algorithm for estimating the position of searched objects.

Průmyslová využitelnostIndustrial applicability

Vynález lze využít jako vstupní filtr pro digitální obraz, před jeho dalším zpracováním např. umělou neuronovou sítí, nebo pro detekci pozice jasové anomálie v obraze. Metoda je použitelná všude tam, kde dochází ke změnám v osvětlení snímaných předloh, popř. tam, kde je rušivé pozadí, znesnadňující detekci objektů v obraze (rýhy po kotoučové pile, jasový gradient světla čelní strany objektu jako důsledek stříhání, jasový gradient světla čelní strany objektu při pálení plazmou apod.).The invention can be used as an input filter for a digital image, before its further processing, eg by an artificial neural network, or for detecting the position of a luminance anomaly in an image. The method can be used wherever there are changes in the lighting of scanned originals, or. where there is a disturbing background, making it difficult to detect objects in the image (scratches on a circular saw, luminance gradient of light on the front of the object as a result of cutting, luminance gradient of light on the front of the object during plasma burning, etc.).

Claims (2)

PATENTOVÉ NÁROKYPATENT CLAIMS 1. Způsob zpracování obrazu metodou postupného gradientu jasu obrazových pixelů v podélné ose, vyznačující se tím, že se postupně provedou následující kroky:A method of image processing by a method of successive gradient of brightness of image pixels in the longitudinal axis, characterized in that the following steps are performed sequentially: a) je vytvořen digitální obraz oblasti zájmu s možnou povrchovou vadou, anomálií,a) a digital image of the area of interest is created with a possible surface defect, anomaly, b) digitální obraz je převeden do maticové podoby,b) the digital image is converted into a matrix form, c) je provedena redukce rozlišení obrazu pomocí průměrování pixelů v uživatelsky definovaném čtvercovém okně,c) the image resolution is reduced by averaging the pixels in a user-defined square window, -5 CZ 2019 - 167 A3-5 CZ 2019 - 167 A3 d) v redukovaném snímku je poté ve směru osy X, nebo Y, provedena derivace jasových hodnot pixelů a pomocí prahování vytvořen nový binarizovaný snímek ad) in the reduced image, the brightness values of the pixels are then derived in the direction of the X or Y axis and a new binarized image is created by thresholding, and e) v derivovaném obraze je provedeno vyhledání osamocených pixelů a tyto jsou z obrazu odstraněny.e) a single pixel search is performed in the derived image and these are removed from the image. 2. Zařízení (1) pro zpracování obrazu způsobem podle nároku 1, vyznačující se tím, že je tvořeno digitální kamerou (2) a výpočetní částí (3), kde digitální kamera (2) obsahuje přizpůsobovací obvody (4) analogové části CCD nebo CMOS a komunikační rozhraní (5) pro přenos digitalizovaných dat a výpočetní část (3) je tvořena jednotkou (7) zpracování dat s CPU, vyhodnocovacím a diagnostickým modulem (8), rozhraním (9) pro styk s okolím a řídícím a ovládacím modulem (10), přičemž v modulu (8) jsou integrovány algoritmus zmenšení obrazu průměrováním dle velikosti čtvercového okna, algoritmus derivace bezprostředně sousedících pixelů a binarizace obrazu, algoritmus filtru osamocených pixelů v obraze s definovaným detekčním rádiem, algoritmus histogramu výskytu anomálií v obraze a algoritmus odhadu pozice hledaných objektů, v modulu (10) je integrován obecný ovládací a řídicí software pro chod zařízení (1), digitální kamera (2) je s výpočetní částí (3) jednosměrně propojena prostřednictvím přenosového média (6), přizpůsobovací obvod (4) je jednosměrně propojen s komunikačním rozhraním (5) a jednotka (7) je obousměrně propojena s modulem (8), rozhraním (9) a modulem (10).The image processing device (1) according to the method of claim 1, characterized in that it consists of a digital camera (2) and a computing part (3), wherein the digital camera (2) comprises matching circuits (4) of the analog part of the CCD or CMOS. and a communication interface (5) for the transmission of digitized data and the computing part (3) consists of a data processing unit (7) with a CPU, an evaluation and diagnostic module (8), an interface (9) for contact with the environment and a command and control module (10). ), while the module (8) integrates the algorithm of image reduction by averaging according to the size of the square window, the algorithm of derivation of immediately adjacent pixels and image binarization, algorithm of isolated pixels in the image with defined detection radio, algorithm of histogram of occurrence of anomalies in the image objects, the module (10) integrates general control and management software for the operation of equipment (1) , the digital camera (2) is unidirectionally connected to the computing part (3) via a transmission medium (6), the adaptation circuit (4) is unidirectionally connected to the communication interface (5) and the unit (7) is bidirectionally connected to the module (8), interface (9) and module (10).
CZ2019167A 2019-03-20 2019-03-20 A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for this CZ308988B6 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CZ2019167A CZ308988B6 (en) 2019-03-20 2019-03-20 A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for this

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CZ2019167A CZ308988B6 (en) 2019-03-20 2019-03-20 A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for this

Publications (2)

Publication Number Publication Date
CZ2019167A3 true CZ2019167A3 (en) 2020-02-19
CZ308988B6 CZ308988B6 (en) 2021-11-10

Family

ID=69522905

Family Applications (1)

Application Number Title Priority Date Filing Date
CZ2019167A CZ308988B6 (en) 2019-03-20 2019-03-20 A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for this

Country Status (1)

Country Link
CZ (1) CZ308988B6 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CZ2021604A3 (en) * 2021-12-31 2023-06-21 Univerzita Hradec Králové A method of measuring the distribution of dust particles in space and time and a device for this

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140684A (en) * 2005-11-15 2007-06-07 Toshiba Corp Image processor, method and program
US9734568B2 (en) * 2014-02-25 2017-08-15 Kla-Tencor Corporation Automated inline inspection and metrology using shadow-gram images

Also Published As

Publication number Publication date
CZ308988B6 (en) 2021-11-10

Similar Documents

Publication Publication Date Title
Cho et al. Development of real-time vision-based fabric inspection system
EP1400922B1 (en) Print inspection method
CN109242853B (en) PCB defect intelligent detection method based on image processing
KR101635461B1 (en) System and Method for Automatically Detecting a Mura Defect using Mask Filtering in Wavelet Transform
JP6208426B2 (en) Automatic unevenness detection apparatus and automatic unevenness detection method for flat panel display
KR20090066212A (en) Defect detection method and defect detection apparatus
CN110378902B (en) Scratch detection method under high noise background
CN106204617B (en) Adapting to image binarization method based on residual image histogram cyclic shift
CN105447489B (en) A kind of character of picture OCR identifying system and background adhesion noise cancellation method
JP2018506046A (en) Method for detecting defects on the tire surface
JP2018096908A (en) Inspection device and inspection method
CZ2019167A3 (en) A method of processing an image by a gradual brightness gradient method of image pixels along a longitudinal axis and the apparatus for the method
KR101557271B1 (en) Method for detecting a circle-type object and approximating a substitute circle based on Image processing
CN113971681A (en) Edge detection method for belt conveyor in complex environment
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP2004296592A (en) Defect classification equipment, defect classification method, and program
WO2020175666A1 (en) Color filter inspection device, inspection device, color filter inspection method, and inspection method
CN115343313A (en) Visual identification method based on artificial intelligence
CN115018829A (en) Glass flaw positioning method and device
KR102272745B1 (en) Inspection System and Method for Compact Camera Module Cover
CN113658135A (en) Fuzzy PID (proportion integration differentiation) -based self-adaptive dimming belt foreign matter detection method and system
CN111882537A (en) Visual inspection method and system
CN116630425B (en) Intelligent food detection system based on X rays
CZ34042U1 (en) Apparatus for performing pre-processed image processing by the K-means type clustering method
TWI738295B (en) Aoi apparatus for product manufactured roll-to-roll process and aoi method by using the same