Journal Search Engine
Search Advanced Search Adode Reader(link)
Download PDF Export Citaion korean bibliography PMC previewer
ISSN : 1229-3431(Print)
ISSN : 2287-3341(Online)
Journal of the Korean Society of Marine Environment and Safety Vol.28 No.6 pp.1054-1062
DOI : https://doi.org/10.7837/kosomes.2022.28.6.1054

A Study on the Improvement of Color Detection Performance of Unmanned Salt Collection Vehicles Using an Image Processing Algorithm

Seon-Deok Kim*, Byong-Won Ahn**, Kyung-Min Park***
*PhD Candidate, Division of Maritime Engineering, Mokpo National Maritime University, Mokpo, Republic of Korea
**Professor, Division of Maritime Engineering, Mokpo National Maritime University, Mokpo, Republic of Korea
***Professor, Division of Coast Guard, Mokpo National Maritime University, Mokpo, Republic of Korea

* First Author : ttlrilo@mmu.ac.kr, 061-240-7232


Corresponding Author : ds4cbt@mmu.ac.kr
July 21, 2022 October 12, 2022 October 28, 2022

Abstract


The population of Korea's solar salt-producing regions is rapidly aging, resulting in a decrease in the number of productive workers. In solar salt production, salt collection is the most labor-intensive operation because existing salt collection vehicles require human operators. Therefore, we intend to develop an unmanned solar salt collection vehicle to reduce manpower requirements. The unmanned solar salt collection vehicle is designed to identify the salt collection status and location in the salt plate via color detection, the color detection performance is a crucial consideration. Therefore, an image processing algorithm was developed to improve color detection performance. The algorithm generates an around-view image by using resizing, rotation, and perspective transformation of the input image, set the RoI to transform only the corresponding area to the HSV color model, and detects the color area through an AND operation. The detected color area was expanded and noise removed using morphological operations, and the area of the detection region was calculated using contour and image moment. The calculated area is compared with the set area to determine the location case of the collection vehicle within the salt plate. The performance was evaluated by comparing the calculated area of the final detected color to which the algorithm was applied and the area of the detected color in each step of the algorithm. It was confirmed that the color detection performance is improved by at least 25-99% for salt detection, at least 44-68% for red color, and an average of 7% for blue and an average of 15% for green. The proposed approach is well-suited to the operation of unmanned solar salt collection vehicles.



이미지 처리 알고리즘을 이용한 무인 천일염 포집장치의 색상 검출 성능 향상에 관한 연구

김 선덕*, 안 병원**, 박 경민***
*목포해양대학교 기관시스템공학부 박사과정
**목포해양대학교 기관시스템공학부 교수
***목포해양대학교 해양경찰학부 교수

초록


한국 천일염 생산 지역의 인구는 빠르게 고령화되고 있어 생산 노동자가 줄고 있는 추세이다. 소금 포집 작업은 천일염 생산 과정에서 가장 많은 노동력을 필요로 한다. 기존의 포집 장치는 사람의 작동 및 운전이 필요하여 상당한 노동력이 필요해서, 천일염 무인 포집장치를 개발하여 생산 노동자의 노동력을 감소시키고자 한다. 천일염 포집장치는 색상 검출을 통해 소금의 포집 상황과 염전에서의 위치를 파악하도록 설계되었기 때문에, 포집장치의 색상 검출 성능이 중요한 요소이다. 그래서 색상 검출 성능 향상을 위해 이미지 처리 를 이용한 알고리즘을 연구하였다. 알고리즘은 입력 이미지를 크기 재조정, 회전 및 투시 변환을 이용하여 around-view 이미지를 생성하고, RoI를 설정하여 해당 영역만 HSV 색상 모델로 변환하고 논리곱 연산을 통해 색상 영역을 검출한다. 검출 된 색상영역은 형태학적 연산을 이용하여 검출 영역을 확장하고 노이즈를 제거하여 컨투어와 이미지 모멘트를 이용하여 검출영역의 면적을 계산하고 설정된 면적과 비 교하여 염판에서 포집장치의 위치 경우를 결정한다. 성능 평가는 알고리즘을 적용한 최종 검출 색상의 계산 면적과 알고리즘의 각 단계 의 검출 색상의 면적을 비교하여 평가하였다. 평가 결과 소금을 검출하는 흰색의 경우 최소 25%에서 최대 99% 이상, 빨간색의 경우 최소 44%에서 최대 68%, 파란색과 녹색은 평균적으로 각각 7%와 15% 검출면적 증가가 있어 색상 검출 성능이 향상되었음을 확인할 수 있었으 며, 이를 무인 천일염 포집장치의 무인작업 수행을 위한 위치 확인에 적용 가능할 것으로 사료된다.



    1. Introduction

    Most solar salt in Korea is produced in Shinan, which in in Jeollanam-do province. Jeollanam-do had an average aging index (i.e., “elderly population per 100 youth population”) of 196.1 in 2020. By contrast, the aging index of Shinan was 555.7, which indicates that Shinan is aging quite quickly (Korean Statical Information Service, 2021). The aging of the population is directly related to the paucity of workers available for solar salt production. The number of workers decreased from 2,918 in 2015 to 2,305 in 2017. Among solar salt production companies, 46.3 % have two workers and 36.8 % have one worker, accounting for the majority of all companies (Korean Ministry of Ocean and Fisheries, 2019). Solar salt production companies face a declining trend as the workers in the production of solar salt are aging and there is no inflow of workers.

    In solar salt production, salt is obtained by trapping seawater in a salt field and then allowing the water to evaporate in sunlight. The produced salt is collected using traditional tools or electric machines. The salt collection process consumes considerable manpower even when collection equipment is used. In such a scenario, automatic salt collection devices can reduce manpower.

    Image processing extracts features such as color, texture, shape, and structure from a photograph or video. The image processing procedure consists of several steps such as preprocessing, Region of Interest (RoI) setting, sampling, threshold setting, feature extraction, recognition, and interpretation (Park and Bae, 2019). Algorithms process information from digitized images using several techniques, including: perspective transformation (Neven et al., 2018;Muthalagu et al., 2020) that transforms an image or corrects distortion, color models used to detect color or object, morphological operations that analyze and process image shapes, and contouring that identifies the outline and shape of objects. The floor of the saltern uses black tiles to absorb sunlight more effectively. Therefore, when salt particles are formed, it is easy for a color model to perform object detection by comparing the color of the salt particles against the black floor. Furthermore, if an image is converted to binary image and a threshold is set, image processing algorithms can easily detect areas having contrasting colors (Kim et al., 2021) but fing it difficult to detect areas for various colors when multiple colors are involved. In this study, a detection method using the HSV color model was developed because during the salt collection process, it is necessary to detect three colors representing directions in addition to salt.

    Machine learning has improved tremendously with the advancement of computer and graphic processing unit (GPU) technologies. Object detection technology is one such machine learning applications, and among machine learning, deep learning shows good performance in object detection. The main deep learning object detection algorithms include YOLO, R-CNN, RetinaNet, and VGGNet. Most deep learning algorithms are convolutional neural networks (CNNs), and when performing convolutional operations, they use a filter with the same parameters to move the pixel positions while repeatedly performing multiple matrix multiplications, resulting in extensive computation (Park, 2021). This amount of computation requires a GPU or high-performance equipment that can perform fast computation in parallel, which would make an unmanned solar salt collection vehicle too expensive. Our proposed image processing algorithm is not complicated in structure and does not require much computation, so it can be applied using low-performance, low-cost equipment, which has the advantage of being competitive in mass production and distribution. Furthermore, equipment used in saltern is operated in extreme conditions under the influence of strong solar heat, high humidity, and high salinity, so equipment failures are frequent and the equipment replacement cycle is short. In this light, low-cost equipment becomes a critical factor.

    In the present work, an experiment was performed to improve the color detection performance of an unmanned solar salt collection vehicle using image processing. The dataset was obtained by directing a scene showing the collection of solar salt in a saltern, as an around-view image using image processing. Color was detected only in the RoI by setting the RoI in the around-view image. A mask was created by setting the HSV upper and lower limit value, followed by performing a morphological operation and an AND operation with the original image. The detected area in color detection represents the outline through contours, and the contours are calculated using an image moment. The case of the collection vehicle within the saltern is determined using the contour area. The performance was evaluated by comparing the detection area in each algorithm step and the final detection area.

    2. Method

    The image processing algorithm for the unmanned solar salt collection vehicle is shown in Figure 1. The input image is transformed into an around-view image through resizing, rotation, and perspective transformation step. RoI is set in the around-view to reduce the amount of computation, and HSV color model conversion is performed only in the RoI area for color detection. A mask is created by setting the HSV upper and lower limit values of the color to be detected, and the color area is detected through the AND operation. A morphological operation is performed on the detected color area to remove noise, and the area is calculated using the contour and image moment. Finally the detected area is compared with a set area to determine the location case of the collection vehicle in the salt plate.

    2.1 Preprocessing

    Preprocessing reduces unnecessary data in an image and refines meaningful data. There is considerable data in images captured by a camera. For example, there are 10,000 kinds of pixels in an image of size 100×100. For color images, an RGB value ranging between 0 to 256×256×256 is allocated to each pixel, so there are 16,777,216 possible value for each pixel (Gonzalez and Woods, 2013). Analyzing all these pixels without additional processing is difficult and time-consuming.

    In addition to reducing the number of pixels, image preprocessing simplifies data using transformations of the size, angle, and color of the image, leaving only necessary data. Preprocessing improves image processing accuracy and precision while reducing computation time.

    2.1.1 Around-view

    Recently, the around-view system, which is an image as if looking down from the sky, has been used in vehicles by installing cameras on all sides. The image to be used for the experiment is input through the camera, and is resized to 512×512 for consistency.

    With reference to the collection vehicle, (a) is the front, (b) is the right, (c) is the back, and (d) is the left in Figure 2. The resized input images are rotated clockwise by (a) 0°, (b) 90°, (c) 180°, and (d) 270° to align the direction.

    The rotated images are mapped to the coordinates of the images using perspective transformation. Perspective transformation transforms two-dimensional (x, y) coordinates into three-dimensional coordinates (X, Y, W) and then transforms them back into two-dimensional coordinates (u, v) (Gonzalez and Woods, 2013).

    Perspective transformation has eight degrees of freedom, so at least four tie points are needed to determine transformation. The around-view image by combining the preprocessed images is shown in Figure 3.

    2.1.2 Region of Interest

    The RoI is used when the goal is to find a specific object or singularity on the image. Setting the RoI is al critical task that can prevent image processing for an irrelevant region, thereby reducing the amount of computation and improving the accuracy of the algorithm. The algorithm operation works only on the RoI; it does not consider the entire image. The RoI is set to a size of 40×100 for the front and back sides and 100×40 for the left and right sides.

    2.1.3 Color model conversion

    The RGB color model represents colors as a combination of red, green, and blue, whereas the HSV color model represents colors intuitively as humans see them. Therefore, the HSV color model is preferred for color detection because it is more similar to the human color recognition process than the RGB color model (Gonzalez and Woods, 2013).

    We did not convert the entire around-view image from the RGB color model to the HSV color model, but only the RoI. As a result, it has RoI in HSV state and RoI (original image) in RGB state.

    2.2 Color detection and contour

    2.2.1 Color detection

    A mask for color detection is created by setting the upper and lower limits value of H, S, and V of the color to be detected. Color detection is performed via an AND operation representing the original image and the mask. Figure 4 shows color detection, (a) is the original image, (b) is the mask for red detection and (c) shows that overlapping parts detected by the AND operation of (a) and (b).

    In our experiment, red (representing the front), green (representing the back), blue (representing the left and right sides), and white (the salt) were detected.

    2.2.2 Morphological operation (Gonzalez and Woods, 2013)

    Morphological operations use structuring elements to remove noise, fill holes in images, and connect broken lines (Park et al., 2017) Examples of morphological operations are erosion, dilation, open, close, gradient, tophat, and blackhat.

    In Figure 5 (a), there is an area that is not accurately detected because there is black noise in the middle portion of the detected color. For red, blue, and green, the opening operation was applied to remove the finely detected part among the parts that should not be detected, and the closing operation was applied to remove the noise in the black portion among the detected parts. Figure 5 (b), to which the morphological operation is applied, shows that the noise in (a) has been removed.

    In Figure 6 (a), white represents salt and black represents the salt plate tile. White color is used for salt detection, but the particles of salt are small, so when it is detected as shown in Figure 6 (b), it is detected as fine dots. In white, the dilation operation was repeated thrice times to dilate the detected portion of the image, and then noise was removed by applying an opening operation and a closing operation. The result is (c).

    2.2.3 Contour

    Image contours connect the borders of areas with the same color or intensity in the image. Figure 7 (a) and (b) are images of the area obtained through contouring. The area obtained by the contour is the area of the color detected in the image.

    The feature value for a contour is called image moment. The image moment consists of 24 values and is largely composed of spatial moments, central moments, and central normalized moments. The 24 values are divided into 10 spatial moments, 7 central moments, and 7 central normalized moments.

    • - spatial moments: m00, m10, m01, m20, m11, m02, m30, m21, m12, m03

    • - central moments: mu20, mu11, mu02, mu30, mu21, mu12, mu03

    • - central normalized moments: nu20, nu11, nu02, nu30, nu21, nu12, nu03

    Using the image moment, we can calculate the center of gravity of the contour, the length of the contour in the form of a closed curve, the length of the curve rather than the closed curve, and the area of the region surrounded by the contour. Among the above image moments, m00 of the spatial moment represents the area of the detected contour area. In this experiment, the spatial moment m00 among the image moments was used, through which the contour detection area was obtained.

    3. Results

    3.1 Dataset

    The experiment was performed using a video filmed in a saltern. The salt plate of the saltern was a square having area 1530cm×1530 cm. The four sides were separated using various-colored tents. The front is red, the back is green, and the left and right are blue. Figure 8 shows the colored tent installed on the salt plate.

    Table 1 summarizes the weather conditions at the time of the experiment (14:00HR). A place where there is little rain, high radiation, and high temperature is suitable for salterns. Thus, salterns have similar high temperature, radiation, and weather conditions during the salt production period.

    Assuming that cameras are installed on all sides of the collection vehicle, the experimental dataset was obtained by photographing four images i.e., the front, back, left, and right at the corresponding position of the salt plate. The obtained image was made into an around-view image through image preprocessing.

    3.2 Cases of collection vehicle location

    Figure 9 shows nine cases depending on the location of the collection vehicle in the salt plate. Color detection was performed with color representing each direction and white representing salt. The detected color represents an area using a contour and calculates the area using an image moment. The area of the detected color was compared with a set area to determine the case.

    3.3 Experimental result

    The experiment used the around-view image created after performing image preprocessing on the dataset. The around-view image sets the RoI and changes it to the HSV color model. For color detection, a mask is created by setting the HSV upper and lower limit values of the color to be detected, and is detected by performing an AND operation with the original image.

    The limit value of HSV was set while changing the hue values. Figure 10 shows the difference in salt detection according to the change in the upper limit of hue in white. The lower limit value of HSV was fixed at (0, 0, 0), and only the upper limit value was changed by 10 from (90, 255, 255) to (120, 255, 255). Comparing hue values (100, 255, 255) and (110, 255, 255), it can be seen that salt is incorrectly detected on the right and back, which should not have been detected when the hue values are (110, 255, 255). Looking at (b) and (c) of Figure 10, it is clear that the upper limit values should be set to (100, 255, 255).

    The HSV lower limit value was experimentally determined by fixing the upper limit value to (100, 255, 255) and changing the hue lower value from (0, 0, 0) to (30, 0, 0) by 10. Figure 11 shows the salt detection according to the lower limit value. Looking in front of (a) in figure 11, it can be seen that red is also detected. However, in (b) in figure 11, the front red color is not detected. Therefore, the lower limit value of the HSV was determined as (10, 0, 0).

    The upper and lower limit value were determined for red, blue, and green in the same way as for white. Table 2 presents the final red, white, green, and blue HSV upper and lower limit values.

    In the case of white color, salt particles are small, so it is detected in very small areas and needs to be expanded. So, dilation operation is performed to expand the small detection areas. The dilation operation filter used a 3×3 size, and there were three consecutive dilation operations. Figure 12 shows the change of the detection area depending on the increase in the number of dilation operations. As the number of dilation operations increases, it can be seen that the detection area becomes larger as small particles expand and combine.

    Figure 13 shows how the number of particles changes with the number of dilation operations. The number of particles decreases as the number of dilation operations increases. Looking at (d) of figure 12, the detected salt particles on the front and left have a sufficiently large size owing to the dilation operation. However, spurious salt particles are detected on the right and back. Therefore, the opening operation is performed to remove small noises, and close operation is performed to connect the remaining unconnected areas.

    Figure 14 shows the closing operation after the opening operation. Compared with (d) of figure 12, it can be seen that the front and left sides are connected smoothly, and minor instances of noise on the right and back sides are removed. In the case of red, green, and blue, a large enough area can be detected only by detecting HSV, so the dilation operation is not required. However, the opening operation is performed after the closing operation to fill in the black spots of the detection area and to remove minor noise.

    Figure 15 illustrates the performance evaluation of applying white to each step of the proposed image processing algorithm. The y-axis is expressed as the ratio of the area obtained in each image processing algorithm step and the area finally obtained. The x-axis represents the algorithm step for each case. Looking at the graph, when only HSV was used (in case3), extremely minute particles are detected, so the area is very small. At this time, the number of particles is 121ea and only 0.2 % of the final area was included. However, it can be seen that the area increases through the dilation operation. When only HSV was used, case7 detected the best, but only 74.36 % of the final detection area. In the case of white, there was a performance improvement from a minimum of 25 % to a maximum of more than 99 %.

    Figure 16 shows graphs showing the performance when the algorithm is applied to red, green, and blue. In the case of red, there was a detection area increase of at least 44 % and a maximum of 68 %, and the average detection area increased by 53 %. In the case of green, detection was good from the HSV step, and there was no large area change, but an average increase of 7 %. In the case of blue, it increased by an average of 15 %.

    4. Conclusions

    This study developed an image-based algorithm to improve the color detection performance of an unmanned solar salt collection vehicle. Nine cases were considered depending on the location of the collection vehicle on the salt plate. The dataset was obtained by capturing images in four directions (front, back, left, and right of the collection vehicle) assuming various locations within the salt plate. The dataset was created as an around-view after image preprocessing and color detection. The color was detected by creating a mask by setting the HSV upper and lower limit value, and performing morphological operation and an AND operation with the original image. The detected color represented the detection area through contour, while the detection area was calculated using the image moment. The case of the collection vehicle was detected by comparing the area of the detection area with the set area. The performance was evaluated by comparing the detection area in each algorithm step and the final detection area.

    When evaluating the results through the experiment, white color detection (salt detection) showed a minimum 25 % improvement in the detection area, and a maximum increase of 99 % or more was confirmed. When all white cases were averaged, the area increased by approximately 76 %. In the case of red, there was detection area increase of at least 44 % and a maximum of 68 %, with the average increase being 53 %. In the case of green, detection was good from the HSV step, and there was no large area change, but an average increase of 7 %. In the case of blue, it increased by an average of 15 %. These results confirmed the accuracy of the proposed algorithm.

    In future research, it is necessary to acquire more images and diverse datasets. In addition, an image of the four sides used as the dataset needs to be captured using a fixed camera for an accurate around-view image, for which it is necessary to develop a collection vehicle prototype. Finally, it is necessary to use real-time videos, not images, in order for a proposed solution to be applicable to real-world collection vehicles.

    Acknowledgment

    This work was supported by the Korea Technology and Information Promotion Agency for SMEs (TIPA). (S2962532)

    Figure

    KOSOMES-28-6-1054_F1.gif

    Image processing algorithm flowchart.

    KOSOMES-28-6-1054_F2.gif

    Resized input image.

    KOSOMES-28-6-1054_F3.gif

    Around-view image.

    KOSOMES-28-6-1054_F4.gif

    Color detection.

    KOSOMES-28-6-1054_F5.gif

    Morphological operation applied at red color.

    KOSOMES-28-6-1054_F6.gif

    Morphological operation applied at white color.

    KOSOMES-28-6-1054_F7.gif

    Contour.

    KOSOMES-28-6-1054_F8.gif

    Experiment environment.

    KOSOMES-28-6-1054_F9.gif

    Cases of collection vehicle location.

    KOSOMES-28-6-1054_F10.gif

    Setting white color HSV upper limit value.

    KOSOMES-28-6-1054_F11.gif

    Setting white color HSV lower limit value.

    KOSOMES-28-6-1054_F12.gif

    Detection area depending on the number of dilation operation.

    KOSOMES-28-6-1054_F13.gif

    Change of number of particles depending on the change of dilation operation iteration.

    KOSOMES-28-6-1054_F14.gif

    Final detection area.

    KOSOMES-28-6-1054_F15.gif

    White color detection area performance graph.

    KOSOMES-28-6-1054_F16.gif

    Red, green, and blue color detection area performance graph.

    Table

    Weather condition (2021.07.20.)

    HSV upper and lower limit values.

    Reference

    1. Korean Ministry of Oceans and Fisheries (2019), The 2nd Basic Salt Industry Promotion Plan, Solar Salt Industry Development Plan, p. 3.
    2. Korean Statistical Information Service (2021), Dependency ratio and aging index by city and county. https://kosis.kr/statHtml/statHtml.do?tblId=DT_215007_007&orgId=215&language=kor&conn_path=&vw_cd=&list_id (accessed on 08.11.2021).
    3. Muthalagu, R. , A. Bolimera, and V. Kalaichelvi (2020), Lane detection technique based on perspective transformation and histogram analysis for self-driving cars., Computers & Electrical Engineering, Volume 85, p. 106653.
    4. Neven, D. , B. D. Brabandere, S. Georgoulis, M. Proesmans, and L. V. Gool (2018), Towards End-to-End Lane Detection: an Instance Segmentation Approach., 2018 IEEE Intelligent Vehicles Symposium (IV), pp. 286-291.
    5. Park, K. M. and C. O. Bae (2019), A Study on Fire Detection in Ship Engine Rooms Using Convolutional Neural Network, Journal of the Korean Society of Marine Environment & Safety, Vol. 25, No. 4, pp. 476-481.
    6. Park, K. M. , C. O. Bae, B. Y. Ahn, and Y. S. Park (2017), A Study on Abalone Young Shells Counting System using Machine Vision., Journal of the Korean Society of Marine Environment & Safety, Vol. 23, No. 4, pp. 415-420.
    7. Park, K. M. (2021), Machine Classification in Ship Engine Rooms Using Transfer Learning, Journal of the Korean Society of Marine Environment & Safety, Vol. 27, No. 2, pp. 363-368.
    8. Gonzalez, R. C. and R. E. Woods (2013), Digital Image Processing, 3rd Edition; PEARSON (Firstbook): Seoul, Korea.