S S symmetry

Article Optimal Rescue Ship Locations Using Image Processing and Clustering

Cho-Young Jung 1 and Sang-Lok Yoo 2,*

1 Department of Marine Science and Production, Kunsan National University, Gunsan 54150, Jeonbuk, Korea; [email protected] 2 Maritime University, Mokpo 58628, Jeonnam, Korea * Correspondence: [email protected]; Tel.: +82-61-240-7175

 Received: 15 October 2018; Accepted: 11 December 2018; Published: 2 January 2019 

Abstract: Currently, globalization of the world economy has also resulted in a shipping volume increase. However, this growth in maritime traffic has led to increased risk of marine accidents. These accidents have a higher probability of occurring in regions where geographical features such as islands are present. Further, the positioning of rescue ships in a particular ocean region with a high level of maritime activity is critical for rescue operations. This paper proposes a method for determining an optimal set of locations for stationing rescue ships in an ocean region with numerous accident sites, such as in the Wando islands of . The computational challenge in this problem is identified as the positioning of numerous islands of varying sizes located in the region. Thus, the proposed method combines a clustering-based optimization method and an image processing approach that incorporates flood filling to calculate the shortest pixel value between two points in the ocean that detours around the islands. Experimental results indicate that the proposed method reduces the distance between rescue ships and each accident site by 5.0 km compared to the original rescue ship locations. Thus, rescue time is reduced.

Keywords: clustering-based optimization; location optimization; flood-filling algorithm; marine accident; rescue ship; shortest distance

1. Introduction Approximately 90% of the world’s trade is conducted by sea, and the volume of cargo and the number of ships entering and leaving ports continues to increase with economic growth [1]. Concomitant with this growth in maritime traffic is the increased risk of marine accidents [2]. The occurrence of marine accidents is higher in regions closer to shore, primarily because of the increased ocean traffic and the resulting collisions. This is also affected by geographical features such as islands. Studies have shown that human error continues to be the dominant factor in maritime accidents [3]. On the other hand, there is an issue about search and rescue operations for migrants at sea [4–6]. In most cases, it is possible to save lives and cargo through appropriately managed rescue operations. Search and rescue operations are of vital importance to address this situation and for the safety of passengers and cargo. The success of a rescue operation primarily depends on the time required for a rescue ship to reach an accident site. Thus, the positioning of rescue ships in a particular region of the ocean is critical for rescue operations. The selection of a particular location for the placement of a rescue ship depends on two main factors. First, the suitability of the location for a rescue operation should be analyzed considering the regional geography and the availability of resources. Secondly, there must be a scientific measure of the effectiveness of locating a rescue ship. However, until now, only a small

Symmetry 2019, 11, 32; doi:10.3390/sym11010032 www.mdpi.com/journal/symmetry Symmetry 2019, 11, 32 2 of 13 number of scientific studies have focused on the problem of the effective positioning of rescue ships. Further, rescue ship positioning is predominantly carried out in a subjective manner without scientific or statistical support. The analysis of present rescue ship locations shows that they are in fact situated far away from the clusters of accident sites, i.e., locations with historically recorded incidents. However, as the distance from an accident site affects the effectiveness of rescue operations, it is important to assess this factor statistically and scientifically. Numerous studies have focused on the general subject of rescue operation optimization, but only a few studies have focused on the optimization of operations based on the location of rescue ships. Astbury [7] investigated search area determination and search unit deployment. This is a meaningful study in terms of the spatial deployment of search and rescue forces after an accident. However, the study does not examine where to ordinarily deploy rescue ships at sea for emergency situations. Trim [8] developed a method for improving the radar visibility of search and rescue transponder responses, and Díaz et al. [9] proposed that very high frequency (VHF) radio direction finders and infrared detectors are essential on rescue ships. These are studies of the equipment required for performing an efficient search. Azofra et al. [10] discussed the problem with a view of sharing resources for rescue with regional and national governments in places of possible conflicts of interest. Afshartous et al. [11] investigated the uncertainty of the accuracy of distress call detection in addition to resource allocation. Stone et al. [12] proposed a method of optimization in rescue operations that optimally predicts accident sites based on distress calls. However, they focused on modeling and simulation-based approaches and did not explicitly deal with the positioning of rescue ships, which is a major factor. Zarandi et al. [13] considered the problem as a large-scale maximal covering location problem and viewed locations as nodes characterized by a set of attributes in a multiconnected graph. Akbari et al. [14] conducted optimization based on mean access time from rescue ship stations to accident site locations using data from the Atlantic coastline region of Canada. In contrast to the studies cited above, our study primarily focused on the optimization of rescue ship locations based on physical location and the realistic navigable distance between these locations and accident-prone areas. Our study focused on the optimization of the distance from rescue ships to accident sites in the study area. The contributions of this study can be summarized as follows: (1) This was the first attempt of using an image processing approach to calculate the shortest distance between two points in the ocean that detours around islands. (2) The flood-filling algorithm was employed to estimate the shortest distance between two points. (3) A clustering method based on the combinations of the number of rescue ship location candidates was applied to assign rescue ships. Consequently, it will be possible to optimally arrange limited rescue ships using the technique developed in this study to ensure fast rescue in a region of numerous islands. The rest of this paper is organized as follows: Section2 describes the related works. Section3 presents the modeling methods. Section4 presents the results and discussion, while Section5 concludes the paper.

2. Related Works In this section, we review the related works on optimal rescue ships.

2.1. Shoreline and Sea-Land Segmentation There are a variety of methods for the extraction of shorelines. Billa and Pradhan [15] presented a method that used satellite images. Zhang et al. [16] also proposed the extraction of coastlines in aquaculture coasts from satellite images. Dang et al. [17] extracted shorelines based on the tide model from satellite stereo images. However, there is one disadvantage of satellite images; extraction of the shoreline from satellite images is affected by weather conditions. Sea-land segmentation is an important step for experiments. Previous studies mostly addressed the problems related to sea-land segmentation using satellite images. Ren et al. [18] proposed a sea-land segmentation method for optical remote sensing images. Cheng et al. [19] performed sea–land Symmetry 2019, 11, 32 3 of 13 segmentation using seeds learning and edge-directed graph cut. Zhuang et al. [20] used the middle wave infrared remote technology for sea–land segmentation. However, these methods experience the problem that a ship in a satellite or lidar image can be recognized as an island during image processing. Removing ships from the satellite images of the ocean is a cumbersome process. In addition, it is technically difficult owing to the complex texture and uneven gray value of land in satellite images [21]. This problem can be solved by simply extracting coastline information without using satellite or lidar images. A navigator can easily access interesting information using electronic navigational charts (ENC) to monitor the path of a ship and to assess the situation based on the constant display of the ship’s position. In accordance with the International Hydrographic Organization (IHO) standards, an ENC should include all necessary information related to safe navigation. One of the essential information is about coastlines [22].

2.2. Estimation of Optimal Location of Rescue Ships Previous studies mostly considered Euclidean distance. Afshartous et al. [11] and Zarandi et al. [10] measured Euclidean distance. Yoo and Jung [23] applied the K-means method for the optimal arrangement of rescue ships. They calculated the Euclidean distance between a rescue ship and an accident site in open sea. However, the K-means method can be applied only to open sea without islands. In addition, Euclidean distance cannot be applied if there are numerous islands because there is an issue in using straight or direct route calculation in this case. Moroni et al. [24] and Pieri et al. [25] developed information systems for detecting and monitoring environmental endangering situations such as oil spills at sea. Risk maps can help in deploying rescue ships in the most hazardous areas, but efficient deployment should be considered with limited number of resources such as two and three.

3. Methods The proposed method comprises four stages. In the first stage, the rectangular study area is converted to an image with pixel values marked as “0” (black) for land and “1” (white) for water. In the second stage, a set of candidates for rescue ship locations are defined and the shortest distance from each accident site to each rescue ship location candidate is calculated using the flood-filling algorithm. In the third stage, the best combination of rescue ship locations is selected. The fourth stage compares and evaluates the suitability of the optimal locations found in the third stage.

3.1. Stage 1: Converting the Study Area to Image Format The challenge of finding the true optimum location for rescue ships in the study area is that the ships must detour around several islands. As a result, an approach where a large number of islands is neglected and Euclidean distances are used for the optimization of the location of rescue ships would be inaccurate and misleading because rescue ships cannot navigate across islands. Thus, to mitigate this problem, we represent the study area as an image by vectorizing it into a matrix of dimensions m × n using Equation (1). A large grid size provides more accurate results but increases computation time. Thus, a grid size of 1000 is selected for a suitable balance between accuracy and computation time. With this choice, a pixel in the image matrix corresponds to a distance of 221 m in the original study area, which is acceptable in terms of ship navigation.

m = b{max(Latitude) − min(Latitude)} × 1000c (1) n = b{max(Longitude) − min(Longitude)} × 1000c

Each accident site (i) and the original rescue ship locations are also transformed into the matrix format using Equation (2). The objective is to reduce the size of the matrix to be as small as possible with a view of minimizing computation time. To ensure that this matrix includes all accident sites in the Symmetry 2019, 11, 32 4 of 13 study area, the boundaries of the study area are defined by the maximum and minimum latitudes and Symmetrylongitudes. 2018, The 10, x transformationFOR PEER REVIEW in Equation (2) maps the maximum latitude and minimum longitude4 of 13 to the first row and column of the matrix, respectively. The last row and column correspond to the tominimum the minimum latitude latitude and maximum and maximum longitude longitude of the accident of the accident sites, respectively. sites, respectively The resulting. The resulting matrix is matrixthe smallest is the matrixsmallest that matrix includes that allincludes accident all sites.accident sites.

푃푖푥푒푙 푖,푙푎푡 = {푚푎푥(퐿푎푡푖푡푢푑푒) − 퐿표푐푎푡푖표푛푖, 푙푎푡} × 1000 + 1 Pixel i,lat = max(Latitude) − Locationi,lat × 1000 + 1  (2) Pixel푃푖푥푒푙i, lon푖,푙표푛== {Location퐿표푐푎푡푖표푛i,푖lon,푙표푛−−min푚푖푛((Longitude퐿표푛푔푖푡푢푑푒) )}××10001000++11

TThehe obtained obtainedRGB RGBimage image is converted is converted to grayscale to grayscale using Equation using Equation (3) to enable (3) to further enable processing further processingas an image as [26 an,27 image]. [26,27]. grayscale푔푟푎푦푠푐푎푙푒= =0.2989 0.2989××R푅++0.58700.5870××G퐺++0.11400.1140××B퐵 (3) Further, the boundaries of the islands are are corrected corrected to to ensure ensure that that they they become become closed closed images images.. Then, t thehe flood flood-filling-filling algorithm is used to identify the land and sea areas and denote them in the matrix as “0” (black) and “1” “1” (white) (white),, respectively respectively.. The resulting image is a binary image com comprisingprising black and white pixels represented by a matrix of zeros and ones. T Thehe image matrix is r reducededuced by a factor of w = 2 to decrease the required computation time time.. This is done by selecting each alternating pixel so that that the the new new dimension dimension of of the the image image matrix matrix is is ( m (m//ww)) ×× ((n/ww).). The The flowchart flowchart in in Fig Figureure 11 describes this image processing stage.

FigFigureure 1 1.. FlowFlow chart chart of the image processing stage.

33.2..2. Stage 2: F Flood-Fillinglood-Filling Algorithm Algorithm In the the proposed proposed method, method, the the flood flood-filling-filling algorithm algorithm [28 [–2830–]30 is ]used is used to find to findthe shortest the shortest path from path eachfrom candidateeach candidate (explained (explained in Stage in Stage 3) for 3) for a rescue a rescue ship ship location location to to each each accident accident site site.. The The same algorithm is also used to identify the land and sea areas of the map matrix. When a starting point (seed) with pixel coordinates ( ii,, j) is selected in the matrix (which is is a sea location)location),, each of the four surrounding pixel pixelss that can immediately be accessed and that are not land pixels is assigned a value of “1.” Then, e eachach of the pixels that were assigned a value of “1” is selected as the seed in thethe nextnext iteration.iteration. TheThe pixel pixel coordinates coordinates are are appended appended to to the the queue queue of of seeds seeds that that must must be beused used as the as seedthe seed in the in next the iteration.next iteration. The pixels The pixels immediately immediately adjacent adjacent to the pixels to the that pixels were that assigned were assigneda value of a “1”value are of assigned “1” are aassigned value of a “2” value in the of next“2” in iteration. the next This iteration. process This is carried process out is untilcarried all out sea untilpixels all are sea assigned pixels are a number, assigned as a shownnumber, in a Figures shown2. in Figure 2.

Figure 2. Example of flood-filling starting from the seed shown in red.

Symmetry 2018, 10, x FOR PEER REVIEW 4 of 13

to the minimum latitude and maximum longitude of the accident sites, respectively. The resulting matrix is the smallest matrix that includes all accident sites.

푃푖푥푒푙 푖,푙푎푡 = {푚푎푥(퐿푎푡푖푡푢푑푒) − 퐿표푐푎푡푖표푛푖,푙푎푡} × 1000 + 1 (2) 푃푖푥푒푙 푖,푙표푛 = {퐿표푐푎푡푖표푛푖,푙표푛 − 푚푖푛(퐿표푛푔푖푡푢푑푒)} × 1000 + 1 The obtained RGB image is converted to grayscale using Equation (3) to enable further processing as an image [26,27]. 푔푟푎푦푠푐푎푙푒 = 0.2989 × 푅 + 0.5870 × 퐺 + 0.1140 × 퐵 (3) Further, the boundaries of the islands are corrected to ensure that they become closed images. Then, the flood-filling algorithm is used to identify the land and sea areas and denote them in the matrix as “0” (black) and “1” (white), respectively. The resulting image is a binary image comprising black and white pixels represented by a matrix of zeros and ones. The image matrix is reduced by a factor of w = 2 to decrease the required computation time. This is done by selecting each alternating pixel so that the new dimension of the image matrix is (m/w) × (n/w). The flowchart in Figure 1 describes this image processing stage.

Figure 1. Flow chart of the image processing stage.

3.2. Stage 2: Flood-Filling Algorithm In the proposed method, the flood-filling algorithm [28–30] is used to find the shortest path from each candidate (explained in Stage 3) for a rescue ship location to each accident site. The same algorithm is also used to identify the land and sea areas of the map matrix. When a starting point (seed) with pixel coordinates (i, j) is selected in the matrix (which is a sea location), each of the four surrounding pixels that can immediately be accessed and that are not land pixels is assigned a value of “1.” Then, each of the pixels that were assigned a value of “1” is selected as the seed in the next iteration. The pixel coordinates are appended to the queue of seeds that must be used as the seed in the next iteration. The pixels immediately adjacent to the pixels that were Symmetryassigned2019 a value, 11, 32 of “1” are assigned a value of “2” in the next iteration. This process is carried5 ofout 13 until all sea pixels are assigned a number, as shown in Figure 2.

Symmetry 2018, 10, x FORFigFigure PEERure 22. REVIEW. Example of flood flood-filling-filling starting from the seed shown in red. 5 of 13

The algorithm for thisthis processprocess isis describeddescribed by by the the flowchart flowchart in in Figure Figure3. This3. This algorithm algorithm is usedis used to tocalculate calculate the the pixel pixel value value from from each each of theof theP accident P accident sites sites to allto all sea sea pixels pixels in thein the region region of theof the map map by bysetting setting the the seed seed pixel pixel to theto the accident accident site. site. The The set set of ofP mapsP maps generated generated in in this this manner manner is is stored stored in in a astructure structure to to be be used used in in Stages Stages 3 and3 and 4. 4.

FigFigureure 3 3.. FlowFlow chart of the flood flood-filling-filling algorit algorithm.hm.

33.3..3. Stage 3: Optimal Optimal Location Location Search Search Three rescue ships are stationed in the sea area at any one time. A clustering method based on the combinations of three three out out of of all rescue rescue ship ship location location candidates candidates is is applied applied to to assign assign rescue rescue ships. ships. The optimum set of three rescue ship locations should be selected such that the cumulative distance from the three rescue ship locations to the accident sites is minimized. To reduce the complexity of the optimization process, we select k × k equally spaced locations in the study area and mark each of them as a potential candidate for rescue ship locations if they are on the sea. The problem is reduced to finding the best three rescue ship locations out of the candidate combinations. Q increases with k. Consequently, as Q increases, the size of the combination is naturally increased. Therefore, a set of candidate combinations of three out of Q (QC3) is created. The best candidate is calculated using Equation (4), where ‖∙‖ is the pixel value based on the Manhattan distance from a rescue ship 1 2 3 location to an accident site, 푃푥 is the location of the 푥-th accident site, and 푎푐 (푎푐 ,푎푐 ) is the first (second, third) rescue ship location out of the c-th combination. Each accident site is assigned to the rescue ship situated closest to it out of the combination of three rescue ship locations. This procedure is carried out for all QC3 sets of candidate locations, and the cumulative pixel value for each set is calculated. The best candidate is obtained by the minimum pixel value among the cumulative pixel values. The flowchart in Figure 4 describes this algorithm.

Symmetry 2019, 11, 32 6 of 13 from the three rescue ship locations to the accident sites is minimized. To reduce the complexity of the optimization process, we select k × k equally spaced locations in the study area and mark each of them as a potential candidate for rescue ship locations if they are on the sea. The problem is reduced to finding the best three rescue ship locations out of the candidate combinations. Q increases with k. Consequently, as Q increases, the size of the combination is naturally increased. Therefore, a set of candidate combinations of three out of Q (QC3) is created. The best candidate is calculated using Equation (4), where k · k is the pixel value based on the Manhattan distance from a rescue ship location 1 2 3 to an accident site, Px is the location of the x-th accident site, and ac (ac , ac ) is the first (second, third) rescue ship location out of the c-th combination. Each accident site is assigned to the rescue ship situated closest to it out of the combination of three rescue ship locations. This procedure is carried out for all QC3 sets of candidate locations, and the cumulative pixel value for each set is calculated. The best candidate is obtained by the minimum pixel value among the cumulative pixel values. The flowchart inSymmetry Figure 20184 describes, 10, x FOR thisPEER algorithm. REVIEW 6 of 13

( P ) 푃 1 2 3  argminc min k a − Px k, k a − Px k, k a − Px k (4) ∑ c 1 c 2 c3 푎푟푔푚푖푛x=1푐 {∑ 푚푖푛(‖푎푐 − 푃푥‖, ‖푎푐 − 푃푥‖, ‖푎푐 − 푃푥‖) } (4) 푥=1

FigureFigure 4.4. Flow chart of the optimization algorithm.

3.4. Stage 4: Evaluation The cumulative pixel values between the accident sites assigned to each current rescue ship location and the optimal locations found in Stage 3 are compared. The minimum cumulative pixel value for the current rescue ship locations is detected using the pixel values generated in Stage 2. As shown in Figure 5, the difference between these two cumulative pixel values is calculated.

Figure 5. Concept of comparing the cumulative pixel values.

Symmetry 2018, 10, x FOR PEER REVIEW 6 of 13

푃 1 2 3 푎푟푔푚푖푛푐 {∑ 푚푖푛(‖푎푐 − 푃푥‖, ‖푎푐 − 푃푥‖, ‖푎푐 − 푃푥‖) } (4) 푥=1

Symmetry 2019, 11, 32 7 of 13 Figure 4. Flow chart of the optimization algorithm.

3.43.4.. Stage Stage 4: 4: Evaluation Evaluation TThehe cumulative cumulative pixel pixel values values between between the the accident accident site sitess assigned assigned to to each each current current rescue rescue ship ship locationlocation and and the the optimal optimal locations locations found found in in Stage Stage 3 3 are compared.compared. The The minimum minimum cumulative cumulative pixel pixel valuevalue for for the the curren currentt rescue rescue ship ship locations locations is isdetected detected using using the the pixel pixel values values generated generated in Stage in Stage 2. As 2. shownAs shown in Figure in Figure 5, t5he, thedifference difference between between these these two two cumulative cumulative pixel pixel value valuess is calculated is calculated..

Figure 5. Concept of comparing the cumulative pixel values. Figure 5. Concept of comparing the cumulative pixel values. 4. Results and Discussion

4.1. Study Area In this study, we analyzed the marine accidents that have occurred in the numerous islands of Wando County in South Korea during the period from 1997–2016. The study area—Wando County in South Korea—consists of a group of 264 islands. A national marine park is situated in the coastal waters of Wando, Jeollanam Province. This park is an actively cultivated seaweed farm in coastal waters in South Korea. Wando County also accounts for 80% of the abalone production in South Korea [31]. Thus, there are a large number of fishing vessels in this area, with 8100 ships registered. The open sea of Wando in the southern sea of Korea is one of the most important shipping areas of the world, connecting major economies such as , , Russia, and South Korea. An increase in foreign trade in the region has led to an increase in vessel traffic volume, which in turn has led to a commensurate increase in the incidents of marine accidents. As shown in Figure6, the study area comprises numerous islands and a complex coastline and covers an area located between latitudes 33.9◦–34.6◦ N and longitudes 126.2◦–127.2◦ E. The shoreline of the study area is extracted from an ENC. Shoreline points are extracted in terms of longitude and latitude. Korea Hydrographic and Oceanographic Administration (KHOA) produced ENC accordance with IHO S-57 from paper navigational charts. At any one time, three rescue ships of the Wando Coast Guard are stationed in this sea area (shown in Figure6) specifically for search and rescue. Symmetry 2018, 10, x FOR PEER REVIEW 7 of 13

4. Results and Discussion

4.1. Study Area In this study, we analyzed the marine accidents that have occurred in the numerous islands of Wando County in South Korea during the period from 1997–2016. The study area—Wando County in South Korea—consists of a group of 264 islands. A national marine park is situated in the coastal waters of Wando, Jeollanam Province. This park is an actively cultivated seaweed farm in coastal waters in South Korea. Wando County also accounts for 80% of the abalone production in South Korea [31]. Thus, there are a large number of fishing vessels in this area, with 8100 ships registered. The open sea of Wando in the southern sea of Korea is one of the most important shipping areas of the world, connecting major economies such as China, Japan, Russia, and South Korea. An increase in foreign trade in the region has led to an increase in vessel traffic volume, which in turn has led to a commensurate increase in the incidents of marine accidents. As shown in Figure 6, the study area comprises numerous islands and a complex coastline and covers an area located between latitudes 33.9°–34.6° N and longitudes 126.2°–127.2° E. The shoreline of the study area is extracted from an ENC. Shoreline points are extracted in terms of longitude and latitude. Korea Hydrographic and Oceanographic Administration (KHOA) produced ENC accordance with IHO S-57 from paper navigational charts. At any one time, three rescue ships of the WandoSymmetry Coast2019, 11 ,Guard 32 are stationed in this sea area (shown in Figure 6) specifically for search8 and of 13 rescue.

FigureFigure 6 6.. StudyStudy area area with with current current rescue ship locations (Magenta).

4.24.2.. Materials Materials Figure 77 showsshows thethe distributiondistribution ofof marinemarine accidentaccident sitessites inin thethe studystudy areaarea overover aa 20-year20-year periodperiod (1997(1997–2016)–2016) [ 3322]. Four Four-hundred-and-thrity-nine-hundred-and-thrity-nine marine marine accidents, accidents, including including collisions, collisions, groundings, groundings, fires,fires, and marine pollution, have occurred in this study area over the past 20 yea years.rs. When a marine accident occurs, one of the three closest rescue ships is assigned the task of rescue and proceeds to the accidentSymmetry occurs, 2018, 10 , onex FOR of PEER the REVIEWthree closest rescue ships is assigned the task of rescue and proceeds8 ofto 13 theaccident accident site site posthaste. posthaste.

FigureFigure 7. 7Marine. Marine accident accident sites sites (1997–2016) (1997–2016) (Orange). (Orange).

4.3.4.3 Results. Results TheThe proposed proposed method method was was evaluated evaluated using using a a scenario scenario involving involving the the positioning positioning of of three three rescue rescue shipsships in in the the Wando Wando islands islands of Southof South Korea, Korea, with with a set a of set 429 of accident 429 accident site locations site locations clustered clustered into three into groups.three groups. We set Wek as set 50 k in as our 50 in study, our study owing, owing to running to running time complexity. time complexity.Q is 1902, Q is 1902, subtracted subtracted by the by numberthe number of candidates of candidate on lands on orland islands. or islands. Consequently, Consequently, a set ofa set candidate of candidate combinations combinations of three of three out ofoutQ isof created Q is created with with1902C 19023 ;C1.13 ≒billion. 1.1 billion The. The algorithm algorithm was was coded coded in MATLAB, in MATLAB, which which was was run run on aon PCa PC with with an Intelan Intel Xeon Xeon E5 2650E5 2650 v3 CPU v3 CPU and and 8 × 816 × GB16 GB DDR4 DDR4 2.3 GHz2.3 GHz RAM. RAM. It required It required 1 day 1 day with with 10 extended10 extend paralleled parallel computing computing multicores. multicores. TheThe conversion conversion of of the the study study area area to to the the image image format format is is illustrated illustrated in in Figure Figure8. 8 Figure. Figure8a 8 showsa shows thethe obtained obtainedRGB RGBimage image that that is is converted converted to to grayscale. grayscale. Figure Figure8b 8 showsb shows boundaries boundaries converted converted to to grayscale.grayscale. Figure Figure8c 8 showsc shows the the resulting resulting image image is is a binarya binary image image comprising comprising black black and and white white pixels. pixels.

Figure 8. Image processing: (a) Map with boundaries with RGB image; (b) grayscale converted boundaries; (c) land and sea areas marked in black and white, respectively.

As shown in Figure 9, this results in Q rescue ship location candidates.

Symmetry 2018, 10, x FOR PEER REVIEW 8 of 13

Figure 7. Marine accident sites (1997–2016) (Orange).

4.3. Results The proposed method was evaluated using a scenario involving the positioning of three rescue ships in the Wando islands of South Korea, with a set of 429 accident site locations clustered into three groups. We set k as 50 in our study, owing to running time complexity. Q is 1902, subtracted by the number of candidates on land or islands. Consequently, a set of candidate combinations of three out of Q is created with 1902C3 ≒ 1.1 billion. The algorithm was coded in MATLAB, which was run on a PC with an Intel Xeon E5 2650 v3 CPU and 8 × 16 GB DDR4 2.3 GHz RAM. It required 1 day with 10 extended parallel computing multicores. The conversion of the study area to the image format is illustrated in Figure 8. Figure 8a shows Symmetrythe obtained2019, 11 RGB, 32 image that is converted to grayscale. Figure 8b shows boundaries converted9 of to 13 grayscale. Figure 8c shows the resulting image is a binary image comprising black and white pixels.

Figure 8.8. Image processing: ( (aa)) Map Map with boundaries with RGB image;image; ( (b) grayscalegrayscale converted converted boundaries; (cc)) landland and seasea areasareas markedmarked inin blackblack andand white,white, respectively.respectively.

SymmetryAs shown2018, 10, inx FOR Figure PEER9 9 ,REVIEW, this this results results in in QQ rescuerescue shipship locationlocation candidates.candidates. 9 of 13

Figure 9.9. PrePre-location-location of rescue ships (Magenta).

The optimum rescue ship locations and the accident site clustersclusters generated by the proposed method are shown in FigureFigure 10.. The ship locations are shown in magenta magenta,, and the clusters of accident sites are depicted in red, green, and blue. The figure figure clearly shows that the allocation of accident sites has been performedperformed while considering the presence ofof islandsislands inin thethe area.area.

Figure 10. Study area showing optimized rescue ship locations (magenta) and accident site locations allocated to them (Red, Green and Blue).

The selection of the optimum locations of the rescue ships to be stationed using our method results in decreased cumulative pixel value. We also evaluated the increase in effectiveness for the new placement of rescue ships by calculating the cumulative pixel value of each accident site from its allocated rescue ship location. The cumulative pixel value from the current rescue ship locations was 49,569 in the study area image, which corresponds to an actual distance of 10,954.7 km. The optimized locations provided a cumulative pixel value of 39,866, which corresponds to a distance of 8810.4 km. This represents a decrease of 9703 pixels or 2144.4 km, which is a reduction of 19.6% from the current rescue ship location. On average, each rescue ship location is 5.0 km closer to its allocated accident sites compared to the current allocation. Assuming that the speed of a rescue vessel is 15 knots, rescue time is reduced by approximately 10 min per accident.

4.4. Discussion

Symmetry 2018, 10, x FOR PEER REVIEW 9 of 13

Figure 9. Pre-location of rescue ships (Magenta).

The optimum rescue ship locations and the accident site clusters generated by the proposed method are shown in Figure 10. The ship locations are shown in magenta, and the clusters of accident sitesSymmetry are 2019depicted, 11, 32 in red, green, and blue. The figure clearly shows that the allocation of accident10 sites of 13 has been performed while considering the presence of islands in the area.

FigFigureure 10 10.. Study area showing optimized rescue ship locations (magenta) and accident site locations allocated to them (Red, Green and Blue).

TThehe selection of the optimum location locationss of the rescu rescuee ships to be stationed using our method results in decreased cumulative pixel v value.alue. We We also evaluated the increase in effectiveness for the new placement ofof rescuerescue shipsshipsby by calculating calculating the the cumulative cumulative pixel pixel value value of of each each accident accident site site from from its itsallocated allocated rescue rescue ship ship location. location. The The cumulative cumulative pixel pixel value value from from the currentthe current rescue rescue ship ship locations locations was was49,569 49 in,569 the in study the study area image, area image, which correspondswhich corresponds to an actual to an distance actual ofdistance 10,954.7 of km. 10,954.7 The optimized km. The optimizedlocations provided locations a provided cumulative a cumulative pixel value pixel of 39,866, value which of 39,866, corresponds which corresponds to a distance to ofa distance 8810.4 km. of 8810.4This represents km. This arepresents decrease ofa decrease 9703 pixels of 9703 or 2144.4 pixels km, or which2144.4 iskm, a reductionwhich is a of reduction 19.6% from of 19.6% the current from therescue current ship rescue location. ship On location average,. On each average, rescue each ship rescue location ship is location 5.0 km closeris 5.0 km to itscloser allocated to its allocated accident accidentsites compared sites compared to the current to the allocation. current allocation. Assuming thatAssuming the speed that of the a rescue speed vesselof a rescue is 15 knots, vessel rescue is 15 knottimes is, rescue reduced time by is approximately reduced by approximately 10 min per accident. 10 min per accident. 4.4. Discussion 4.4. Discussion In this paper, we proposed an image processing approach to optimally locate rescue ships and allocate ocean regions where numerous accidents occur at each of these locations. The optimization problem was solved by minimizing the cumulative pixel value from each allocated rescue ship location to historically reported accident sites. Distance minimization was implemented using the flood-filling algorithm based on Manhattan distance. This was because rescue ships cannot navigate across land or islands. Using the Euclidean distance from accident sites to rescue ship locations was deemed to be unrealistic for this reason. This issue could be solved by combining the Manhattan distance and Euclidean distance such that routes include only ocean areas. Even though our approach used only Manhattan distance, this could be achieved by a simple modification of our approach by employing the flood-filling algorithm to √ diagonally propagate. A distance compensation factor of 2 was required in diagonal movements in comparison with lateral and longitudinal movements. The optimization was performed using a set k × k of rescue ship locations. This discretization of the problem is an inherent limitation of the proposed computational approach. Therefore, the allocation of extremely few accident sites close to the boundary between regions could be affected by the errors caused by this discretization. This could lead them to be assigned to rescue ship locations slightly farther than the optimum location. However, the approach successfully minimized the cumulative pixel value and average rescue time. We set k as 50 in our study to decrease time complexity while achieving significant improvement. However, with higher k, we can expect that the proposed method will produce even better optimization with reduced possibility of such discretization errors. If k is set Symmetry 2019, 11, 32 11 of 13 as greater than 50, it is inefficient for the strategic aim of this study because running time exceeds 1 day. Even when extracting the best from the number of combinations far exceeding one billion, the change in the distance of the optimal locations of the rescue ships is relatively short. The scaling down of the original problem using a factor of w = 2 can affect accuracy because it decreases the resolution of the paths calculated in the map. However, the effect of this is minimal because the size of a pixel in the image corresponds to a smaller distance of 221 m in the original study area. Further optimization can be performed by successive iterations of this procedure and by selecting candidate rescue ship locations that are closer to and that surround the locations identified in this study. This study was conducted using historical ship accident site locations. However, the practical requirements of the application of this approach could be more dynamic. Accident site locations could be affected by dynamic factors such as weather and traffic. The locations of rescue ships could also be constrained owing to several factors that were not examined in this approach. These limitations can be addressed by dynamically weighting the distance calculated between locations to include factors other than physical distance that affect the optimality of rescue ship locations. However, the lack of such data limits further analysis.

5. Conclusions This paper proposed a method that uses image processing and the flood-filling algorithm to produce accurate minimum distances from rescue ships to accident sites in the presence of intervening islands. The results provided by the proposed method can be considered to be more accurate compared to methods in which the positioning of islands is not considered. The decrease in the cumulative pixel value compared to current ship locations is evidence of the effectiveness of the proposed method. Thus, the proposed method, which has been applied to the case of rescue ships in the Wando islands of South Korea, satisfies our objective of obtaining a set of optimal rescue ship locations based on the pixel value. However, the method is limited because it only considers the distance in determining optimal rescue ship locations. Therefore, the effects of other factors, such as the availability of resources and the nature of accidents, must be included in future studies for obtaining more accurate results. Furthermore, tidal current and wind direction were not considered. Clearly, as the maritime traffic from these sources can have a significant impact on the access and availability of the rescue ships to be deployed, their effect must be incorporated in future research. Another limitation of this work is related to the fact that we developed the optimization model assuming that rescue ship locations are stationary and ships are readily available for rescue missions when called. However, in real life scenarios, rescue ships could actually be in surrounding regions and not at desired locations. Therefore, the scheduling and timing of these operations must be studied. The algorithm used to evaluate accident site locations and to allocate them to rescue ships may be scalable in terms of quantity and variety. For example, a larger region of study can be broken down into smaller regions and the algorithm can be successively applied on selected parts to increase accuracy. In addition, a weight factor can be applied to these accident sites to account for other factors in addition to the distance factor before further analysis. In future work, we will focus on sourcing additional data to facilitate the extension of the proposed method.

Author Contributions: All authors have contributed equally to this paper. The individual responsibilities and contribution of all authors are as follows: The idea of this paper was proposed by C.Y., and he completed the preparatory work of the paper. S.L. analyzed the data and wrote the paper. Funding: This research received no external funding. Conflicts of Interest: The authors declare no conflict of interest. Symmetry 2019, 11, 32 12 of 13

Nomenclature

1 2 3 ac (ac , ac ) first (second, third) rescue ship location out of the c-th combination c total number of combinations k potential candidates for rescue ship locations, K × K equally spaced locations L current accident site

Locationi,lat latitude for each accident site (i) and rescue ship location Locationi,lon longitude for each accident site (i) and rescue ship location m, n row and column for matrix P total number of accident sites

Pixel i,lat latitude transformed to matrix format Pixel i,lon longitude transformed to matrix format Q number of effective rescue ship location candidates QC3 combinations of three out of Q w factor for decreasing resolution

References

1. UNCTAD (United Nations Conference on Trade and Development). Review of Maritime Transport 2014; United Nations: Geneva, Switzerland, 2014. 2. EMSA (European Maritime Safety Agency). Annual Overview of Marine Casualties and Incidents 2015; European Maritime Safety Agency: Lisboa, Portugal, 2016. 3. Baker, C.C.; Seah, A.K. Maritime accidents and human performance: The statistical trail. In Proceedings of the MARTECH, Singapore, 22–24 September 2004. 4. Cusumano, E. Emptying the sea with a spoon? Non-governmental providers of migrants search and rescue in the Mediterranean. Mar. Policy 2017, 75, 91–98. [CrossRef] 5. Cuttitta, P. Repoliticization through search and rescue? Humanitarian NGOs and migration management in the central Mediterranean. Geopolitics 2018, 23, 632–660. [CrossRef] 6. Del Valle, H. Search and rescue in the Mediterranean Sea: Negotiating political differences. Refug. Surv. Q. 2016, 35, 22–40. [CrossRef] 7. Astbury, J. Search area determination and search unit deployment. J. Navig. 1987, 40, 63–72. [CrossRef] 8. Trim, R.M. A technique for improving the radar visibility of search and rescue transponder responses. J. Navig. 1996, 49, 284–285. [CrossRef] 9. Díaz, A.B.; Mora, A.P.; Armas, I.P. Search and rescue location and identification: Experience with SARTs. J. Navig. 2002, 55, 65–74. 10. Azofra, M.; Pérez-Labajos, C.A.; Blanco, B.; Achutegui, J.J. Optimum placement of sea rescue re-sources. Saf. Sci. 2007, 45, 941–951. [CrossRef] 11. Afshartous, D.; Guan, Y.; Mehrotra, A. US Coast Guard air station location with respect to distress calls: A spatial statistics and optimization based methodology. Eur. J. Oper. Res. 2009, 196, 1086–1096. [CrossRef] 12. Stone, L.D.; Kratzke, T.M.; Frost, J.R. Search modeling and optimization in USCG’s search and rescue optimal planning system (SAROPS). In Proceedings of the Safer Seas Conference, Brest, France, 10 May 2011. 13. Zarandi, M.F.; Davari, S.; Sisakht, S.H. The large scale maximal covering location problem. Sci. Iran 2011, 18, 1564–1570. [CrossRef] 14. Akbari, A.; Pelot, R.; Eiselt, H.A. A modular capacitated multi-objective model for locating maritime search and rescue vessels. Ann. Oper. Res. 2017, 267, 1–26. [CrossRef] 15. Billa, L.; Pradhan, B. Semi-automated procedures for shoreline extraction using single RADARSAT-1 SAR image. Estuar. Coast. Shelf Sci. 2011, 95, 395–400. 16. Zhang, T.; Yang, X.; Hu, S.; Su, F. Extraction of coastline in aquaculture coast from multispectral remote sensing images: Object-based region growing integrating edge detection. Remote Sens. 2013, 5, 4470–4487. [CrossRef] 17. Dang, Y.; Zhang, C.; Zhou, X.; Xu, J.; Xue, S. Instantaneous Shorelines as an Intermediate for Island Shoreline Mapping based on Aerial/Satellite Stereo Images. Mar. Geod. 2018, 41, 219–229. [CrossRef] Symmetry 2019, 11, 32 13 of 13

18. Ren, X.; Jiang, L.; Guan, D.; Tang, X.A. A geographic information based sea-land segmentation method for HR optical remote sensing image. In Proceedings of the Progress in Electromagnetic Research Symposium (PIERS), Shanghai, China, 8–11 August 2016; pp. 3553–3556. 19. Cheng, D.; Meng, G.; Xiang, S.; Pan, C. Efficient sea-land segmentation using seeds learning and edge directed graph cut. Neurocomputing 2016, 207, 36–47. [CrossRef] 20. Zhuang, Y.; Guo, D.; Chen, H.; Bi, F.; Ma, L.; Soomro, N.Q. A novel sea-land segmentation based on integral image reconstruction in MWIR images. Sci. China Inf. Sci. 2017, 60, 069302. [CrossRef] 21. You, X.; Li, W. A sea-land segmentation scheme based on statistical model of sea. In Proceedings of the 4th International Congress on Image and Signal Processing (CISP), Shanghai, China, 15–17 October 2011; Volume 3, pp. 1155–1159. 22. Łubczonek, J.; Włodarczyk, M. Charting of the shoreline of inland waters using digital remote sensing images. Sci. J. Marit. Univ. Szczec. 2010, 22, 53–58. 23. Yoo, S.L.; Jung, C.Y. Optimal arrangement of patrol ships based on k-means clustering for quick response of marine accidents. J. Korean Soc. Mar. Environ. Saf. 2017, 23, 775–782. [CrossRef] 24. Moroni, D.; Pieri, G.; Tampucci, M.; Salvetti, O. A proactive system for maritime environment monitoring. Mar. Pollut. Bull. 2016, 102, 316–322. [CrossRef] 25. Pieri, G.; Cocco, M.; Salvetti, O. A marine information system for environmental monitoring: ARGO-MIS. J. Mar. Sci. Eng. 2018, 6, 15. [CrossRef] 26. Jackson, J.T.; Gunsch, G.H.; Claypoole, R.L.; Lamont, G.B. Blind steganography detection using a computational immune system: A work in progress. IJDE 2003, 4, 19. 27. Bala, R.; Eschbach, R. Spatial color-to-grayscale transform preserving chrominance edge information. In Proceedings of the Twelfth Color Imaging Conference: Color Science and Engineering Systems, Technologies, Applications, Scottsdale, AZ, USA, 9 November 2004; Volume 1, pp. 82–86. 28. Henrich, D. Space-efficient region filling in raster graphics. Vis. Comput. 1994, 10, 205–215. [CrossRef] 29. Nosal, E.M. Flood-fill algorithms used for passive acoustic detection and tracking. In Proceedings of the New Trends for Environmental Monitoring Using Passive Systems, Hyeres, French Riviera, France, 14–17 October 2008; pp. 1–5. 30. Clifford, R.; Jalsenius, M.; Montanaro, A.; Sach, B. The complexity of flood filling games. Theory Comput. Syst. 2012, 50, 72–92. [CrossRef] 31. Ock, Y.S. Pending issues and policy about abalone culture. Policy Res. Fish. 2010, 5, 13–36. 32. KMST (Korea Maritime Safety Tribunal). Accident Position Information Based on Electronic Chart; Korea Maritime Safety Tribunal: Sejong-City, Korea, 2016. Available online: http://data.kmst.go.kr/WebVMS_ KMST/WebVMS.jsp (accessed on 14 October 2017).

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).