You are on page 1of 6

2.

1 FLOW CHART

The complete algorithm to be followed in order to detect the target using digital image processing and follow it is presented.

Sequence of Underwater image taken

Converted to gray-scale image

Difference image obtained

Threshold of the difference image calculated

Binary image obtained

Characteristics of the targets calculated

Characteristics of the target matched

Signal is send to buzzer

Position of target matching the characteristics is calculated

Target is then followed using moving camera

Fig 2.1: Flow-chart

2.2 PROCEDURE TO PERFOM THE TASK

STEP 1: Sequence of Underwater image Sequence of image was taken and converted to gray scale image. Image background is little different between two continual frames in image sequence. If we can wipe off resemble background to large extent, restrain noise and stand out targets the precision and efficiency to detect targets can meet the real-time requirement of monitoring system. Frame 1:

Frame 2:

Fig 2.2 Sequence of images

STEP 2: Difference image

image. STEP 3: Binary image

=
Fig 2.3 Difference image

The difference image so obtained is converted to binary image using threshold of the Gary scale

Fig 2.4 Binary Image Then arithmetic difference of the Gary scale image was taken. Besides some targets are obvious, there are a lot of noise signals. Underwater images are different from images in air. Random float arouses some difference of background grayscale level in the two frames.

Fig 2.5 Histogram

The histogram of the difference image is shown. Since the gray-scale level concentrates on low part, shows only an interval of 0 100 We calculate ratio R of gray-scale level sum of the difference image and that of the original image. Then we determine threshold T according to size of targets to be detected. We can consider that targets perhaps exist when R > T. Otherwise, no target exists and we can start to calculate a new difference image. According above stated, underwater background is complicated. If we judge targets only depending on the difference image we may misjudge. So we still carry out following calculation when we consider that targets perhaps exist. To use formula of threshold: = + 32 Pixel gray-scale level G(i,j) is transformed into B(i,j):

STEP 4: Segmentation The binary image is segmented into different image containing single object.

(a)

(b)

(c)

(d)

Fig 2.6 Segmented image The target after segmentation is formed by motion of the underwater target. It reflects only a small part of the actual target. We can infer actual size of the original target according to the shape and size of the target in segmentation image. From the segmented image various parameters of the object was calculated such as perimeter, area and liner level.

STEP 5: Analysis and target detection

OBJECT NUMBER 1 2 3 4

AREA

PERIMETER

LINEAR LEVEL

68 416 69 61

30.82 89.11 31.07 26.82

2.20 4.66 2.22 2.27

Table 2.1 Calculated data From the data obtained from above calculation is analyzed and target is identified. We can calculate feature properties of a target, such as area, perimeter, linear level and ratio of length and width, and determine if it is a target interested. So we can fulfill our goal to detect speedy underwater moving targets. We give a new definition of linear level: L = A / P Here P is the perimeter of the target, and A is the area of the target. Their units are both pixel. L is linear level, no dimension. Linear level is so defined because its value is minimum to the target which shape is linear, and the minimum is 1. More round the target, more big the value of linear level. Linear level may be used to differentiate targets which their areas are close, but their shapes are different. Area and linear level of the fish is maximum. Linear level is maximum for objects that are round. Linear level of other objects is less than half of the fish as they are more linear.

STEP 6: Send signal to buzzer and movable camera

After the target is detected x coordinate of the centroid of the target is send to microcontroller to rotate motor in the direction of the target at the same time signal is also send to the buzzer.

You might also like