balaji ramadoss december,06,2002

32
DEVELOPMENT OF ALGORITHM FOR PANORAMA GENERATION, AND IMAGE SEGMENTATION FROM STILLS OF UNDERVEHICLE INSPECTION Balaji Ramadoss December,06,2002

Upload: chantrea-nhek

Post on 02-Jan-2016

24 views

Category:

Documents


2 download

DESCRIPTION

DEVELOPMENT OF ALGORITHM FOR PANORAMA GENERATION, AND IMAGE SEGMENTATION FROM STILLS OF UNDERVEHICLE INSPECTION. Balaji Ramadoss December,06,2002. Main Objective of this course. Design segmentation algorithm to identify the objects in the data collected from the under vehicle inspector - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Balaji Ramadoss December,06,2002

DEVELOPMENT OF ALGORITHM FOR PANORAMA GENERATION, AND IMAGE SEGMENTATION FROM STILLS OF UNDERVEHICLE INSPECTION

Balaji RamadossDecember,06,2002

Page 2: Balaji Ramadoss December,06,2002

Main Objective of this course

Design segmentation algorithm to identify the objects in the data collected from the under vehicle inspector

Develop various algorithm in MATLAB for segmenting the image and then convert the most efficient algorithm to stand alone application

Page 3: Balaji Ramadoss December,06,2002

Algorithms developed

Segmentation approach applying global threshold and morphology functions in MATLAB

Segmentation approach applying edge detection and morphology functions in MATLAB

Segmentation approach applying edge detection and

Radon transformation

Page 4: Balaji Ramadoss December,06,2002

Segmentation-Algorithm 1

Operation Low pass filtering Thresholding Reduce noises with OPEN operation Create Marker image Multiply the marker image with the original image

Low Passfiltering

Threshold Open operationCreate Marker

imageImpose

Marker in originalSegmented

image

Original image

Page 5: Balaji Ramadoss December,06,2002

Segmentation-Algorithm 1 (contd)

GUI developed using MATLAB that can read high resolution image in any of the following following format .bmp or .tiff

High resolution image of size 2016x3040x3 of under vehicle inspection is read by the

software Size of the image is reduced into 480x720

using bilinear operation to make the image display exactly within the axes of the GUI

Page 6: Balaji Ramadoss December,06,2002

Segmentation algorithm2-direct

Original image is edge detected using canny method

Edge detected image is used as marker and imposed on the original image to segment the object

Color selection to identify the edges in the GUI is provided

Canny Edge Detection

Create Markerimage

ImposeMarker in original

Segmented image

Original image

Block diagram of the algorithm

Resultant image

Page 7: Balaji Ramadoss December,06,2002

Segmentation algorithm2-Dilation operation

Edge Detected image is dilated and the used as marker to segment the image

Details of the small objects are missing after segmentation

Canny Edge Detection

Dilate operation

Create Markerimage

ImposeMarker in original

Segmented image

Original image

Block diagram of the algorithm

Resultant image

Page 8: Balaji Ramadoss December,06,2002

Segmentation algorithm2-Open operation operation

Image after canny edge detection is OPEN and the imposed in the original image

Better than the edge dilation operation with less loss of information

Canny Edge Detection

Open operationCreate Marker

imageImpose

Marker in originalSegmented

image

Original image

Block diagram of the algorithm

Resultant image

Page 9: Balaji Ramadoss December,06,2002

Improvisation of Segmentation details –applying radon transform

Though Canny edge detection gave good results in forming the edges of the objects ,there are noises in the form unlinked lines

These broken lines seen within objects due to intensity variation are studied by applying Radon transform

Radon transform is similar to Hough transform Curves for each pixel of line are generated and the

point of intersection of peak values are determined

Page 10: Balaji Ramadoss December,06,2002

Why Radon Transformation?

Goal of this project in future is to extract all the objects that are captured from the image captured by the under vehicle robot

For this edge details has to be perfectly reconstructed in segmentation to improve the results of labeling the objects based on chain codes

Page 11: Balaji Ramadoss December,06,2002

Implementation of Radon transform

Radon transform is applied to Under vehicle edge detected image to connect the lines that are edge detected with canny filter

Peak values in Radon transform correspond to lines

Result of applying Radon transform the under vehicle image

Page 12: Balaji Ramadoss December,06,2002

Some results of applying Radon Transformation

0 20 40 60 80 100 120 140 160

-400

-300

-200

-100

0

100

200

300

400 0

20

40

60

80

100

120

140

160

180

Edge detected image Radon transform of the image

Lines detected with Radon transform with threshold >115

Page 13: Balaji Ramadoss December,06,2002

Some results of applying Radon Transform

Lines detected with radon transform superimposed in the original image

Page 14: Balaji Ramadoss December,06,2002

Drawbacks of detecting lines with radon transform Linear feature detection for line segments shorter than the

image dimension is difficult

Reason for this drawback is that the radon transform integrates along a 1-pixel line straight line through the entire image

Start and end points of the edges in the objects are not distinguishable after applying radon transform

Any edges that are identified with radon transform will stretch through out the image

Any objects that have any straight edges are not detected and are disturbed with the lines detected with the local objects

Page 15: Balaji Ramadoss December,06,2002

Steps taken to solve the problems faced after applying radon transform

Read the following two papers on application of radon transform

Localized Radon transform for ship wake detection in SAR imagery- Anthony C.Copeland,Gopaln Ravichandran,Mohan M.Trivedi

Localized Radon transform-based detection of linear features in noisy images- Anthony C.Copeland,Gopaln Ravichandran,Mohan M.Trivedi

Page 16: Balaji Ramadoss December,06,2002

Abstract from the two papers

Drawbacks in identifying linear features in image is discussed in both these papers

Radon transform is applied locally to each feature for each value of theta

The variance is calculated for each strips along one direction and threshold is determined

Morphology operation is done on the transformed image so that each transform constitutes a portion of the image

All the identified features are mapped

Page 17: Balaji Ramadoss December,06,2002

Development of a new algorithm from the above abstract

Read imageCanny filter

Line detection

Localized Radon transformation

Check connectivity in endpoints

Mapping

Lines detected image

Segmented Image

Page 18: Balaji Ramadoss December,06,2002

Some results with localized radon transformation by applying manually

0 20 40 60 80 100 120 140 160

-60

-40

-20

0

20

40

60

0

10

20

30

40

50

60

70

80

Localized imageRadon transformation of this image

0 20 40 60 80 100 120 140 160

-60

-40

-20

0

20

40

60

0

10

20

30

40

50

60

70

80

Page 19: Balaji Ramadoss December,06,2002

Some results by localizing the radon transform

Original edge detected image

Line connected using Radon transform Bottom portion of the image and applied radon transform

Page 20: Balaji Ramadoss December,06,2002

Some results by localizing the radon transform

If radon transform is locally applied to the above edge detected image as shown then the line detected is as above

Page 21: Balaji Ramadoss December,06,2002

Algorithm and the flow chart to locate discontinuity

3X3 unit matrix moves on the edge pixels and sets the value of 1.0 if there any discontinuity and sets value 0.5 if it is closed loop

Edge detected Image

Graylevel 0.5

Check connectivity in endpoints

Gray level 1.0

Page 22: Balaji Ramadoss December,06,2002

Discontinuity detected (pixel value 1.0)in the original image in the program output

Functions developed Pixelcontinuitydown()

Pixelcontinuityup()-

This function is C compatible and can

be included in a C program

Problems faced with these functions

Pixels direction was always focused on clockwise direction which caused error in detecting discontinuity

Starting coordinate for radon transform

Page 23: Balaji Ramadoss December,06,2002

Magnified image of discontinuity detected

Starting coordinate for radon transform

Page 24: Balaji Ramadoss December,06,2002

Algorithm to connect the pixel at discontinuity

Algorithm identify discontinuity

Apply radon transformation

Dilate the radon results

Create marker image for localization

Apply localization results to Disconnectivity algorithm results

Apply radon to the results of localization

Connect the disconnected pixel in edge detected image

Check pixel connectivity in endpoints

Page 25: Balaji Ramadoss December,06,2002

Image before applied with new (drawfinalradon) algorithm

Page 26: Balaji Ramadoss December,06,2002

Functions developed to implement this new algorithm

Drawfinalradon(dir,Emodel,Etest,E2,oldi,oldj)

Coordinates with pixel connectivity in the localized disconnectivity pixels and the radon transform edge detected image

Outputs the pixel in the disconnected localized area

Pixel direction This function provides the

direction of the localization and removes the unwanted area in the localization

Localized image

Radon image

Localized mask

Page 27: Balaji Ramadoss December,06,2002

Some important modification in the stand alone functions developed

Pixelcontinuitydown()

Pixelcontinuityup()-

Direction

Check pixel() Labels the pixels with desired gray level if found disconnected(no matlab inbuilt functions)

Detects discontinuity

• Disadvantages• Assumption is made to move in clockwise direction• Logic fails if the traverse of pixel edge is in anticlockwise direction

•Advantages• Overcomes all the above problems and no errors

Page 28: Balaji Ramadoss December,06,2002

Some important functions developed for this edge detecting algorithm and their results

Labeldiscontinuity() Stand alone

function

Page 29: Balaji Ramadoss December,06,2002

Some important functions developed for this edge detecting algorithm and their results

Radon transform line Localized line Localized image

Detect line at dis continuity with radon transform

Localize the radon detected line

Dilate the radon results

Create marker image for localization and get the image

Apply once again radon transformation to get close results

Page 30: Balaji Ramadoss December,06,2002

Some important functions developed for this edge detecting algorithm and their results

Radon draw()- to draw line corresponding to the radon transformation

Red radon() to localize the radon line detected Decide line to detect and draw the line in image based on

the results of the radon image

Page 31: Balaji Ramadoss December,06,2002

Results

Algorithm for discontinuity and edge detection is developed using MATLAB

The functions are to be further tested to improve the edge detection

All the functions were written with C compatible codes and have to be implemented in C for stand alone application

The following problems are completely solved in last week

Discontinuity detection Localized feature extraction in image

Page 32: Balaji Ramadoss December,06,2002

Future Work

Codes will be executed in C++ Edge detected image will applied with the developed

technique in algorithm 2 After segmenting the objects from the image the

objects will be extracted applying cluster technique Developed VC++ GUI to segment the objects using

clustering technique and the above codes will be implement in this GUI to extract the objects from the image