The Analysis of Underwater Imagery System for Armor Unit Monitoring Application

The placement of armor units for breakwaters in Indonesia is still done manually, which depends on divers in each placement of the armor unit. The use of divers is less effective due to limited communication between divers and excavator operators, making divers in the water take a long time. This makes the diver's job risky and expensive. This research presents a vision system to reduce the diver's role in adjusting the position of each armor unit. This vision system is built with two cameras connected to a mini-computer. This system has an image improvement process by comparing three methods. The results obtained are an average frame per second is 20.71 without applying the method, 0.45 fps for using the multi-scale retinex with color restoration method, 16.75 fps for applying the Contrast Limited Adaptive Histogram Equalization method, 16.17 fps for applying the Histogram Equalization method. The image quality evaluation uses the underwater color quality evaluation with 48 data points. The method that has experienced the most improvement in image quality is multi-scale retinex with color restoration. Forty data have improved image quality with an average of 14,131, or 83.33%. The number of images that experienced the highest image quality improvement was using the multi-scale retinex with color restoration method. Meanwhile, for image quality analysis based on Underwater Image Quality Measures, out of a total of 48 images, the method with the highest value for image quality is the contrast limited adaptive histogram equalization method. 100% of images have the highest image matrix value with an average value is 33.014.


I. INTRODUCTION
Indonesia is still in the stage of accelerating the industrial revolution 4.0, where its application is still small and uneven in various sectors.One of the developments that must be pursued to accelerate the industrial revolution 4.0 is the maritime field's construction in underwater environments [1].For example, in the construction sector, such as laying armor units (concrete rocks) for breakwaters (breakwaters) is still done using simple technology with a low level of work safety [2].
The placement of the armor units for the breakwater still uses long-arm excavators, the ends of which are replaced with clamps from the armor units.To place the armor units so that they are in the desired position, the role of the diver is needed.However, the role of divers has several limitations, namely a longer lifetime.Short time for divers due to limited oxygen and communication between excavator operators and divers because they are in different environments.This makes the work of divers in constructing laying armor units for breakwaters very high risk [3].
Armor Units for breakwaters are artificial stones made of concrete that function as the main protective layer for breakwaters [2].Each protective stone unit must be placed individually to ensure that the placement is interrelated to have stability and strength as a group in resisting waves.Stable armor units will protect the stones beneath the armor and the smaller core layers.The breakwater will lose stability if the layer beneath the armor units is exposed-the potential to cause landslides and trigger collapse.The placement of these armor units requires that each unit be hoisted one at a time using slings or grippers, and then each unit must be placed in the water under the supervision of a diver.The diver must direct the excavator operator each time a rock is placed until the armor unit is below the water's surface.This activity endangers divers, and it is also difficult to coordinate placement between divers and excavator operators [3] [4].With the industrial revolution 4.0 that is currently developing, it should be able to replace divers with camera technology.The implementation uses computer vision because it can be safe regarding time, cost, and human safety [4].But the underwater image issue is about the quality that is unobvious.The Green-blue dominates in the resulting image because sunlight cannot be maximally reflected underwater [5].So, it needs image processing, such as image enhancement and image color restoration.
There are several methods used in image enhancement and color restoration.The High-Frequency Emphasis (HFE) method for image enhancement can make images look clearer and sharper.However, when using high-frequency object areas, the results tend to eliminate the object details [10].In addition, an adaptive histogram equalization method can produce sharp output images, maintain image details, and avoid local areas that are too bright and have wrong contours.But this method is effective for application to images similar to CT image processing [18].There is also the Fusion method to enhance underwater images [7].The results show increased image and video quality, reduced noise levels, better exposure in dark areas, and increased global contrast while maintaining image details and edges.But this research has not tested real-time data yet.As for color restoration, there is the center-surround retinex method which can increase the brightness of an image [9].But this method has a weakness in color clarity.Even though the input image has low illumination, the single-scale retinex method can work well (with high contrast without losing color vividness and edge enhancement) [12].However, single-scale retinex cannot simultaneously use dynamic range compression and tonal rendition.
Based on the methods that have been developed and their advantages and disadvantages.This study applies histogram equalization, contrast-limited adaptive histogram equalization, and multi-scale Retinex.It uses color restoration methods for image enhancement and color restoration.This study aimed to conduct an in-depth quantitative and qualitative examination of picture enhancement and color restoration techniques.In addition, it also describes an analysis of the visualization performance of this system.
The difference between this study and the previous one [8] is that in this study, the researcher developed a variable lighting level in data testing that affects the qualitative and quantitative evaluation of image enhancement and color restoration.Whereas in previous research, the lighting level was constant.In addition, in this study, there is an analysis of visualization performance.

II. METHOD
This section will discuss the three comparison methods used in this research and the two matrix evaluations that use underwater color image quality evaluation and underwater image quality measures.

A. Histogram Equalization
Nowadays, histogram alignment and modification are used to enhance the image by increasing the contrast.However, a known method for calculating the equalization histogram has several drawbacks that reduce the efficiency of using this technique.The traditional definition of the global histogram equalization equation is often defined as Equation (1): Where, the variable   is the brightness quantity of the m-th pixel of the image source;   is the brightness of the j-th pixel of the transformed image; (  ) is the cumulative distribution function; and (  ) is the density probability function of brightness.
Then there is an improved method for Histogram Equalization [6], especially for the histogram alignment that satisfies the basic requirements for the intensity of the transforming image and fulfilling the criteria of self-duality.The formulation is derived using Equations (2) to (5).
Where, the variable (  ) is the brightness of the transferred image.

B. Contrast Limited Adaptive Histogram Equalization
The CLAHE algorithm can be explained as histogram equalization is the most well-known procedure Image processing in the spatial domain is based on intensity transformation [11].The algorithm of contrast-limited adaptive histogram equalization can be explained as: • The input image is transformed into a sub-image with the matrix size M x N • Calculating the histogram for each sub-image • Applying the clip limit value for each sub-image • Limited contrast histogram for each sub-image processed with Histogram Equalization.Next, the pixels of the subimage are mapped using linear interpolation The number of sub-image pixels is distributed at each grayscale.The average number of pixels in each grayscale is Equations ( 6) and (7).
Where the variable   is the average number of a pixel;   is the grayscale number of the sub-image;  − is the number of pixels in the Y dimension of the sub-image;  − is the number of pixels in the Z dimension of the sub-image;   is the clip limit; and   is the maximum value of the average pixel for each sub-image grayscale.
In the original histogram, pixels will be clipped if the number of pixels is greater bigger than NCLIP.The number of pixels is evenly distributed into each gray degree defined by the total number of pixels clipped   using Equation (8).
To calculate the Contrast Limited Histogram (  ) for the sub-image, can be used Equation ( 9) to (11).
Suppose the search is terminated before all pixels have been evenly dispersed.In that case, it will be recalculated using the Equation from earlier, and a fresh search will be begun until all of the pixels have been evenly distributed.As a result, a brand new histogram will be created.

C. Multi-Scale Retinex with Color Restoration
Multi-scale Retinex with color restoration (MSRCR) is the development of Multi-scale Retinex, which is capable of improving the quality of the image that is on the enlightenment of the image with maintain color constancy [13].Color constancy or color provisions taken from the human vision system that seeks color from an object still looks the same even in different lighting conditions [14].The Equation for the multi-scale retinex with color restoration (MSRCR) method using Equations ( 13) to (17).
(, ) =   (, )   (, ) Where, the   (, ) is the color restoration;  is the non-linear control;  is the gain constant;  is the color channel; and    is the multi-scale retinex.Where the variable  is the number of used scales;   is the associated weight of i-th scale; and   is the output from Single-Scale Retinex associated with the i-th scale; the j symbol represents the color channel.

D. Underwater Color Image Quality Evaluation
The research in the CIELab color space shows that the sharpness factor and color correlate well with subjective image quality perceptions.Based on this, underwater color image quality evaluation (UCIQE) [15], a linear combination of chroma, saturation, and contrast, was proposed to measure non-uniform color casts, opacity, and low contrast that characterizes underwater engineering and monitoring.The matrix underwater color image quality evaluation underwater image quality evaluation for I images in color space CIELab can be defined as, Where the variable  1 ,  2 ,  3 is the coefficient of UCIQE;  is the chroma standard deviation;   is the luminance contrast; and   is the saturation average.

E. Underwater Image Quality Measures
The research of Karen Panetta et al. explained that underwater images suffer from blurry, low contrast, and color effects gray due to absorption and scattering effects underwater.An image enhancement algorithm has been developed to enhance the visual quality of images underwater.Unfortunately, no objective measure well received can evaluate the quality of underwater images similar to human perception.The bottom image processing algorithm, dominant water, use subjective evaluation, which is timeconsuming and biased, or a measure of general image quality.It fails to consider underwater image properties.His investigation uncovered a novel approach to solving the issue, and it is as follows: non-reference for underwater image quality measures (UIQM) [16].The underwater image quality measures consist of three attribute measures for underwater images: underwater image colorfulness measure (UICM), underwater image sharpness measure (UISM) measure, and size underwater image contrast measure (UIConM).Each attribute is selected to evaluate one aspect of underwater image degradation, and each measure of the attributes presented is inspired by the human visual system characteristics (HVS).The formula for underwater image quality measures can be seen in Equation (19).

A. Experimental Setup
For the prototype used in this research is depicted in Fig. 1.The module comprises two cameras, three lightings, a GUI visualization module, a processor module, and a power supply module.The brightness level that happened when the experiment was conducted was 81,67 cm.The brightness level is measured using a Secchi disc.For the design system of this research is illustrated in Fig.

B. Image Enhancement and Color Restoration Qualitatively Evaluation
In this research, the methods used are histogram equalization, contrast-limited adaptive histogram equalization, and multi-scale retinex with color restoration.With the same input images, there will be compared qualitatively about the result for those methods.The experiment is conducted for a depth of 50 cm, and the distance between the camera and the object (armor unit prototype) is 20 cm and 50 cm.The lighting is set in 0 Lux, 500 Lux, and 1000 Lux.The result is summarized in Table I   Based on Table I, they can qualitatively compare the result using those methods.After using the methods, all the images show cleaner and more colorful.The object also shows more obvious by using the methods.This experiment is conducted for a depth of 20 cm, and the distance between the object and the camera is 50 cm.The same as Table I, but in Table II, the experiment is conducted for a depth is 50 cm, and the distance between the camera and the object is 50 cm.

C. Image Enhancement and Color Restoration Matrix Evaluation
In this part, the quality of the image will be explained quantitatively (the previous part is a qualitative evaluation).This part, there will be divided into two matrix evaluations.Histogram equalization (HE), contrast limited adaptive histogram equalization (CLAHE) with clip limit (4,4);(4,7);(7,1), and (7,7).The multi-scale retinex with color restoration (MSCR) are all utilized in the processing of every image that is read in.The scenarios that are conducted for this measurement are summarized in Table III.Based on Table V and Table VI, the underwater color image quality evaluation shows the calculation result using the underwater color image quality evaluation formulation.The image input for the formulation is the output of each image applied for each method.So, every method and every scenario has a different result.So, to measure which image has a good quality, it has the highest result number (after the underwater color image quality evaluation formulation is applied).The highest result is signed by a yellow color table cell in all the tables of 48 data from Table V

D. Visualization Performance
Visualization performance is measured by testing the access of these two cameras by running the program's main page and counting the number of frames captured and the time needed so that frames per second (fps) can be obtained.This test is carried out with several devices, the size of the page layout main, and different locations.The device used is a laptop, raspberry pi 3 B 1GB, and Raspberry Pi 4 B 4GB [17], for layout size.This main page is divided into two, namely 1280x640 pixels and 800x480 pixels.This is because it follows the size of the camera's maximum resolution (640x480 pixels per camera) and adjusts the screen touchscreen's resolution so that the video capture size must be resized to 400x300 pixels per camera.This test is also carried out in conditions.The complete scenarios are summarized in Table VIII.

IV. CONCLUSION
This research purpose is to make a vision system of armor unit positioning.There are some analyses to evaluate the system.These are qualitative evaluation for image quality, image enhancement and color restoration matrix evaluation, and visualization performance.Based on the experiment in this research, the image that applied the method (histogram equalization, contrast limited adaptive histogram equalization, and multi-scale retinex with color restoration) qualitatively has increased the output.Meanwhile, the quantitative evaluation through underwater color image quality evaluation and underwater image quality measures.The result of the underwater color image quality evaluation shows that 83,33% of data images experienced the most significant improvement by using multi-scale retinex with color restoration method.
Meanwhile, using the underwater image quality measures matrix, 100% of the method that achieves the most significant improvement is the image with contrast limited adaptive histogram equalization method.Then, the visualization performance is evaluated by measuring the frame per second (fps) using multi-scale retinex with color restoration method.The average fps is 0,45 fps using the contrast limited adaptive histogram equalization method, the average fps is 16,75 fps using the histogram equalization method, and the average fps is 16,17 fps.

Fig 2 .
Fig 2. Pipeline Research Based on Fig. 2 (the pipeline research), there are three comparison methods used in this research, two evaluation matrixes for the image enhancement and color Restoration method and an evaluation regarding the performance of the visualization that is conducted by calculating the frame per second.
and Table VI; 6 data have the highest result in the Histogram Equalization method (HE); 2 data have the highest result in the contrast limited adaptive histogram equalization method (CLAHE), and 40 data have the highest result in multi-scale retinex with color restoration (MSCR).Then the next evaluation is underwater image quality measures applied for camera 1.The result is summarized in Table VI.
Camera are summarized in Table VII.The same analysis was used for the previous evaluation.The underwater image quality measures formulation was used in this part.All 48 data from Table VI and Table VII have the highest result in the contrast limited adaptive histogram equalization method (CLAHE).
9DOI: http://dx.doi.org/10.25139/ijair.v5i1.5918 The result of visualization performance (by analyzing the fps value) is summarized in TableIX.Based on TableX, it can be seen that the average frame per second for the original image is 20.71 fps.Then the average frame per second of the histogram equalization method is 16.17 fps.The average frame per second when implementing contrast-limited adaptive histogram equalization is 16.75 fps.And the average frame per second is 0.45 fps when implementing multi-scale retinex with Color Restoration.So based on the result of the frame per second value, multi-scale retinex with color restoration has the lowest value.The lower the frame value per second, the worse the visualization performance.The low frame value per second affects the quality of data transmission, which does not provide real-time data transmission.