With advancements in the digital world, technology have evolved over the years especially after the invention of computers. Digital systems are now enabling us to solve several real-life problems and with better accuracy. Several applications have now been built that can process images and make them more meaningful for us.
What is Image Processing?
With the advancement of technology, we can save images digitally, might be in computers or mobiles or any other digital media. Now we might need to process that image either to enhance the same image or to extract some information embedded in it using some algorithm.
The primary steps for digital Image Processing includes:
- Import the image.
- Analyze and process the image imported.
- Output the image after the original image has been modified to get the desired result.
Some of the fields where digital image processing include but not restricted to are -
- Image sharpening and restoration.
- Medical field such as X-Ray imaging, CT scan and other such applications.
- Machine/Robot vision.
- Pattern recognition.
- Remote sensing.
How are images stored digitally?
Data in digital media is stored in the form of Binary i.e., 0s and 1s. To store an image, it is broken down into smallest element known as Pixel, each having a particular value at a particular location for example, the image is represented in the form 2096 X 1200 pixels.
Consider the following matrix-
Now, the colours are represented as 2n where 'n' is the no of bits used to represent. So if 1 bit is used (0 and 1), it can represent two colours i.e., black and white, while 8 bits can store 256 types of colours in the image and so on.
Cracks in old images.
Many paintings, especially old ones, suffer from breaks in the substrate, the paint, or the varnish. These patterns are usually called "cracks" and can be caused by aging, drying, and mechanical factors. Age cracks can result from non-uniform contraction in the canvas or wood-panel support of the painting, which stresses the layers of the painting. Drying cracks are usually caused by the evaporation of volatile paint components and the consequent shrinkage of the paint. Finally, mechanical cracks result from painting deformations due to external causes, e.g. vibrations and impacts. The appearance of cracks on paintings deteriorates the perceived image quality. However, one can use digital image processing techniques to detect and eliminate the cracks on digitized paintings.
There are three basic steps in above problem namely -
Crack detection and image restoration.
By applying digital image processing techniques, we can detect and remove the cracks in those images. The methodology involves crack detection and removal of cracks with some filling procedure.
It involves grey scale algorithm and cracks identification and removal algorithm with the use of mathematical morphology and an effective algorithm. The technique consists of the following stages:
- There should be some method through which crack area in the digital image can be detected.
- Separation of the thin dark brush strokes, which have been misidentified as cracks.
- Crack filling.
- Notably, a certain degree of user interaction and idea, most notably in the crack detection stage is required for optimal results.
Crack Detection:
In most cases, cracks can be considered as being local minima with rather elongated structure. In cracks are identified by taking into account the fact that they have considerably darker grey levels compared to the background and are characterized by a uniform grey level. From a local point of view they also have a strong orientation tendency. The cracks are detected using suitable morphological operations.
This can be achieved using four ways -
- Erosion : Erosion of an image strips away a layer of pixels from the boundaries of foreground regions.
- Dilation : Dilation of an image adds a layer of pixels to the boundaries of foreground regions.
- Opening : The opening of an image is an erosion followed by a dilation.
- Closing : Closing adds foreground pixels at the boundaries of foreground regions, but is less destructive of the initial background regions than dilation.
Black Hat Transformation can then be applied which is the difference between the closing of the image and the source image.
The black top-hat returns an image, containing the "objects" that:
- Are "smaller" than the structuring element, and
- Are darker than their surroundings.
Crack Identification:
After the Black Hat Transformation is applied on the original image with cracks, the cracks are identified using either "Selective Thresholding" or "Adaptive Thresholding".
This is one of the simplest and easiest method to identify the cracks clearly. This method works on grey scale images. So we have to convert the picture in to grey scale before applying the process. This method works with the intensity value of the pixel which start from 0 and ends in 255.
Crack Classification:
Some paintings have got certain areas where brush strokes have almost the same thickness and luminescence features as cracks. For example, hairs of a person in a portrait could be such an area. So, in order to avoid these undesirable changes to the original paintings, it is very important to separate these brush strokes from actual cracks, before carrying out the crack filling procedure. There are several crack classification procedures that can be used. Some of them are -
- Semi-automatic crack separation
- Hue, Saturation and Value
Crack filling:
Once cracks are identified and mis-classified brush strokes are separated, the final task is to restore the image using local image information (i.e., information from neighboring pixels) to fill the cracks. We can use idea of median filtering technique to fill the cracks of the image, to fill the crack using several algorithms from selecting the co-ordinate of the cracked pixel to fill those cracks by getting the approximate colour from its neighboring pixels.
In order to fill the crack pixels, a sliding window is used whose center contains the pixel to be filled and value of the other pixels in it is used for filling. It slides through the total no of crack pixels.
Conclusion:
By detecting the cracks in the old images and fill them in digitized method, it becomes easier to get an idea of how the actual image would look like and hence can be effectively used to restore the historic artifacts.
There are a lot of tools, some of which are OpenCV and Matlab, which helps to process the images by offering in-built functions. These tools can be used in major programming languages such as Java, C#, Python and others.
Comments
Post a Comment