GmImgProc Alexandra Olteanu SCPD Alexandru Ştefănescu SCPD.

Slides:



Advertisements
Similar presentations
OpenMP Optimization National Supercomputing Service Swiss National Supercomputing Center.
Advertisements

QR Code Recognition Based On Image Processing
SE263 Video Analytics Course Project Initial Report Presented by M. Aravind Krishnan, SERC, IISc X. Mei and H. Ling, ICCV’09.
Starting Parallel Algorithm Design David Monismith Based on notes from Introduction to Parallel Programming 2 nd Edition by Grama, Gupta, Karypis, and.
Prénom Nom Document Analysis: Document Image Processing Prof. Rolf Ingold, University of Fribourg Master course, spring semester 2008.
An Adaptive Image Enhancement Algorithm for Face Detection By Lizuo Jin, Shin’ichi Satoh, and Masao Sakauchi. ECE 738 In Young Chung.
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Copyright © 2012 Elsevier Inc. All rights reserved.. Chapter 4 Thresholding Techniques.
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
Foreground Background detection from video Foreground Background detection from video מאת : אבישג אנגרמן.
Morphology – Chapter 10. Binary image processing Often it is advantageous to reduce an image from gray level (multiple bits/pixel) to binary (1 bit/pixel)
An article by: Itay Bar-Yosef, Nate Hagbi, Klara Kedem, Itshak Dinstein Computer Science Department Ben-Gurion University Beer-Sheva, Israel Presented.
Otsu’s Thresholding Method Based on a very simple idea: Find the threshold that minimizes the weighted within-class variance. This turns out to be the.
Modeling Pixel Process with Scale Invariant Local Patterns for Background Subtraction in Complex Scenes (CVPR’10) Shengcai Liao, Guoying Zhao, Vili Kellokumpu,
EE 7730 Image Segmentation.
HCI Final Project Robust Real Time Face Detection Paul Viola, Michael Jones, Robust Real-Time Face Detetion, International Journal of Computer Vision,
MRI Image Segmentation for Brain Injury Quantification Lindsay Kulkin 1 and Bir Bhanu 2 1 Department of Biomedical Engineering, Syracuse University, Syracuse,
Contents Description of the big picture Theoretical background on this work The Algorithm Examples.
Segmentation Divide the image into segments. Each segment:
Digital Image Processing
Objective of Computer Vision
Image Enhancement.
Objective of Computer Vision
Smart Traveller with Visual Translator. What is Smart Traveller? Mobile Device which is convenience for a traveller to carry Mobile Device which is convenience.
California Car License Plate Recognition System ZhengHui Hu Advisor: Dr. Kang.
Real-Time Face Detection and Tracking Using Multiple Cameras RIT Computer Engineering Senior Design Project John RuppertJustin HnatowJared Holsopple This.
Department of Electrical Engineering National Cheng Kung University
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
Efficient Parallel Implementation of Molecular Dynamics with Embedded Atom Method on Multi-core Platforms Reporter: Jilin Zhang Authors:Changjun Hu, Yali.
This module was created with support form NSF under grant # DUE Module developed by Martin Burtscher Module B1 and B2: Parallelization.
Predictive Runtime Code Scheduling for Heterogeneous Architectures 1.
BACKGROUND LEARNING AND LETTER DETECTION USING TEXTURE WITH PRINCIPAL COMPONENT ANALYSIS (PCA) CIS 601 PROJECT SUMIT BASU FALL 2004.
Architectural Support for Fine-Grained Parallelism on Multi-core Architectures Sanjeev Kumar, Corporate Technology Group, Intel Corporation Christopher.
S EGMENTATION FOR H ANDWRITTEN D OCUMENTS Omar Alaql Fab. 20, 2014.
CS 6825: Binary Image Processing – binary blob metrics
OpenMP OpenMP A.Klypin Shared memory and OpenMP Simple Example Threads Dependencies Directives Handling Common blocks Synchronization Improving load balance.
Independent Component Analysis (ICA) A parallel approach.
Texture. Texture is an innate property of all surfaces (clouds, trees, bricks, hair etc…). It refers to visual patterns of homogeneity and does not result.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Fast Support Vector Machine Training and Classification on Graphics Processors Bryan Catanzaro Narayanan Sundaram Kurt Keutzer Parallel Computing Laboratory,
Quadtrees, Octrees and their Applications in Digital Image Processing.
Automatic Minirhizotron Root Image Analysis Using Two-Dimensional Matched Filtering and Local Entropy Thresholding Presented by Guang Zeng.
Digital Image Processing Lecture 18: Segmentation: Thresholding & Region-Based Prof. Charlene Tsai.
Terrorists Team members: Ágnes Bartha György Kovács Imre Hajagos Wojciech Zyla.
G52IVG, School of Computer Science, University of Nottingham 1 Edge Detection and Image Segmentation.
Data Extraction using Image Similarity CIS 601 Image Processing Ajay Kumar Yadav.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
JPEG-GPU: A GPGPU IMPLEMENTATION OF JPEG CORE CODING SYSTEMS Ang Li University of Wisconsin-Madison.
CS654: Digital Image Analysis
Non-Photorealistic Rendering and Content- Based Image Retrieval Yuan-Hao Lai Pacific Graphics (2003)
Digital Image Processing Lecture 10: Image Restoration
Parallelization of likelihood functions for data analysis Alfio Lazzaro CERN openlab Forum on Concurrent Programming Models and Frameworks.
Zhongyan Liang, Sanyuan Zhang Under review for Journal of Zhejiang University Science C (Computers & Electronics) Publisher: Springer A Credible Tilt License.
Wonjun Kim and Changick Kim, Member, IEEE
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Color Image Segmentation Mentor : Dr. Rajeev Srivastava Students: Achit Kumar Ojha Aseem Kumar Akshay Tyagi.
Tuning Threaded Code with Intel® Parallel Amplifier.
IMAGE SEGMENTATION USING THRESHOLDING
1-Introduction (Computing the image histogram).
Computer Vision Lecture 5: Binary Image Processing
Other Algorithms Follow Up
Binary Image Analysis: Part 1 Readings: Chapter 3: 3.1, 3.4, 3.8
Binarization of Low Quality Text Using a Markov Random Field Model
Otsu’s Thresholding Method
Binary Image Analysis: Part 1 Readings: Chapter 3: 3.1, 3.4, 3.8
Department of Computer Engineering
Image Segmentation.
Computer and Robot Vision I
Presentation transcript:

GmImgProc Alexandra Olteanu SCPD Alexandru Ştefănescu SCPD

Image processing for OCR and content extraction Implies a set of costly operations like: - Binarization – the resulted image is formed by two classes separated by a threshold t : foreground and background - Noise detection - Clustering for creating meta-entities (ex: characters, lines) - Detection and/or classification of page components: line, table, character, frame, image, etc - Skew Detection and correction - Geometrical distortions correction - And the list may continue For this project our aim was to implement methods for image binarization and to try different solutions to improve our results and to remove noise: Otsu 1D Otsu 2D Niblack Color Uniformization

Input (grayscale)

Otsu 1D

Otsu 2D

Niblack

Color Uniformization (intermediate grayscale)

Color Uniformization + Otsu 1D

Otsu 1D Otsu method is based on a very simple idea: find the threshold that minimizes the weighted within-class variance, defined as a weighted sum of variances of the two classes. Advantages: This method is fast because operates directly on the gray level histogram. It provides very good results when the numbers of pixels in each class are close to each other. ω i are the probabilities of the two classes separated by a threshold t are variances of these classes This can be demonstrated to be the same as maximizing the between-class variance. where μ i represent the class means Implementation: we simply compute the class means and their probabilities

Otsu 1D parallelization using OpenMP ONT = OMP_NUM_THREADS

Observations granularity => good fast serial algorithm => low speedup load balance => good Profiling results: CPU time utilization => very good hot spot => histogram computation

Otsu 2D  considers both the gray value of a pixel and the average gray value of it neighborhood  pixels are partitioned into two classes by a threshold pair (s, t), where s is gray level of a pixel and t it's local average gray level  Otsu 2D method is based on the same principles as classic Otsu  it uses the two dimensional histogram  by using the trace of the between-class variance matrix as the measurement of between class variance and maximizing it we select the corresponding threshold (s, t) for this value. Implementation: we use a fast recursive algorithm to implement Otsu 2D method. Advantages: more robust to noise than Otsu 1D provides very good results when the numbers of pixels in each class are close to eachother

Otsu 2D parallelization using OpenMP ONT = OMP_NUM_THREADS

Observations in OpenMP 2.5 and in earlier versions the nested parallelism can be exploit only by using nested parallel regions granularity => good atomic constructs introduce synchronization overhead load imbalance – conditional instructions Profiling results: hot spot => local average gray level computation

Otsu 2D tuned with OpenCL CPU: Intel Core 2 Duo, T7500, 2. 2 GHz, 1.99 GB RAM - Display Mobile Intel(R) 965 OpenCL (seconds)Serial (seconds) Image size 11 MB44 MB62 MB11 MB44 MB62 MB Transform data into CL structures Create CL context, buffers etc Runtime Copy computed data from CL structures into app structures TOTAL time Helped by Iulian Milas

Niblack Niblack’s method is a local threshold binarization method which involves computing for each pixel in the grayscale image the mean and standard deviation of the colors of the neighboring pixels in an area (window) of predefined size. The threshold for determining if the pixel will be black or white is computed by the formula: where k is a constant, preselected coefficient. Implementation: We simply slide the window onto each pixel and recompute the mean and standard deviation. Assessment: does not involve a unique threshold for the entire image and thus is adaptable for local particularities had worst results in our tests, despite being considered the best binarization method for text images is much slower than other methods.

Niblack parallelization using OpenMP ONT = OMP_NUM_THREADS

Observations granularity => good trivial to parallelize each iteration is completely independent on the rest load balancing easy to achieve CPU wait time practically zero (except for I/O) Profiling results: hot spot => computing mean and stdev

Image color uniformization  is a preprocessing technique for grayscale images before the binarization step.  creates an intermediate grayscale image which binarized with global methods like Otsu 1D or Otsu 2D produces better results than without the preprocessing  the main idea is to “diffuse” color differences weighted by distances between neighboring pixels  each pixel in the intermediate image is computed using the following sum, for the pixels in a neighboring area (window) of predefined size: for every pixel of coordinated (x’, y’) located in the window W centered in (x, y)  in the end, the sums are scaled to 0 – 255 to correspond to a level of gray. Implementation: We simply slide the window onto each pixel and recompute the mean and standard deviation. Assessment: obtained a great improvement in the image binarized with Otsu 1D and Otsu 2D using this preprocessing step as compared to binarizing without it. similar to Niblack’s method, it is very slow.

Parallelization of Color Uniformization algorithm with OpenMP ONT = OMP_NUM_THREADS

Observations similar to Niblack’s method granularity => good each iteration is completely independent on the rest CPU wait time practically zero (except for I/O) Profiling results: hot spot => computing the sum

Conclusions (what we’ve learned!) OpenMP:  reducing false sharing => making use of private data as much as possible  parallelize at the highest level possible  make parallel regions as large as possible to reduce parallelization overhead  use CRITICAL sections for fine-grained locking  the work should be distributed evenly across the threads  NOWAIT clause => to eliminate redundant or unnecessary barriers  we also compiled with Intel C++ but we obtained similar results (but we hated it)  profiling was made on a two core system OpenCL:  very fast  does not support bidimensional arrays  setting up the OpenCL kernel for running is very complicated

Q&A..and autographs