husseina ozigi otaru final report

Upload: rohit-gupta

Post on 29-May-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    1/27

    SUMMER RESEARCH FINAL REPORT

    IMAGE PROCESSING TECHNIQUES

    BY: HUSSEINA OZIGI-OTARUMENTOR: DR. HONG MAN

    MAY 2005 - AUGUST 2005

    THIS RESEARCH IS SPONSORED BY THE DEPARTMENT OF DEFENSE

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    2/27

    2

    TABLE OF CONTENTS

    Summary3Introduction.4Image Processing6Noise Reduction..7Linear Filtering.....12Edge Linking.....15Edge Properties.17Detecting an Edge.17Thresholding ....18Image Segmentation.19Hough Transform.....19

    Texture Analysis..22References24Weekly Reports25

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    3/27

    3

    SUMMARY

    This summer I conducted research at the Stevens Institute of Technology where I was furthering myresearch experience by investigating the techniques of Image Detection which can then be used to examineremote detection and diagnosis of prostrate cancer through Internet and Wireless Networks to provide

    prostrate cancer screenings to patients in remote areas. By examining the roles of telepathology andteleconsultation we hope to provide significant advances in the early detection of prostrate cancer.

    With the start of the program, Team 205 decided to take a technical approach to providing a mediafor the teleconsultation of pathologists, during this era my main focus was to help debug existing programswritten by Tom Lutz to utilize his work, so I started off with learning C++ then familiarizing myself with theIntel OpenCV under GNU Linux.

    After this period I had a talk with my mentor and decided I was more interested in analyzing theimages than creating a media for this transfer of work, so then I decided to concentrate on Image Processing.I started this by familiarizing myself with CImg library which is an open source C++ tool kit for image

    processing, it provides simple classes to load, save, process and display images in C++. I then restructured aprogram to load a JPEG image that when clicked on will display the intensity profiles of RGB of thecorresponding image line. After which I wrote a program to display intensity profiles of RGB on JNP files,looked at some more functions on OpenCV Image Processing then learnt about Gradient, Edges and Cornersof Images.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    4/27

    4

    INTRODUCTION

    In the broadest sense as stated by Wikipedia the Free Encyclopedia, image processing includes anyform of information processing in which the input is an image. Many image processing techniques derivefrom the application of signal processing techniques to the domain of images - two-dimensional signals suchas photographs or video.

    Most of the signal processing concepts that apply to one-dimensional signals - such as resolution,dynamic range, bandwidth, filtering, etc. - extend naturally to images as well. However, image processingbrings some new concepts - such as connectivity and rotational invariance - that are meaningful or usefulonly for two-dimensional signals. Also, certain one-dimensional concepts - such as differential operators,edge detection, and domain modulation - become substantially more complicated when extended to twodimensions.

    The name image processingis most appropriate when both inputs and outputs are images. Theextraction of arbitrary information from images is the domain of image analysis, which includes patternrecognition when the patterns to be identified are in images. In computer vision one seeks to extract moreabstract information, such as the 3D description of a scene from video footage of it. The tools and conceptsof image processing are also relevant to image synthesis from more abstract models, which is a major branchof computer graphics.

    The enormous size of images, compared to other data streams commonly processed by computers,and the need to process images quickly, has led to whole sub-fields on high speed image processing. A fewdecades ago, image processing was done largely in the analog domain, chiefly by optical devices. Optical

    methods are inherently parallel, and for that reason they are still essential to holography and a few otherapplications. However, as computers keep getting faster, analog techniques are being increasingly replacedby digital image processing techniques which are more versatile, reliable, accurate, and easier toimplement. Specialized hardware is still used for digital image processing: computer architectures based onpipelining have been the most commercially successful, but many different massively parallel architectureswere developed as well. These architectures, especially pipelined architectures, are still commonly used invideo processing systems. However, these days commercial image processing tasks with a processing speedof a few images per second or less are increasingly done by software libraries running on conventionalpersonal computers.

    Typical problems covered by this field include

    Geometric transformations such as enlargement, reduction, and rotation; Color corrections such as brightness and contrast adjustments, quantization, or conversion to a

    different color space; Combination of two or more images, e.g. into an average, blend, difference, or image composite. Interpolation, demosaicing, and recovery of a full image from a mosaic image (e.g. a Bayer pattern,

    etc.); Noise reduction and other types of filtering, and signal averaging; Edge detection and other local operators;

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    5/27

    5 Segmentation of the image into regions; image editing and digital retouching; Extending dynamic range by combining differently exposed images (generalized signal averaging of

    Wyckoff sets).

    and many more.

    Besides static two-dimensional images, the field also covers the processing of time-varying signals such asvideo and the output of tomographic equipment. Some techniques, such as morphological image processing,are specific to binary or grayscale images.

    Some applications are:

    Photography and printing Satellite image processing Medical image processing Face detection, feature detection, face identification Microscope image processing

    Some related concepts are:

    Classification Feature extraction Pattern recognition Projection Multi-scale signal analysis Principal components analysis Independent component analysis Self organizing map

    Hidden Markov model Neural networks

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    6/27

    6

    IMAGE PROCESSING

    What is the function of Image Processing in relation to Planetary investigation?

    In high resolution field, in addition to the usual preprocessing functions (offset, dark and flat corrections), theusefulness of image processing can be divided into two main functions: increasing the contrast of planetarydetails and reducing the noise.

    Increasing the contrast of planetary details

    On a planet, the contrast of details is generally small compared to the brightness of the disk. Then, a rawplanetary image directly displayed on a computer display shows few details because close details occupyonly one grey level. We need to increase the contrast of the details to make them clearly visible on the

    screen.

    Increasing the contrast of small details is the aim of many processing algorithms which all act in the sameway: they amplify the high frequencies in the image. This is the reason why they are called high-pass filters,and probably the most famous of them is unsharp masking. This technique is well-known but hard to use inastrophotography. In digital image processing the general principle of unsharp masking is

    - a fuzzy image (blue curve) is made from the initial image (red curve) by application of a low-pass filter(gaussian) whose strenght is adjustable; the high frequencies are suppressed,

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    7/27

    7- this fuzzy image is substracted from the initial image; the result (green curve) contains only the smalldetails (high frequencies) but its appearance is very strange and unaesthetic (unfortunately, this image alsocontains noise),

    Samplingis choosing which points you want to have represent a given image. Given an analog image,

    sampling represents a mapping of the image from a continuum of points in space (and possibly time, if it is amoving image) to a discrete set. Given a digital image, sampling represents a mapping from one discrete setof points to another (smaller) set.

    Image noise reduction

    Images taken with both digital cameras and conventional film cameras will pick up noise from a variety ofsources. Many further uses of these images require that the noise will be been (partially) removed - foraesthetic purposes as in artistic work or marketing, or for practical purposes such as computer vision.

    [edit]

    Types of noise

    In salt-and-pepper noise (also known as random or independent noise), pixels in the image are vastlydifferent in color from their surrounding pixels. The defining characteristic is that the color of a noisy pixelbears no relation to the color of surrounding pixels. Generally this type of noise will only affect a smallnumber of image pixels. When viewed, the image contains dark and white dots, hence the term salt andpepper noise. Typical sources include flecks of dust on the lens or inside the camera, or with digital cameras,faulty CCD elements.

    In Gaussian noise (dependent noise), an amount of noise is added to every part of the picture. Each pixel inthe image will be changed from its original value by a (usually) small amount. Taking a plot of the amount ofdistortion of a pixel against the frequency with which it occurs produces a Gaussian distribution of noise.

    REMOVING IMAGE NOISE:

    Gaussian masks

    One method to remove noise is by convolving the original image with a mask. The Gaussian mask gives animage a blurred appearance, and has the effect of smearing out the value of a single pixel over an area of the

    image. This brings the value of each pixel into closer harmony with the value of its neighbours. Gaussianmasks work relatively well, but the blurring of edges can cause problems, particularly if the output is beingfed into edge detection algorithms for computer vision applications.

    Median filters

    A median filter is very good at preserving image detail. To run a median filter:

    *consider each pixel in the image

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    8/27

    8*sort the neighbouring pixels into order based upon their intensities

    *replace the original value of the pixel with the median value from the list

    This type of filter is very good at removing salt and pepper noise from an image, and also causes very littleblurring of edges, and hence is often used in computer vision applications.

    Averaging

    Another method to remove noise is by averaging several images. Averaging has the power to reduce noisewithout compromising detail, because it actually increases the signal-to-noise ratio (SNR) of your image.The amplitude of any random noise decreases as the square root of the number of images averaged.

    For example.. this is an original picture

    This is the sampled picture

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    9/27

    9

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    10/27

    10

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    11/27

    11

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    12/27

    12LINEAR FILTERING

    * Low pass filtersLow pass filtering, otherwise known as "smoothing", is employed to remove high spatial frequency noisefrom a digital image. Noise is often introduced during the analog-to-digital conversion process as a side-effect of the physical conversion of patterns of light energy into electrical patterns [Tanimoto].

    There are several common approaches to removing this noise:

    If several copies of an image have been obtained from the source, some static image, then it may bepossible to sum the values for each pixel from each image and compute an average. This is notpossible, however, if the image is from a moving source or there are other time or size restrictions.

    If such averaging is not possible, or if it is insufficient, some form of low pass spatial filtering may berequired. There are two main types:

    o reconstruction filtering, where an image is restored based on some knowledge of the type ofdegradation it has undergone. Filters that do this are often called "optimal filters".

    o enhancement filtering, which attempts to improve the (subjectively measured) quality of animage for human or machine interpretability. Enhancement filters are generally heuristic and

    problem oriented [Niblack]; they are the type that are discussed in this tutorial.

    * Moving window operations

    The form that low-pass filters usually take is as some sort of moving window operator. The operator usuallyaffects one pixel of the image at a time, changing its value by some function of a "local" region of pixels("covered" by the window). The operator "moves" over the image to affect all the pixels in the image. Somecommon types are:

    Neighborhood-averaging filters These replace the value of each pixel, a[i,j] say, by a weighted-

    average of the pixels in some neighborhood around it, i.e. a weighted sum ofa[i+p,j+q], withp = -kto k, q = -k to kfor some positive k; the weights are non-negative with the highest weight on the p =q = 0 term. If all the weights are equal then this is a mean filter. "linear"

    Median filters This replaces each pixel value by the median of its neighbors, i.e. the value such that50% of the values in the neighborhood are above, and 50% are below. This can be difficult and costlyto implement due to the need for sorting of the values. However, this method is generally very goodat preserving edges.

    Mode filters Each pixel value is replaced by its most common neighbor. This is a particularly usefulfilter forclassification procedures where each pixel corresponds to an object which must be placedinto a class; in remote sensing, for example, each class could be some type of terrain, crop type,water, etc..

    The above filters are all space invariant in that the same operation is applied to each pixel location. A non-space invariant filtering, using the above filters, can be obtained by changing the type of filter or theweightings used for the pixels for different parts of the image. Non-linear filters also exist which are notspace invariant; these attempt to locate edges in the noisy image before applying smoothing, a difficult taskat best, in order to reduce the blurring of edges due to smoothing. These filters are not discussed in thistutorial.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    13/27

    13

    High Pass Filter: A high pass filter is used in DIP to remove or suppress the low frequency component,resulting in a sharpened image. High pass filters are used in conjuction with low pass filters. For example,the image may be smoothed using a low pass filter, then a high pass filter can be applied to sharpen theimage, therefore preserving boundary detail.

    Edge: An edge may be regarded as a boundary between two dissimilar regions in an image.

    These may be different surfaces of the object, or perhaps a boundary between light and shadow falling on asingle surface.

    An edge is not a physical entity, just like a shadow. It is where the picture ends and the wall starts. It iswhere the vertical and the horizontal surfaces of an object meet. It is what happens between a bright windowand the darkness of the night. Simply speaking, it has no width. If there were sensor with infinitely smallfootprints and zero-width point spread functions, an edge would be recorded between pixels within in an

    image. In reality, what appears to be an edge from the distance may even contain other edges when lookedclose-up. The edge between a forest and a road in an aerial photo may not look like an edge any more in aimage taken on the ground. In the ground image, edges may be found around each individual tree. If lookeda few inches away from a tree, edges may be found within the texture on the bark of the tree. Edges arescale-dependent and an edge may contain other edges, but at a certain scale, an edge still has no width.

    Traditionally, edges have been loosely defined as pixel intensity discontinuities within an image. While twoexperimenters processing the same image for the same purpose may not see the same edge pixels in theimage, two for different applications may never agree. In a word, edge detection is usually a subjective task.

    The quality of edge detection is limited by what's in the image. Sometimes a user knows there should be an

    edge somewhere in the image but it is not shown in the result. So he adjusts the parameters of the program,trying to get the edge detected. However, if the edge he has in mind is not as obvious to the program assome other features he does not want detect, he will get the other "noise" before the desired edge is detected.Edge detecting programs process the image "as it is". As a human being, an experimenter knows there is anedge because he is using knowledge in addition to what's contained in the image. How to use suchknowledge about the real world in the process of general edge detection is a huge topic that I would like towatch from a safe distance for the time being. For example, if the program knows an edge is that of a roadand it is likely that it will continue on the other side of a tree branch, then it may have a chance to detect theedge of each and every visible part of a road behind a tree; otherwise, some small and not so obvious piecesof the edge may remain undetected. In a simplified special case, an edge detector may be tailored to takeadvantage of the domain knowledge. For example, a "straight edge" detector may be very effective in

    locating most buildings and objects such as tennis courts in an aerial photo.

    In principle an edge is easy to find since differences in pixel values between regions are relatively easy tocalculate by considering gradients.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    14/27

    14

    Many edge extraction techniques can be broken up into two distinct phases:

    Finding pixels in the image where edges are likely to occur by looking for

    discontinuities in gradients.

    Candidate points for edges in the image are usually referred to as edge points, edgepixels, oredgels.

    Linking these edge points in some way to produce descriptions of edges interms of lines, curves etc.

    Gradient based methods

    An edge point can be regarded as a point in an image where a discontinuity (in gradient) occurs across someline. A discontinuity may be classified as one of three types (see Fig 21):

    Fig. 21 The C Compilation Model

    A Gradient Discontinuity

    -- where the gradient of the pixel values changes across a line. This type of discontinuity can beclassed as

    roofedges ramp edges convex edges concave edges

    by noting the sign of the component of the gradient perpendicular to the edge on either side of theedge.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    15/27

    15Ramp edges have the same signs in the gradient components on either side of the discontinuity,while roof edges have opposite signs in the gradient components.

    A Jump or Step Discontinuity

    -- where pixel values themselves change suddenly across some line.A Bar Discontinuity

    -- where pixel values rapidly increase then decrease again (orvice versa) across some line.

    For example, if the pixel values are depth values,

    jump discontinuities occur where one object occludes another (or another partof itself). Gradient discontinuities usually occur between adjacent faces of the sameobject.

    If the pixel values are intensities,

    a bar discontinuity would represent cases like a thin black line on a white pieceof paper. Step edges may separate different objects, or may occur where a shadow fallsacross an object.

    However there are disadvantages to the use of second order derivatives.

    (We should note that first derivative operators exaggerate the effects of noise.)Second derivatives will exaggerated noise twice as much. No directional information about the edge is given.

    Edge Linking

    Edge detectors yield pixels in an image lie on edges.

    The next step is to try to collect these pixels together into a set of edges.

    Thus, our aim is to replace many points on edges with a few edges themselves.

    The practical problem may be much more difficult than the idealised case.

    Small pieces of edges may be missing,

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    16/27

    16 Small edge segments may appear to be present due to noise where there isno real edge, etc.

    In general, edge linking methods can be classified into two categories:

    Local Edge Linkers

    -- where edge points are grouped to form edges by considering each point's relationship to any

    neighbouring edge points.Global Edge Linkers

    -- where all edge points in the image plane are considered at the same time and sets of edge points aresought according to some similarity constraint, such as points which share the same edge equation.

    Local Edge Linking Methods

    Most edge detectors yield information about the magnitude of the gradient at an edge point and, moreimportantly, the direction of the edge in the locality of the point.

    This is obviously useful when deciding which edge points to link together since edge points in aneighbourhood which have similar gradients directions are likely to lie on the same edge.

    Local edge linking methods usually start at some arbitrary edge point and consider points in a local

    neighbourhood for similarity of edge direction as shown in Fig. 29.

    Edge linking

    If the points satisfy the similarity constraint then the points are added to the current edge set.

    The neighbourhoods based around the recently added edge points are then considered in turn and so on.

    If the points do not satisfy the constraint then we conclude we are at the end of the edge, and so the processstops.

    A new starting edge point is found which does not belong to any edge set found so far, and the process isrepeated.

    The algorithm terminates when all edge points have been linked to one edge or at least have been consideredfor linking once.

    Thus the basic process used by local edge linkers is that of tracking a sequence of edge points.

    An advantage of such methods is that they can readily be used to find arbitrary curves.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    17/27

    17Many strategies have been adopted to control the search and selection processes used for edge linking.

    The basic idea is to find sets of edges. Here the assignment of each edge point to an edge is based on aprobability estimate that the particular edge point and its local neighbours lie on the same edge.

    Other methods have posed the edge linking problem as

    A graph or tree search problem, Dynamic programming problem -- where functions measuring the error in thefitting of an edge to a set of points are minimised to find the best fitting edges inthe image.

    Edge properties

    Edges may be viewpoint dependent- these are edges that may change as the viewpoint changes, and typicallyreflect the geometry of the scene, objects occluding one another and so on, or may be viewpoint independent- these generally reflect properties of the viewed objects such as markings and surface shape. In twodimensions, and higher, the concept of a projection has to be considered.

    A typical edge might be (for instance) the border between a block of red color and a block of yellow; incontrast a line can be a small number of pixels of a different color on an otherwise unchanging background.There will be one edge on each side of the line.Edges play quite important role in all applications of imageprocessing

    Detecting an edge

    Taking an edge to be a change in intensity taking place over a number of pixels, edge detection algorithmsgenerally calculate a derivative of this intensity change. To simplify matters, we can consider the detectionof an edge in 1 dimension. In this instance, our data can be a single line of pixel intensities. For instance anedge can clearly be detected between the 4th and 5th pixels in the following 1-dimensional data:

    5 7 6 4 152 148 149

    Calculating the 1st derivative

    Many edge-detection operators are based upon the 1st derivative of the intensity - this gives us the intensitygradient of the original data. Using this information we can search an image for peaks in the intensitygradient.

    IfI(x) represents the intensity of pixelx, andI(x) represents the first derivative (intensity gradient) at pixelx,we therefore find that:

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    18/27

    18

    For higher performance image processing, the 1st derivative can therefore be calculated (in 1D) byconvolving the original data with a mask:

    1 0 1

    Calculating the 2nd derivative

    Some other edge-detection operators are based upon the 2nd derivative of the intensity. This is essentially therate of change in intensity gradient and is best at detecting lines :- as noted above, a line is a double edge,hence we will see an intensity gradient on one side of the line, followed immediately by the opposite gradienton the opposite site. Therefore we can expect to see a very high change in intensity gradient where a line ispresent in the image. To find lines, we can search the results for zero-crossings of the change in gradient.

    IfI(x) represents the intensity at pointx, andI(x) is the second derivative at pointx:

    Again most algorithms use a convolution mask to quickly process the image data:

    +1 2 +1

    Thresholding

    Once we have calculated our derivative, the next stage is to apply a threshold, to determine where the resultssuggest an edge is present. The lower the threshold, the more lines will be detected, and the results becomeincreasingly susceptible to noise, and also to picking out irrelevant features from the image. Conversely ahigh threshold may miss subtle lines, or sections of lines.

    A commonly used compromise is thresholding with hysteresis. This method uses multiple thresholds to findedges. We begin by using the upper threshold to find the start of a line. Once we have a start point, we tracethe edge's path through the image pixel by pixel, marking an edge whenever we are above the lowerthreshold. We stop marking our edge only when the value falls below our lower threshold. This approachmakes the assumption that edges are likely to be in continuous lines, and allows us to follow a faint sectionof an edge we have previously seen, without meaning that every noisy pixel in the image is marked down asan edge.

    Edge detection operators

    Ist order; Roberts Cross, Prewitt, Sobel, Canny and Spacek2

    ndorder; Laplacian, Marr-Hildreth

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    19/27

    19IMAGE SEGMENTATION

    In image analysis, segmentation is the partition of a digital image into multiple regions (sets of pixels),according to some criterion.

    The goal of segmentation is typically to locate certain objects of interestwhich may be depicted in the imageSegmentation could therefore be seen as a computer vision problem. Unfortunately, many important

    segmentation algorithms are too simple to solve this problem accurately: they compensate for this limitationwith their predictability, generality, and efficiency.

    A simple example of segmentation is thresholding a grayscale image with a fixed threshold t: each pixelp isassigned to one of two classes,P0 orP1, depending on whetherI(p) < torI(p) t.

    Some other segmentation algorithms are based on segmenting images into regions of similar textureaccording to wavelet or Fourier transforms.

    Segmentation criteria can be arbitrarily complex, and take into account global as well as local criteria. Acommon requirement is that each region must be connected in some sense.

    An example of a global segmentation criterion is the famous Mumford-Shah functional. This functionalmeasures the degree of match between an image and its segmentation. A segmentation consists of a set ofnon-overlapping connected regions (the union of which is the image), each of which is smooth and each ofwhich has a piecewise smooth boundary. The functional penalizes deviations from the original image,deviations from smoothness within in each region and the total length of the boundaries of all the regions.

    Mathematically,

    Hough Transforms

    One powerful global method for detecting edges is called theHough transform.

    Let us suppose that we are looking for straight lines in an image.

    If we take a point (x',y') in the image,alllines which pass through that pixel have the form

    for varying values ofm and c. See Fig. 30.

    Lines through a point

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    20/27

    20However, this equation can also be written as

    where we now considerx' andy' to be constants, and m and c as varying.

    This is a straight line on a graph ofc against m as shown in Fig. 31.

    Each different line through the point (x',y') corresponds to one of thepoints on the line in (m,c) space.

    The C Compilation Model

    Now consider two pixelsp and q in (x,y) space which lie on the same line.

    For each pixel, all of the possible lines through it are represented by a singleline in (m,c) space. Thus the single line in (x,y) space which goes through both pixels lies on theintersection of the two lines representingp and q in (m,c) space, as illustrated bythe diagram below.

    Points on the same line

    Taking this one step further,

    All pixels which lie on the same line in (x,y) space are represented by lineswhich all pass through a single point in (m,c) space. The single point through which they all pass gives the values ofm and c in theequation of the liney=mx+c.

    To detect straight lines in an image, we do:

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    21/27

    211. Quantise (m,c) space into a two-dimensional arrayA for appropriate steps ofm and c.2. Initialise all elements ofA(m,c) to zero.3. For each pixel (x',y') which lies on some edge in the image, we add 1 to allelements ofA(m,c) whose indices m and c satisfyy'=mx'+c.4. Search for elements ofA(m,c) which have large values -- Each one foundcorresponds to a line in the original image.

    One useful property of the Hough transform is that the pixels which lie on the line need not all becontiguous.

    For example, all of the pixels lying on the two dotted lines in Fig. 33 will be recognised as lying on the samestraight line. This can be very useful when trying to detect lines with short breaks in them due to noise, orwhen objects are partially occluded as shown.

    Non-contiguous pixels on the same line

    On the other hand, it can also give misleading results when objects happen to be aligned by chance, as shownby the two dotted lines in Fig. 34.

    Aligned objects

    Indeed, this clearly shows that one disadvantage of the Hough transform method is that it gives an infiniteline as expressed by the pair ofm and c values, rather than a finite line segment with two well-definedendpoints.

    One practical detail is that they=mx+c form for representing a straight line breaks down for vertical lines,when m becomes infinite.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    22/27

    22To avoid this problem, it is better to use the alternative formulation given earlier,

    as a means of describing straight lines.

    Note, however, that a point in (x,y) space is now represented by a curve in space rather than a straightline.

    Otherwise, the method is unchanged.

    The Hough transform can be used to detect other shapes in an image as well as straight lines.

    For example, if we wish to find circles, with equation

    Now:

    Every point in (x,y) space corresponds to a surface in (a,b,r) space (as we canvary any two ofa, b and r, but the third is determined by Eqn. 53). The basic method is, thus, modified to use a three-dimensional arrayA(a,b,r), All points in it which satisfy the equation for a circle are incremented.

    In practice, the technique takes rapidly increasing amounts of time for more complicated curves as thenumber of variables (and hence the number of dimensions ofA) increases

    So the method is really only of use for simple curves.

    Texture Analysis

    In many machine vision and image processing algorithms, simplifying assumptions are made about theuniformity of intensities in local image regions. However, images of real objects often do not exhibit regionsof uniform intensities. For example, the image of a wooden surface is not uniform but contains variations ofintensities which form certain repeated patterns called visual texture. The patterns can be the result ofphysical surface properties such as roughness or oriented strands which often have a tactile quality, or theycould be the result of reflectance differences such as the color on a surface.

    Image texture, defined as a function of the spatial variation in pixel intensities (gray values), is useful in a

    variety of applications and has been a subject of intense study by many researchers. One immediateapplication of image texture is the recognition of image regions using texture properties. For example, basedon textural properties, we can identify a variety of materials such as cotton canvas, straw matting, raffia,herringbone weave, and pressed calf leather. Texture is the most important visual cue in identifying thesetypes of homogeneous regions. This is called texture classification. The goal of texture classification then isto produce a classification map of the input image where each uniform textured region is identified with thetexture class it belongs to.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    23/27

    23We could also find the texture boundaries even if we could not classify these textured surfaces. This isthen the second type of problem that texture analysis research attempts to solve -- texture segmentation. Thegoal of texture segmentation is to obtain the boundary map separating the differently textured regions in animage.

    Texture synthesis is often used for image compression applications. It is also important in computer graphicswhere the goal is to render object surfaces which are as realistic looking as possible.

    Theshape from texture problem is one instance of a general class of vision problems known as ``shape fromX.'' The goal is to extract three-dimensional surface shape from variations in textural properties in the image.The texture features (texture elements) are distorted due to the imaging process and the perspectiveprojection which provide information about surface orientation and shape.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    24/27

    24References

    http://en.wikipedia.org/wiki/Image_processing

    http://robotics.eecs.berkeley.edu/~sastry/ee20/

    http://www.prettyview.com/edge/oldedge.shtml

    http://marathon.csee.usf.edu/edge/edge_detection.html

    http://www.eduseek.com/navigate.php?ID=10851

    http://www.ece.stevens-tech.edu/~hman/cpe645/

    Digital Image Processing, By William K. Pratt

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    25/27

    25

    WEEKLY REPORTS

    WEEK 1:

    * Built website* Familiarized my self with C++ pointer* Familiarized myself with Intel OpenCV Under GNU Linux* Attended various Strategic meetings with my mentor and team* Waiting on IPP software

    WEEK 2:* Familiariazed myself with cimg library which is an open source C++ tool kit for image - It provides simple classes toload, save, process and display images in C++* Restructured a program to load a JPEG image that when clicked on will display the intensity profiles of RGB of thecorresponding image line .

    WEEK 3:* Tried to write a program to display intensity profiles of RGB on JNP files

    * On Open CV Image Processing* Gradients, Edges and Corners* Sampling, Interpolation and Geometric Transform* Morphological Operations

    WEEK 4:* Filters and color conversion* Pyramids and the applications* Connected components* Image and contour moments* Introduction to Facial Recognition

    WEEK 5:

    * Special Image Transforms* Histograms* Matching

    WEEK 6:* Canny Edge Detection - It is used in CV to locate sharp intensity changes and to find object boundaries in an image. TheCED classifies a pixel as an edge if the gradient magnitude of the pixel is larger than those of pixels at both its sides in thedirection of maximum intensity change.

    * Nalwa Edge Detection - Nalwa describes two methods. The first method uses difference operators and is based on thssimulation of the differentiation of pixel intenisty values. High derivatives values correspond to large changes in intensityvalues and many times indicate edges.

    * Rothwell Edge Detection - uses dynamic thresholding.

    $$$$$Pitcher$$$$$

    CannyNalwaRothwellIversonBergholm

    $$$$Banana$$$$

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    26/27

    26Canny

    NalwaRothwellIversonBergholm

    WEEK SEVEN

    ** Linear Filtering

    -- Low Pass Filters ( Smoothing )this is used to remove high spatial frequency noise froma digital image. Noise is often introduced during the analog to digitaconversion process as a side effect of the conversion of patterns of light energy to electrical patterns.

    To remove noise, different approaches can be taken, for example if it was obtained from a static image then it is possible tosum the values of each pixel and compute the average, if it not from a still image then a type of low pass spatial filteringmay be required.~ reconstruction filtering; an image is restored based on knowledge of the type of degradation it has undergone. Filters thatdo this are called Optimal Filters~ enhancement filtering; improves the quality of an image for human/machine interpretability.

    --Moving Window OperationsLow pass filters generally take the form of of moving window operator. This operator usually affects one pixel at a timechanges it value by some function of a local region of pixels, the operator then moves over the image to affect all pixels inthe image.The filters below are all space variant, ie the same operation is applied to each pixel location.Types of MWO are~ Neighborhood-averaging filters; These replace the value of each pixelby a weighted average of the pixels in thesurrounding neighborhood. If the weights are all equal then it is called a mean/ linear filter.~Median filters; this replaces each pixel value by the median of its neighbors. This method is good for preserving edges.~Mode filters; Each pixel is replaced by its most common neighbor, this is used for classificatin procedures.

    WEEK EIGHT

    An image defined in the "real world" is considered to be a function of two real variables, for example, a(x,y) with a as theamplitude (e.g. brightness) of the image at the real coordinate position (x,y). An image may be considered to contain sub-images sometimes referred to as regions-of-interest, ROIs, or simply regions. This concept reflects the fact that imagesfrequently contain collections of objects each of which can be the basis for a region. In a sophisticated image processingsystem it should be possible to apply specific image processing operations to selected regions. Thus one part of an image(region) might be processed to suppress motion blur while another part might be processed to improve color rendition.

    A digital image a[m,n] described in a 2D discrete space is derived from an analog image a(x,y) in a 2D continuous spacethrough a sampling process that is frequently referred to as digitization.

    Neighborhood operations play a key role in modern digital image processing. It is therefore important to understand how

    images can be sampled and how that relates to the various neighborhoods that can be used to process an image.

    * Rectangular sampling - In most cases, images are sampled by laying a rectangular grid over an image as illustrated inFigure 1.

    * exagonal sampling - An alternative sampling scheme is termed hexagonal sampling.

    Both sampling schemes have been studied extensively and both represent a possible periodic tiling of the continuous imagespace. My attention, however is to only rectangular sampling as it remains, due to hardware and software considerations, themethod of choice.

  • 8/9/2019 Husseina Ozigi Otaru Final Report

    27/27

    27

    WEEK NINE

    Worked on more Image processing techniques for NSF presentation...Presentation

    WEEK TEN**Image Feature ExtractionImage Feature EvaluationAmplitude FeaturesTransform Coefficeint FeaturesTexture DefinitionVisual Texture DiscriminationTexture Features