pneumonia xray

Upload: luigi-carlo-de-jesus

Post on 08-Mar-2016

46 views

Category:

Documents


3 download

DESCRIPTION

Thesis

TRANSCRIPT

SUPPLEMENTARY PNEUMONIA DETECTION VIA X-RAY IMAGES THROUGH MATLAB

A thesis presented to the College of Engineering of FEU Institute of Technology

In partial fulfillment of requirements for the degree of Bachelor of Science in Electronics and Communications Engineering

byCordova, Mark Joseph M.Gan, Benjamin FranklinDelos Reyes, Jayson Z.Mateo, Lawrence RayMaupoy, Jhon Paul C.

Engr. Luigi Carlo De JesusAdviser

Engr. Pocholo James M. Loresco,PECEFaculty-in-Charge

Chapter 1Introduction1.1 Background of the StudyEssential checking for our well-being is important in order for us to keep track of our health status. This study entitled Supplementary Pneumonia Detection via X-ray Images through MATLAB is designed to providespecialists a more effective and convenient way of detecting pneumonia.Based from the data gathered by the researchers, radiologists are having a hard time on detecting pneumonia accurately due to the lack of proper equipments which leads to misdiagnosing of disease. With the help of the advancement of computer technology, medical experts incorporate the use of image processing to deliver concrete results through chest X-ray. Image processing techniques are widely used in several medical fields for image enhancement in earlier detection and treatment stages of the patients.However, the traditional manual procedure of chest X-ray is still not enough to produce a high accurate result because of image quality illumination.From the stated facts above, the proponents came up with the idea of incorporating the used of matrix laboratory (MATLAB). The proposed system is a supplementary device that will capture chest X-ray films and digitized the image to be transferred to MATLAB software. It will employ lung segmentation, extraction and selection. The proposed system will have a constant database stockpiling that will store pictures for further investigation of the result.

1.2 Statement of the ProblemAccording to Dr. Mario E. Sarmenta and Dr. Socorro Ferias from the Radiology Office in the Philippines Childrens Medical Center, one of their most common problem they encounter during pneumonia detection is when a part of chest X-ray is underexposed or overexposed. An underexposed chest X-ray result has a low density number and is white or lighter without enough image details while an overexposed chest X-ray result means the image is too dark to be read and some image details are lost due to being burned out to radiation that leads to misdiagnosis of disease. In addition, according to Dr. Sarmenta another problem they encounter that contributes to misdiagnosing of disease is theiroutdatedequipment that may have an inaccurate result. Aside from that, the skill of the radiologistis also another factor to be consider. The ability of the radiologist is also important in order to avoid any errors during test diagnosis. He also mentioned that another issue they are encountering in the Radiology Department was it takes days before they can determine the patient to havepneumonia because in some cases, there are procedures that were need to review regarding with the related pathology especially difficult cases.They also consider the history of each patient before they can diagnose it with pneumonia.This study Supplementary Pneumonia Detection System via X-ray Images through MATLAB, will attempt to solve the following problems: Scarcity of spare parts The misdiagnosis of disease due overexposed and underexposed images The longer time duration of releasing the results

1.3 Objectives of the StudyThe general objective of this study is to design and implement a supplementary pneumonia detection system via X-ray through MATLAB.1.3.1 Specific Objective To develop a system that will aid radiologists to produce an reliable chest X-ray result To develop a program that can be able to employ lung segmentation, feature extraction and feature classification of a chest X-ray image through MATLAB. To provide radiologists in obtaining faster result in detecting pneumonia using X-ray images from patients To lessen time consume and errors by performing statistical analysis of the project

1.4 Scope and LimitationsThe main scope of this study is to identify and characterize pneumonia patterns by analyzing the input X-ray image then use the pattern to compare on an actual chest X-ray of the patient. The system is designed to determine whether the chest X-ray of the patient is infected with pneumonia based on the pattern and characterization gathered from several chest X-ray images that contains actual pneumonia. By using the proposed system, misdiagnosis of the disease will be reduce and the accuracy of the chest X-ray result will be enhance.The proposed system is capable of capturing images from a chest X-ray which includes buzzer to detect whether the X-ray is properly attached to the hardware and ready to be captured. The suggested dimension of the input will be 14x7 inches which will also be used on the testing of the hardware. The system will also make use of Arduino Uno board with ATMEGA 383 microcontroller that will control and send the capture images to the computer. The image format that the proposed system will produce will have an extension of JPEG or JPG format so it will be supported by MATLABs formats for import and export.The operating system that will be used in this project shall not be lower than Windows 7 with an Intel or AMD x86 processor supporting SSE2 instruction set. The recommended RAM should at least be 2048MB and the Hard Drive space should be 1GB for MATLAB only and 3 to 4GB free space is needed for MATLAB installation. The MATLAB version that will be used will not be lower than version 7.10.0.499 (R2010a).The proposed system is limited only on detecting patterns of pneumonia and does not include other diseases. If the chest X-ray of the patient does not have any signs of pneumonia, it will be categorized as healthy or if the system determines other patterns that is not the same with pneumonia, it will be categorized with other disease.1.5 Significance of the StudyThis study is designed to provide a pneumonia detection system via X-ray images through MATLAB. It will be very beneficial for doctors and lab technicians as it can be used to diagnose patientswith pneumonia faster and accurately to produce reliable results.This study is also relevant for students especially for medical students in order for them to gain more knowledge about pneumonia and also about the field of radiology. They can used this study as a reference or research material to further investigate the methods of detecting pneumonia.The study will also be significant for future researchers who will also attempt to conduct future study about pneumonia detection as it will serve as a good reference for the development of their study.1.6 Definition of Terms Conventional is based on or in accordance with what is generally done or believed.Database is a structured set of data held in a computer, especially one that is accessible in various ways.Digitized is to put data (images etc.) into digital form.Employ is to use something to work; to make use of.Extraction is the action of taking out something, especially using effort or force.Image Processing is the analysis and manipulation of a digitized image, especially in order to improve its quality.MATLAB (Matrix Laboratory) is a multi-paradigm numerical computing environment and fourth-generation programming language developed by MathWorks.Misdiagnosis is an incorrect diagnosis due to some medical malpractice and or errors.Radiation is the emission of energy as electromagnetic waves or as moving subatomic particles, especially high-energy particles that cause ionization.Radiologist are medical doctors who specialize in diagnosing and treating diseases and injuries using medical imaging techniques such as x-rays, computed tomography (CT), magnetic resonance imaging (MRI), nuclear medicine, positron emission tomography (PET) and ultrasound.Segmentation is the process of dividing something into parts or segments.Stockpiling is the act of storing for future use, usually carefully accrued and maintained.Supplementary is something added to complete a thing, make up for a deficiency, or extend or strengthen the whole.System is a set of connected things or parts forming a complex whole, in particular. A set of principles or procedures according to which something is done; an organized scheme or method.

Chapter 2Review of Related Works and Literature2.1 Foreign Literature2.1.1 HIRA-TAN: A real-time PCR-based System for the Rapid Identification of Causative Agents in PneumoniaTakashi Hirama, Shohei Minezaki (2013).HIRA-TAN: A real-time PCR-based system for the rapid identification of causative agents in pneumonia, Odaiba, Japan.According to this article written by Mr. Takahashi Hirama and Mr. Shohei Minezaki, the case of pneumonia is increasing the past centuries and was notably the main cause of deaths by many. Different medical tests such as antigen tests and paired antibody titers etc. all failed to know and identify the reason of the causative pathogens of the disease. According to them, in order to effectively identify the causative pathogens of pneumonia, a quick identification using the HIRA-TAN system will allow the medical experts to come up for the selection of solutions for pneumonia.The identification of pneumonia using the HIRA-TAN system really helps the medical experts in various ways such as for the selection of antibiotics, a quick scans and in producing accurate results.2.1.2 Detection of Pneumonia in chest X-ray ImagesShabnam Kannan (2011).Detection of Pneumonia in Chest X-ray Images, India.According to this article, based from the survey conducted by medical experts around the world, pneumonia is a type of infection that is very common to people who has poor lifestyle. It is also stated that the disease like pneumonia is also common for children who has weak immune system. This type of infection quickly spreads in the lung area of the body. To diagnose pneumonia, medical experts uses the power of image processing technology like the chest X-ray. Using the chest X-ray images, the doctors can effectively identify pneumonia by looking at the pattern in the chest X-ray result from the patients. Because of its effectiveness in identifying difficult illnesses, chest X-ray was then used to detect several diseases not only pneumonia.The researchers also added that using feature extractions like WPT, WFT and DWT can also be used in detecting the disease. This method according to them produces more accurate result than the rest of the known methods of pneumonia detection.

2.1.3 Pneumonia DiagnosisDr. Shirley Mcfield (2012).Pneumonia Diagnosis, USAThis article is about pneumonia diagnosis. According to this article, pneumonia diagnosis is done using some physical health examination based from the findings of the doctors. The article also stated that further investigations are being done by the experts to confirm their diagnosis. The data gathered from the chest X-rays and blood tests are very helpful in order to them to thoroughly identify the case of the patient. The researcher also stated that the chest X-ray method for pneumonia detection is widely commonly used by many hospitals and medical clinics now because of its reliable and convenient results. However, according to some study conducted by medical experts, there are still areas that uses the traditional way of detecting pneumonia. They diagnosed diseases based from the symptoms and health examinations only. The researcher also cited that diagnosing can also be difficult in some patient especially to those who also have other disease. To distinguish pneumonia from other illnesses of the patient, medical experts make use of the chest CT scan or by the use of other tests that also make use of image processing techniques.The author also stated that chest X-ray is a very helpful test for identifying pneumonia when it comes to difficult scenarios during diagnosis. Chest X-ray helps in exposing pneumonia patterns to be able to identify clearly by medical experts.

2.1.4 What is Pneumonia? Its types and how to detect it?Bree Normandin (2012). What is Pneumonia? Its Types and how to detect it?, USA.Bree Normandin conducted a study about pneumonia and how to detect it. According to his study, pneumonia is a some sort of infection that occurs in human lungs. Fungi, bacteria and other viruses are the number one cause of pneumonia that brings people in the pinch of pains. This paper further reveals that pneumonia also causes inflammation in lungs air sacs known as the alveoli. The inflammation brings pains to patients that causes serious effect when not immediately taken care of because the alveoli makes breathing difficult. Pneumonias symptoms according to the study of medical experts can starts from mild to a high level life threatening one. Pneumonia is a top leading disease that causes more deaths than any other illness worldwide. The seriousness of the disease depends on the cause of its inflammation or either the type of virus that caused the infection. The types of pneumonia based from this article are: bacterial pneumonia, this type of pneumonia according to the author can affect anyone. On the other hand, viral pneumonia is a type pneumonia which can be dangerous to pregnant women. While, mycoplasma pneumonia is a type of pneumonia that produces mild cases of pneumonia.Pneumonia detection can be done by the help of chest X-ray and other image processing techniques, a noninvasive tests that shows the structures of what the inside of the human chest and produces images out of it. Noninvasive means that no surgery will be done and no medical instruments will be inserted into the patients body.

2.1.5 Preliminary Study of Pneumonia Symptoms Detection Method Using Cellular Neural NetworkAbdullah, A.A. (2014). Preliminary Study of Pneumonia Symptoms Detection Method Using Cellular Neural Network, Malaysia Perlis, Arau, Malaysia.According to this paper, it is said that medical diagnosis is one of the most important process wherein image processing technique is being applied. This paper proposes a pneumonia symptoms detection method based on cellular neural networks technology that was developed to help users to detect early symptoms of any disease.The main technology used in this study is the cellular neural networks which is represented by a virtual pattern expansion obtained from different operations done by the researchers. The CNN was based from 3 by 3 patterns of linear space invariant. The main aim of this paper is to be able to detect pneumonia symptoms within the short period of time. The main function of the cellular neural networks is by allowing the connections between the adjacent units only in order to avoid any network traffics. There are also mandatory rules that has to be implemented in designing the patterns to be used for instance: the state, output, boundary equations and also their respective values. In order to create the most effective algorithm for pneumonia symptoms detection, the developer combined all the patterns that were acquired during the development phase.Furthermore, during the software testing and debugging the developer make use of the candy software as a simulator for the cellular neural networks in detecting pneumonia symptoms. The software was tested using the 23 amounts of chest X-rays samples with grayscales which is an indication of symptoms of pneumonia.

2.2 Local Literature2.2.1 Detection of Potential Pneumonia Causing Bacteria Found in Nebulizers in Iligan City Hospitals: Some Implications on Infection ControlBlaisel Mae Q. Baguio, Aimee Grace Gemelo (2012).Detection of Potential Pneumonia Causing Bacteria Found in Nebulizers in Iligan City Hospitals: Some Implications on Infection Control, Baguio, Philippines.This article written by Blaisel et al. discusses the survey conducted in Iligan City Hospitals. Based from the data gathered by the researchers about the most commonly acquired infection by patients from hospitals, pneumonia is on its third place which means that almost 14% of deaths in the world is caused by pneumonia infection from the said place. It was estimated that up to 70% rates of pneumonia cases are acquired from hospitals. The study also stated that pneumonia is included in the top ten causes of deaths here in the Philippines. The researchers considered the use of nebulizers for inhalation therapy to fight hospital acquired pneumonia because nebulizers creates aerosols of droplets that goes deeply into the narrowest airways of the lungs. Nebulizers are known in reducing significant problems in the lungs. It is also widely used by manymedical doctors across countries.The main purpose of the study is to conduct an assessment on pneumonia detection using nebulizer in Iligan City hospitals.

2.2.2 Incidence and Risk Factors of Childhood Pneumonia-Like Episodes in Biliran Island, PhilippinesDelmiro Fernandez Reyes (2015). Incidence and Risk Factors of Childhood Pneumonia-Like Episodes in Biliran Island, Philippines, Tarlac University. Philippines.In this article, the discussion is about the study of the researcher conducted in Biliran Island. The study is about the factor of risk of pneumoniaamong patients in the said area. According to Delmiro, the main cause of deaths among babies and young adults is none other than pneumonia. According to the information gathered by the researcher,in some developing countries such as the Philippines and Malaysia, pneumonia is a disease feared by many because of its severity that easily leads to death. However, the scarce amount of data obtained by the researcher are still not enough to support this study. This paper aims to calculate the tragics and rates in death of pneumonia in Biliran Island. Moreover, the study also aims to evaluate the risk factors of pneumonia and the health threats among the residence.Based from previous studies that were found, parental smoking, the type of cooking fuel, type of toilet facility etc. are all contributes to the risk factors of having pneumonia. All the aforementioned studies were conducted in the hospitals and that data gathered were all from the different researchers who also conducted the same topic. According to the research done by the experts in the said area, when the children develops pneumonia, some parents do not take them to hospitals because of various reasons, this is due to financial problems and the lack of knowledge.In conclusion, a stable and good connection to medical institutes is significant in order to prevent pneumonia earlier.

2.2.3 Preventing Pneumonia in the ElderlyThe Philippine Star (2014). Preventing Pneumonia in the Elderly, Manila, Philippines.According to the Philippine Star Newspaper, community-acquired pneumonia in adults with an aged of 65 above can be prevented based from the results gathered form landmark clinical trial test that was conducted by evaluating the Pfizers effectiveness using its pneumococcal vaccine. The vaccine were tested on several adults who are identified positive with pneumonia and the result has an average percent to prevent the spread of pneumonia.Also, according to this article, community-acquired pneumonia is publics most health concern and the main cause of deaths in adults around the world. The article also reveals based from the Philippines Department of Health, the data of mortality of adults in the country. It was revealed that pneumonia is currently on its 5th rank in the top leading causes of mortality among adults. In addition to this, the total number of Filipinos 60 years and older were at 3.7 million during the year 1995, which represents 5.4% total of the population.And by the year 2000 to present, the total record has increased to 4.8 million or almost 6% of the total population today.However, despite of the success of the trial, the researchers stated that there are still works to be done.

2.2.4 Philippines Clinical Practice Guidelines on the Diagnosis, Empiric Management, and Prevention of Community-acquired Pneumonia (CAP) in Immunocompetent AdultsMarissa M. Alejandria (2014). Philippines Clinical Practice Guidelines on the Diagnosis, Empiric Management, and Prevention of Community-acquired Pneumonia (CAP) in Immunocompetent Adults, Philippine College of Radiology, Philippines.This article is about the study of the researchers about the clinical practices on the diagnosis, empiric management and prevention of community-acquired pneumonia for immunocompetent adults in the Philippines.According to this study conducted by the researchers, pneumonia is the third leading cause of death in the Philippines based from the data obtained from the Philippine Health Statistics Office. From year 1998 to 2001 the rate of death caused by pneumonia was the highest among other neighboring countries. Community-acquired pneumonia or CAP for short is typically known as an acute infection that usually target young children and or aged adults. Pneumonia infections symptoms includes acute illness, pains and accompanied by an abnormal chest X-ray findings. However, those people who acquired the infection from long term facilities are not included. These clinical practice guidelines about community-acquired pneumonia or CAP for short was conducted only for empiric therapy of those immunocompetent patients/adults. This study was drafted in order to provide experts with a more practical approach in the resolution of the important issues in diagnosis, management and prevention of community-acquired pneumonia of adult patients.

2.2.5 Respiratory Viruses from Hospitalized Children with Severe Pneumonia in the PhilippinesHazel B. Galang (2012). Respiratory Viruses from Hospitalized Children with Severe Pneumonia in the Philippines, Tacloban City, Philippines.In this article, the study of the researcher revolves around investigating respiratory viruses from hospitalized children with severe pneumonia. According to this article, over the past 20 years, pneumonia is still the main cause of deaths by young patients. It was because the symptoms from pneumonia cases remains undefined by experts due to the lack of proper equipment until now.In Eastern Visayas Regional Medical Center in Tacloban City is the place where this study is conducted. The researcher has a target population of 819 patients who were involved in this study. The goal of this study is to be able to identify the nature of pneumonia by investigating the patients who have a symptoms of pneumonia. To begin the research process, the researcher uses samples which is composed of children with ages 9 days to 15 years old who were transferred into the Pediatrics Department. These children are positive with severe pneumonia viruses and are voluntarily enrolled themselves to be part of the research being conducted by the researcher.After the admission of the patients, the researcher performed the polymerase reaction by using some blood samples. The detection of these respiratory viruses and bacteria helps the researcher to identify the severity stages of the symptoms of pneumonia from patients who are infected by pneumonia viruses.According to the researcher, pneumonia viruses and symptoms are very common to the young adults in the Philippines. So, a quick and effective pneumonia detection system is very necessary to aid the patients.2.3 Foreign Studies2.3.1 Computer-Aided Tuberculosis Detection in Chest Radiographs: A SurveyNyeinNaing, Htike, Khan, Shafie (2014).Computer-Aided Tuberculosis Detection in Chest Radiographs: A Survey, Kuala Lumpur, Malaysia.In this study, the researchers conducted a study about the investigation of a PC supported conclusion framework for computerized examination of mid-section x-beam for recognizable proof of pneumonic tuberculosis. The study stresses to give the progressions of tuberculosis order from x-beam pictures, for example preprocessing.The principal goal of the picture preprocessing is not just to enhance the nature of the picture additionally to lessen the undesired segment from the foundation of the pictures. The vast majority of pre-handling strategy connected the force estimation of neighborhood pixel for getting the brilliance power estimation of the information pictures.

2.3.2 Towards the Detection of Abnormal Chest Radiographs the Way Radiologists Do ItAlzubaidi, Patel, Panchanathan, Black (2010). Towards the detection of abnormal chest radiographs the way radiologists do it,Arizona State University, Tempe, Arizona, USA.In this study, they utilize PC Supported Identification (CADe) and PC Helped Diagnosis (CADx) to utilize highlight extraction, design acknowledgment, and machine learning calculations to help radiologists in recognizing and diagnosing variations from the norm in therapeutic pictures.The examinations endeavors to utilize base up preparing to give up PC Supported Analysis of typical versus anomalous elements, they propose to utilize it to give PC Helped Discovery of typical components. They also propose to determine gray scale overlay map that shows how ordinary basic radiography substance is, in the nearby area around that pixel.

2.3.3 Diagnosis of Pneumonia with an Electronic Nose: Correlation of Vapor Signature with Chest Computed Tomography Scan FindingsHockstein, Thaler, Torigian, Miller Jr., Deffenderfer, Hanson (2004). Diagnosis of Pneumonia with an Electronic Nose: Correlation of Vapor Signature with Chest Computed Tomography Scan Findings, Massachusetts, USA.Electronic nose innovation is conceivably valuable in clinical drug in light of the fact that the gadgets are convenient, trying is not invasive, and the outcome are fast. In the conclusion of pneumonia, the system can be usedto test lapsed gasses. On the off chance that the gadget can be prepared to perceive the electronic pattern of the patients breath who is positive with pneumonia, it will be very useful in the facilitating of patients accepting ventilation powered by mechanical machines. As of now no highest quality level in the conclusion of the said disease. Framework scoring pneumonia, radiography in mid-section, and bronchoscope are all considered. In real life use, conclusion taking into account the flow of accessible information and clinical tests and experiments. During emergency unit tests, basically sick patients frequently experience mid-section registered tomography filtering to help in analysis. Past medical tests had shown the ability of proposed electronic nose to recognizepatients who were in danger of pneumonia ventilating-related stuffs and the capacity of the proposed electronic nose to distinguish respiratory pathogens in vitro 89. According to this study, it is was assumed that the proposed electronic nose is failed to detectbreathed out unpredictable atoms from patients breaths.

2.3.4 Detection of Pneumonia using Free-Text Radiology Reports in the Bio Sense SystemAsatryan A. (2010). Detection of Pneumonia using Free-Text Radiology Reports in the Bio Sense System, Science Applications International Corporation, USA.The study is about the development of the real-time disease detection system using the electronic data sources. According to the study, the cases of patients who are positive with symptoms of pneumonia are getting bigger and alarming each year. A rapid pneumonia detection system is needed in order to provide radiologists a faster way to diagnosis and detect the symptoms of pneumonia. The proposed study aims to develop a system that can be used to send text radiology reports to medical experts for quicker detection of pneumonia.In order to test the reliability of the proposed system, the researcher tested the program using the electronic radiology to send text reports. A computer algorithm was used that searches for selected programmed keywords.

2.3.5 Innovative Chest X-ray Solutions Supporting TB Prevalence Studies Dr. Wessel Eijkman and Dr. Frank Van Doren (2009). Innovative Chest X-ray Solutions Supporting TB Prevalence Studies, USA.Dr. Wessel Eijkman and Dr. Frank Van Doren conducted a study entitled Innovative Chest X-ray Solutions Supporting TB Prevalence Studies. According to their study, chest X-rays is a very useful image processing technique as it visually shows the patterns of symptoms of a disease just like symptoms of pneumonia and or TB. Chest x-ray according to them not only helps radiologists in obtaining accurate results but also helps in shortening the delays of diagnosis of doctors. They also cited that avoiding films by using digitized chest X-rays is more appropriate because the digital technology has a more tendency to solve most chest X-ray problems.Furthermore, the researchers believes that by using the direct digital chest X-ray will definitely improve the chances in obtaining accurate and rapid results. The direct digital X-ray will another advantage is that it is an eco-friendly system that also decimates cost per image while providing balance support to the ecosystem by eliminating the chemical waste issues as well as revolutionizing the case detection of pneumonia and TB in countries with insufficient sources.

2.4 Local Studies2.4.1 Breast Cancer (Ductal Carinoma) Detection and Classification Software using Fuzzy Pattern Recognition Lorenzo, Montalban, Real, So (2007). Breast Cancer (Ductal Carinoma) Detection and Classification Software using Fuzzy Pattern Recognition,De La Salle University, Philippines.In this study, the researchers deals on detection and classification of breast carcinoma particularly ductal carcinoma. The study takes on the characteristics and definitions seen in the microscope, analyzed and evaluated with two modules which is image processing and the fuzzy pattern recognition.The first module analyzes the Terminal Duct Lobular Unit (TDLU) by implementing a number of image processing techniques such as Nuclei Extraction, Filtering and Feature extraction to name a few. The second module uses fuzzy membership functions to evaluate the degree and the level at which the image is an Invasive Carcinoma (malignant) or Non-invasive (benign). And if invasive, would it be invasive ductal carcinoma NST (no specific type) or of a different type. The researchers overall accuracy on performing the study is about 95%.

2.4.2 Paddy Disease Detection System Using Image Processing Kevin B. Buenaventura et al., (2012). Paddy Disease Detection System Using Image Processing, Dominican College,Sta. Rosa, Laguna, Philippines.In Dominican College of Sta. Rosa Laguna, a study about Paddy Disease Detection System using Image Processing was amended. The main objectives of the study is to develop a system that can be used to detect paddy diseases such as the Paddy Blast, Brown Spot, and Narrow Brown Disease. The study focuses on the image processing techniques used in enhancing image qualitiesand the techniques of neural networks to identify the paddy disease. The system development methodology used by the researchers during the image processing includes pre-processing, segmentation and classification. The researchers put the paddy samples through the RGB till proceeding to the binary conversion. After having identified all the paddy samples as normal or with patterns of paddy disease, the segmented paddy disease sample then converted by the researchers into binary data. In order to recognize the paddy diseases with passing accuracy rates, employing neural technique is necessary.

Chapter 3Research Methodology3.1 OverviewThe proposed system is designed to provide radiologists a supplementary pneumonia detection system via X-ray images through MATLAB. The system aims to help specialists to produce accurate results in detecting pneumonia.The graphical user interface of the proposed system is composed of six buttons: the Scan Image button, Start Processing button, View Test Result button, Reset button, Help button and the Exit button.The ideal set up of the proposed system will be discussed in the succeeding parts of this chapter.3.2 Conceptual Framework INPUT X-ray scan image MATLAB capture image LED-light indicatorPROCESSI. The x-ray scan image will be placed on the deviceII. MATLAB will process the x-ray scan imageIII. MATLAB will segment, select and extract the image.IV. LED light indicator signifies that the image is already capturedV. LCD display will show off if the patient is healthy, possible positive of pneumonia or possible of other disease.VI. The result will be printed out on a paper.OUTPUT Result with diagnosis LCD displayFigure 1. Conceptual FrameworkFigure 1 presents the conceptual framework of the proposed system. The figure shows the input-process-output of the project. The system input includes the user and the patients chest X-ray that will be employed into the machine. In the process stage, is where the captured image will be processed by MATLAB to perform image enhancement. The system output is where the result will be display in the graphical user interface of the system that has the option to store image into the database that can be used for future reference.3.3 Block Diagram

Chest X-rayImage(Digitized Image)

MATLAB(Image Processing)

ExtractionSegmentation

SelectionProcessedImage(Result)

Figure 2. Functional Block Diagram of the Proposed System

Figure 3.3.1 shows the functional block diagram of the supplementary pneumonia detection system via X-ray images through MATLAB. The figure shows the principal functions of the systems which are represented by the blocks. According to this diagram, the chest X-ray will be digitized and will be placed into the MATLAB machine. The chest X-ray will then undergo image processing to be able to scan the X-ray image thoroughly by performing image segmentation, extraction and selection.

3.4 Schematic Diagram

Figure 3. Schematic Diagram of the Proposed System

Figure 4. Schematic Diagram of Microcontroller (ATMEGA328)Explanation3.5 Algorithm

DISPLAY OF POSSIBLE OF OTHER ILLNESSNDISPLAY POSSIBLE POSITIVE OF PNEUMONIANDISPLAY POSSIBLE POSITIVE OF PNEUMONIA WITH OTHER DESEASEYYWITH OTER DESEASEPNEUMONIADISPLAY HEALTHYYNHEALTHY?FIND MATCHFEATURE CLASSIFICATIONFEATURE EXTRACTIONFEATURE SEECTIONPROCESS LUNG SEGMENTATIONPRE PROCESS OF THE IMAGECAPTURE IMAGESTART

END

Figure 3.5.1: Software Design Flow Chart

Figure 3.5.1 shows the software diagram of the proposed system. First, digitized chest X-ray image will be uploaded to the system and prepares for processing. Next, pre-processing stage will be performed wherein the image will undergo with image enhancement. After the pre-processing stage, the image will undergo with lung segmentation. Then, the segmented lungs will undergo to feature selection wherein target areas in the lungs will be selected. After feature selection, it will undergo to feature classification to determine if the targeted areas in the lungs are classified as healthy, positive with pneumonia, positive of pneumonia with other disease, and positive of other illness. Once feature classification is done, the output will be displayed in the graphical user interface of the system.

FLOWCHART

STARTX- RAY IMAGE PLATEINPUT DATA RECEIVEDCAPTURE IMAGEX-RAY FILM CONVERTED TO DIGITAL IMAGEIMAGE TRANSMITTED TO COMPUTER FOR PROCESSINGPROCESSED IMAGERESULT(The Output)END

Figure 3.5.2: General Hardware Design Flow ChartFigure 3.5.2 shows the hardware diagram of the proposed system. First, the X-ray image template will be used as input. Then, the X-ray image plate input will be scanned through a scanner to digitize the input image. The digitized chest X-ray image will now be imported into the system and store the digitized X-ray image to start processing.3.6 Test ProceduresStep 1: The proponents will place the x-ray film on the IlluminatorStep 2: The camera will take a picture of the x-ray filmStep 3: The proponent will check whether the image is received by the databaseStep 4: The proponent will check the output that will be shown by the GUIStep 5: The output will serve as the input on the proposed projects outputStep 6: Repeat Steps 1 to 5 until the number of trials are reached3.7 Ideal Setup

(a) (b)

Figure 3.7.1 Ideal Setup Representation of the Project

Figure 3.7.1 shows how the prototype will work and how it will function during the operations. x-ray films will be placed on the illuminator and then an image capturing device will be present at which its output will be placed directly to the software device and perform the algorithms necessary to analyze the image for further investigation.3.8 Hardware Components

Figure 3.7.1: The Arduino Uno Board

Figure 3.8.1 shows the Arduino Uno Board that will be used by the proposed system. It is a microcontroller board based on the Atmels ATMEGA328 microcontroller. It is the latest in a series of USB (Universal Serial Bus) Arduino board. It has 16MHz ceramic resonator, a USB connection, a power jack, an ICSP header, a reset button, 6 analogs inputs and 14 digital input/output pins of which 6 pin can be used as PWM outputs. It uses ATMEGA16U2 programmed as USB-to-serial converter instead of FTDI USB-to-serial driver chip which was used in all the preceding board. It has a 32kb flash memory of which 0.5kb is used by boot loader, 2kb of SRAM, 1kb of EEPROM and 16 MHz clock speed.

Figure 3.8.2: Representation of ATMEGA328

Figure 3.8.2 shows the microcontroller unit that will be used on the proposed system. The microcontroller unit consists of 4K/8K bytes of in-system programmable flash with read-while-write capabilities, 256/412 bytes EEPROM along with the 512/1K/2K bytes of SRAM. It has 23 general purpose input/output, 32 general working registers, 3 flexible timer/counters with compare models, internal and external interrupts and a serial program USART. It has a byte-oriented 2-wire serial interface, an SPI serial port, a 6-channel 10 bit ADC, a programmable watch-dog timer with an internal oscillator and 5 software-selectable power saving mode.

Figure 3.8.3: Representation of USB to Serial Bridge Controller PL2303

Figure 3.8.3 shows the presentation of USB to serial bridge controller PL2303 which will be used by the proponent that can operate as a bridge between one USB port and one standard RS232 serial port. It comprises of 9 ports input signal, 5 ports output signal, 9 power/ground connection and 5 ports bi-directional signals.

Figure 3.8.4: Representation of P30N06LE Transistor

Figure 3.8.4 represents an N-channel MOSFET transistor that will be used by the proponents.

Figure 3.8.5 LCD SCREEN MODULEA Liquid Crystal Display (LCD) is a flat, as shown in figure 10, thin display device consisting of any number of pixels aligned in front of a reflector or source of light. The group will be using a Philips 2 by 16 LCD to be able to display if the patient has possible pneumonia or possible of other illness which were displayed on the LCD.

LED (Light indicator)

Figure 3.8.6 LED LIGHT INDICATORAlight-emitting diode(LED) is a two-leadsemiconductorlight source. It is apn junctiondiode, which emits light when activated.When a suitablevoltageis applied to the leads,electronsare able to recombine withelectron holeswithin the device, releasing energy in the form ofphotons. This effect is calledelectroluminescence, and the color of the light (corresponding to the energy of the photon) is determined by the energyband gapof the semiconductor. It is used as a light indicator of the device when capturing image.

3.9 Software Consideration

Figure 3.9.1: MATLAB (Matrix Laboratory)

Matrix Laboratory (MATLAB) is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. A typical use of this software includes Algorithm development, scientific and engineering graphic, data analysis, exploration and visualization, and application development which include Graphical User Interface building.The advantages of MATLAB over other programming languages for image processing are it has a huge database of inherent calculation for image processing and PC vision application. It permits you to test calculations instantly without recompilation where you can sort something at the order line or execute an area in the supervisor and promptly see the outcome. Their desktop surroundings which permit you to work intelligently with your information help you to stay informed concerning documents and variables, and disentangle normal programming or investigating assignments. It has a capacity to pursue in a wide mixture of both basic and space particular picture designs, furthermore, its capacity to auto-produce C code, utilizing MATLAB Coder, for an expansive and developing subset if image processing and other specific functions, which you could then use in different situations such as for installed frameworks or as a segment in other programming.

3.10 Working Theories The performance of algorithm used in processing the chest X-ray image is usually quantified in terms of accuracy of the software. Algorithm with higher accuracy requires more processing time which is undesirable for most system application. However, it is important to take note that the proposed system will focus on the accuracy of the system that can be used for other studies.

3.10.1 Pre-processing StageIn this stage, in order to achieve enhanced image result for further analysis, the input chest X-ray image must be readable. The proposed system depends on the quality of the input image. This stage involves processes of grayscale conversion, binarization and noise reduction.

3.10.2 Lung SegmentationThe first algorithm to be implemented is by obtaining the inner lung details along with border refinement which involves separating the background and foreground pixels. Also, the lung fields have to be grouped together and surrounding areas needs to be removed. Also the blood vessels are segmented to be obtaining better orientation of the blood stream within the lung area. Segmenting blood vessels in the lung areas as well may have a better resemblance to pneumonia patterns.

3.10.3 Feature SelectionFor the algorithm of the feature selection, a covariance matrix of each feature will be categorized between the three classes which are healthy, with pneumonia and other disease. It gives difference between the corresponding feature values of various classes. A threshold will be set after the trial and error, which selects a set of feature that helps distinguish the various classes better.

3.10.4 Feature ClassificationThe classification algorithm used in this process is by getting each region for the image along with the set of features that has been selected is computed. The data will be served as a training set for the classifier. The classes are assigned to each region of the data. The input image will be classified based on the nearest neighbor algorithm, the features that closely resemble to the data.

3.10.5 Feature ExtractionFrom the segmented lungs of the image, regions in the lungs are marked and each of these gray level co-occurrence matrixes is constructed. It is an n*n matrix where n is the number of distinct intensity values, which shows the relationship between various intensities. This will give idea of spatial relationship between intensities.

3.10.6 Expected ResultThe following series of images show what is expected to occur during processing.(a) (b) (c) (d)

Figure 3.10.6.1: Image Progress using the Proposed SystemThe figures above shows the development of the chest X-ray image during image processing using the proposed system where (a) is the Original Image; (b) Binarized Image; (c) the Segmented Lungs; (d) is for Feature Extraction of the Lungs.

3.11 Statistical Analysis of DataTo be able to determine the reliability of the proposed project, several tests will be performed by the proponents. The suitable fit to determine the reliability of the proposed project is by using Cohens Kappa coefficient which measures inter-rater agreement of categorical output.3.11.1 Cohens Kappa TestingCohens Kappa (Cohen 1960) was presented as a measure of agreement which maintains a strategic distance from the issue depicted by adjusting the observed proportional agreement to take account of the measure of understanding which would be expected by chance. Sample size estimation using an inter-rater reliability study, the proponents must resolve how many subjects should be selected and how many raters should rate them. Flack et al. (1988) have recommended a method of calculating the optimal number of subjects for Cohens kappa coefficient when the quantity of raters is constrained to two. The ideal number of subjects for a given inter-rater reliability coefficient is characterized as the quantity of subject that minimized standard error connected with the percent agreement between two discretionary raters. The variance agreement is defined as,

Where: = percent agreementRequired number of subjectsThe 95% error margin connected with the percent agreement is , and if the proponent want it to remain below a desired value then this goal will be accomplished by any number of subject that exceeds the desired value. Since the smaller the number of subjects the better, the optimal subject is given by,

Where: Desired error margin

Cohens Kappa (Cohen 1960) illustrates the minimum number of subject required on accomplishing the desired 95% error margin. It takes after that the evaluated percent agreement to fall within 5% of its true error-free value, the collected data of 400 subjects is required. Hence,

After determining the required sample size with a 5% desired error margin, the proponents will be able to start determining the Cohens Kappa value given by the equation,

Where: Cohens Kappa valueRelative observed agreement = Hypothetical probability of chance agreement

Computing for the relative observed agreement, , and the hypothetical probability of chance agreement, , the normal numbers concurring are found as in chi-squared test, by row total times column divided by grand total.Generally, a Kappa has a range of 0 to 1.00 values, with larger values indicating better reliability. Benchmarking the result is essential for communicating the results reliability. And also provides guidelines to assist practitioners with the use of agreement statistics. Landis and Koch ( 1977) proposed an extend agreement that can be qualified as Poor , Slight, Fair, Moderate, Substantial, and Almost Perfect depending on the magnitude of Kappa. A kappa value of 40% to 60% indicates a moderate agreement level, 60% to 80%, and 80% to 100% indicates substantial and almost perfect agreement levels respectively.

Sample no.1234...400

Rater 1

Rater 2

Table 1 Sample data for identifying the agreement between doctor's output and proposed project's outputThe proponents are required to check that each samples will identify whether the X-ray films contains a disease or it is classified as healthy. Two raters will identify the disease, Rater 1 as the doctors output, and rater 2 defined as the proposed projects output. The samples output will be abbreviated as follows:

p = pneumoniah = healthypo = pneumonia with other diseaseo = other disease

Rater 2Rater 1Row Totals

phpoo

p

h

po

o

Column Total

Table 2 Contingency table for the proposed output Table 2 represents the rating of each 400 samples that has been arranged and will be tallied to this contingency table. Agreements between the two raters will be set in one of the diagonal cells. Differences between raters will be set in one of the off-diagonal cells. Next is by computing the row totals which sum across the values on the same row and column totals which is sum across the values on the same column of the observed frequencies.