Brick recognition