SlideShare a Scribd company logo
Research Journal of Applied Sciences, Engineering and Technology 14(3): 101-111, 2017
DOI:10.19026/rjaset.14.4152
ISSN: 2040-7459; e-ISSN: 2040-7467
© 2017 Maxwell Scientific Organization Corp.
Submitted: November 15, 2016 Accepted: February 13, 2017 Published: March 15, 2017
Corresponding Author: I. Made Oka Widyantara, Electrical Engineering Department, Faculty of Engineering, Udayana
University, Jimbaran, Bali, Indonesia
This work is licensed under a Creative Commons Attribution 4.0 International License (URL: http://creativecommons.org/licenses/by/4.0/).
101
Research Article
An Automated Approach of Shoreline Detection Applied to Digital Videos using
Data Mining
1
I. Made Oka Widyantara, 1
I. Made Dwi Putra Asana, 1
N.M.A.E.D. Wirastuti and
2
Ida Bagus Putu Adnyana
1
Electrical Engineering Department, Faculty of Engineering,
2
Civil Engineering Department, Udayana University, Jimbaran, Bali, Indonesia
Abstract: This study aims to detect a shoreline location and its changes automatically in the temporal resolution.
This approach is implemented on the coastal video monitoring system applications. The proposed method applied
data mining by using two main systems-a training system using classification and shoreline detection systems with
Self-Organizing Map (SOM) and K-Nearest Neighbor (K-NN) algorithms. The training system performs feature
texture extraction using agray-level co-occurrence matrix and the results are stored to classification process. The
detection system has five processing stages: contrast stretching preprocessing and morphological contrast
enhancement, SOM clustering, morphological operations, feature extraction and K-NN classification and detection
shoreline. Preprocessing was used to improve the video image contrast and reliability. SOM algorithm in
segmenting objects in the onshore video images. Morphological operations were applied to eliminate noise on the
objects that were not needed in the spatial domain. The segmentation results of video frames classified by K-NN.
The aim is to provide the class labels on each region segmentation results, namely, sea label, land label and sky
label. The determination of the shoreline is done by scanning the neighboring pixels from the edge of land class
label after binary image transformation. The shoreline change detection was performed by comparing the position of
existing shoreline and shoreline position in the reference video frame. A Receiver Operating Characteristic (ROC)
curve was used to evaluate the performance of shoreline detection systems. The results showed that the combination
of SOM and K-NN was able to detect shoreline and its changes accurately.
Keywords: Feature extraction, image enhancement, K-NN, shoreline, SOM, video monitoring
INTRODUCTION
Shoreline, the contact zone between ocean and
land, has changed over time due to the cross-shore
movement of sediments along the shore and the
dynamic nature of the water surface. The dynamic
changes of the shoreline may cause erosion of the beach
bodies (abrasion) and the addition of beach bodies
(accretion), which can damage the coastal environment.
Therefore, monitoring the position of the shoreline is a
very significant issue given the socio-economic value
and high population density along shore areas
(Goncalves et al., 2012; Huisman et al., 2011).
Beach morphology changes in different spatial and
temporal scales. Therefore, intensive monitoring
schemes are required (Rigos et al., 2014). Traditionally,
shoreline studies have been based on field
measurements of waves, currents, sediment transport
and morphological changes. This scheme can provide
essential information concerning the shoreline in
temporal resolution but it has limitations in spatial
resolution. Moreover, some logistical difficulties, such
as high cost and difficulty of the survey when the
weather conditions are bad, exist in this scheme (Rijn,
2007). Another method is remote sensing by using
satellites or aircraft fitted with remote-sensing systems
with active and passive sensors to describe the
dynamics of the nearshore area. This method offers a
good spatial-temporal resolution, but these observations
are relatively expensive and the visibility is not
extensive.
Some of the difficulties mentioned above can be
solved using video-based remote-sensing systems
(Almar et al., 2012). Video monitoring system provides
information in data per second in the time scale and
spatial scales from meters to kilometers. The emergence
of devices based network cameras, allowing the spatial
scale can be expanded. This is done by installing
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
102
cameras scattered along the coast and is integrated in a
computer network.
Currently, many studies on shoreline estimate use
data from digital video sources. Video-detected
shoreline is generally estimated using several methods
among:
• Shore Line Intensity Maximum (SLIM)
• Pixel Intensity Clustering (PIC)
• Artificial Neural Network (ANN)
• Channel Color Divergence (CCD)
SLIM method defines as cross-shore shoreline
position at which wave breaking is maximized, which
corresponds to maximum pixel intensity in close to the
shore (Plant et al., 2007). CCD method is based on red,
green and blue channels whose values are similar to the
white sand on the shore but have different values in
water (Turner et al., 2000). The shoreline is defined on
each cross-shore transect where divergence between
color channels exceeds a threshold. A technique was
developed by PIC (Aarninkhof et al., 2003) that uses
both color and grayscale intensity information. The
ANN models use neural networks to differentiate wet
pixels from dry pixels by using the RGB channel as an
input (Rigos et al., 2014; Kingston et al., 2000). The
number of proposed methods showed that the robust
shoreline detection procedures have many challenges
due to the variety of intra-annual environmental,
hydrodynamic and morphological conditions in the
coastal zone.
In an effort to develop a system that provides
remote sensing-based digital videos, this study has built
shoreline detection systems using data mining
techniques. Detection of shorelines is done by
segmentation of shore objects in the video frame,
followed by the classification of these objects. The
objects on the shore on a video frame are separated
according to the similarity of pixels and the process of
object recognition would categorize objects into objects
land, sea and sky. When an object is recognized as the
land, then the scanning process is carried out to obtain
the pixels in the object marked as land that has pixels
neighboring the sea objects. The pixels on the land label
that has neighboring pixels with sea label is shoreline.
This study applied SOM algorithms in the process of
clustering and K-NN algorithm in the classification
process.
SOM algorithm has been known as a reliable
clustering method and has been applied in a wide range
of applications (Kohonen, 2013; Ortiz et al., 2013).
SOM-ANN training uses a technique that is based on
winner take all, where only the winner neurons
willrenewed its weight. Although SOM is based on
ANN, itdoes not use the class target value, so that no
classes are defined for each data.
As a classifier algorithm, the K-NN algorithm has
advantages when used for the election of large data
compared with other classification methods (Jain et al.,
2000). K-NN algorithms perform classification based
on the proximity (distance) of the data with other data,
which is the shortest distance from a sample to the test
sample. With this technique, the K-NN algorithm is
able to fully exploit the spatial correlation between
adjacent data (Huang et al., 2016). This technique is
needed for the classification of land, sky and sea objects
on ashore line image.
In this study, an automatic shoreline detection in
the video monitoring system of shoreline change was
explained. The proposed methods comprise five
modules. The first module formed preprocessing
mechanisms to improve the shoreline image quality.
The clustering process which segmenting objects that
based on color feature similarity by getting rid of color
feature of pixels, itwas performed in the second
module. The quality of segmentation improved by
removing noise usingthe morphology algorithm was
done in module three. Feature extraction and object
classification was performed in module four. Moreover,
module five provides the shoreline extraction. For the
classification mechanism, this study uses a
classification training method for a shore area.
MATERIALS AND METHODS
In this study, a video monitoring system to track
shoreline changes using data mining techniques has
been developed. The dataset video that was used was
shore area monitoring dataset of Egmond, Netherlands
that was downloaded from the website Deltares Argus
Archive (Argus, 2015). The video was an image
combination that proceeded sequentially in time with a
certain speed. The images that formed the video were
called frames. Moreover, the image recitation speed
was called frame rate and has a unit of frame per
second (Widyantara, 2015). The video frame of the
Egmondshore area was an input that was processed in
the system so that the position shoreline could be
shown automatically. A flow analysis of the video
monitoring system concerning the shoreline change is
shown in Fig. 1.
Preprocessing: The video frames were obtained from
the process of monitoring the activity of the coastline, is
a color image with sunlight effect compositions that
vary according to the acquisition time. The effect of
sunlight varies in shore areas and this becomes a
problem when separating objects during the
segmentation process (Widyantara et al., 2016).
Therefore, an image enhancement mechanism is
required to improve the graphical display of the video
frames prior to the segmentation process.
Image enhancement is accentuated or sharpening
elements of an image such as edge, boundaries or
contrast levels that it creates a useful graphic display of
the image. Image enhancement does not fix or improve
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
103
Fig. 1: Research method
the quality of information and data that already exists in
the image. Nevertheless, image enhancement increase
the dynamic range of desired elements in the image so
that the elements can be noticed or seen clearly. Image
enhancement includes functions such as contrast
manipulation, noise reduction, edge crispening and
sharpening, interpolation and image magnification. The
selection of techniques to be used must also consider
the characteristics of the video image that needs to be
processed. This study usesa technique based on contrast
manipulation, which is a combination of contrast
stretching and morphological contrast enhancement
techniques, to increase the contrast of video frames.
The goal is to enable the process of segmentation to
cluster objects in the video frames.
Contrast stretching: The contrast improvement of
video frames using contrast stretching can be done on
the original image, which means that this process only
depends on the value of intensity (gray level) of a pixel
and is not dependent on other pixels around it. Contrast
stretching will sharpen the elements in the image by
increasing the dynamics of gray level.
In contrast stretching, each pixel in the image is
transformed by:
. (1)
where, u(i,j) and o(i,j) are the pixels before and
aftertransformed on the coordinate (i, j), c and dare the
maximum and minimum values of pixels on the input
image and L is the maximum value of gray. If the pixel
value is less than zero, then it will be zero. Moreover, if
the value is greater than L−1, then it will be L−1 (Al-
Amri, 2011).
Morphological contrast enhancement: The objective
of morphological contrast enhancement is to clarify the
objects in the video frames obtained from the
monitoring of coastal areas. This technique can
overcome the influence of sunlight (illumination); thus,
the quality of image segmentation can be improved
(Widyantara et al., 2016).
Morphological contrast enhancement is applied
using morphology operation, namely, top-hat and
bottom-hat transformation (Hassanpour et al., 2015).
o(i, j) =
u(i, j)− c
d − c
(L −1)
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
104
Top-hat transformation is a morphological operation
that extracts the bright areas on the video frame using
structure elements. Conversely, bottom-hat
transformation extracts the dark areas. Both
morphology operationsare given as:
( ) ( )THTop Hat A A A A B− = = − ⋅ (2)
( ) ( )BHBottom Hat A A A B A− = = ⋅ − (3)
Further more, the video frame with new contrast is
obtained by summing the video frame with the results
of a top-hat transformation. To optimize the contrast,
the sum of video frames with the results of the top-hat
transformationthen substracted to the results of the
bottom-hat transformation. This process can reduce
dark areas in the video frame. Mathematically, this
process is given by:
EN TH BHA A A A= + − (4)
SOM: SOM algorithm separates objectsin the video
frames based on similarity features in the color of the
pixel, that is, the color index of the Red (R), Green (G)
and Blue (B). Further more, SOM segments the color
index by estimating the proximity to the center pixel
cluster. The SOM algorithm used for segmenting the
video frame is shown in Algorithm 1 (Kohonen, 2013).
SOM is a form of unsupervised ANN topology,
where the training process does not require supervision
(target output). SOM is used for clustering the data
based on the features of the data. Color image
segmentation results using the SOM algorithm can
produce a human perceptual segmentation approach.
Morphological operation: Morphological operation is
used to optimize the segmentation result by eliminating
noise on the objects that are not needed. Basic
operations performed on the morphology are dilation
and erosion. This operation is the basis for making a
variety of morphological operations that are very useful
for processing video frames.
Dilation: Dilation process is done by comparing each
pixel on the input video frame with a central value of
structuring element. This is done by superimposing
structuring element with the video frame, so that the
center of structuring element is to be right with the
pixel position of the video frame. If an object (image
input) is expressed by A, structuring element are
expressed by B and Bx is stated as translational B such
that B lies in the center of x, then the dilation operation
A to B can be expressed by:
{ }( , ) : xD A B A B x B A φ= ⊕ = ∩ ≠ (5)
Algorithm 1: SOM Algorithm
1. Initialization
a. Weight, wji
b. Initial learning rate, learning function, dan number
of iteration.
c. Number of cluster.
2. As long as the maximum number of iterations has
not been reached, do steps 3-7
3. For each input vector x (feature RGB), do steps 4-
4. Calculate all j with:
5. Dj = ∑ (‫ݓ‬௝௜ − ‫ݓ‬௜)௜
2
;i = 1, 2, ...., N
6. Determine the index j such that the minimum Dj
7. For each unit j around J, modification of weight
with:
8. wji(new) = wji (old) + η (xi – wji (old))
9. Modifications learning rate
Erosion: The erosion process is the opposite of
dilation. If the dilation process produces large object,
then the the reverse, the erosion processes will produce
narrowed objects. The hole in the object will appear
enlarged due to narrowing of the object boundary.
Erosion operation is given by:
( ) { }, : xE A B A B x B X= Θ = ⊂ (6)
Gray-Level Co-occurrence Matrix (GLCM): GLCM
is included in statistical methods where the statistical
calculations use gray degrees distribution (histogram).
GLCM statistics is a popular method in the image
texture feature extraction. Based on co-occurrence
matrix, Haralick et al. (1973) defined fourteen texture
features that were measured from a probability matrix
to extract the characteristics of remote-sensing image
texture. In this study, GLCM is used for texture features
extraction of segmentation results. Texture features
were used to identify areas (classification) with values
of land, sea and sky labels. Texture features used were
entropy, energy, contrast and homogeneity and are
defined as (Zayed and Elnemr, 2015):
( , )ln ( , )d d
i j
Entropy P i j P i j= −∑∑ (7)
2
( , )d
i j
Energy P i j= ∑∑ (8)
2
( ) ( , )d
i j
Contrast i j P i j= −∑∑ (9)
2
1
( , )
1 ( )
d
i j
Homogenity p i j
i j
=
+ −
∑∑ (10)
where,
pd = The normalized symmetric GLCM
pd(i,j) = The (i,j)th element of the nomalized GLCM
K-NN: K-NN is an object classification method based
on proximity (distance) of the data with other data. In
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
105
the classification, there is a training system to assist in
the classification. Training process on the K-NN
method is done by storing the feature of vector images
with a specified label (Kim et al., 2012). K-NN
classification can perform well on image classification
with texture features. K-NN classification algorithm is
shown in Algorithm 2. In this study, Euclidean distance
is used to measure the distance between test data and
training data objects.
Algorithm 2: K-NN classification algorithm:
1. Z = (x’,y’),s the test data as a function of a vector
x’ and the class label is unknown (y')
2. Calculate the distance d(x’,x), which is the distance
between the test data (Z) to each vector training
data, store it in D.
3. Select D2⊆ D, that is K-NNs of Z
4. Calculate the class:
‫́ݕ‬ = arg max ∑ ‫ݒ(ܫ‬ = ‫ݕ‬௜)(௫೔,௬೔)∈஽೥
Shoreline extraction: In this study, the shoreline
extraction process was performed using land label
scanning on the results obtained after K-NN
classification. Scanning of labels made against
neighboring pixels ofthe image of the label area of land.
If the neighboring pixels were not members of the land
label, then the pixels are marked as pixels of the
shoreline. A collection of pixels that were marked as
pixels of the shoreline will form shoreline areas.
RESULTS AND DISCUSSION
The detection of the shoreline position during
video frame monitoring coastal areas using data mining
techniques has been applied in this study using Matlab
R2014a. Figure 2 shows that the shoreline position was
successfully determined using the video frame
monitoring shoreline system. The system consists of
several sub-processes including training systems,
preprocessing, image segmentation, morphological
operations, classification and determination of shoreline
position.
Training system: Figure 3 shows training processes for
training data using K-NN classification. In the training
system, texture feature extraction is performed using
GLCM. Texture is stored with a label that has been
determined using a. csv file that will be used in the
classification process. Figure 4 shows samples of the
training data using the K-NN classification training
system.
Preprocessing: In this process, video frame
enhancement is done using contrast stretching and
morphological contrast stretching so that the color in
the video frame is sharper and the influence of
illumination is reduced on the frame contrast stretching
operation. The results of preprocessing a video frame
are shown in Fig. 5. The Matlab script for contrast
stretching is indicated by
Function imgContrast = contrast(img)
rimg = histeq(img(:,:,1));
gimg = histeq(img(:,:,2));
bimg = histeq(img(:,:,3));
imgContrast = cat(3, rimg, gimg, bimg);
Fig. 2: Shoreline video monitoring systems
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
106
Fig. 3: Shoreline training system classification
(a) (b)
(c)
Fig. 4: Sample of training data; (a): sea label; (b): land label
and; (c): sky label
(a) (b)
(c)
Fig. 5: Preprocessing results of video frame; (a): Original
frame; (b): Contrast stretching; (c): Morphological
contrast enhancement
The syntax for the morphological contrast
enhancement process is as follows:
se = strel(‘square’,10);
Itop = imtophat(I);
Ibot = imbothat(I,se);
Ienhance = imsubtract(imadd(Itop,I),Ibot);
Ienhance = imcompliment(Ienhance);
SOM segmentation: The results of the image
enhancement process undergo the image segmentation
process, which divides the objects in the video frame
into a separate areas. In this process, the similarity of
every region refers to an obvious criteria. In this study,
the criteria used is based on the features of RGB.
Algorithm 3: Segmentation process using SOM:
Input: Input Vectors
Output: Image Cluster
1. Initialize Total Cluster, MaxIterations, Learning
Rate, Learning Rate Reduction
2. xij<- Input Vectors
3. wij<- Initialize Codebook Vectors (Input Vectors
Width, Total Cluster)
4. For (z = 1 to maxiterations)
5. For (y = 1 to Input VectorHeight)
6. For (j = 1 to Total Cluster)
7. Calculate distance Dj = ∑ (‫ݓ‬௜௝ − ‫ݔ‬௜௝)ଶ
௜
8. End
9. BMUz= minimum(D)
10. ind = index of minimum(D)
11. ClusterIndexi = ind
12. Update wij, wi= wi + (Learning Rate*(xind - wi))
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
107
Table 1: SOM algorithm performances
No Testing data Silhouette values Explanation / Criteria
1 0.3610 Weak Cluster
2 0.5447 Reasonable Cluster
3 0.5290 Reasonable Cluster
13. End
14. Learning Rate =
15. Learning Rate*Learning Rate Reduction
16. End
17. PixelLabel <- Reshape (Cluster Index, Input
VectorHeight, Input VectorWidth)
18. For (s = 1 to Total Cluster)
19. Image Clusters <- Input Vectors = Pixel Label(s)
20. End
In the SOM segmentation, feature values of RGB
should be normalized. The aim is that values of feature
has an uniform range of minimum and maximum
values. After the process of normalization, the
segmentation mechanism using SOM was conducted
with several attribute values, i.e., the number of clusters
is 3, the maximum number of iterations is 100, the
learning rate is 0.5, the learning function is 0.2 and the
initialization of the initial weight is randomly
determined according to the number of clusters.
Determination of the attribute values is based on a
series of experiments that can maximize the
performance of the SOM algorithm. The segmentation
process using SOM is shown in Algorithm 3, while the
segmentation results are shown in Fig. 6.
The performance evaluation of the SOM algorithm
in segmenting the video frame on a shoreline detection
system is determined by searching an index value
validation, using the silhouette coefficient (Rousseeuw,
1987). The measurements are carried out against three
randomized trial data.
Table 1 shows that the quality of the segmentation
generated by the SOM algorithm is good, which is
entered in the category of reasonable cluster. It has been
shown that the application of preprocessing techniques
using contrast stretching and morphological contrast
enhancement can help the SOM-based segmentation
process for segmenting objects in the video frames.
Preliminary research has been done also shows that the
application of techniques based on morphological
contrast enhancement is able to indicate the degree of
ownership of the objects in the cluster approach 1
(reasonable). The values of silhouette has a range of -1
to 1, where the value is close to 1 have a better quality
cluster. This means that the contrast manipulation-
based techniques can support the process of
segmentation (Widyantara et al., 2016).
Morphology operation: Application of morphology
operation is to reduce the set of small pixels on the
results of segmentation that can affect the performance
of the classification of the shore area. As shown in Fig.
7, morphological operations are able to optimize the
segmentation results generated by SOM. The
application of the morphology operation carried out at
several stages of the process, namely, a binary image
transformation, opening, closing and imfill. The stages
of implementing techniques of morphology operation
are shown in Algorithm 4. The final results of the
morphology operation are then used as a reference
matrix to optimize the segmentation results for the
classification process.
Algorithm 4: Morphology operation:
1. Binary image transformation BW1 = im2 bw
(segmentation result)
2. Opening operation BWao = bwareaopen(BW1)
3. Closing operation closeBWao = imclose
(BWao,nhood);
4. Filtering Operation rough Mask = imfill (close
BWao,’ holes’);
K-NN Classification: KNN classification aims to
provide a label class in each region segmentation results
of SOM. This study has used three class labels, namely,
sea, land and sky. In this study, the classification
process is carried out in three main stages, namely, the
extraction of features, trainning of dataset and
classification of K-NN. The implementation details of
each stage is shown in Algorithm 5.
K-NN algorithm testing is done by calculating the
area under the curve (AUC) on the ROC curve (Han
et al., 2011). ROC curves are presented on the basis of
the results of testing of each class label a with
confusion matrix. Each class was tested three times,
with a set of 30 testing data. The classification is
evaluated by analyzing the accuracy, sensitivity,
specificity and false positive rate. The results of the
confusion matrix test in each class are presented on the
ROC curve.
Algorithm 5: Classification process:
Training Data:
Input: Sample Data, Label
Output: Training Data
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
108
(a) (b) (c)
Fig. 6: Segmentation results of video frame; (a): Segmentation 1; (b): Segmentation 2; (c): Segmentation 3
(a) (b) (c)
(d) (e) (f)
Fig. 7: Morphological process; (a): SOM result segmentation; (b): Binary image transformation; (c): Opening operation; (d):
Closing operation; (e): Imfill operation; (f): Segmentation final
1. c = SampleData;
2. l = classLabel;
3. x = extraxt GLCMFeature (c);
4. Define label to x, t = [c x];
5. Store t into TrainingData vector;
6. Return TrainingData
Classification:
Input: Image Cluster, Training Data
Output: Labelled Image Cluster
1. c = ImageCluster;
2. t = TrainingData;
3. For (i = 1 to c.count)
4. x = Extract GLCMFeature(ci);
5. For (j = 1 to t.count)
6. calculate distance Dij(x,t)
7. Dij = ∑ (‫ݓ‬௜௝ − ‫ݔ‬௜௝)௜
2
;
8. End
9. Order D from lowest to highest;
10. Select the K-nearest instance to x : ‫ܦ‬௫
௄
;
Table 2: K-NN algorithm performances
Experiment Accuracy Precision Sensitivity Specificity False positive
Sea label
1 0.90 0.95 0.90 0.90 0.10
2 0.93 0.87 0.93 0.86 0.14
3 1 0.95 1 0.70 0.30
Land label
1 0.87 0.75 0.90 0.85 0.15
2 0.90 0.90 0.95 0.80 0.20
3 0.87 0.82 0.93 0.80 0.20
Sky label
1 0.83 0.86 0.80 0.86 0.14
2 0.87 0.82 0.93 0.80 0.20
3 0.83 0.94 0.80 0.90 0.10
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
109
(a) (b)
(c)
Fig. 8: ROC Graph; (a): sea label; (b): land label and; (c): sky label
11. LabbeledImageClusteri = Assign to x the most
frequent label in ‫ܦ‬௫
௄
;
12. End
13. Return LabelledImageCluster;
As shown in Table 2 and Fig. 8, in general, the
classification of sea, land and sky labels can be
performed well by using the K-NN algorithm. This is
evidenced by the AUC value that is at an average value
of sensitivity approaches a value of 1, each of 0.94 to
sea label, 0.82 to land label and 0.84 to sky label. In
data mining, AUC value range is from 0.5 up to 1. In
the AUC value of 0.9 up to 1, said that the quality
classification is unbelievably good and at a value from
0.8 to 0.89 classification quality is good (Gorunescu,
2011).
Shoreline detection: In the process of determining
shorelines, the neighboring pixels were scanned from
the edge of the land areas using binary image
transformation. Scanning was performed from the right
side in Fig. 9. If the neighboring pixels had a value of
approximately zero, then the pixel was given a value of
one as a shoreline sign.
To determine the change of shoreline, shoreline
position comparisons are needed between video frames.
This study uses the shoreline position in a reference
frame as the reference position. Furthermore, this
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
110
(a) (b) (c) (d)
(e) (f) (g) (h)
Fig. 9: Determining shoreline position process on frame 1 and frame 2: (a) and (e) areas with land label, (b) and (f)
transformation results of binary images, (c) and (g) scanning neighboring pixels and (d) and (h) shoreline on a video
frame
(a) (b)
(c)
Fig. 10: Shoreline changes; (a): Reference frame; (b): Data
frame 1 and; (c): Data frame 2
reference position compared to the position of the
shoreline in the other video frame. The results of the
comparison will be displayed in a video frame
reconstruction (Fig. 10). The shoreline found is
provided in red, the shoreline of the reference frame is
in purple and the area of the shoreline change is in pink.
The information of the distance between video frame
inputs and reference frames denotes the number of
pixels in the range of marked areas.
CONCLUSION
The implementation of data mining techniques for
detecting the shoreline location by using frame-by-
frame video monitoring of shore areas has been
performed. The proposed system comprises a
classification training system for a shore area and has a
shoreline detection system that is based on SOM and K-
NN algorithms. This system can automatically detect
the position of the shoreline in the video frame. It can
also display information concerning shoreline alteration
based on the reference frame. The distance information
concerning the changes in a shoreline is in pixels.
Further research is needed to change the video frame to
the map domain using the rectification technique so that
the distance measurement can be performed using
scaling techniques.
ACKNOWLEDGMENT
This study was funded by competitive research
grants in 2016 from Udayana University under the
contract number 486.25/UN14.2/PNL.01.03.00/2016.
REFERENCES
Aarninkhof, S.G.J., I.L. Turner, T.D.T. Dronkers, M.
Caljouw and L. Nipius, 2003. A video-based
technique for mapping intertidal beach bathymetry.
Coastal Eng., 49(4): 275-289.
Al-Amri, S.S., 2011. Contrast stretching enhancement
in remote sensing image. BIOINFO Sensor Netw.,
1(1): 6-9.
Almar, R., R. Ranasinghe, N. Sénéchal, P. Bonneton,
D. Roelvink, K.R. Bryan, V. Marieu and J.P.
Parisot, 2012. Video-based detection of shorelines
at complex meso-macro tidal beaches. J. Coastal
Res., 28(5): 1040-1048.
Argus, 2015. Argus Image Archive: Site: Egmond
(Coast3D tower). Noord Holland. Retrieved from:
http://argus-public.deltares.nl/archive. (Accessed
on: May 1-30, 2015)
Goncalves, R.M., J.L. Awange, C.P. Krueger, B. Heck
and L. dos Santos Coelho, 2012. A comparison
between three short-term shoreline prediction
models. Ocean Coast. Manage., 69: 102-110.
Gorunescu, F., 2011. Data Mining: Concepts, Models
and Techniques. Springer, Berlin, Heidelberg.
Han, J., M. Kamber and J. Pei, 2011. Data Mining:
Concepts and Techniques. 3rd Edn., Elsevier
Science, Berlington.
Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017
111
Haralick, R.M., K. Shanmugam and T. Dinstein, 1973.
Textural features for image classification. IEEE T.
Syst. Man Cyb., SMC-3(6): 610-621.
Hassanpour, H., N. Samadiani and S.M.M. Salehi,
2015. Using morphological transforms to enhance
the contrast of medical images. Egypt. J. Radiol.
Nucl. Med., 46(2): 481-489.
Huang, K., S. Li, X. Kang and L. Fang, 2016. Spectral–
spatial hyperspectral image classification based on
KNN. Sens. Imag., 17: 1.
Huisman, C.E., K.R. Bryan, G. Coco and B.G.
Ruessink, 2011. The use of video imagery to
analyse groundwater and shoreline dynamics on a
dissipative beach. Cont. Shelf Res., 31(16): 1728-
1738.
Jain, A.K., R.P.W. Duin and J. Mao, 2000. Statistical
pattern recognition: A review. IEEE T. Pattern
Anal., 22(1): 4-37.
Kim, J., B.S. Kim and S. Savarese, 2012. Comparing
image classification methods: K-nearest-neighbor
and support-vector-machines. Proceeding of the
6th WSEAS International Conference on Computer
Engineering and Applications and American
Conference on Applied Mathematics
(AMERICAN-MATH'12/CEA'12). Cambridge,
USA, pp: 133-138.
Kingston, K.S., B.G. Ruessink, I.M.J. Van Enckevort
and M.A. Davidson, 2000. Artificial neural
network correction of remotely sensed sandbar
location. Mar. Geol., 169(1-2): 137-160.
Kohonen, T., 2013. Essentials of the self-organizing
map. Neural Networks, 37: 52-65.
Ortiz, A., J.M. Górriz, J. Ramírez, D. Salas-González
and J.M. Llamas-Elvira, 2013. Two fully-
unsupervised methods for MR brain image
segmentation using SOM-based strategies. Appl.
Soft Comput., 13(15): 2668-2682.
Plant, N.G., S.G.J. Aarninkhof, I.L. Turner and K.S.
Kingston, 2007. The performance of shoreline
detection models applied to video imagery. J.
Coastal Res., 23(3): 658-670.
Rigos, A., O.P. Andreadis, M. Andreas, M.I.
Vousdoukas, G.E. Tsekouras and A. Velegrakis,
2014. Shoreline extraction from coastal images
using chebyshev polynomials and RBF neural
networks. Proceeding of the 10th International
Conference on Artificial Intelligence Applications
and Innovations. Springer, Berlin, Heidelberg, 436:
593-603.
Rijn, L.C.V., 2007. Manual Sediment Transport
Measurements in Rivers, Estuaries and Coastal
Seas. Aqua Publications, Delft, Netherlands.
Rousseeuw, P.J., 1987. Silhouettes: A graphical aid to
the interpretation and validation of cluster analysis.
J. Comput. Appl. Math., 20: 53-65.
Turner, I.L., V. Leyden, G. Symonds, L.A. Jackson, T.
Jancar, S. Aarninkhof and I. Elshoff, 2000.
Comparison of observed and predicted coastline
changes at the gold coast artificial (surfing) reef.
Proceeding of the 27th International Conference on
Coastal Engineering. Sydney, Australia, pp: 1836-
1847.
Widyantara, I.M.O., 2015. Decoding approach with
unsupervised learning of two motion fields for
improving Wyner-Ziv coding of video. Int. J. Appl.
Eng. Res., 10(5): 11763-11776.
Widyantara, I.M.O., N.M.A.E.D. Wirastuti, I.M.D.P.
Asana and I.B.P. Adnyana, 2016. Image
enhancement using morphological contrast
enhancement for video based image analysis.
Proceeding of the International Conference on Data
and Software Engineering (ICoDSE), Oct. 26-27.
Zayed, N. and H.A. Elnemr, 2015. Statistical analysis
of Haralick texture features to discriminate lung
abnormalities. Int. J. Biomed. Imag., 2015: 1-7.

More Related Content

PDF
Using Remote Sensing Techniques For Monitoring Ecological Changes In Lakes: C...
PDF
D41037045
PDF
B04920920
PDF
L012438186
PPTX
PDF
Mapping of hydrothermal alteration in mount berecha area of main ethiopian ri...
PDF
2 d seismic refraction tomography investigation of a sewage treatment site
Using Remote Sensing Techniques For Monitoring Ecological Changes In Lakes: C...
D41037045
B04920920
L012438186
Mapping of hydrothermal alteration in mount berecha area of main ethiopian ri...
2 d seismic refraction tomography investigation of a sewage treatment site

What's hot (18)

PDF
B0362010014
PDF
Shallow Water Depth Mapping Using Single Band and Band Ratio on High-Resoluti...
PDF
Heritage hetherington lidar_pdf[1]
PDF
Multi sensor data fusion for change detection
PDF
UAV Mangroves Rev 0 colour
PPSX
Gissa 2013-6 10-Iuma Martinez
PDF
Monitoring and analysis of deformation of ikpoba river bridge, benin city, ed...
PPT
FR4.L09 - KARIN – THE KA-BAND RADAR INTERFEROMETER ON SWOT: MEASUREMENT PRINC...
PPTX
The Nippon foundation -GEBCO seabed 2030
PDF
CNR at NSE2019
PPT
FR4.L09 - QUANTITATIVE ASSESSMENT ON THE REQUIREMENTS OF DESDYNI MISSION FOR ...
PPT
Integrated Geophysical Approach for Rapid & Cost Effective Site Investigation...
PDF
19 b
PDF
Evaluation and Accuracy Assessment of Static GPS Technique in Monitoring of ...
PPT
1_Buck - Wavemil Steps IGARSS-11.ppt
PDF
Langhammer, Miřijovský
PDF
OECD_PortugalKeynote_SatelliteTechnology_R1r00
PDF
Calibration of Physically based Hydrological Models
B0362010014
Shallow Water Depth Mapping Using Single Band and Band Ratio on High-Resoluti...
Heritage hetherington lidar_pdf[1]
Multi sensor data fusion for change detection
UAV Mangroves Rev 0 colour
Gissa 2013-6 10-Iuma Martinez
Monitoring and analysis of deformation of ikpoba river bridge, benin city, ed...
FR4.L09 - KARIN – THE KA-BAND RADAR INTERFEROMETER ON SWOT: MEASUREMENT PRINC...
The Nippon foundation -GEBCO seabed 2030
CNR at NSE2019
FR4.L09 - QUANTITATIVE ASSESSMENT ON THE REQUIREMENTS OF DESDYNI MISSION FOR ...
Integrated Geophysical Approach for Rapid & Cost Effective Site Investigation...
19 b
Evaluation and Accuracy Assessment of Static GPS Technique in Monitoring of ...
1_Buck - Wavemil Steps IGARSS-11.ppt
Langhammer, Miřijovský
OECD_PortugalKeynote_SatelliteTechnology_R1r00
Calibration of Physically based Hydrological Models
Ad

Similar to An Automated Approach of Shoreline Detection Applied to Digital Videos using Data Mining (20)

PDF
GEO-SPATIAL TECHNOLOGIES IN SHORELINE ANALYSIS, VARIABILITY AND EROSION
PDF
COVIMOS: A Coastal Video Monitoring System
DOCX
Work_Sample_Paper
PDF
Supervised classification and improved filtering method for shoreline detection.
PDF
Automated Extraction of Shoreline in Tuban Regency, East Java from Google Ear...
PDF
Acrs2012 safe coastal_sl_final
PDF
A Novel Approach for Ship Recognition using Shape and Texture
PDF
DSD-INT 2017 Global sandy shoreline dynamics derived from satellite imagery -...
PDF
Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
PPTX
coastal management by Remote Sensing and GIS
PDF
02-Final Updated NEOM_MH_06_07_2024_v1_English.pdf
PDF
Development of a Location Invariant Crack Detection and Localisation Model (L...
PDF
IRJET- Impacts of Afforested Mangroves in Tadri River – Geospatial Assess...
DOC
Brusli n
PPTX
Climate change and Coastal India
PPTX
Beach slopes from satellite-derived shorelines [Coast2Coast presentation]
PDF
Wave Characterization for the Diagnosis of Semi-Submerged Structures
PDF
Pheno metric as published
PDF
National Highway Alignment from Namakkal to Erode Using GIS
GEO-SPATIAL TECHNOLOGIES IN SHORELINE ANALYSIS, VARIABILITY AND EROSION
COVIMOS: A Coastal Video Monitoring System
Work_Sample_Paper
Supervised classification and improved filtering method for shoreline detection.
Automated Extraction of Shoreline in Tuban Regency, East Java from Google Ear...
Acrs2012 safe coastal_sl_final
A Novel Approach for Ship Recognition using Shape and Texture
DSD-INT 2017 Global sandy shoreline dynamics derived from satellite imagery -...
Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
coastal management by Remote Sensing and GIS
02-Final Updated NEOM_MH_06_07_2024_v1_English.pdf
Development of a Location Invariant Crack Detection and Localisation Model (L...
IRJET- Impacts of Afforested Mangroves in Tadri River – Geospatial Assess...
Brusli n
Climate change and Coastal India
Beach slopes from satellite-derived shorelines [Coast2Coast presentation]
Wave Characterization for the Diagnosis of Semi-Submerged Structures
Pheno metric as published
National Highway Alignment from Namakkal to Erode Using GIS
Ad

Recently uploaded (20)

PPTX
Artificial Intelligence
PDF
Well-logging-methods_new................
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPT
Project quality management in manufacturing
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
web development for engineering and engineering
PPTX
Sustainable Sites - Green Building Construction
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Digital Logic Computer Design lecture notes
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
DOCX
573137875-Attendance-Management-System-original
PDF
PPT on Performance Review to get promotions
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Artificial Intelligence
Well-logging-methods_new................
CYBER-CRIMES AND SECURITY A guide to understanding
Project quality management in manufacturing
Lecture Notes Electrical Wiring System Components
Automation-in-Manufacturing-Chapter-Introduction.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
web development for engineering and engineering
Sustainable Sites - Green Building Construction
UNIT 4 Total Quality Management .pptx
Digital Logic Computer Design lecture notes
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
573137875-Attendance-Management-System-original
PPT on Performance Review to get promotions
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

An Automated Approach of Shoreline Detection Applied to Digital Videos using Data Mining

  • 1. Research Journal of Applied Sciences, Engineering and Technology 14(3): 101-111, 2017 DOI:10.19026/rjaset.14.4152 ISSN: 2040-7459; e-ISSN: 2040-7467 © 2017 Maxwell Scientific Organization Corp. Submitted: November 15, 2016 Accepted: February 13, 2017 Published: March 15, 2017 Corresponding Author: I. Made Oka Widyantara, Electrical Engineering Department, Faculty of Engineering, Udayana University, Jimbaran, Bali, Indonesia This work is licensed under a Creative Commons Attribution 4.0 International License (URL: http://creativecommons.org/licenses/by/4.0/). 101 Research Article An Automated Approach of Shoreline Detection Applied to Digital Videos using Data Mining 1 I. Made Oka Widyantara, 1 I. Made Dwi Putra Asana, 1 N.M.A.E.D. Wirastuti and 2 Ida Bagus Putu Adnyana 1 Electrical Engineering Department, Faculty of Engineering, 2 Civil Engineering Department, Udayana University, Jimbaran, Bali, Indonesia Abstract: This study aims to detect a shoreline location and its changes automatically in the temporal resolution. This approach is implemented on the coastal video monitoring system applications. The proposed method applied data mining by using two main systems-a training system using classification and shoreline detection systems with Self-Organizing Map (SOM) and K-Nearest Neighbor (K-NN) algorithms. The training system performs feature texture extraction using agray-level co-occurrence matrix and the results are stored to classification process. The detection system has five processing stages: contrast stretching preprocessing and morphological contrast enhancement, SOM clustering, morphological operations, feature extraction and K-NN classification and detection shoreline. Preprocessing was used to improve the video image contrast and reliability. SOM algorithm in segmenting objects in the onshore video images. Morphological operations were applied to eliminate noise on the objects that were not needed in the spatial domain. The segmentation results of video frames classified by K-NN. The aim is to provide the class labels on each region segmentation results, namely, sea label, land label and sky label. The determination of the shoreline is done by scanning the neighboring pixels from the edge of land class label after binary image transformation. The shoreline change detection was performed by comparing the position of existing shoreline and shoreline position in the reference video frame. A Receiver Operating Characteristic (ROC) curve was used to evaluate the performance of shoreline detection systems. The results showed that the combination of SOM and K-NN was able to detect shoreline and its changes accurately. Keywords: Feature extraction, image enhancement, K-NN, shoreline, SOM, video monitoring INTRODUCTION Shoreline, the contact zone between ocean and land, has changed over time due to the cross-shore movement of sediments along the shore and the dynamic nature of the water surface. The dynamic changes of the shoreline may cause erosion of the beach bodies (abrasion) and the addition of beach bodies (accretion), which can damage the coastal environment. Therefore, monitoring the position of the shoreline is a very significant issue given the socio-economic value and high population density along shore areas (Goncalves et al., 2012; Huisman et al., 2011). Beach morphology changes in different spatial and temporal scales. Therefore, intensive monitoring schemes are required (Rigos et al., 2014). Traditionally, shoreline studies have been based on field measurements of waves, currents, sediment transport and morphological changes. This scheme can provide essential information concerning the shoreline in temporal resolution but it has limitations in spatial resolution. Moreover, some logistical difficulties, such as high cost and difficulty of the survey when the weather conditions are bad, exist in this scheme (Rijn, 2007). Another method is remote sensing by using satellites or aircraft fitted with remote-sensing systems with active and passive sensors to describe the dynamics of the nearshore area. This method offers a good spatial-temporal resolution, but these observations are relatively expensive and the visibility is not extensive. Some of the difficulties mentioned above can be solved using video-based remote-sensing systems (Almar et al., 2012). Video monitoring system provides information in data per second in the time scale and spatial scales from meters to kilometers. The emergence of devices based network cameras, allowing the spatial scale can be expanded. This is done by installing
  • 2. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 102 cameras scattered along the coast and is integrated in a computer network. Currently, many studies on shoreline estimate use data from digital video sources. Video-detected shoreline is generally estimated using several methods among: • Shore Line Intensity Maximum (SLIM) • Pixel Intensity Clustering (PIC) • Artificial Neural Network (ANN) • Channel Color Divergence (CCD) SLIM method defines as cross-shore shoreline position at which wave breaking is maximized, which corresponds to maximum pixel intensity in close to the shore (Plant et al., 2007). CCD method is based on red, green and blue channels whose values are similar to the white sand on the shore but have different values in water (Turner et al., 2000). The shoreline is defined on each cross-shore transect where divergence between color channels exceeds a threshold. A technique was developed by PIC (Aarninkhof et al., 2003) that uses both color and grayscale intensity information. The ANN models use neural networks to differentiate wet pixels from dry pixels by using the RGB channel as an input (Rigos et al., 2014; Kingston et al., 2000). The number of proposed methods showed that the robust shoreline detection procedures have many challenges due to the variety of intra-annual environmental, hydrodynamic and morphological conditions in the coastal zone. In an effort to develop a system that provides remote sensing-based digital videos, this study has built shoreline detection systems using data mining techniques. Detection of shorelines is done by segmentation of shore objects in the video frame, followed by the classification of these objects. The objects on the shore on a video frame are separated according to the similarity of pixels and the process of object recognition would categorize objects into objects land, sea and sky. When an object is recognized as the land, then the scanning process is carried out to obtain the pixels in the object marked as land that has pixels neighboring the sea objects. The pixels on the land label that has neighboring pixels with sea label is shoreline. This study applied SOM algorithms in the process of clustering and K-NN algorithm in the classification process. SOM algorithm has been known as a reliable clustering method and has been applied in a wide range of applications (Kohonen, 2013; Ortiz et al., 2013). SOM-ANN training uses a technique that is based on winner take all, where only the winner neurons willrenewed its weight. Although SOM is based on ANN, itdoes not use the class target value, so that no classes are defined for each data. As a classifier algorithm, the K-NN algorithm has advantages when used for the election of large data compared with other classification methods (Jain et al., 2000). K-NN algorithms perform classification based on the proximity (distance) of the data with other data, which is the shortest distance from a sample to the test sample. With this technique, the K-NN algorithm is able to fully exploit the spatial correlation between adjacent data (Huang et al., 2016). This technique is needed for the classification of land, sky and sea objects on ashore line image. In this study, an automatic shoreline detection in the video monitoring system of shoreline change was explained. The proposed methods comprise five modules. The first module formed preprocessing mechanisms to improve the shoreline image quality. The clustering process which segmenting objects that based on color feature similarity by getting rid of color feature of pixels, itwas performed in the second module. The quality of segmentation improved by removing noise usingthe morphology algorithm was done in module three. Feature extraction and object classification was performed in module four. Moreover, module five provides the shoreline extraction. For the classification mechanism, this study uses a classification training method for a shore area. MATERIALS AND METHODS In this study, a video monitoring system to track shoreline changes using data mining techniques has been developed. The dataset video that was used was shore area monitoring dataset of Egmond, Netherlands that was downloaded from the website Deltares Argus Archive (Argus, 2015). The video was an image combination that proceeded sequentially in time with a certain speed. The images that formed the video were called frames. Moreover, the image recitation speed was called frame rate and has a unit of frame per second (Widyantara, 2015). The video frame of the Egmondshore area was an input that was processed in the system so that the position shoreline could be shown automatically. A flow analysis of the video monitoring system concerning the shoreline change is shown in Fig. 1. Preprocessing: The video frames were obtained from the process of monitoring the activity of the coastline, is a color image with sunlight effect compositions that vary according to the acquisition time. The effect of sunlight varies in shore areas and this becomes a problem when separating objects during the segmentation process (Widyantara et al., 2016). Therefore, an image enhancement mechanism is required to improve the graphical display of the video frames prior to the segmentation process. Image enhancement is accentuated or sharpening elements of an image such as edge, boundaries or contrast levels that it creates a useful graphic display of the image. Image enhancement does not fix or improve
  • 3. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 103 Fig. 1: Research method the quality of information and data that already exists in the image. Nevertheless, image enhancement increase the dynamic range of desired elements in the image so that the elements can be noticed or seen clearly. Image enhancement includes functions such as contrast manipulation, noise reduction, edge crispening and sharpening, interpolation and image magnification. The selection of techniques to be used must also consider the characteristics of the video image that needs to be processed. This study usesa technique based on contrast manipulation, which is a combination of contrast stretching and morphological contrast enhancement techniques, to increase the contrast of video frames. The goal is to enable the process of segmentation to cluster objects in the video frames. Contrast stretching: The contrast improvement of video frames using contrast stretching can be done on the original image, which means that this process only depends on the value of intensity (gray level) of a pixel and is not dependent on other pixels around it. Contrast stretching will sharpen the elements in the image by increasing the dynamics of gray level. In contrast stretching, each pixel in the image is transformed by: . (1) where, u(i,j) and o(i,j) are the pixels before and aftertransformed on the coordinate (i, j), c and dare the maximum and minimum values of pixels on the input image and L is the maximum value of gray. If the pixel value is less than zero, then it will be zero. Moreover, if the value is greater than L−1, then it will be L−1 (Al- Amri, 2011). Morphological contrast enhancement: The objective of morphological contrast enhancement is to clarify the objects in the video frames obtained from the monitoring of coastal areas. This technique can overcome the influence of sunlight (illumination); thus, the quality of image segmentation can be improved (Widyantara et al., 2016). Morphological contrast enhancement is applied using morphology operation, namely, top-hat and bottom-hat transformation (Hassanpour et al., 2015). o(i, j) = u(i, j)− c d − c (L −1)
  • 4. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 104 Top-hat transformation is a morphological operation that extracts the bright areas on the video frame using structure elements. Conversely, bottom-hat transformation extracts the dark areas. Both morphology operationsare given as: ( ) ( )THTop Hat A A A A B− = = − ⋅ (2) ( ) ( )BHBottom Hat A A A B A− = = ⋅ − (3) Further more, the video frame with new contrast is obtained by summing the video frame with the results of a top-hat transformation. To optimize the contrast, the sum of video frames with the results of the top-hat transformationthen substracted to the results of the bottom-hat transformation. This process can reduce dark areas in the video frame. Mathematically, this process is given by: EN TH BHA A A A= + − (4) SOM: SOM algorithm separates objectsin the video frames based on similarity features in the color of the pixel, that is, the color index of the Red (R), Green (G) and Blue (B). Further more, SOM segments the color index by estimating the proximity to the center pixel cluster. The SOM algorithm used for segmenting the video frame is shown in Algorithm 1 (Kohonen, 2013). SOM is a form of unsupervised ANN topology, where the training process does not require supervision (target output). SOM is used for clustering the data based on the features of the data. Color image segmentation results using the SOM algorithm can produce a human perceptual segmentation approach. Morphological operation: Morphological operation is used to optimize the segmentation result by eliminating noise on the objects that are not needed. Basic operations performed on the morphology are dilation and erosion. This operation is the basis for making a variety of morphological operations that are very useful for processing video frames. Dilation: Dilation process is done by comparing each pixel on the input video frame with a central value of structuring element. This is done by superimposing structuring element with the video frame, so that the center of structuring element is to be right with the pixel position of the video frame. If an object (image input) is expressed by A, structuring element are expressed by B and Bx is stated as translational B such that B lies in the center of x, then the dilation operation A to B can be expressed by: { }( , ) : xD A B A B x B A φ= ⊕ = ∩ ≠ (5) Algorithm 1: SOM Algorithm 1. Initialization a. Weight, wji b. Initial learning rate, learning function, dan number of iteration. c. Number of cluster. 2. As long as the maximum number of iterations has not been reached, do steps 3-7 3. For each input vector x (feature RGB), do steps 4- 4. Calculate all j with: 5. Dj = ∑ (‫ݓ‬௝௜ − ‫ݓ‬௜)௜ 2 ;i = 1, 2, ...., N 6. Determine the index j such that the minimum Dj 7. For each unit j around J, modification of weight with: 8. wji(new) = wji (old) + η (xi – wji (old)) 9. Modifications learning rate Erosion: The erosion process is the opposite of dilation. If the dilation process produces large object, then the the reverse, the erosion processes will produce narrowed objects. The hole in the object will appear enlarged due to narrowing of the object boundary. Erosion operation is given by: ( ) { }, : xE A B A B x B X= Θ = ⊂ (6) Gray-Level Co-occurrence Matrix (GLCM): GLCM is included in statistical methods where the statistical calculations use gray degrees distribution (histogram). GLCM statistics is a popular method in the image texture feature extraction. Based on co-occurrence matrix, Haralick et al. (1973) defined fourteen texture features that were measured from a probability matrix to extract the characteristics of remote-sensing image texture. In this study, GLCM is used for texture features extraction of segmentation results. Texture features were used to identify areas (classification) with values of land, sea and sky labels. Texture features used were entropy, energy, contrast and homogeneity and are defined as (Zayed and Elnemr, 2015): ( , )ln ( , )d d i j Entropy P i j P i j= −∑∑ (7) 2 ( , )d i j Energy P i j= ∑∑ (8) 2 ( ) ( , )d i j Contrast i j P i j= −∑∑ (9) 2 1 ( , ) 1 ( ) d i j Homogenity p i j i j = + − ∑∑ (10) where, pd = The normalized symmetric GLCM pd(i,j) = The (i,j)th element of the nomalized GLCM K-NN: K-NN is an object classification method based on proximity (distance) of the data with other data. In
  • 5. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 105 the classification, there is a training system to assist in the classification. Training process on the K-NN method is done by storing the feature of vector images with a specified label (Kim et al., 2012). K-NN classification can perform well on image classification with texture features. K-NN classification algorithm is shown in Algorithm 2. In this study, Euclidean distance is used to measure the distance between test data and training data objects. Algorithm 2: K-NN classification algorithm: 1. Z = (x’,y’),s the test data as a function of a vector x’ and the class label is unknown (y') 2. Calculate the distance d(x’,x), which is the distance between the test data (Z) to each vector training data, store it in D. 3. Select D2⊆ D, that is K-NNs of Z 4. Calculate the class: ‫́ݕ‬ = arg max ∑ ‫ݒ(ܫ‬ = ‫ݕ‬௜)(௫೔,௬೔)∈஽೥ Shoreline extraction: In this study, the shoreline extraction process was performed using land label scanning on the results obtained after K-NN classification. Scanning of labels made against neighboring pixels ofthe image of the label area of land. If the neighboring pixels were not members of the land label, then the pixels are marked as pixels of the shoreline. A collection of pixels that were marked as pixels of the shoreline will form shoreline areas. RESULTS AND DISCUSSION The detection of the shoreline position during video frame monitoring coastal areas using data mining techniques has been applied in this study using Matlab R2014a. Figure 2 shows that the shoreline position was successfully determined using the video frame monitoring shoreline system. The system consists of several sub-processes including training systems, preprocessing, image segmentation, morphological operations, classification and determination of shoreline position. Training system: Figure 3 shows training processes for training data using K-NN classification. In the training system, texture feature extraction is performed using GLCM. Texture is stored with a label that has been determined using a. csv file that will be used in the classification process. Figure 4 shows samples of the training data using the K-NN classification training system. Preprocessing: In this process, video frame enhancement is done using contrast stretching and morphological contrast stretching so that the color in the video frame is sharper and the influence of illumination is reduced on the frame contrast stretching operation. The results of preprocessing a video frame are shown in Fig. 5. The Matlab script for contrast stretching is indicated by Function imgContrast = contrast(img) rimg = histeq(img(:,:,1)); gimg = histeq(img(:,:,2)); bimg = histeq(img(:,:,3)); imgContrast = cat(3, rimg, gimg, bimg); Fig. 2: Shoreline video monitoring systems
  • 6. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 106 Fig. 3: Shoreline training system classification (a) (b) (c) Fig. 4: Sample of training data; (a): sea label; (b): land label and; (c): sky label (a) (b) (c) Fig. 5: Preprocessing results of video frame; (a): Original frame; (b): Contrast stretching; (c): Morphological contrast enhancement The syntax for the morphological contrast enhancement process is as follows: se = strel(‘square’,10); Itop = imtophat(I); Ibot = imbothat(I,se); Ienhance = imsubtract(imadd(Itop,I),Ibot); Ienhance = imcompliment(Ienhance); SOM segmentation: The results of the image enhancement process undergo the image segmentation process, which divides the objects in the video frame into a separate areas. In this process, the similarity of every region refers to an obvious criteria. In this study, the criteria used is based on the features of RGB. Algorithm 3: Segmentation process using SOM: Input: Input Vectors Output: Image Cluster 1. Initialize Total Cluster, MaxIterations, Learning Rate, Learning Rate Reduction 2. xij<- Input Vectors 3. wij<- Initialize Codebook Vectors (Input Vectors Width, Total Cluster) 4. For (z = 1 to maxiterations) 5. For (y = 1 to Input VectorHeight) 6. For (j = 1 to Total Cluster) 7. Calculate distance Dj = ∑ (‫ݓ‬௜௝ − ‫ݔ‬௜௝)ଶ ௜ 8. End 9. BMUz= minimum(D) 10. ind = index of minimum(D) 11. ClusterIndexi = ind 12. Update wij, wi= wi + (Learning Rate*(xind - wi))
  • 7. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 107 Table 1: SOM algorithm performances No Testing data Silhouette values Explanation / Criteria 1 0.3610 Weak Cluster 2 0.5447 Reasonable Cluster 3 0.5290 Reasonable Cluster 13. End 14. Learning Rate = 15. Learning Rate*Learning Rate Reduction 16. End 17. PixelLabel <- Reshape (Cluster Index, Input VectorHeight, Input VectorWidth) 18. For (s = 1 to Total Cluster) 19. Image Clusters <- Input Vectors = Pixel Label(s) 20. End In the SOM segmentation, feature values of RGB should be normalized. The aim is that values of feature has an uniform range of minimum and maximum values. After the process of normalization, the segmentation mechanism using SOM was conducted with several attribute values, i.e., the number of clusters is 3, the maximum number of iterations is 100, the learning rate is 0.5, the learning function is 0.2 and the initialization of the initial weight is randomly determined according to the number of clusters. Determination of the attribute values is based on a series of experiments that can maximize the performance of the SOM algorithm. The segmentation process using SOM is shown in Algorithm 3, while the segmentation results are shown in Fig. 6. The performance evaluation of the SOM algorithm in segmenting the video frame on a shoreline detection system is determined by searching an index value validation, using the silhouette coefficient (Rousseeuw, 1987). The measurements are carried out against three randomized trial data. Table 1 shows that the quality of the segmentation generated by the SOM algorithm is good, which is entered in the category of reasonable cluster. It has been shown that the application of preprocessing techniques using contrast stretching and morphological contrast enhancement can help the SOM-based segmentation process for segmenting objects in the video frames. Preliminary research has been done also shows that the application of techniques based on morphological contrast enhancement is able to indicate the degree of ownership of the objects in the cluster approach 1 (reasonable). The values of silhouette has a range of -1 to 1, where the value is close to 1 have a better quality cluster. This means that the contrast manipulation- based techniques can support the process of segmentation (Widyantara et al., 2016). Morphology operation: Application of morphology operation is to reduce the set of small pixels on the results of segmentation that can affect the performance of the classification of the shore area. As shown in Fig. 7, morphological operations are able to optimize the segmentation results generated by SOM. The application of the morphology operation carried out at several stages of the process, namely, a binary image transformation, opening, closing and imfill. The stages of implementing techniques of morphology operation are shown in Algorithm 4. The final results of the morphology operation are then used as a reference matrix to optimize the segmentation results for the classification process. Algorithm 4: Morphology operation: 1. Binary image transformation BW1 = im2 bw (segmentation result) 2. Opening operation BWao = bwareaopen(BW1) 3. Closing operation closeBWao = imclose (BWao,nhood); 4. Filtering Operation rough Mask = imfill (close BWao,’ holes’); K-NN Classification: KNN classification aims to provide a label class in each region segmentation results of SOM. This study has used three class labels, namely, sea, land and sky. In this study, the classification process is carried out in three main stages, namely, the extraction of features, trainning of dataset and classification of K-NN. The implementation details of each stage is shown in Algorithm 5. K-NN algorithm testing is done by calculating the area under the curve (AUC) on the ROC curve (Han et al., 2011). ROC curves are presented on the basis of the results of testing of each class label a with confusion matrix. Each class was tested three times, with a set of 30 testing data. The classification is evaluated by analyzing the accuracy, sensitivity, specificity and false positive rate. The results of the confusion matrix test in each class are presented on the ROC curve. Algorithm 5: Classification process: Training Data: Input: Sample Data, Label Output: Training Data
  • 8. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 108 (a) (b) (c) Fig. 6: Segmentation results of video frame; (a): Segmentation 1; (b): Segmentation 2; (c): Segmentation 3 (a) (b) (c) (d) (e) (f) Fig. 7: Morphological process; (a): SOM result segmentation; (b): Binary image transformation; (c): Opening operation; (d): Closing operation; (e): Imfill operation; (f): Segmentation final 1. c = SampleData; 2. l = classLabel; 3. x = extraxt GLCMFeature (c); 4. Define label to x, t = [c x]; 5. Store t into TrainingData vector; 6. Return TrainingData Classification: Input: Image Cluster, Training Data Output: Labelled Image Cluster 1. c = ImageCluster; 2. t = TrainingData; 3. For (i = 1 to c.count) 4. x = Extract GLCMFeature(ci); 5. For (j = 1 to t.count) 6. calculate distance Dij(x,t) 7. Dij = ∑ (‫ݓ‬௜௝ − ‫ݔ‬௜௝)௜ 2 ; 8. End 9. Order D from lowest to highest; 10. Select the K-nearest instance to x : ‫ܦ‬௫ ௄ ; Table 2: K-NN algorithm performances Experiment Accuracy Precision Sensitivity Specificity False positive Sea label 1 0.90 0.95 0.90 0.90 0.10 2 0.93 0.87 0.93 0.86 0.14 3 1 0.95 1 0.70 0.30 Land label 1 0.87 0.75 0.90 0.85 0.15 2 0.90 0.90 0.95 0.80 0.20 3 0.87 0.82 0.93 0.80 0.20 Sky label 1 0.83 0.86 0.80 0.86 0.14 2 0.87 0.82 0.93 0.80 0.20 3 0.83 0.94 0.80 0.90 0.10
  • 9. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 109 (a) (b) (c) Fig. 8: ROC Graph; (a): sea label; (b): land label and; (c): sky label 11. LabbeledImageClusteri = Assign to x the most frequent label in ‫ܦ‬௫ ௄ ; 12. End 13. Return LabelledImageCluster; As shown in Table 2 and Fig. 8, in general, the classification of sea, land and sky labels can be performed well by using the K-NN algorithm. This is evidenced by the AUC value that is at an average value of sensitivity approaches a value of 1, each of 0.94 to sea label, 0.82 to land label and 0.84 to sky label. In data mining, AUC value range is from 0.5 up to 1. In the AUC value of 0.9 up to 1, said that the quality classification is unbelievably good and at a value from 0.8 to 0.89 classification quality is good (Gorunescu, 2011). Shoreline detection: In the process of determining shorelines, the neighboring pixels were scanned from the edge of the land areas using binary image transformation. Scanning was performed from the right side in Fig. 9. If the neighboring pixels had a value of approximately zero, then the pixel was given a value of one as a shoreline sign. To determine the change of shoreline, shoreline position comparisons are needed between video frames. This study uses the shoreline position in a reference frame as the reference position. Furthermore, this
  • 10. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 110 (a) (b) (c) (d) (e) (f) (g) (h) Fig. 9: Determining shoreline position process on frame 1 and frame 2: (a) and (e) areas with land label, (b) and (f) transformation results of binary images, (c) and (g) scanning neighboring pixels and (d) and (h) shoreline on a video frame (a) (b) (c) Fig. 10: Shoreline changes; (a): Reference frame; (b): Data frame 1 and; (c): Data frame 2 reference position compared to the position of the shoreline in the other video frame. The results of the comparison will be displayed in a video frame reconstruction (Fig. 10). The shoreline found is provided in red, the shoreline of the reference frame is in purple and the area of the shoreline change is in pink. The information of the distance between video frame inputs and reference frames denotes the number of pixels in the range of marked areas. CONCLUSION The implementation of data mining techniques for detecting the shoreline location by using frame-by- frame video monitoring of shore areas has been performed. The proposed system comprises a classification training system for a shore area and has a shoreline detection system that is based on SOM and K- NN algorithms. This system can automatically detect the position of the shoreline in the video frame. It can also display information concerning shoreline alteration based on the reference frame. The distance information concerning the changes in a shoreline is in pixels. Further research is needed to change the video frame to the map domain using the rectification technique so that the distance measurement can be performed using scaling techniques. ACKNOWLEDGMENT This study was funded by competitive research grants in 2016 from Udayana University under the contract number 486.25/UN14.2/PNL.01.03.00/2016. REFERENCES Aarninkhof, S.G.J., I.L. Turner, T.D.T. Dronkers, M. Caljouw and L. Nipius, 2003. A video-based technique for mapping intertidal beach bathymetry. Coastal Eng., 49(4): 275-289. Al-Amri, S.S., 2011. Contrast stretching enhancement in remote sensing image. BIOINFO Sensor Netw., 1(1): 6-9. Almar, R., R. Ranasinghe, N. Sénéchal, P. Bonneton, D. Roelvink, K.R. Bryan, V. Marieu and J.P. Parisot, 2012. Video-based detection of shorelines at complex meso-macro tidal beaches. J. Coastal Res., 28(5): 1040-1048. Argus, 2015. Argus Image Archive: Site: Egmond (Coast3D tower). Noord Holland. Retrieved from: http://argus-public.deltares.nl/archive. (Accessed on: May 1-30, 2015) Goncalves, R.M., J.L. Awange, C.P. Krueger, B. Heck and L. dos Santos Coelho, 2012. A comparison between three short-term shoreline prediction models. Ocean Coast. Manage., 69: 102-110. Gorunescu, F., 2011. Data Mining: Concepts, Models and Techniques. Springer, Berlin, Heidelberg. Han, J., M. Kamber and J. Pei, 2011. Data Mining: Concepts and Techniques. 3rd Edn., Elsevier Science, Berlington.
  • 11. Res. J. Appl. Sci. Eng. Technol., 14(3): 101-111, 2017 111 Haralick, R.M., K. Shanmugam and T. Dinstein, 1973. Textural features for image classification. IEEE T. Syst. Man Cyb., SMC-3(6): 610-621. Hassanpour, H., N. Samadiani and S.M.M. Salehi, 2015. Using morphological transforms to enhance the contrast of medical images. Egypt. J. Radiol. Nucl. Med., 46(2): 481-489. Huang, K., S. Li, X. Kang and L. Fang, 2016. Spectral– spatial hyperspectral image classification based on KNN. Sens. Imag., 17: 1. Huisman, C.E., K.R. Bryan, G. Coco and B.G. Ruessink, 2011. The use of video imagery to analyse groundwater and shoreline dynamics on a dissipative beach. Cont. Shelf Res., 31(16): 1728- 1738. Jain, A.K., R.P.W. Duin and J. Mao, 2000. Statistical pattern recognition: A review. IEEE T. Pattern Anal., 22(1): 4-37. Kim, J., B.S. Kim and S. Savarese, 2012. Comparing image classification methods: K-nearest-neighbor and support-vector-machines. Proceeding of the 6th WSEAS International Conference on Computer Engineering and Applications and American Conference on Applied Mathematics (AMERICAN-MATH'12/CEA'12). Cambridge, USA, pp: 133-138. Kingston, K.S., B.G. Ruessink, I.M.J. Van Enckevort and M.A. Davidson, 2000. Artificial neural network correction of remotely sensed sandbar location. Mar. Geol., 169(1-2): 137-160. Kohonen, T., 2013. Essentials of the self-organizing map. Neural Networks, 37: 52-65. Ortiz, A., J.M. Górriz, J. Ramírez, D. Salas-González and J.M. Llamas-Elvira, 2013. Two fully- unsupervised methods for MR brain image segmentation using SOM-based strategies. Appl. Soft Comput., 13(15): 2668-2682. Plant, N.G., S.G.J. Aarninkhof, I.L. Turner and K.S. Kingston, 2007. The performance of shoreline detection models applied to video imagery. J. Coastal Res., 23(3): 658-670. Rigos, A., O.P. Andreadis, M. Andreas, M.I. Vousdoukas, G.E. Tsekouras and A. Velegrakis, 2014. Shoreline extraction from coastal images using chebyshev polynomials and RBF neural networks. Proceeding of the 10th International Conference on Artificial Intelligence Applications and Innovations. Springer, Berlin, Heidelberg, 436: 593-603. Rijn, L.C.V., 2007. Manual Sediment Transport Measurements in Rivers, Estuaries and Coastal Seas. Aqua Publications, Delft, Netherlands. Rousseeuw, P.J., 1987. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math., 20: 53-65. Turner, I.L., V. Leyden, G. Symonds, L.A. Jackson, T. Jancar, S. Aarninkhof and I. Elshoff, 2000. Comparison of observed and predicted coastline changes at the gold coast artificial (surfing) reef. Proceeding of the 27th International Conference on Coastal Engineering. Sydney, Australia, pp: 1836- 1847. Widyantara, I.M.O., 2015. Decoding approach with unsupervised learning of two motion fields for improving Wyner-Ziv coding of video. Int. J. Appl. Eng. Res., 10(5): 11763-11776. Widyantara, I.M.O., N.M.A.E.D. Wirastuti, I.M.D.P. Asana and I.B.P. Adnyana, 2016. Image enhancement using morphological contrast enhancement for video based image analysis. Proceeding of the International Conference on Data and Software Engineering (ICoDSE), Oct. 26-27. Zayed, N. and H.A. Elnemr, 2015. Statistical analysis of Haralick texture features to discriminate lung abnormalities. Int. J. Biomed. Imag., 2015: 1-7.