Embedded Systems CSEE W4840. Design Document. Hardware implementation of connected component labelling

Similar documents
Chapter 17. Shape-Based Operations

Game Console Design. Final Presentation. Daniel Laws Comp 499 Capstone Project Dec. 11, 2009

Image Forgery. Forgery Detection Using Wavelets

Interactive 1 Player Checkers. Harrison Okun December 9, 2015

4.5.1 Mirroring Gain/Offset Registers GPIO CMV Snapshot Control... 14

Motion Detection Keyvan Yaghmayi

Gomoku Player Design

Digital Image Processing Lec.(3) 4 th class

PLazeR. a planar laser rangefinder. Robert Ying (ry2242) Derek Xingzhou He (xh2187) Peiqian Li (pl2521) Minh Trang Nguyen (mnn2108)

Proc. IEEE Intern. Conf. on Application Specific Array Processors, (Eds. Capello et. al.), IEEE Computer Society Press, 1995, 76-84

A Modified Image Template for FELICS Algorithm for Lossless Image Compression

Computer Graphics (CS/ECE 545) Lecture 7: Morphology (Part 2) & Regions in Binary Images (Part 1)

Design of Parallel Algorithms. Communication Algorithms

Raster Based Region Growing

Spring 06 Assignment 2: Constraint Satisfaction Problems

GENERALIZATION: RANK ORDER FILTERS

Matlab for CS6320 Beginners

Finger print Recognization. By M R Rahul Raj K Muralidhar A Papi Reddy

AUTOMATIC INSPECTION SYSTEM FOR CMOS CAMERA DEFECT. Byoung-Wook Choi*, Kuk Won Ko**, Kyoung-Chul Koh***, Bok Shin Ahn****

PAC XON CSEE 4840 Embedded System Design

i1800 Series Scanners

Chapter 6. [6]Preprocessing

Information hiding in fingerprint image

Lane Detection in Automotive

An Embedded Pointing System for Lecture Rooms Installing Multiple Screen

An Implementation of LSB Steganography Using DWT Technique

Automatics Vehicle License Plate Recognition using MATLAB

Image Processing : Introduction

Compression Method for Handwritten Document Images in Devnagri Script

Spring 06 Assignment 2: Constraint Satisfaction Problems

Hardware-based Image Retrieval and Classifier System

Robocup Electrical Team 2006 Description Paper

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

EDB9300UE Manual. Oscilloscope function

Lane Detection in Automotive

Efficient Car License Plate Detection and Recognition by Using Vertical Edge Based Method

Implementing VID Function with Platform Manager 2

RTTY: an FSK decoder program for Linux. Jesús Arias (EB1DIX)

Coding for Efficiency

DI-1100 USB Data Acquisition (DAQ) System Communication Protocol

Princeton ELE 201, Spring 2014 Laboratory No. 2 Shazam

A New Connected-Component Labeling Algorithm

Real-Time Face Detection and Tracking for High Resolution Smart Camera System

Design Description Document - 1D FIR Filter

Image Processing - License Plate Localization and Letters Extraction *

Universiteit Leiden Opleiding Informatica

HUFFMAN CODING. Catherine Bénéteau and Patrick J. Van Fleet. SACNAS 2009 Mini Course. University of South Florida and University of St.

Fantastic Tetris. Design Report

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

Spartan Tetris. Sources. Concept. Design. Plan. Jeff Heckey ECE /12/13.

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

SPIHT Algorithm with Huffman Encoding for Image Compression and Quality Improvement over MIMO OFDM Channel

Evaluation of Visual Cryptography Halftoning Algorithms

L2. Image processing in MATLAB

X9 REGISTRY FOR CHECK IMAGE TESTS

The Use of Non-Local Means to Reduce Image Noise

Robert Collins CSE486, Penn State. Lecture 3: Linear Operators

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

TECHNICAL REPORT VSG IMAGE PROCESSING AND ANALYSIS (VSG IPA) TOOLBOX

A NOVEL APPROACH FOR CHARACTER RECOGNITION OF VEHICLE NUMBER PLATES USING CLASSIFICATION

Guidance on Using Scanning Software: Part 6. Canon ScanGear

The KNIME Image Processing Extension User Manual (DRAFT )

CMPUT 657: Heuristic Search

i800 Series Scanners Image Processing Guide User s Guide A-61510

EE307. Frogger. Project #2. Zach Miller & John Tooker. Lab Work: 11/11/ /23/2008 Report: 11/25/2008

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

AN EXTENDED VISUAL CRYPTOGRAPHY SCHEME WITHOUT PIXEL EXPANSION FOR HALFTONE IMAGES. N. Askari, H.M. Heys, and C.R. Moloney

Decision Based Median Filter Algorithm Using Resource Optimized FPGA to Extract Impulse Noise

Acute Lymphocytic Leukemia Detection and Classification (ALLDC) System

Ultrasonic Positioning System EDA385 Embedded Systems Design Advanced Course

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

Follower Robot Using Android Programming

Automatic Electricity Meter Reading Based on Image Processing

An Improved Bernsen Algorithm Approaches For License Plate Recognition

Chapter 6 EXPERIMENTAL VERIFICATION

Register Allocation by Puzzle Solving

GTBIT ECE Department Wireless Communication

3G TR 25.xxx V0.0.1 ( )

Image Representation and Processing

Image processing for gesture recognition: from theory to practice. Michela Goffredo University Roma TRE

Chapter 3 Graphics and Image Data Representations

I. INTRODUCTION II. EXISTING AND PROPOSED WORK

EE368/CS232 Digital Image Processing Winter Homework #3 Released: Monday, January 22 Due: Wednesday, January 31, 1:30pm

A SURVEY ON COLOR IMAGE SEGMENTATION BY AUTOMATIC SEEDED REGION GROWING

Introduction. EN Raster Graphics 6-1

Area Extraction of beads in Membrane filter using Image Segmentation Techniques

EE 314 Spring 2003 Microprocessor Systems

MRI Grid. The MRI Grid is a tool in MRI Cell Image Analyzer, that can be used to associate measurements with labeled positions on a board.

-f/d-b '') o, q&r{laniels, Advisor. 20rt. lmage Processing of Petrographic and SEM lmages. By James Gonsiewski. The Ohio State University

Image Filtering in VHDL

AutoBench 1.1. software benchmark data book.

Improved RGB -LSB Steganography Using Secret Key Ankita Gangwar 1, Vishal shrivastava 2

VISUAL CRYPTOGRAPHY for COLOR IMAGES USING ERROR DIFFUSION AND PIXEL SYNCHRONIZATION

DICOM Correction Item

UW Campus Navigator: WiFi Navigation

The ST7588T is a driver & controller LSI for graphic dot-matrix liquid crystal display systems. It contains 132 segment and 80

EC O4 403 DIGITAL ELECTRONICS

LC-10 Chipless TagReader v 2.0 August 2006

IMPLEMENTATION USING THE VAN HERK/GIL-WERMAN ALGORITHM

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Transcription:

Embedded Systems CSEE W4840 Design Document Hardware implementation of connected component labelling Avinash Nair ASN2129 Jerry Barona JAB2397 Manushree Gangwar MG3631 Spring 2016

Table of Contents TABLE OF CONTENTS... 2 PREFACE... 3 LINUX... 3 Image Storage... 3 Main Program... 3 Preconditioning data for Image Processing... 3 Padding... 3 Block Processing... 4 Driver implementation... 8 FPGA... 8 RAM implementation... 8 Control Byte and States... 9 Connected component labelling on FPGA... 9 First scan... 11 Second scan... 12

Preface This document describes the components and procedures that constitute of the project. It mainly consists of two parts involving the two interacting interfaces (Linux and FPGA). The entities and algorithms within each interfaces are also described. For deeper understanding of the procedures, flowcharts have been added. Linux Image Storage The images that would be used for connected component identification will be captured beforehand and will be stored in the SoCkit board memory. The images would be read from the files with the help of OpenCV library functions. Each image is then processed to identify and label connected components. Main Program This program will be responsible for reading the images stored in the memory, dividing the pixel data into blocks of size MxN, transmitting the pixel information in each of the blocks to the FPGA for processing, retrieving the processed pixel data and recombining it into a single image. Preconditioning data for Image Processing Padding The first stage of processing involves padding the image with a single pixel wide border. This is done in order to make the algorithm on the FPGA simpler by not having to handle edge cases.

Block Processing We do not have enough memory on the FPGA to process the entire image in a single shot. Instead, we need to divide the input image into overlapping blocks of size B. The overlap between adjacent blocks would be at-most 1 row and 1 column. The overlapping allows us to avoid dealing with boundary cases separately and reduces the number of duplicate (equivalent) labels that get generated. Each block of size B then needs to be sent to the FPGA for processing. The processing happens in three stages. In the first stage, we do a raster scan of each block, threshold each grayscale pixel and assign it a label if it s a foreground pixel. If the algorithm detects an equivalence between two labels it stores this information in a LUT. The second stage, we do another raster scan of the block to resolve any ambiguities in labeling with the help of the LUT created in the first stage. The third stage, is used to display the results on a monitor. The transfer of pixel data corresponding to each block happens in two steps. We first send a command bit to the FPGA, through the device driver, to tell it which stage of processing needs to be done on the data that it receives. This is then followed by the pixel data of the block that needs to be processed. Once the data is transferred, the program waits till it receives the processed data. The original image s pixel values are replaced with the processed pixel values before sending the next block of data. The following is the flowchart of the program:

Driver implementation A device driver compiled into the kernel will be implemented. The driver will allow the copying to and from the user interface (C code that manages the blocks of pixel information split from the original input image) and the kernel space, which subsequently will be copied or read to a memory location in the FPGA, implemented by RAM. RAM implementation FPGA In order to store the pixel information in the FPGA memory location which the FPGA will process, a RAM will be implemented. Each memory address will hold a byte-size memory

location. The total RAM capacity will be B bytes equivalent to the size of a single block of pixels plus one control byte which will be transmitted at the beginning of each block from the C code. Therefore, every block pixel will be stored in individual addresses each. Control Byte and States Because the size of the input image will largely exceed the memory capacity of the FPGA, the input image will be split in blocks of identical size which will be processed one at a time by the system. After a block is processed, the resulting block will be sent back to the C code interface before the next block is read to process. There are different types of processes that will be executed on each block each time. The control byte is meant to inform the system what type of operation it must perform on each pixel block read from the driver. The operations are designated as states in which the system will remain until the control byte from the next block is read. There will be 3 major states that will be included in the control byte and that the system will handle: The first looping through the block which will label each pixel either as foreground or background upon comparison to a previously established threshold. After the labeling is completed for all blocks, the blocks will be looped through again to unify the labels upon the detection of connected components. In the third state, the system will display the blocks on a visual peripheral. Connected component labelling on FPGA Connected component labelling assigns each connected component with a unique label. The following steps are performed in labelling an image block: 1. Chose a threshold T to convert the input grayscale image into a binary image.

2. Compare the value of each pixel with T. a. If I(x,y) > T then I(x,y)=1, foreground pixel b. Else I(x,y)=0, background pixel 3. Define a 3-pixel neighborhood. N2 N3 N1 P 4. Scan the image in blocks of size MxN. 5. In the first scan, in case of foreground pixel / I(x,y) = 1: a. If none of its neighbors are labelled, then assign a new label to P. b. If only one of its neighbor has a label, then assign the same label to P. c. If two or all neighbors have the same label, then assign the same label to P. d. If neighborhood pixels have different values, then copy the value in N1 to P and create an entry in the equivalence table for labels in neighborhood pixels. 6. Repeat step 5 for all foreground pixels. 7. In the second scan, find the smallest label for each set of equivalences and replace each label in the image with the corresponding smallest label.

First scan Image block FPGA memory (Shift register) Column counter Threshold (Comparator) Neighborhood comparator Pixel labelling Label counter Equivalence table

Second scan Equivalence table Labelled image Smallest equivalent label Pixel scanning Label comparator Labelled image