New Edge Detection Method for Indonesian Batik

. New Edge Detection Method for Indonesian Batik. In this paper, we propose a new edge detection analysis method on batiks motif. Edge detection has been oftenlyÂ used in computer vision and image processing. IndonesianÂ Batiks motif are some example of graphic picture that has unique pattern that interesting to analyse. The method that used for example on this paper are canny and prewit and produce a new method, thomas method. the differentÂ amongs the method, the result of comparison appears on quality, accuracy and clarity. The example that we use are parang batiks motive, lereng batiks motive, and udan liris batiks motive. Three of batiks motive above are have unique pattern.Â


Introduction
There are many ways to make image simplification, one of the ways commonly used in image processing is edge detection. The basis of the edge detection technique is to scan the image vertically and horizontally, looking at whether a sudden color change in excess of a price (sensitivity) between two points attached. If yes, then in place between the two points is considered the edge of an object. One is the development of edge detection with Prewitt operator technique. This technique is used on neighborhood-sized 3 x 3, matrix with the inspection point as the midpoint matrix. Of the matrix calculations are then performed between the difference in points on the horizontal side of the difference in points on the vertical side.  (3+5+8-1-4-6)

Edge Detection
Edge detection is a fundamental tool used in most image processing applications to obtain information from the frames as a precursor step to feature extraction and object segmentation. This process detects outlines of an object and boundaries between objects and the background in the image. An edge-detection filter can also be used to improve the appearance of blurred or anti-aliased video streams. An edge is a boundary between an object and the background, and indicates the boundary between overlapping objects. Usually people say process of finding sharp contrasts in the intensities of an image. Edge shows limits of object and used for processing identification and segmenting object. Purpose of edge detection is shows the line which surrounding the object.
Edges represent object boundaries and therefore can be used in image segmentation to subdivide an image into its constituent regions or objects. It's form the outline of an object, so if the edges are identified in an image accurately, then all the objects can be located and basic properties such as area, perimeter can be measured. Edge detection is based on the relationship a pixel has with its neighbors.
The basic edge-detection operator is a matrix area gradient operation that determines the level of variance between different pixels. The edge-detection operator is calculated by forming a matrix centered on a pixel chosen as the center of the matrix area. If the value of this matrix area is above a given threshold, then the middle pixel is classified as an edge. Examples of gradient-based edge detectors are Roberts, Prewitt, and Sobel operators. All the gradient-based algorithms have kernel operators that calculate the strength of the slope in directions which are orthogonal to each other, commonly vertical and horizontal. Later, the contributions of the different components of the slopes are combined to give the total value of the edge strength. Types of edge displayed on figure 2.

Figure 2. Edge Type Example
The Prewitt operator measures two components. The vertical edge component is calculated with kernel Kx and the horizontal edge component is calculated with kernel Ky. |Kx| + |Ky| gives an indication of the intensity of the gradient in the current pixel.
Depending on the noise characteristics of the image or streaming video, edge detection results can vary. Gradient-based algorithms such as the Prewitt filter have a major drawback of being very sensitive to noise. The size of the kernel filter and coefficients are fixed and cannot be adapted to a given image. An adaptive edge-detection algorithm is necessary to provide a robust solution that is adaptable to the varying noise levels of these images to help distinguish valid image content from visual artifacts introduced by noise.
The Canny algorithm uses an optimal edge detector based on a set of criteria which include finding the most edges by minimizing the error rate, marking edges as closely as possible to the actual edges to maximize localization, and marking edges only once when a single edge exists for minimal response. According to Canny, the optimal filter that meets all three criteria above can be efficiently approximated using the first derivative of a Gaussian function.

Equation 2. Gaussian
The first stage involves smoothing the image by convolving with a Gaussian filter. This is followed by finding the gradient of the image by feeding the smoothed image through a convolution operation with the derivative of the Gaussian in both the vertical and horizontal directions. The 2-D convolution operation is described in the following equation. Both the Gaussian mask and its derivative are separable, allowing the 2-D convolution operation to be simplified. This optimization is not limited to software implementation only, but applies to hardware implementation as well, as shown in the next section.
The non-maximal suppression stage finds the local maxima in the direction of the gradient, and suppresses all others, minimizing false edges. The local maxima is found by comparing the pixel with its neighbors along the direction of the gradient. This helps to maintain the single pixel thin edges before the final thresholding stage.
Instead of using a single static threshold value for the entire image, the Canny algorithm introduced hysteresis thresholding, which has some adaptivity to the local content of the image. There are two threshold levels, th, high and tl, low where th > tl. Pixel values above the th value are immediately classified as edges. By tracing the edge contour, neighboring pixels with gradient magnitude values less than th can still be marked as edges as long as they are above tl. This process alleviates problems associated with edge discontinuities by identifying strong edges, and preserving the relevant weak edges, in addition to maintaining some level of noise suppression. While the results are desirable, the hysteresis stage slows the overall algorithm down considerably.
The performance of the Canny algorithm depends heavily on the adjustable parameters, σ, which is the standard deviation for the Gaussian filter, and the threshold values, th and tl. σ also controls the size of the Gaussian filter. The bigger the value for σ, the larger the size of the Gaussian filter becomes. This implies more blurring, necessary for noisy images, as well as detecting larger edges. As expected, however, the larger the scale of the Gaussian, the less accurate is the localization of the edge. Smaller values of σ imply a smaller Gaussian filter which limits the amount of blurring, maintaining finer edges in the image. The user can tailor the algorithm by adjusting these parameters to adapt to different environments with different noise levels. The Canny edge detector is one of the most widely used edge detectors in computer vision and image-processing community. In many applications, The Canny edge detector has been used as the standard image preprocessing technique. Canny edge detection consists of four steps: noise suppression, gradient computation, non-maximal suppression, and hysteresis.
Results can be further improved by performing edge detection at multiple resolutions using multi-scale representations, similar to the Marr-Hildreth algorithm. This is achieved using different standard deviations, which correspond to different resolution versions of the image. Edges have zero crossing at multiple scale values. Combining maxima information from different scales allows better classification of true edges.
Convolution at multiple resolutions with large Gaussian filters require even more computation power. This may prove to be challenging to implement as a software solution for real-time applications.

Threshold Selection
The edge is detected by comparing the edge gradient to a defined threshold value. This threshold represents the sensitivity of the edge detector. When dealing with noisy edges, one could miss valid edges while creating noise-induced false edges. Edge detection can be represented by the following conditional probability densities. where PD and PF represent the probability of correct detection and the probability of false edge detection respectively. Also, the t is denoted as the detection threshold. Figure 3 exhibits the conditional probability densities of edge gradient that vary in edge and non-edge regions. The probability of misclassification can be represented as equation 5.

P E =[1-P D ]P(edge)+[P F ]P(no-edge)
According to Heyman-Pearson test, a threshold t is chosen to minimize PF for a fixed PD. An ideal threshold must produce minimum error PE. This condition can be achieved if the following maximum likelihood ratio test associated with the Bayes minimum error decision rule of classical decision theory is satisfied.

Equation 6. Bayes
The conditional densities for 2 by 2 and 3 by 3 edge detection operators were derived by Abdou. The densities apply when the width of a ramp edge is one (w=1) and additive Gaussian noise is present. However, Reliability of the stochastic edge. Model and analytic difficulties in deriving the edge gradient conditional densities are two difficulties when we are determining the optimal threshold for our edge detector. Abdou and Pratt have developed an approach based on pattern recognition techniques. Their design produced a table which lists the optimal threshold value for several 2 by 2 and 3 by 3 edge detectors and the probability of correct and false edge detection. When edges and non-edges are equally probable, PF equals 1 -PD. The edge detection threshold should be inversely proportional to SNR (Signal-to-Noise Ratio).

Indonesian Batik
Batik is one of Indonesian culture and listed by UNESCO as one of World Heritage in year 2009 reference number 170. Batik has many and unique motif as it demographic culture and every motif is unique. Indonesia has many and unique variety of Batik motives due to plural culture and ethnics.Batik originated from the Javanese 'amba', meaning to write and 'titik' that mean point. The word batik refers to fabric with patterns generated by the materials 'malam' (wax) is applied to the fabric. Indeed the point is the dominant design in batik.
Javanese women in the past made their skills in batik for a living, so in batik work is exclusively women's work. Batik is also identically with female beauty, considering that in the kingdom in Java, a woman's beauty is also in measuring the skill of making batik using canting. Canting is one tool to write on batik cloth using wax. Until the discovery of 'batik cap' which allows the entry of men into the field. Actually batik in Indonesia has been known since the time of Majapahit Kingdom and growing to the kingdom and the subsequent kings.
At the beginning of its development, roughly around the eighteenth century or early twentieth century was still a original write method batik, batik cap itself are introduced after the first world war or the year 1920. Initially, batik is only made limited in the palace and the results are used for the king and the family clothing and his followers.
In fact, batik motif can indicate the status of a person. Like the families of Yogyakarta and Surakarta palace, each wearing only a certain batik motif until now. The more widespread batik influenced by followers of the king who lived outside the palace that helped popularize batik outside the palace.
Over time this batik art imitated by the people nearest and further extends to the work of women in the household to fill his spare time. Batik clothes that had only the family court later became a popular folk clothing both men and women. At that time, the white cloth that is used when it is the result of his own weaving.
While coloring materials used consisted of growing native plants homemade Indonesia including mengkudu tree, tall, Soga, indigo, and flat materials made from soda ash and salt from the mud. Every motive is stated in the fabric has a philosophy about the meaning of life, events, to the life experiences of the characters or the family tradition.
Batik should not be vain and presumptuous to interpret because inspirations pour just above the fabric. Before translate handwriting, first they do little rituals like fasting and reading "mantera". The maker also have to implement the closing ritual.
And batik actually contains historical value is very high. Parang Rusak batik motif instance, including batik motif is the only sacred in use at the palace. Similarly, the color motif batik parang court can determine the origin of the wearer, whether from the royal palace of the royal palace Solo or Jogja Lereng motive tells of the many slopes in the mountains of Indonesia Udan liris the meaning of "udan" is the rain, and the "liris" is the lyric, from the two pairs of words, telling us that the motive was told about the lyrics of rain in the rainy season.

Thomas Method
The Thomas Method are combination of 2 methods resulting from repeated experiments on two matrices that are used by Prewitt and Canny. From the prewitt matrix calculation, and the canny logic, then conducted the experiment by replacing the existing values in the matrix prewit, so that in the middle of the Y prewitt matrix, are the inverse of the matrix X, where the value of 0 in the matrix X are the detector for vertical color difference and the matrix Y is a horizontal color difference detection.
The result are made for a single left line detector. The Matrix that used on the program are the result of : For the X matrix For the Y matrix

Experiment Result
The Program that used on this experiment can be seen in figure 4. And save results produced can be seen in figure 4, 5, and 6.

Conclusion
Compared with the calculation prewitt, and canny logic. matrix that is formed can be useful for the detection of a line from the left side, so if the image is the desired result of the detection line on the left then this matrix can be used. The weakness of this method is a line from the right side of the image information still visible although very thin, and noise levels for the complex image information can not be solved properly.