DETECTION AND EVALUATION OF SKIN DISORDERS BY ONE OF PHOTOGRAMMETRIC IMAGE ANALYSIS METHODS

Abnormalities on skin may vary from simple acne to painful wounds which affect a person’s life quality. Detection of these kinds of disorders in early stages, followed by the evaluation of abnormalities is of high importance. At this stage, photogrammetry offers a non-contact solution to this concern by providing geometric highly accurate data. Photogrammetry, which has been used for firstly topographic purposes, in virtue of terrestrial photogrammetry became useful technique in non-topographic applications also (Wolf et al., 2000). Moreover the extension of usage of photogrammetry, in parallel with the development in technology, analogue photographs are replaced with digital images and besides digital image processing techniques, it provides modification of digital images by using filters, registration processes etc. Besides, photogrammetry (using same coordinate system by registration of images) can serve as a tool for the comparison of temporal imaging data. The aim of this study is to examine several digital image processing techniques, in particular the digital filters, which might be useful to determine skin disorders. In our study we examine affordable to purchase, user friendly software which needs neither expertise nor pre-training. Since it is a pre-work for subsequent and deeper studies, Adobe Photoshop 7.0 is used as a present software. In addition to that Adobe Photoshop released a DesAcc plug-ins with CS3 version and provides full compatibility with DICOM (Digital Imaging and Communications in Medicine) and PACS (Picture Archiving and Communications System) that enables doctors to store all medical data together with relevant images and share if necessary.


INTRODUCTION 1.1 Motivation
Photogrammetry, which has been used for firstly topographic purposes, in virtue of terrestrial photogrammetry became useful technique in non-topographic applications also.Aircraft manufacture, forestry, telecommunication, archaeology, architecture, geology, engineering, criminology, medicine and dentistry can be counted in that concern (Wolf et al.,2000).When compared with the other fields, medical photogrammetry is quite new area for photogrammetric applications but despite the newness, it has many sub-fields X-Ray photogrammetry, 3D modelling from CT and MR images, determination and observation of physical disorders like scoliosis, or wound measurement even image guided surgery.Medical photogrammetry as well as being new it also requires different and generally unique system designs for every different sub-area.This challenging feature generates the motivation of this study as a start.

Aim of the Study
The aim of this study is to determine some conditions such as lighting conditions, most appropriate camera settings like ISO Speed, Shutter Speed, Aperture Value, White Balance etc. to acquire images that yield the most natural appearance and then, evaluating data by using digital image processing techniques to extract the most suitable information, detection of disorders and observation of their evaluation with the use of computer aided programs.
Improvements on technological area pave the way for photogrammetry to be used in different subjects and applications.Medical field is one of the freshest but promising scopes.It should be noted that, some of the methods mentioned below in the study are newly used for medical purposes and are still on experimental level and further investigations with deeper examinations are necessary.

PROPOSED METHODOLOGY
The detection of skin disorders and their evaluation is divided into some basic steps.

Determining the Conditions for Most real like Images
Experiments using different camera conditions in order to decide the most appropriate criteria that satisfy the needs of the work.

Image enhancement
Image enhancement is the step for neutralizing the illumination effects by using homomorphic filter, thus obtaining light independent conditions.

Registration
It is the process needed to compare (pixel by pixel) the temporal images.

Image Processing by Filters
It includes different applications of filtering to reveal automatically the detection of skin disorders.

Quantitative Analysis
Determining the true space the scar covers and gives to the decision maker the tool measure it.This step is processed by using two separate tools in Photoshop (which are the magic wand and the magnetic lasso tool).

DETERMINING THE CONDITIONS FOR MOST REAL LIKE IMAGES
According to Boersma (1998), if the camera is very sensitive to light, very strong illumination might not be necessary; on the other hand, common lighting should respond the need of providing sufficient depth of field.White fluorescent light was used in the experimental stage.As a primary test, a set of examination was run in order to consider which camera parameters provide most real-like vision.A colourful paper was attached on the wall to take snapshots.82 images were taken in different shutter speed, aperture mode, metering mode, ISO Speed and White balance specifications.After the evaluation of images, the criteria below were determined the most suitable to collect the most natural images.After, conditions were tested with colorful irrelevant image to the medical application; another two different test images that depict the same skin disorder at different sizes were also acquired.Figure 3.2 shows two different shutter speed conditions on "Test Image#1".

IMAGE ENHANCEMENT
Since the illumination condition has the major effect on the appearance of the subject, light conditions need to be standardized in order to use the method in every environment.For this reason, in order to reduce the effect of the illumination, homomorphic filter was applied to images.It is a multiplicative filter that affects a lot with the images' intensity.Homomorphic filter is based on the idea that optical images have two components which are luminance and reflectance.Poor contrast images can be enhanced by straining the light source and increasing the reflectance at the same time (Al-Amri et al., 2010).Since the Fourier Transform is suitable to be used when the noise can be modelled as additive term to the original image values, defects like uneven lighting, needs to be modelled as multiplicative term.As a combination of illumination and reflectance an image can be modelled below (Matthys, 2001).f(x,y) = i(x,y).r(x,y) (1) Adelmann (1998) states that frequency-domain filtering of images serves as both multilateral and strong tool but, illumination and reflectance components of an image cannot be operated differently in the frequency domain, because as seen in equation ( 1) above the two mentioned components are in multiplicative form and not separable.In order to apply Fourier Transform, multiplicative equation must be converted to an additive form.
Figure 3 shows the flow chart of homomorfic filter which are a logarithmic operation for converting equation (1) into additive form, taking the FFT of both sides of logarithmic equation, applying the suitable filter function (H(u,v)), then taking the inverse of FFT and lastly taking the exponential of both sides respectively.
Homomorphic filter was applied with "Astra Image 3.0 Pro" Software.Different strength conditions were tested and it was decided there is no significant difference between values of 1.50 to 2.00, on the other hand RGB and Luminance condition used during the filter reveals different effects.Luminance provides closer visualization to the original image but using RGB values applies biggest contrast around the disorder area.Thus, it is considered that this enables to discriminate the differences between the scar and the normal skin more easily.As a second consideration of criteria, exposure compensations were tested and homomorphic filter was also applied to them.As a result of the comparison, changing exposure levels does not affect images dramatically especially after applying the homomorphic filter.

REGISTRATION
Evaluation of the disease, growth or reduce of its size can be detected only if they are both in the same coordinate system.In order to provide the same coordinate system for both images "image to image" registration needs to be applied.In order to be able to perform arithmetic (and other comparing) operations between the pixels in two images, there should be available an automatic process to refer them in the same ground space.The solution to this problem lies beyond the targets of the current work and a generic settlement is not provided.There are many algorithms that might be used to perform a registration between images.The most commonly used is the SIFT (Scale Invariant Feature Transform) and its variation that has been used with great success in the creation of panoramic images.For more details please follow the references (Lowe, Meng).However, in the current study a couple of time variant images should be referred to each other, thus they were registered manually using the Autodesk® Raster Design software.The software is freely available to all the academic higher educational institutes (http://students.autodesk.com)and the latest version 2010 has been used.During the registration process, the one of the images is left unchanged while the other is aligned using a triplet of very well defined points visible also to the original one.The scale, shift and rotation of the second image are applied and a resampled image is generated.A common rectangle area is used to crop the two images in the same ground space (using the same ground resolution) and the comparing algorithms are applied to extract the healing progress of the tissue.

IMAGE PROCESSING BY FILTERS
As a main purpose of the project, skin disorders, basically scars are tried to be extracted automatically from healthy skin and observe their evaluation if they are growing or healing by using some filters.For this aim, the best visualization is considered to be black and white images.Adobe Photoshop 7.0 was used as image processing software.All the filters were applied on both homomorphicaly filtered "Test Image#1" and "Test Image#2"

Photocopy -Trace Contour
Photocopy filter, which is under the Sketch section in Photoshop Menu tend to copy large areas of darkness on the original image around the edges and the other areas are drawn back to either solid black or white (Adobe Photoshop Help Center).Photocopy filter has two criteria these are detail and darkness.Detail refers to how much detail in the original image will be filtered while darkness refers to how dark the details will be (Yousif, 2005).
Trace Contour filter that lies under "Stylize" section in Photoshop Menu uses transitions of major brightness areas in image and highlights them in order to produce lines similar to contours in a map.This filter has two settings, edge option and level.In Edge

Photocopy -Threshold
Threshold level defines the value that all the pixels lower than this value are converted to black colour and all pixels higher than threshold are converted to white colour.The value of threshold level is inversely proportional to the darkness as the parameter of photocopy filter (Adobe Photoshop Help Center).

QUANTITATIVE ANALYSIS WITH PHOTOSHOP
Quantitative analysis on skin disorders is very important in order to see the evaluation of a disease.Analysis done by only visual observation by doctors is observer-dependent (Ramazani et al.) and moreover small changes might not be recognizable by human vision.Photoshop provides a user-friendly and amount effective tool to answer this purpose.In this part of the study (as well as in the filter testing phase), Photoshop 7.0 was used to make quantitative analysis.Two images with different dimensions of the same scar on skin were analysed.Because of the inability to access real patients, the tests were applied on printed images downloaded from the internet.It should be noted that, to make a final judgment about the validity of all Photoshop tools, more examinations must be done with the contribution of medical specialists and on real patient's skin diseases.Quantitative analysis was performed using two different tools of Photoshop: "Magic Wand" and "Magnetic Lasso".These tools determine the size of the scar in pixel dimensions that can be used for a reliable metric evaluation comparison.The mentioned methods were applied on the same scar images but with different characteristics (size).All image pairs were registered on each other and were converted to the same ground space in order to make the comparison feasible.This way it was possible to define some standards for this kind of temporal images' comparison and to reveal the usefulness of the applied filters.

Magic Wand Tool
The Magic Wand tool specifies the adjacent area around a pixel which is selected by the operator.Two criteria, tolerance value and contiguous option, must also be determined.Tolerance value in pixels ranges between 0 and 255.This value must be selected low if it is preferable to select very similar pixels to the operator's choice.Higher values widen the range of pixel differences between each other (Adobe Photoshop Help Center).Contiguous selection allows neighbouring pixels to the operator's selection to be taken into consideration for the final selection of the area.Otherwise, only the similar pixels (within the given tolerance) will be taken into consideration Tolerance was chosen as 30 and contiguous option was used during the application.The histogram under the image menu shows mean, median, standard deviation and pixel amount within the selection.Results after ten trials on both homomorphicaly filtered Test Image#1 and Test Image#2 are displayed below in

Magnetic Lasso Tool
The Lasso tool lets the operator to draw borders freely while the magnetic lasso tool snaps the border to the edges of the defined areas in the image.Anti-aliasing smoothes the edges and the feathering feature blurs the edges between the selection and its surrounding pixels.There are some extra options to determine the use of the magnetic lasso tool.Width value in pixels indicates the amount of the neighbor pixels which will be included into border.Edge Contrast is the sensitivity to edges in image.Higher values detect only edges that differs highly contrast with its surroundings and lower value allows lower contrast selection.Frequency specifies the rate between fastening points of lasso tool.Higher frequency means closetimbered selection will be done by software (Adobe Photoshop Help Center).While using Magnetic Lasso tool, anti-aliasing and feather choices were left to 0 because smoothness and blurriness is considered to cause loss of information and make the selection of edges harder.The selection width of 24 pixels (in diameter) was left unchanged as it was originally selected by the software; edge contrast was chosen to be 20% after some trial.This value can be chosen according to the color or contrast between the scar and normal skin and frequency 75 was considered enough to make a sufficient border

Comparison of the Results
First of all, there is a significant difference in the amount of pixels selected when the two methods are used.During the application it was observed that the magic wand tool can exclude some pixels (from of manual operator's selection) depending on the tolerance value that is specified.This effect is shown in Figure .9. Red squares show the pixels which are not included in the selected area.
Another reason can be that, magnetic lasso is an operator depended tool.Operator selects the points and creates border manually from the beginning.This enables the person to decide the extensity of the edging.In that way, the operator might select a wider border that he thinks it is part of the scar.On the other hand the magic wand tool is an automated tool that only results according to the digital numbers of the selected pixel.
Figure 10.Pixels which are not included at result of Magic Wand tool process Standard deviation rates are higher in magnetic lasso selection process.This can be the effect of exclusion of outlier pixels over scars by the magic wand tool.Also standard deviation represents the variation among the pixels in the selection area which reveals their difference in digital numbers.However, this does not mean that these pixels do not belong to the scar.

Quantitative Analysis on Filtered Images
Filtered images were chosen according to their results which were considered most accurate or suitable to represent the whole scar on the skin by using overlay visualization of filtered and original images.Because filtered images are only black and white images, magic wand tool is enough to calculate the amount of pixels and also it is enough to execute the tool once since there will be no change in the digital number of the pixel that is chosen by the operator inside the region of the scar.

Comparison between Homomorphic Images and Filtered Images
When the Test Image#1 and Test Image#2 are compared, it can be seen that total pixel amount difference calculated by magic wand tool is less on homomorpicaly filtered images than enhanced images (different filter applications).The reason of this difference is that, filters comprise some pixels from upper part which has lighter red color than main scar.But when the magic wand tool was used on non-enhanced images this part is not counted as adjacent pixels.See Figure 9.

CONCLUSIONS
As a conclusion, all the performed tests show that it is possible to use the filters mentioned above for the determination and monitoring of skin disorders.On the one hand they have achieved satisfactory results and on the other hand the software used (Photoshop) is user friendly and requires no special training or skills to use.The combination of the "Trace Contour -Photocopy" filters provides good results which are easy to interpret and provide some conclusions because they show not only the original image but also the border.On the contrary; "Find Edges-Photocopy-Trace Contour" filters don't reveal exact boundaries.Parameters of filters are also another aspect which needs to be considered in further investigations concerning also the hurt area size on the image.
Quantitative analysis might constitute providence about the size of scar during the observation of the healing process but they must be evaluated very carefully.Finally, in order to make any standard about this kind of study, different type of skin damages must also be investigated profoundly with in-depth information.Texture of the scar is another aspect, which should be taken into consideration in the stage of determination of the disorder.Besides the type of damage, color is another important criterion that can provide auxiliary information.Especially with the usage of color calibration method, some disorder type can be defined in charts and it disposes observer dependence in a considerable extend.
Photoshop is a really "cool" image processing tool and has been used for its big variety of tools (selection tools, filters etc) and its wide usage among people with different knowledge background on computers.All of the above mentioned algorithms and techniques should be developed and embedded in a dedicated software application in order to be used appropriately for the evaluation of skin damages.However, this is a kind of research that must be performed in different level and is far beyond the current work.

Figure 2 .
Figure 2. Medical test images#1 (a) SS: 2"5, AV:32, WB: AWB; (b) S S: 2", AV: 32, WB: AWB Figure 4.2 shows the homomorphic filter applied with Astra Image 3.0 Pro with original data.As seen from the figure 4.2, homomorphic filter provides clearer image around skin artifact.Homomorphic filter applied to test image#1 (a) Original Test Image#1 (b) Homomorphic Filtered Image: RGB strength 1.50 Option, lower edge outlines areas where the color values of pixels fall below the specified level and upper edge outlines areas where the color values fall above (Adobe Photoshop Help Center).Level can take a value between 0 and 255 and it indicates the threshold for the evaluation of tonal values in the image.Multiple tests were run with different detail/darkness values and with different edge option/level values.Homomorphicaly Filtered Test Image#1 (a) Photocopy filter (Det: 24, dark:5) (b) Trace Cont.(Level, Edge Lower:128) (c) overlay with original image (a) (b) (c) Figure 6.Homomorphicaly Filtered Test Image#1 (a) Photocopy filter (Det: 24, dark:10) (b) Trace Cont.(Level, Edge Lower:170) (c) overlay with original image Figure 7. Homomorphicaly Filtered Test Image#1 (a) Photocopy filter (Det: 24, dark:5) (b) Threshold (Level:128) (c) overlay with original image Homomorphicaly Filtered Test Image#1 (a) Photocopy filter (Det: 20, dark:5) (b) Threshold (Level:165) (c) overlay with original image 6.3 Find Edges -Photocopy -Trace Contour Find edges in "Stylize" section of filters in Photoshop menu highlights the areas with dramatic transitions and extracts the edges.It can be used for creating borders around an image area or around a specific pattern in an image.Homomorphicaly Filtered Test Image#1 (a) Find Edges (b) Photocopy filter (Det: 5, dark:5) (c) overlay with original image

Table 5 .
Magic Wand tool applied on filtered images