Multimedia processing
Image recognition

A common problem with images is determining whether an image contains some specific object, or feature. This problem is currently solved only for specific object (we are looking for faces), but not for arbitrary objects on a image (e.g. list what you see on this particular image). Therefore we recognize multiple areas of recognition, such as:

- Barcodes – barcode consists of bars of varying width representing digits. These widths are of course relative, therefore bars have to be scaled and approximate matches have to be found.
- 2D codes – also known as QR codes, or matrix codes are basically a 2D barcodes, which can store much more data than simple barcodes. They can store various types of data, such as URLs, numbers, or text. They can be of various size and density and contain RS codes with embedded data correction capability
- Optical Character Recognition (OCR) – identifying characters in images of printed or handwritten text, which basically is specific pattern recognition.
- Fingerprint identification – a pattern based algorithm compares basic fingerprint patterns (arches, loops and whorls) in an image with predefined template (original finger scan)
- Specific detection – image is scanned for certain conditions, such as movements in digital security cameras
- Face recognition – an image is searched face patterns
- Object recognition – one or several pre-specified or learned objects or object classes can be recognized, such as augmented reality programs like Nokia Lens, or Google Goggles

Each recognition type uses its own algorithm, which can be simple, or advanced – such as use of advanced statistics and neural networks. As an example we provide a simple face detection algorithm with forehead and chin detection on images with defined pixel sizes.

## Face points detection

Facial feature detection is based on human skin chromacity and morphological characteristics of the human head. Output of the skin detection is used to isolate further important points of the analyzed face. As the first step of detection, noise has to be removed, with use of low band-pass filter. This is necessary in order to avoid unwanted (and incorrect) detections. Next step would be edge detection, via a special Sobel filter. After this necessary „preparation“, the preprocessed picture can be used to start detection of major face elements (eye, nose, mouth, chin…) based on known characteristics of these elements.

Chin detection starts in the area below the lower lip, with the actual search proceeding down. The boundary of horizontal search is approximately in the third of the image (this assumption is based on the image size and image position criteria). We look for image area where the edge enters the image followed by sharp rise, which is the end of chin.

The detection is comparing the horizontal distance of two points, both of which are on the edge. The Y position of the second point is less by 10 pixels (this value is valid only for our algorithm with specific size of picture). If the horizontal distance of these points is bigger than expected, the point is designated as the chin.

The area of forehead detection is in the first third in horizontal direction, and in the first quarter in vertical direction of the image. We want to find the point where hair meets the skin.

For this detection the output of skin detection is used, too. We are looking for a point on the edge. Than we start to search the “Skin detect” image, right direction of this point. When the search finds the point with color value 255 (hair color in RGB in the output picture for skin detection) it looks on the difference of its X position and X position of the edge point. If the difference is lower than the given value, we found the point of forehead.

Chin detection
Forehead detection

Based on face points detection a general 3D model of human head can be deformed and personalized.