Learning Object Representation Andrej Lúčny Department of Applied Informatics Faculty of Mathematics, Physics and Informatics Comenius University, Bratislava
Regular objects few parameters fully describe the object recognize object = specify its parameters
Regular objects e.g. Hough transform Conversion of image to parameters
Image Three arrays r[h,w], g[h,w], b[h,w], values corresponding to color ingredients
Red ingredient
Green ingredient
Blue ingredient
Intensity map bw[i,j] = 0.3*r[i,j] *g[i,j] *b[i,j]
Looking for edges: one line can be represented as a function
column intensity Edges corresponds to sharp sectors
Sobel operator a i-1,j-1 a i-1,j a i-1,j+1 a i,j-1 a i,j a i,j+1 a i+1,j-1 a i+1,j a i+1,j+1 b i,j º = dx i,j = a i-1,j+1 + 2a i,j+1 + a i+1,j+1 - a i-1,j-1 - 2a i,j-1 - a i+1,j-1 a i-1,j-1 a i-1,j a i-1,j+1 a i,j-1 a i,j a i,j+1 a i+1,j-1 a i+1,j a i+1,j+1 b i,j º = dy i,j = a i+1,j-1 + 2a i+1,j + a i+1,j+1 - a i-1,j-1 - 2a i-1,j – a i-1,j+1
Sobel operator approximated image derivation (gradient) Concerning a threshold Sobel operator indicates us edges threshold
Sobel operator |dx||dy|
Sobel operator |grad| = √ (dx + dy ) 2 2
Binary image
Thinning ?? ? ? ?? ? ? ? ??? ?? ? ?? ? ??
Hough transform Example: Circle Task: how to turn thinned image to circle parameters Paramaters: center x-coordinate center y-coordinate radius x y r
Hough transform Each parameter has a particular range E.g. for image with resolution 320 x 240 : Range of center x-coordinate is Range of center y-coordinate is Range of radius is We evaluate probability of each tupple (x,y,r) from the given range
Hough transform x y The probability P[x,y,r] is given by number of witnesses, i.e. white pixels on thinned image which would be white if one draws circle with parameters x,y,r. r
Hough transform Circle is recognized !
Irregular objects Parameters of irregular objects are not clear ! It is better look an universal method how to learn their representation
Irregular objects e.g. Dominant orientation templates How such objects are represented?
Simple but fast and efficient method Dominant orientation templates (DOT)
Motivation template image dealing with thinned edges
Edges detector Canny intensity |gradient| orientations |dx| thinned edges |dy|
Orientations (dx, dy)
Template based on the orientations
Template object is covered by non-overlapping regions
Template We concern orientation of any pixel in region, which lies on edge
Template We select set of dominant (prevailing) orientations
Template We have such set of few dominant templates for each region
Template The sets of dominant orientations form the representation of the object
How to use the template We cover image by regions and select one most dominant orientation for each region template image
How to use template Object is found if for the most of regions the dominant orientation from image is an element of the set of dominant orientations in template templateimage
Basic formal expression I – current image O – image from which the template is created c – position on the image I R – region c + R – corresponding region put to position c DO( O, R ) : set of (maximally k) dominant orientations in region R in template, i.e. on the image O do( I, R ) : dominant orientation in region R in the current image I do( X, R ) = DO( X, R ) for k = 1 δ(x) = x ? 1 : 0 where x is true or false
Does it work ? Yes, if we put region R to proper position c No, otherwise Therefore we will need more templates for various positioning of regions templates positions …
Advanced formal expression I – current image O – image from which the template is created w(O,M) – image O shifted by M c – position on the image I R – region, c + R – corresponding region put to position c DO( O, R ) : set of (maximally k) dominant orientations in region R in template, i.e. on the image O do( I, R ) : dominant orientation in region R in the current image I δ(x) = x ? 1 : 0 where x is true or false
More effective but less precise approach We can summarize more overlapping templates to one. We simply add orientations from overlapping regions. Such template must fit regardless shifting, but can detect also phantoms integrated template templates …
Formalism of the efficient approach I – current image O – image from which the template is created w(O,M) – image O shifted by M c – position on the image I R – region, c + R – corresponding region put to position c DO( O, R ) : set of (maximally k) dominant orientations in region R in template, i.e. on the image O do( I, R ) : dominant orientation in region R in the current image I δ(x) = x ? 1 : 0 where x is true or false =
More viewpoints Still one template represents the object from one viewpoint only Therefore we need to create more templates from various viewpoints Again we can integrate more templates which are similar enough to one (in the same way as shifted templates)
DOT efficiency Belonging of orientation to a template can be represented by bits 0 or 1 and all DOT can be expressed in form of bit operations Therefore DOT is very fast and running in real time
Object border DOT can provide also approximate border of the object. It is created by those edge pixels for which we have found their orientation in the template
How to get template? Scan object put to contrast scene by camera from various viewpoints (i.e. not in the natural scene but under specific conditions) or separate object from scene by another method (e.g. by movement detector)
Failure of recognition pattern Failure or creativity ? phantom
Further study Hinterstoisser, S. - Lepetit, V. - Ilic, S. - Fua, P. - Navab, N.: Dominant Orientation Templates for Real-Time Detection of Texture-Less Objects. IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), San Francisco, California (USA), June 2010
Thank you ! Andrej Lúčny Department of Applied Informatics Faculty of Mathematics, Physics and Informatics Comenius University, Bratislava