Abstract

In today’s technology era, the field of digital image processing is growing in popularity and developing demand. When the input is given to the system, after the processing a variation is performed and the output is taken from the system. This research is about a visualized image of road pavement that was first given as an input to obtain an output using gray-level image enhancing techniques. In this research, the image enhancement is performed through different visualized enhancement images, which is the backbone of this research. Initially, it was cogitating as a piece of cake but once we start implementing the technique then we realize that it was not that easy and it needs a lot of knowledge, and the variation of research to overcome complicated problems correlate with this research. The complicated assignments were a variation of light from day to night, visibility of the cracks, homogeneous background, etc. The most complex issue is the visibility and recognition of the road cracks that are complex to classify using different algorithms in obtained images. For deep research purposes, we must identify and categorize many properties of the input images, such as intensity, color adjustment, and conversion for the sake of better image enhancement. Using MATLAB, we examine the various gray-level image using better techniques based on their computational capability. This depicts the entire outcome of road pavement images to assess the characteristics and repercussions of alteration. To more precisely check road crack detection, image enhancement techniques such as image negative, logarithmic transformations, gamma corrections, and others are applied. Every single specified technique, such as gamma and constant values, is proposed with a general mathematical implementation. Piecewise linear contrast widening subclasses are also studied to more comprehensively discover and assess road cracks. Every technique mentioned above has specific features and a unique image enhancement. Each method has a different and unique feature, so none in all the ways can be implemented for all kinds of gray-level image enhancement. Because in some cases, it will be necessary to implement gamma corrections for better enhancement, while in other areas, it will be necessary to implement logarithmic transformations for the sake of good results. The logarithmic transformation is suitable for such kind of conversion in which logarithm is taken and the image goes under process, but for the same image, the other enhancement like the negative image does not suit. A comparison will be made at the end of this study for different algorithms. We aim to compare and contrast the benefit of one technique over another, and the researcher will implement that technique for better accuracy and result. The proposed framework for image enhancement to classify the road surface cracks is beneficial in discriminating among different types. It also gives us insight into selecting the appropriate technique for the image enhancement of the road cracks according to their kinds.

1. Introduction

The background of any image plays a vital role in elaborating the contrast or brightness of that image [1]. If the visible characteristics of the targeted object are as similar as the background, then we can say that the image has poor contrast. When the difference between the target and background of an image is significantly high, we call it high-contrasted images. Such kind of image dataset always gave promising results, and the images are also known as bright images [2]. The difference in reflectance qualities between the target item and the image background will be used to examine this study’s overall brightness or contrast. Image enhancement is not easy because most of the images under consideration are very difficult to enhance, like a satellite or long-distance image [3]. Every image can be divided into two parts: brightness and contrast. Brightness is the overall intensity level of the pixel representing the image. The typical intensity value of the brighter image is always high because the gray-level value is close to the value that is close to the high-intensity scale value of the image [4]. Distinguishing by the viewer between two pixels within an image is known as the image’s contrast. Intensity variation from pixel to pixel or adjacent within the entire image, including small or large variations, can be provided through spatial variation [5].

The practical implementation of gray-level transformation with no error is complicated. Still, with abundant effort and research, it is not impossible to be implemented with a small acceptable error like the research of Riid et al. [6,7]. For the last couple of decades, the shifting procedure was being used for image enhancement [8]. The central tendency method is employed to point out the shifting in that operation, and the converted methodology was applied to identify automated contrast enhancement [9]. Yes, the environment has a great impact, and therefore, the processed images were taken under special consideration like dark homogeneous background, different variation impact of light like day and night times, different angles, and different weather like cloudy and sunny. There is also the contribution of Rahman et al. to the practical implementation of image enhancement [10]. Sun et al. also did some image enhancement techniques [11]. For the first time, Akagic et al. tapped the properties of the curvelet in their experiment [12,13]. This study consists of 4 main headings in which the introduction is on top. Then, gray-level image enhancement techniques were discussed with the subheadings of histogram equalization technique, methodology, and the conclusion that are on numbers 3 and 4, respectively.

2. Motivation

As our research work is related to road cracks and road safety, a lot of research is performed on road cracks, but still, there is some margin of improvement like a significant time drop concerning processing and an increase in accuracy. Road maintenance plays a vital role not only in the development of any country, but also road accidents are essential to be reduced to save human life. This could only be possible if there is a proper check and balance of road maintenance, performed by the ministry of local transportation [14]. One of the motivations for doing the research is to find an economical way for upgrading road cracks. In the United States, the transport infrastructure condition is graded as D+ on average, and the rehabilitation cost is expected to be $123 billion [15]. With slight development in 1970s, the percentage of structures older than 30 years was estimated at 3.8% in 2014 in Korea [16]. It is expected to exponentially increase and reach 13.8% in 2024 and 33.7% in 2029. Similarly, a lot of money has been used for road maintenance and survey in many countries like China, Pakistan, India, Korea, and Canada. So, this motivates us to give our input as an engineer and contribute our part to the development of China because we consider China as our homeland.

3. Gray-Level Image Transformation Techniques

One of the most valuable points for gray-level image enhancement is that in this technique, the gray-level image enhancement techniques are directly performed on the specific pixel of an image [17]. One of the most valuable points for gray-level image enhancement is that the process is directly performed on the particular pixel of an image in this technique [18]. The modification value of every single pixel of the processed image is dependent on the original pixel value. Many researchers like Umer Farooq have uniquely implemented image enhancement using infrared images [19].

Processing the gray-level image is comparatively more efficient than working on the true color image, so it is more focused and striking for researchers, like point process, etc. [20]. In this study, the pixel we are looking at has a two-dimensional gray image with 256 levels, ranging from 0 to 255. The horizontal axis will be from 0 to 255, but the vertical axis is reliant on the number of pixels and the distribution of gray-level values of an image. The general equation that is frequently used for image enhancement is given in equation (1).

In mention (1), T stands for the pixel transformation of the input image, where s is the multiplicative output sum of transformation and multiplication of r. Basically, r is representing the original pixel value. To make it easy and more understandable, let us consider and , then s is the representing f and on that specific pixel value of the image on the point x and y.

As we are utilizing an 8-bit image, a digital image consists of matrices holding the color intensity of each sampled point; therefore, the intensity of each color red, green, and blue will represent 28 levels of intensity. It will be in the range of 0 to 255. The statistical mean value showing the brightness of an image can be found with the help of equation (1). The pixel intensity of an image can define the contrast of that image. In equation (2), contrast modulation is shown, and this module takes and . The sinusoidal wave of an image is shown in Figure 1 for finding the intensity of an image.

Below, Figure 1 shows the conceptual sinusoidal intensity waveform of the image processing.

In above Figure 1, the sinusoidal waveform shows the intensity of the image. The intensity of an image varies from point to point. A different image representation is based on the spatial frequency of gray value or color fluctuations across the image plane. The convolutional spatial representation and reverse transformation of the latter into spatial representation are entirely equivalent. This will be valid when the lossless conversion of the 2D spatial function of spatial frequency turns into a 2D spectrum .

3.1. Histogram Equalization

The digital image constitutes every finite element with a particular location, worth, and value that specifies the area known as an image element or pixel [21]. In the image enhancement, it is required to enhance the visibility of the pixel for human or machine perception about the nature of the cracks. Classically, histogram equalization of an image is independently analyzed from its contrast [22]. It comprises applying an extraordinary difference change that straightens the histogram. It can be performed either identically or powers the repartition capacity to be as direct as could reasonably be expected. Any specific method, including histogram adjustment, is inappropriate for difference invariant image analysis. It will mathematically prove along with the figures in the later parts of this study.

After adjusting the output image after propagating the approximate background and subtracting it from the original image, the following processing step was to adapt the proposed image. Finally, the adopted image and its histogram were resolved. The difference is self-explanatory when compared to an original image. In equation (3), the mathematical representation of histogram equalization is shown.

In the above equation (3), the output is shown of the histogram equalization where n is showing integer pixel intensities, which start from 0 to L − 1, often 256. The output image has been adjusted after propagating the approximate background and subtracting it from the original image. While analyzing Figures d, e, and f with a and b, in Figure 2, it became apparent that pixel is contrasted. This method application yields into the processed image for equalized histogram as shown in Figure 2. It reflects the final histogram that is distributed according to the pixel value. In the image, the pixel value on every spot, irrespective of center, upper, or lower side, is almost the same as the pixel values are equalized and uniformly distributed, as shown in Figure 2.

3.2. Image Negative

Image negative is the opposite of a positive image, indicating that it will reverse the normal image because the image, once enhanced by negative processing, will get the light area as a dark and the dark part as a light area of the input image. This technique is simple and easy in all the gray-level image points on operational processes [23]. In this technique, we must subtract the input image value r from L − 1, the desired output in equation (4) below.

In this technique, the gray-level pixel order is reversed, and for L gray levels, the transformation function is s = T(r) = (L − 1) − r [24]. A negative image is also color reversed, like red areas converted to cyan, green areas to magenta, and blue areas to yellow [25]. Image negative is a grayscale transformation, depending on the pixel position. We are processing an 8-bit image, so the total gray levels are 256. If we insert the actual value, then equation (4) will turn to equation (5) like below, and the darker pixel becomes light, and lighter pixels become dark, as shown in Figure 3. The reverse of an image intensity levels in such a manner results in the correspondence of a photographic negative. Below Figure 3, from a to c, verifies this technique.

This processing technique is mostly suited for refining white or gray elements embedded in dark regions of an input image, predominantly when the dark areas have a prominent size [26].

3.3. Logarithmic Transformations

Logarithmic transformations are further divided into log transformation and inverse log transformation [27]. Log transformation is used to expand the value of dark pixels while compressing the high-level values. Inverse log transformation or exponential transformation is the opposite because it expends the value of high pixels while compressing the darker level value [28]. So, the transformation will be as precise as another, like expending one part will be as accurate as simultaneously compressing the other [29]. The mathematical representation of this technique can be expressed as in equation (6).

The above Figure 4 is representing a graphical representation of image negative in which r represents the input pixel value, s represents output, and c is a constant with an intensity profile spanning 0 to 255. The main aim of using this technique is suitable for enhancing the dark pixels and compressing the bright pixel.

In Figure 5, the subfigures a to i show logarithmic transformation with the variation of constant value from 0.1 to 0.7. In the performed experiment, we keep the r value from 0.1 to 0.7. The 0.7 value result is white as shown in Figure 5(i). From 0.7 onward, the result is the same and there is no effect on the output if we increase the value. During mapping an input image, the intensity level shifts from low to more comprehensive in a narrow range and high intensity toward narrow in a broader range. This technique is widely used when the input image values are exceptionally hefty. The constant variation from 0.1 to 0.7 has been processed, and the output of each constant is crystal clear and visible for analysis and comparison. There are two main properties of log transformations. One of the properties is that it expends the gray-level range at input lower amplitudes. The other property is the opposite of it, which means in the other property, the gray-level range will be compressed at high input amplitudes [27], as shown in the above output images. This kind of transformation suits the dynamic range compression in which the processed image far exceeds the aptitude of the display device.

3.4. Power-Law Transform

In the power-law transform technique, γ plays a vital role, and with the tuning of γ, the characteristic curve is adjusted [10]. With the adjustment of γ, the input image is modified in both darkness and light. Through varying γ, the low-intensity levels jump toward a broader range from input to output levels, so the dark pixels are expended in the output levels. In the inverse log, it also compresses the high value, and that is the reason this technique is comparatively better than all other techniques. Gamma transform is the second name of power-law transformation. Mathematical representation is here in equation (7):

The fractional γ value corresponds from low- to high-intensity values in Gamma transformation [30]. Every display device has its gamma value, and according to that value, the algorithm decides about the intensity of brightness or makes the image lighten. We mainly use the cathode-ray tube, which has the intensity to voltage response. The gamma value varies from 1.8 to 2.5, which leads to a dark display [31].

According to Figure 6, if the gamma value is less than 1, the given output will be a sharp and brighter image. If the gamma value is greater than 1, the output image will be dark, but if the gamma value is 1, there will be no effect on the output, and the input and output images will remain the same. Above Figure 6 tells us that if γ = 1, identity transformation will occur, but if γ > 1 or γ < 1, the variation will depend on the value of gamma.

In above Figure 7, different gamma values’ output is presented, and from the output images, it is evident that the darkness varies with the variation of gamma as shown above [32]. Gamma value is different in different display units, so it is essential to enhance images for several display devices. The primary and significant steps for power-law transformation are getting the image, converting RGB to grayscale, setting gamma value, and applying it to the input image. Before mentioned processes are performed with the variation of gamma value to the input image, and the output is present from a to k with a variation.

3.5. Gamma Corrections

Every technique has its importance and use, but histogram equalization is comparatively good for overall aspects [33]. There are some applicable techniques for histogram equalization like widespread histogram, etc. Besides all these advantages, this technique is still not good, because it does not significantly improve each pixel. If there is any irregularity in capturing the image, the result will not be good, and some parts will be more bright or dark with low or high contrast [34]. Irregularity in capturing the image means that we have to keep a few parameters under consideration while capturing images to be processed. These parameters are dark homogeneous background, keeping different variation impact of light like day and night times, different angles, and different weather like cloudy and sunny. For some parts of the image, the brightness or contrast will be an increase in the processed image, but some parts of the captured image will remain the same, so gamma correction is the best technique for this kind of problem like keeping the gamma value 1 will create a linear map [15]. If the gamma value is a maximum of 2 in the experiment, we received a darker image, as shown in Figure 9. Then, we reduced the gamma value from 2 to 1; we have less dark output than the image with a gamma value of 2. If we keep the value constantly toward down like 0.3 or less than 1, then the result will be easily noticed with the visual eye because the contrast will go toward maximum high.

Figure 8 is the best self-explaining figure of gamma and gamma correction, while mathematically it will be written as in equation (8).

In the above equation, we have three major variables that are i representing as an original image pixel value, and J gamma correction output gain, while c is constant.

The following figures of Figure 9 show the variation with the different gamma values from 0.3 to 2. From the above figures, it is crystal clear that if the gamma varies, the result varies.

3.6. Piecewise Linear Contrast Stretching

Enhancement and analysis in an efficient mode can be achieved by applying the piecewise linear stretching. The increment in the range of brightness values for the single and multiple images is performed in this technique. In this technique, the objective value of an image contrast can be different either partially or wholly due to specific characteristics [35]. These features include lighting and the acquisition sensor device’s settings for acquiring the image. It can be simply defined as the modification between the minimum and the maximum intensities of a pixel in an image or within the image [14]. The logic behind this technique is to enhance the range of dynamic gray levels of an input image. Thus, this procedure leads toward the dynamic modification of the gray levels of an image or images to get the required dynamic range of enhancement. Figure 10 demonstrates a typical modification used for contrast stretching. The positions of points (r1, s1) and (r2, s2) manipulate the visibility of the modification [36]. This technique presents the simplest contrast stretch method in which the values of the pixel of an image are widening with low contrast or high contrast. It is performed by dividing the dynamic range across the whole image spectrum from 0 to (L − 1), with horizontal representing before and vertical representing after image modification. In the image spectrum, the integer pixel intensities range from 0 to L − 1. L − 1 is the number of possible intensity values, often 256. Figure 10 illustrates this technique.

3.6.1. Contrast Stretching

Contrast is defined as the difference between the intensity of two adjacent pixels. The difference will be more in high-contrast images while less in low contrast [37]. Low-contrast images are the result of either poor or nonuniform lighting conditions. It is also either because of nonlinearity or quite a small dynamic limit of the imaging sensor [38]. The contrast stretching transformation is given by the following:

Above Figure 11 is the graphical representation of the contrast stretching. According to the necessity, the transformation slope is more significantly and gradually selected than unity in this procedure. In this technique, transformation is under consideration, stretching the slope of the image, so in this procedure, the slope of transformation must be selected greater than unity. The details of the darker area of an image become visible in contrast stretching. It works evenly well on both color and gray images. The formula is applicable to all three RGB planes.

The primary purpose of Figure 12 is to increase the dynamic range of the gray levels for low-contrast images. Low-contrast images from poor illumination enhance that the quality is improved in case the imaging sensor lacks the dynamic range. Finally, the rectified output image was taken in a lens’s impropriate setting during image acquisition [39].

3.6.2. Gray-Level Slicing

This technique was implemented when a specific range of gray levels gained prominence. To suppress or maintain some essential details, this technique is required to apply [40]. It is almost similar to the thresholding, but the way of implementation is different, and in the result, the output also varies, as shown in Figures 13 and 14. This is the most preferred technique for satellite imaging because, in satellite image analysis, it is also used to remove the defects and displace certain features [41]. There are two main themes in this technique; first is to show a higher value for all gray levels. The second is to show a lower value for all other gray levels in the range of interest. In this case, the emphasis is on the object of interest rather than other elements like background. On the contrary, the different approaches brighten the desired range of gray levels [42]. Meanwhile, they also configure the image according to the gray-level tones and background [43].

Figure 13 shows the slicing without background, while the b figure is with the background. So, both figures a and b offer the gray-level slicing and are merged into Figure 13.

In Figure 14, the specific ranges of the images are highlighted. Also, the high value of all gray levels in the range of interest and a low value for all other gray levels are displayed. So, in short, the transformation highlights range [A, B] of the gray level and reduces all others to a constant level but also preserves all other levels. In Figure 14, the intensity level of “d” is 150, and “h” is 1200. Of course, the difference is very high, and it is because if we keep the value like 300, 600, or higher. But it is in between 200 and 1,200; clearly, the result does not vary.

4. Implementing Strategy

All the techniques and processes were performed in the well-known software, namely, MATLAB, because this software gives us the best environment for image processing simulation. Processing the images as the input after processing gaining the output is very easy and inexpensive with the Image Processing Toolbox [44]. One of the key points of using this software is the controlling features, as the control of input and the program can be stopped at every stage if needed [45]. This software is very approachable and friendly because while editing, we do not need to rewrite and run all the programs from the beginning as we do in other programming software like C or C++. So, with this, the researcher saved a lot of time and energy while achieving a better outcome than others like C or C++. For this experiment, NVIDIA GPU has been used, which speeds up the processing with no need to consume and is also suitable for using GUI (graphical user interface) to enable command control parameters. GPU is also essential for processing all the above techniques [46]. The device specification on which these experiments are performed is given in Table 1 below.

5. Conclusions

This study represents six eminent gray-level techniques implemented in MATLAB with a functional collaborative graphical user interface. This study also presented the procedures required to implement the various gray-level methods used in image processing analysis. It shows a much more appropriate way to achieve the required gray-level output. Regardless of the effectiveness and robustness of the executed techniques in MATLAB, there is some margin of improvement like we can implement using other algorithms and do a comparison with implemented algorithms. The proposed algorithms are not for a specific area or specific dataset. These implemented techniques are suitable for every part of the world and every single image. In the future, the study can be broadened to implement other advanced image enhancement techniques with a variation. In this work, we have illustrated how different image enhancement techniques enhance the quality of images. These techniques include contrast stretching and histogram equalization with gamma correction. They have their specific characteristics to modify the images according to the requirement. After implementing each technique, the simulation results show that every method produces visually pleasing results, making the analysis manageable and applicable. There are many different methods used for feature extraction but in our proposed method, and we experimented on the well-known algorithms and did a comparison that which method’s output is comparatively good for the kind of road cracks.

Data Availability

The data used in this research will be provided by the corresponding author upon request.

Conflicts of Interest

There are no conflicts of interest.