INTRODUCTION
Problem Statement
Health is crucial to our well-being, leading many to invest significantly in healthcare services The cardiovascular, immune, and digestive systems are of particular concern for many individuals With ongoing scientific and technological advancements, healthcare providers will be better equipped to address these health issues in the coming decades.
Over the centuries, concerns about dental health have surged, with scientists identifying various issues affecting human teeth Tooth decay, or caries, is a significant infectious disease that deteriorates tooth structure, leading to cavities formed by bacterial metabolism Initially, this process may go unnoticed, but the condition of the teeth worsens over time Without treatment, individuals may experience pain, difficulty eating, and in severe cases, it can even lead to life-threatening complications.
Over the past 60 years, significant advancements in dental hygiene have emerged, primarily categorized into two types: those focused on tooth care, such as the introduction of fluoride in toothpaste and rinses, and those aimed at detecting tooth decay This article emphasizes detection methods, which are crucial to our field Various techniques exist for cavity detection, including the visual assessment by trained dentists, X-ray tomography, and optical methods While visual inspection is a fundamental approach, it serves only as a preliminary reference Tomography, although technologically advanced, is often avoided by patients due to radiation risks, particularly to the head In contrast, optical methods have been developed over the past three decades, combining the advantages of both visual and X-ray techniques, and are recognized for their potential benefits in the detection and imaging of dental decay.
This thesis presents the development of an image acquisition system utilizing optical methods, specifically demonstrating that near-infrared (NIR) light at 760nm effectively captures images of early occlusal caries lesions, which are prevalent in newly formed dental issues Photographs were taken from extracted human molars and premolars, with plans to test the system under various tooth conditions.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 2
Objectives
Our project centers on capturing images of occlusal dental decay using near-infrared (NIR) light, utilizing a Raspberry Pi as the microcontroller and a Raspberry camera for image acquisition We will display the results on a computer monitor through a Wi-Fi connection and design a practical model using 3D printing technology.
Research Content
- CONTENT 1: Study the information, literature related to the “Detecting Tooth Decay by Near-Infrared Laser and Camera Model.”
- CONTENT 2: “Detecting Tooth Decay by Near-Infrared Laser and Camera Model” design solution
- CONTENT 3: “Detecting Tooth Decay by Near-Infrared Laser and Camera Model” design
- CONTENT 4: Design Image Processing Software
Limitations
The limitations of this project contain:
- Use Raspberry Pi 3 Model B as a microcontroller
- Use Camera (F) for Raspberry Pi to acquire images
- Design a device’s model for educational purposes (with a 3D printer technology) The examination is better with tooth samples that were taken out of patients
- Write a program in Python for basic processing of the results to clarify the dental decays
- The system does not have a function that detects the tooth caries.
Thesis Report Outline
Show the necessity of the topic; some facts relate to the topic in reality and introduce the quick view of content
Present the theoretical basis of “Detecting Tooth Decay by Near-Infrared Laser and Camera Model” and the working principle of the model
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 3
Based on the request of the topic, choose the components, and learn how to connect them, suggest the design method of the system
● Chapter 4: Assembly of the image acquisition system
Show how we execute the system and apply the image processing method
Summarize what we did and show the results
● Chapter 6: Conclusions and Future Work
Show the conclusion about the things that we complete, not complete, and some drawbacks Present the plan of the topic in the future
Materials are related to the project.
MATERIALS AND METHODS
Overview of Human Teeth
Human teeth play a vital role in the digestive system by mechanically breaking down food into smaller pieces for easier swallowing and digestion There are four types of teeth: incisors, canines, pre-molars, and molars, each serving distinct functions—incisors cut food, canines tear it, and molars and pre-molars crush it The roots of the teeth are anchored in the maxilla (upper jaw) or mandible (lower jaw) and are protected by gums Composed of various tissues with differing densities and hardness, human teeth are essential for effective digestion.
Figure 2 1 The names of human teeth
Incisors are the eight sharp teeth located at the front of the mouth, essential for biting into food and cutting it into smaller pieces, which aids in digestion.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 5
Incisors are flat with a thin edge They are also known as anterior teeth Both children and adults have eight incisors (four incisors for each jaw) [2]
Canines, also known as cuspids or eyeteeth, are the sharp, peaked teeth located next to the incisors, resembling the fangs of predators They are the longest teeth in the mouth, primarily designed for tearing food Both children and adults possess four canines, with two located in each jaw The first permanent canines typically emerge in children between the ages of 9 and 12, with the lower canines usually appearing slightly before those in the upper jaw.
Pre-molars, also known as bicuspids, are larger than incisors and canines, featuring multiple ridges that aid in chewing and grinding food Adults typically possess eight premolars, with the first and second premolars located adjacent to the canines Notably, young children do not have premolar teeth, which emerge as permanent teeth between the ages of 10 and 12.
Molars are the largest teeth in the mouth, designed with a broad, flat surface and ridges for effective chewing and grinding of food Adults typically possess twelve permanent molars, with six located in each jaw, while children have eight primary molars.
Dental Anatomy
A human tooth is composed of enamel, dentin, cementum, and pulp tissue, with the visible part known as the dental crown and the hidden part referred to as the tooth root At the center of the tooth lies the dental pulp cavity, which houses the nerve The tooth root's surface, covered by cementum, connects to the alveolar bone through the periodontal ligament, a fibrous tissue that absorbs impact and reduces force on the jaw Overall, the tooth is supported by the alveolar bone, gums, and periodontal ligament.
Tooth enamel is a vital tissue that forms the outer layer of human and animal teeth, including certain fish species This tough, highly mineralized substance appears white to off-white and serves as a protective barrier for the tooth However, it can easily become vulnerable, particularly to acids found in various foods and beverages.
Dentin is a vital calcified tissue in the body, primarily found beneath the enamel on the crown and cementum on the root, enveloping the pulp Composed of 45% hydroxyapatite mineral, 33% organic material, and 22% water, dentin plays a crucial role in dental structure and health.
[3] Dentin is softer than enamel Two principal characteristics distinguish dentin from enamel: dentin forms throughout life, and it is sensitive [1]
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 6
Figure 2 2 The anatomy of human tooth
Cementum is a vital tissue that covers the surface of the tooth root, playing a crucial role in connecting the alveolar bone to the tooth through the periodontal ligament Its hardness is comparable to that of bone Additionally, this tissue is associated with nerve functions, primarily supplying nutrients to the dentin and facilitating the formation of dentin.
Dental Problems
Plaque is a colorless, sticky film of bacteria that forms on tooth surfaces, particularly along the gum line, within four to twelve hours after brushing When sugars from food and drinks interact with plaque, they create acids that can erode tooth enamel, harm gums, and lead to cavities If left untreated, this damage may become irreversible Accumulated plaque can mineralize into tartar, which traps stains and exacerbates oral health problems Additionally, plaque bacteria play a significant role in gum diseases such as gingivitis.
Tartar is a hard, crusty deposit that can cause tooth discoloration and is formed when residual plaque on teeth reacts with minerals in saliva This yellow or brown buildup occurs as plaque mineralizes, and individual susceptibility to tartar accumulation can vary significantly Typically, the likelihood of developing tartar increases with age.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 7 c) Tooth Decays
Tooth decay, or dental caries, occurs when bacteria produce acids that break down teeth, resulting in cavities that can appear yellow to black Common symptoms include difficulty while eating and pain If left untreated, tooth decay can progress to inflammation of surrounding tissues, leading to tooth loss, infections, or abscesses.
Cavities are primarily caused by acid produced by bacteria that break down food debris and sugars on the tooth surface, affecting the enamel, dentin, and cementum A diet high in simple sugars increases the risk of tooth decay, as these sugars serve as the main energy source for harmful bacteria Additionally, conditions that lead to reduced saliva production, such as diabetes mellitus and Sjögren's syndrome, as well as certain medications like antihistamines and antidepressants, can further elevate the risk of cavities Poor dental hygiene practices also contribute significantly to the development of caries.
Dental caries formation requires four key elements: a tooth surface (either enamel or dentin), cariogenic bacteria, fermentable carbohydrates (like sucrose), and sufficient time The process is heavily influenced by plaque, tartar, and the acid produced by bacteria However, these factors alone may not lead to caries; a conducive environment for cariogenic biofilm development is also necessary The progression of dental caries is not inevitable, as individual susceptibility varies based on tooth shape, oral hygiene practices, and saliva's buffering capacity Caries can develop on any tooth surface exposed to the oral cavity, excluding structures embedded within the bone.
Tooth decay occurs when dental plaque, a type of biofilm, forms on the teeth and develops into a cariogenic substance This process is driven by specific bacteria within the biofilm that generate acid when exposed to fermentable carbohydrates like sucrose, fructose, and glucose.
Radiographic Views
The bitewing view is essential for examining the crowns of posterior teeth and assessing the height of the alveolar bone in relation to the cementoenamel junctions, which mark the boundary between the tooth crown and root An example of the bitewing view is illustrated in Figure 2.3.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 8
Figure 2 3 The bitewing view b) Full Mouth View
Figure 2 4 The full mouth view
A full mouth view is a dental imaging technique that eliminates the need to place film inside the mouth Instead, patients simply sit in a designated position while the X-ray machine rotates to capture comprehensive images of both the upper and lower jaws This method facilitates easier diagnosis by providing a complete overview of the dental structure An example of a full mouth view can be seen in Figure 2.4.
Occlusal X-rays are larger and show the roof or floor of the mouth with full tooth development and placement Each X-ray reveals the entire arch of teeth in either the upper or lower jaw Occlusal X-rays are used to find extra teeth, teeth that have not yet broken through the gums, jaw fractures, a cleft in the roof of the mouth (cleft
The Department of Electronics - Biomedical Engineering utilizes occlusal X-rays to detect foreign objects, cysts, abscesses, or growths in patients An example of an occlusal view is illustrated in Figure 2.5 Additionally, periapical views are employed for detailed examination of dental structures.
The periapical view is essential for examining both anterior and posterior teeth, as it focuses on capturing the tip of the tooth's root This imaging technique is particularly useful for diagnosing the source of pain in a specific tooth, enabling dentists to visualize not only the tooth itself but also the surrounding bone structure An example of the periapical view can be seen in Figure 2.6.
Near-Infrared Laser and Tooth Enamel
Dental enamel exhibits high transparency to near-infrared (IR) light, making it an effective tool for transillumination in detecting interproximal caries and imaging occlusal caries Understanding the fundamentals of IR and its interaction with enamel is crucial for enhancing the detection of dental decay Key concepts include absorption and scatter, which significantly impact IR imaging While visible light (400-700 nm) causes considerable scattering in healthy dental enamel, resulting in dark areas on images that complicate clinical assessments, near-infrared light (0.7 to 2.0 micrometers) can penetrate teeth with minimal scattering at certain wavelengths Thus, identifying the optimal IR spectrum is essential for accurately detecting enamel lesions.
Atoms and molecules exposed to light absorb energy and re-emit it in various directions and intensities, a phenomenon known as scattering This physical process occurs when forms of radiation, including light, sound, or moving particles, deviate from a straight path due to localized non-uniformities in the medium they traverse.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 10
Carious lesions appear dark due to light scattering and absorption, while healthy dental enamel strongly scatters visible light (400-700 nm), hindering imaging through tooth layers Near-infrared (NIR) illumination, ranging from 0.7 to 2.0 μm, has a lower scattering coefficient in normal enamel, allowing it to penetrate deeper without significant scattering Most NIR light can pass through healthy enamel with minimal scattering, whereas visible light is poorly absorbed by enamel In dentin, the absorption coefficient remains constant at 4 cm-1, while enamel exhibits high scattering at 632 nm (60 cm-1), decreasing to 2-3 cm-1 at 1310 nm Consequently, enamel is nearly transparent to NIR light, with lower visual attenuation than in the visible range NIR light at a wavelength of 1310 nm is optimal for dental imaging, balancing water attenuation and enamel transparency.
The light scattering rate in dental enamel decreases with the wavelength (1/λ³), making the near-infrared (near-IR) range of 780 to 1550 nm particularly promising for optical imaging methods due to minimal scattering and absorption in dental hard tissue Notably, enamel exhibits maximum transparency at approximately 1310 nm, while dentin has a higher absorption coefficient of 4 cm⁻¹ across most wavelengths To achieve optimal imaging results, it is essential to select an IR wavelength with a lower attenuation coefficient, with 1310 nm being the ideal choice within the short wavelength infrared (SWIR) spectrum.
At a wavelength of 940 nm, the attenuation coefficient of enamel ranges from 2 to 3 cm⁻¹ However, as the wavelength increases, water absorption significantly rises, which decreases the penetration of infrared (IR) light Consequently, in areas affected by caries, dark spots appear in images, indicating that caries inhibit the passage of IR light.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 11
Figure 2 7 The attenuation coefficient of dental enamel (filled circles) water
Image Processing Methods
There are two methods used to emphasize the tooth decays: Histogram Equalization and Otsu Thresholding
A histogram visually depicts the intensity distribution of an image by showing the number of pixels corresponding to each intensity value Dark pixels, with intensity values near 0, are represented on the left side of the histogram, while white pixels, with intensity values close to 255, are found on the right side.
Histogram Equalization is a vital computer image processing technique designed to enhance image contrast by adjusting the histogram to approximate a uniform distribution This method serves as a foundational step in nearly all image processing workflows.
Figures 2.8 and 2.9 illustrate an original image alongside its histogram equalized counterpart The results in Figure 2.9 demonstrate that histogram equalization enhances the distinction between the object and its background The process of histogram equalization involves two key steps.
Step 1: Create a table of the intensity distribution of an image
- L = 2 x , x is a bit of the image
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 12
- M, N are dimensions of the image
- n is the amount of 1 pixel a) Original Image b) Histogram of the Original image
Figure 2 8 Original Image a) Histogram Equalized Image b) Histogram of Histogram Equalized Image
Figure 2 9 The Image is processed with Histogram Equalization method
To highlight the distinction between objects and the background in an image, we convert it into a binary format In this process, pixels identified as caries are changed to 0 (black) A crucial aspect of this technique is determining a threshold value, where any pixel value below this threshold is converted to 0, while values above it remain unchanged.
Determining a specific threshold value for images can be challenging due to their complexity and diversity Fortunately, certain algorithms can effectively identify the appropriate threshold value One such algorithm is Otsu's Method, developed by Nobuyuki Otsu, which automatically calculates the optimal threshold value to enhance image processing.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 13 where the sum of foreground and background spreads is at its minimum (intra-class intensity variance)
To find a threshold value used Otsu’s Method:
Step 1: Compute histogram and probabilities of each intensive level
Step 2: Step through all possible thresholds T (0 ≤ 𝑡 ≤ 𝑚𝑎𝑥𝑖𝑚𝑢𝑛 𝑖𝑛𝑡𝑒𝑛𝑠𝑖𝑡𝑦):
- Compute weight (𝑊), mean (𝜇), variance (𝜎 2 ) of Background (< 𝑡) and foreground (≥ 𝑡)
- 𝑤 𝑏 (𝑡): The weight of the Background
- 𝑤 𝑓 (𝑡): The weight of the foreground
- 𝑛(𝑖): The number of pixels valid i
- M, N are dimensions of the image
- L = 2 x , x is a bit of the image
- 𝜇 𝑏 (𝑡): The mean of the Background
- 𝜇 𝑓 (𝑡): The mean of the foreground
- 𝑤 𝑏 (𝑡): The weight of the Background
- 𝑤 𝑓 (𝑡): The weight of the foreground
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 14
- 𝑛(𝑖): The number of pixels valid i
- M, N are dimensions of the image
- L = 2 x , x is a bit of the image
- 𝜇 𝑏 (𝑡): The mean of the Background
- 𝜇 𝑓 (𝑡): The mean of the foreground
- 𝑤 𝑏 (𝑡): The weight of the Background
- 𝑤 𝑓 (𝑡): The weight of the foreground
- 𝑛(𝑖): The number of pixels valid i
- M, N are dimensions of the image
- L = 2 x , x is a bit of the image
- 𝜎 2 𝑏 : The variance of the Background
- 𝜎 2 𝑓 : The variance of the foreground
- Compute the 'Within-Class Variance' following the formula:
- 𝑤 𝑏 : The weight of the Background
- 𝜎 2 𝑏 : The variance of the Background
- 𝑤 𝑓 : The weight of the foreground
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 15
- 𝜎 2 𝑓 : The variance of the foreground
Step 3: The desired threshold corresponds to the minimum 𝜎 2 𝑤 (t) [16].
Hardware
A camera is a device that converts light signals into electrical signals, and there are various types compatible with Arduino and Raspberry Pi microcontrollers The OV7670 camera, known for its affordability and ease of connection to Arduino, features a CCD sensor with adjustable focus and a resolution of 640x480, along with an IR filter that partially blocks infrared light However, due to the limitations of Arduino and the camera's infrared blocking capability, it may not meet certain requirements For applications requiring infrared light, a night vision camera is more suitable Additionally, there are specific cameras designed for Raspberry Pi that cater to these needs.
The RPi Camera (F) is a versatile Night Vision Camera compatible with all Raspberry Pi models, featuring a 5-megapixel OV5647 CMOS sensor that allows for adjustable focusing distance to enhance energy efficiency With a 75-degree angle of view, it captures optimal images at an 850nm infrared wavelength Despite being pricier than the OV7670, it was selected for its ability to meet all the requirements of our project.
Figure 2 10 Camera(F) 5MP For Raspberry Pi with two infrared LEDs
Based on the advantages highlighted in the previous chapter, we have chosen to utilize camera (F) for our acquisition block Its key specifications are outlined below, and it is connected to the Raspberry Pi 3 Model B using an FFC cable.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 16
- The angle of view (diagonal): 75 degree
- Supports connecting infrared LED and/or fill flash LED
In our exploration of near-infrared lasers, we identified three types of infrared light suitable for our project However, the ideal 1310nm wavelength LED is scarce in the Vietnamese market Consequently, we tested three available LEDs, evaluating their advantages and disadvantages during the examination period.
Table 2 1 Infrared LEDs Comparison Table
High power High intensity Available module
The energy is too drastic that it can go through the tooth
It is made for night vision purpose
Its wavelength is the nearest the ideal one
It must use a bunch of bulbs → take a lot of space
High power High intensity Available module
Its wavelength is quietly far from the ideal wavelength
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 17
Because of the dominant advantages of Camera(F) 5MP that were shown in table 2.1, we decided to use it for an acquisition block
- Near-Infrared light cannot be seen by the eyes of a majority of humans
For V = 5V, I = 20mA, based on the Ohm’s law, the resistor of LED is computed following a formula 3.2:
Because the internal resistor of LED is 227Ω, we used a 22Ω resistor to protect the LEDs
When selecting a central processing block for projects, options like Arduino, Raspberry Pi, Intel Galileo, and Odroid are available Arduino boards feature various microprocessors and offer digital and analog I/O pins for interfacing with expansion boards and prototyping circuits While Arduino supports programming in C and C++, its limited processing power restricts smooth image processing, yielding a mere 2-3 frames per second, making it unsuitable for real-time applications Consequently, the OV7670 camera was not selected due to these limitations In contrast, Raspberry Pi functions as a complete Linux computer, delivering comprehensive capabilities with low power consumption, making it a more suitable choice for demanding tasks.
Pi, users simply load the operating system and plug in a mouse, a keyboard, and a
The Raspberry Pi is an affordable option for electronic system projects, computing configurations, and DIY initiatives, although it operates at a slower speed compared to standard personal computers.
For our project, we opted for the Raspberry Pi 3 and Raspberry Pi 4 due to their powerful microcontrollers that can process video and offer various connectivity options The Raspberry Pi 4, with its higher clock speeds and increased RAM compared to the Pi 3, presents an excellent choice However, since our system does not require a high-end device, our selection ultimately hinges on the popularity and pricing of each Raspberry Pi model.
Raspberry Pi 3 Model B was used as an embedded computer because of its popularity and its reasonable price (the cheapest one)
The purpose of this unit is to capture the image from the camera and process an image signal Connecting the camera to Raspberry may seem complicated Still, Raspberry
Pi 3 Model B’s operating system already supports predefined camera pins through the CSI slot, just plug in the cable and define the camera through Raspberry Pi 3 Model B’s configure Figure 2.11 shows how to connect the camera to a raspberry via FFC cable
Figure 2 11 The connection of camera and Raspberry 2.7.4 Power Supply
Power management integrated circuits (PMICs), also known as power management units (PMUs), are essential components designed for efficient power management in electronic devices These integrated circuits encompass a diverse range of chips or modules, particularly within system-on-a-chip (SoC) configurations, and typically feature multiple DC/DC converters or their control mechanisms The six primary functions of power management ICs include voltage regulation, power sequencing, battery management, load management, energy harvesting, and thermal management, making them crucial for optimizing power efficiency and performance in modern electronics.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 19
In our project, we aim to design a power circuit board capable of delivering the required voltage and current using commonly used ICs from our curriculum, including the LM1084, LM7812, and LM7805 The primary goal of the power supply is to meet the specific current and voltage requirements of the system Our power supply circuit incorporates essential electrical components such as a power management IC, diode bridge, diodes, relays, and buttons to ensure efficient operation.
At the beginning of the circuit, the transformer steps down the AC input voltage to meet the requirements of the integrated circuit (IC) When current flows through one of the transformer's coils, it generates a magnetic flux in the transformer core, inducing a varying electromotive force in other coils wound around the same core This allows electrical energy to transfer between different coils without direct metal contact Although the output waveform retains the same shape as the input waveform, it differs in amplitude, which can be calculated using the appropriate formula for an ideal transformer.
- 𝑈 𝑖 represents for the input voltage
- 𝑈 𝑜 represents for the output voltage
- 𝑁 𝑖 represents for the number of turns in an input winding
- 𝑁 𝑜 represents for the number of turns in an output winding
- 𝐼 𝑖 represents for the input currents
- 𝐼 𝑜 represents for the output current
A bridge rectifier is a full-wave rectifier that utilizes four or more diodes arranged in a bridge circuit to efficiently convert alternating current (AC) into direct current (DC) As illustrated in the construction diagram, the four diodes are connected in a closed-loop configuration, allowing current to flow in one direction during each half-cycle of the AC input This results in an output voltage drop of 1.2 to 2 volts The input and output waveforms of the bridge rectifier are depicted in the accompanying figures.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 20
Figure 2 12 The circuit of a diode bridge
Figure 2 13 The circuit of a diode bridge
The AC waveform continues to oscillate, necessitating the use of a filter to convert the AC voltage into a stable DC supply This filter, typically a capacitor, plays a crucial role in smoothing the output waveform generated by bridge rectification.
Figure 2 14 The circuit of bridge rectification
Figure 2 15 The output of bridge rectification
The regulator circuit functions by lowering the input voltage to achieve the desired output voltage, utilizing the LM1084 integrated circuit (IC) This series of low dropout voltage positive regulators features a maximum dropout of 1.5V As illustrated in figure 2.16, the input voltage must exceed 6.5V to guarantee a stable 5V output.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 21
Software
There are three ways to connect a Raspberry Pi to a computer: using a LAN cable, a USB cable (specifically for Raspberry Pi Zero), or through an internet connection For ease of use, we opted for the internet connection method.
RealVNC offers remote access software that enables users to control another computer's screen from a distance This software includes a server application known as VNC Server and a client application called VNC Viewer, both of which utilize the Virtual Network Computing protocol.
RealVNC is typically pre-installed on Raspbian, the leading operating system for Raspberry Pi If it is not present, you can easily install it manually To do this, open the terminal on Raspbian and enter the following commands: `sudo apt update` and `sudo apt install realvnc-vnc-server realvnc-vnc-viewer`.
And then, the VNC option must be enabled in the Raspberry Pi configuration to use the remote access function
- Find the IP of Raspberry
- Type name and password of Raspberry
Use an IP finder software to get Raspberry Pi IP (Internet Protocol) Then, copy that
IP to RealVNC on PC and log into Raspberry Pi 3 Model B As usual, the default user is “pi”, and the default password is “raspberry”
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 22
DESIGN AND CALCULATION
Calculation of The Image Acquisition System
3.1.1 Block Diagram of an Acquisitive Device
Figure 3 1 Block diagram of the system
The system, as illustrated in Figure 3.1, is powered by a 5V Power Supply and includes Peripheral Devices such as a mouse and keyboard for patient data input A tooth is illuminated using a Near-Infrared LED, and a picture is captured by a Raspberry camera This image data is then sent to the central processing unit, where it undergoes various image processing techniques, including image filtering and histogram equalization Ultimately, the processed image is displayed on a screen for analysis.
3.1.2 The 5-volt Power Supply a) Calculation of Power Requirement
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 23
Table 3 1 The consumption power of the circuit Order Device or circuit Voltage (V) Current (mA) Power (W)
The sum of consumption power is described in formula 3.3:
This is a minimum of power that the system requires As a result, we decided to make a power supply 5V-3A
This table below shows details about three common types of voltage regulator IC
Table 3 2 The Comparison of popular integrated circuit
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 24
The 1084IT-5.0 is a linear regulator integrated circuit (IC) that delivers a stable 5V output with a maximum current of 5A, resulting in a power capacity of 10W, effectively preventing LED flickering This circuit design utilizing the 1084IT-5.0 is straightforward, eliminating the need for additional components such as diodes and inductors.
Finally, the power supply is a combination of the transformer, the bridge rectification, and the regulator circuit Figure 3.2 demonstrates a schematic of the power supply
Figure 3 2 The power supply circuit diagram Note:
The power supply features a protective relay that safeguards the board from issues like short circuits In the event of a problem, the relay automatically disconnects the power, requiring users to inspect the situation and press a button to restore functionality.
3.1.3 Case designs for the image acquisition system
To enhance the process of capturing dental images, we developed a device specifically designed for acquiring images of teeth within the human mouth This innovative design allows for adjustable positioning of the infrared (IR) beam, ensuring optimal image acquisition The device consists of three distinct components, each contributing to its overall functionality.
- The LED positions a) The case of Raspberry Pi 3 Model B
The main objective of this case is to safeguard the Raspberry Pi 3 Model B mainboard while providing access to various inputs, including LCDs, mice, and keyboards Additionally, it features a detachable joint for connecting an image acquisition device, simplifying the operational process for medical professionals The design of the Raspberry Pi 3 Model B case is illustrated in Figure 3.3.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 25
Figure 3 3 The design of the raspberry case b) The Handle of The Image Acquisition Device
The handle joint is specifically designed to attach to the Raspberry Pi 3 Model B case, ensuring the camera remains securely positioned when not in use It features three slots for connecting two LED cables and a camera cable Figure 3.4 illustrates both the front and back views of the handle.
Figure 3 4 The front side (a) and backside (b) of the camera holder c) The Probe of The Image Acquisition Device
In this section, two LEDs were positioned parallel to effectively deliver sufficient power to a tooth, with the camera lens centrally located, as illustrated in Figure 3.5.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 26
Devices Connection
To achieve optimal imaging results, we opted for capturing images from an occlusal view As illustrated in Figure 3.6, the device features a straightforward design, with the mouse and keyboard connected through USB ports The camera interfaces with the Raspberry Pi 3 via a flexible flat cable (FFC), while a separate power supply unit ensures that the Raspberry Pi 3, camera, and infrared LEDs receive adequate power.
Figure 3 6 Block diagram showing the connection of parts of the system
ASSEMBLY OF THE IMAGE ACQUISITION SYSTEM
Power Supply
We begin by designing the Printed Circuit Board (PCB) for the power supply in Proteus 8.6 Following this, we perform calculations and conduct simulation tests to obtain accurate results, with the components detailed in Table 4.1.
Table 4 1 Electronic component of the power supply board
Order Component Quantity Value Type Note
Red bulb and green bulb
Chapter 4 Assembly of the image acquisition system
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 28
4.1.1 Assembly of the Power Supply
Steps to conduct circuit construction:
1 List components, make the schematic and check the output on Proteus software
2 Make the printed circuit board (PCB), arrange components on the printed circuit board in Proteus software, export pdf file
3 Printing the PCB on a glossy paper, position it on the copper board, ironing it for about 5 minutes After that, wash the circuit with ferric chloride
4 Conducting drilling, arranging the components on the board, and welding it
5 Plugin the power, recheck the circuit, and measure the outputs of the source board
Figure 4.1 describes the completed power supply There are three 5V-2A header output and one USB power port
4.1.2 Inspection of The Power Supply
Once the power supply is assembled, it is essential to verify that all outputs deliver adequate voltage and current for the project's modules The inspection process, illustrated in Figure 4.2, confirms that the power supply meets our specified requirements.
Chapter 4 Assembly of the image acquisition system
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 29
Enclosure of The Image Acquisition System
All of the enclosure parts were made of PLA material We used the Prusa i3 3D printer to produce the case of our device Figure 4.3 demonstrates the resulted prototype
Figure 4 3 The side view of the device
Figure 4.4 shows the top view of the model There is a slot in the Raspberry Pi 3 Model B case to avoid overheating when Raspberry Pi 3 Model B is operating
To attach the LEDs to the holder, we utilized hot glue, ensuring a secure fit Additionally, the wires were permanently affixed along the camera tube with adhesive As illustrated in Figure 4.5, the positioning of the IR LEDs is clearly shown.
Chapter 4 Assembly of the image acquisition system
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 30
Figure 4 4 The top view of the device
Image Acquisition System Software
The program is designed for caries detection by acquiring and processing dental images Upon execution, the user enters the patient's name, generating a dedicated folder for saving results Two windows will display the original and processed images The processing involves splitting the RGB image into three channels, applying a median filter to the red channel to mitigate salt and pepper noise, and using a Gaussian filter to reduce speckle noise Histogram equalization is then employed to enhance visibility of dental issues like decays and cracks, with black traces indicating caries and white marks denoting cracks Users can save the processed image by pressing the spacebar, and the entire image acquisition process occurs within milliseconds For optimal performance, the camera frame rate should be set below 15 FPS.
- Enter a location to save Data: To create a folder to save images
- Get image: To initialize camera, set frames rate.
Chapter 4 Assembly of the image acquisition system
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 31
- Crop and Get the red channel of image: To resize the image and get the red channel to process.
- Median filter: To reduce salt and pepper noise in the images by the median filter.
- Gaussian filter: To reduce speckle noises in the images by Gaussian filter.
- Histogram Equalization: To detail the tooth by histogram equalization method.
- Increase the contrast and the brightness: To reject shadow.
- Locate caries: To highlight the suspected a point/line of caries.
- Show image: To display final images.
- Save image: To save the processed images into the folder that we created
Figure 4 6 The flowchart of the image acquisition system
RESULTS AND DISCUSSION
Results
Initially, we considered the ESP32-Cam, which integrates the ESP32 and OV2640, due to its compact size and affordability However, the low-quality 2MP camera did not meet our expectations After further research, we discovered the advantages of using a night vision camera and successfully integrated this technology into our model The high-resolution camera and fast microprocessor significantly outperformed the previous setup, leading us to choose these components as our primary hardware.
The significance of this project lies in the use of infrared LEDs After extensive research and experimentation with various angles and IR wavelengths, we identified the optimal positioning for our infrared LEDs Sourcing the appropriate wavelength in Vietnam proved challenging, leading us to order 760nm infrared LEDs from China, which did not meet our initial expectation of 780nm Surprisingly, the results in image processing were promising As illustrated in Figure 5.1, the two infrared LEDs operated effectively at a high intensity without flickering However, the aesthetic aspect was compromised as the LEDs were attached to the model using hot glue.
Figure 5 1 Testing the Infrared LED 5.1.2 The Power Supply
Figure 5.2 illustrates the arrangement of input jacks, output jacks, and components The power supply is theoretically capable of delivering 5A of current, and the USB power supply port is reinforced with hot glue to enhance durability and prevent breakage during prolonged use Notably, the power supply remains cool even after extended periods of operation, maintaining an output voltage of approximately 5V, as detailed in table 5.1.
The power supply in biomedical engineering ensures stable voltage delivery, enabling components to function reliably at optimal temperatures below 30 degrees Celsius Additionally, it features a safety mechanism that disconnects power in the event of a short circuit, protecting the system from potential damage.
Table 5 1 The Output/Inputs voltage testing
Order Input voltage Output voltage
5 minutes after the power supply connected to loads (Include Raspberry,
Order Input voltage Output voltage
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 34
5.1.3 Result Images Acquisition a) Image of the tooth under visible light
Prior to emitting the NIR light beam through the tooth, it was observed that the teeth exhibited opalescence, reflecting normal light, while deep marks on the surface remained invisible to the naked eye Figure 5.2 displays images of the tooth sample prior to processing.
Figure 5 2 Image of the tooth under visible light b) Results after processed
Choosing the right wavelength for infrared LEDs during our research presented several challenges, necessitating a trial-and-error approach This method, while essential for identifying the optimal wavelength, proved to be costly in terms of both time and resources.
In low light conditions, an image captured with 940nm IR LEDs demonstrates that infrared rays theoretically penetrated the tooth; however, the image processing algorithm is unable to process this particular picture.
In low light conditions using 850nm IR LEDs, tooth details were clearly visible; however, tooth decay was not prominently highlighted This may be attributed to the scattering effects of high-power LEDs on infrared rays.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 35 a) 940nm b) 850nm
Figure 5 3 The images with two different NIR wavelengths 940nm and 850nm
We chose to utilize 760 nm IR LEDs for our project due to their superior performance, as demonstrated in Table 5.2 The study involved examining several extracted teeth with suspected caries To obtain the results presented in the table, the input images underwent a systematic process consisting of seven distinct steps.
Step 1: Resize an input image to 180x180
Step 2: Get the red channel of the image
Step 3: Use the Gaussian filter to reduce speckle noises and the median filter to reduce salt and pepper noise
Step 4: Apply the Histogram Equalization method (mentioned in 2.6.1 section) to the image to adjust contrast
Step 5: Find a threshold with Otsu’s Method The formula was mention in section
Step 6: Increase the contrast of the image with the 5.2 formula:
- i and j indicate that the pixel is located in the i-th row and j-th column
- g(i,j) is a new value of a pixel
- f(i,j) is a default value of a pixel
The parameters α and β, known as the gain and bias parameters, play a crucial role in adjusting image properties Specifically, α controls the contrast, enhancing it when greater than zero, while β manages brightness.
Step 7: Use the threshold found with Otsu’s Method to mark the cavities Because pixel values of the cavity are very close to zero, we should subtract 60 from the threshold value to determine the exact decay traces, avoiding marking to the corners and edges of the teeth Pixels with a value lower than the threshold value will be assigned a value of 0; otherwise, the value will have remained the same
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 36
The images displayed feature molar and pre-molar teeth, focusing on their crown areas Each case will be accompanied by our insights, reflecting our predictions and evaluations from a student's viewpoint The outcomes of the actual teeth in volunteers are presented in Table 5.2, while Table 5.3 illustrates the results from the sample teeth.
Table 5 2 The comments of the real tooth
1 No sign of dental decay
There is a significant black point on the crown area A volunteer revealed that his tooth was filled
3 No sign of dental decay
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 37
Table 5 3 The comments of the sample tooth
1 No abnormal sign, maybe it is a healthy tooth
The lesion can be seen apparently
We could not determine how deep it is
3 The exact location of a suspected lesion is shown on the output data on the top view
4 The exact location of fillings on the tooth shown on the output image
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 38
Table 5 4 Accuracy of the system refers to a visual ability of normal human eyes
Decay detection of molar reaches 93.3% (14/15)
Decay detection of pre-molar reaches 90% (9/10).
Instruction
Step 1: Plug the male jack in the power outlet, turn on the switch, press the small button on the supply to make the power supply active, the green light of the power supply lights up
Step 2: Plugin Raspberry Pi 3 Model B power USB and power jack
Step 3: Wait for raspberry booting (roughly 10 to 20 seconds)
Step 4: Display Raspberry screen You can display a raspberry screen in two different methods
Step 4a.1: On our computer, use any kind of IP Scanner to find what your
Step 4a.2: Use the RealVNC program to connect to Raspberry Pi 3 Model B
Step 4b Use an HDMI cable to connect Raspberry board to a TV/Monitor
Step 5: Open Get_image.py on a desktop on Raspberry
- After powering up the device, launch the device Use a small spoon to push out the cheekbones, making it easy to insert the device into the teeth
Molar Pre-Model Canine Healty
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 39
To achieve the best image quality, position the device so that the teeth are situated between the two lights, ensuring that the device faces upward and is as perpendicular to the teeth as possible.
- You can directly view the image via Raspberry or use the Space key to capture images
Causing: The device operates stably at room temperature, avoiding use in hot environments.
Discussions
We have made significant advancements in our project model, transitioning from initial experiments on the impact of infrared (IR) on enamel to developing a practical device for patient use This device is designed for easy maneuverability within the mouth, allowing for optimal results Notably, the probe is separate from the embedded computer, facilitating user handling Our scientific research has provided us with a foundational understanding of how different IR wavelengths affect enamel, leading us to emphasize decay traces, despite not utilizing the ideal wavelength identified theoretically Additionally, we developed image processing software to reduce noise and enhance the visibility of dental issues, yielding results that, while not perfect, surpass what can be observed by the naked eye.
Despite our efforts to successfully complete the project, we encountered unforeseen drawbacks, particularly with the image processing program, which sometimes fails to accurately identify dental issues Additionally, the power supply presents a significant concern, as it lacks a cooling system and must run continuously, raising potential reliability issues.
CONCLUSIONS AND FUTURE WORK
Conclusions
In conclusion, this device was developed for research purposes, leading to significant insights into infrared technology, 3D printing, and power supply design Our experience highlighted the critical role of experimentation in scientific disciplines, particularly in biomedical engineering Despite some drawbacks, the device successfully fulfills its initial goal of examining the effects of infrared on enamel Looking ahead, we aspire to enhance the device, transforming it into a widely-used tool for everyday applications.
Future Works
As science and technology advance, the demand for non-invasive medical equipment is growing Our goal is to continue developing a device that meets medical standards, utilizing high-quality plastic to ensure lightweight design and minimize allergic reactions in patients We envision creating a pen-shaped device powered by a battery, which could foster a sense of empathy from patients due to its user-friendly appearance.
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 41
[1] “Human tooth”, https://en.wikipedia.org/, accessed on 26/02/2020
[2] “Teeth: Names, types, and functions”, https://medicalnewstoday.com/, accessed on 26/02/2020
[3] “The Roles and Structure of Teeth”, https://www.lions.co.jp, accessed on
[4] “Tooth Plaque and Dental Tartar”, https://oralb.com, accessed on
[5] SECTION ON ORAL, HEALTH; SECTION ON ORAL, HEALTH
(December 2014), “Maintaining and improving the oral health of young children”, Pediatrics
[6] Southam JC, Soames JV (1993), “2 Dental Caries”, Oral pathology (2 nd ed.) Oxford: Oxford Univ
[7] Smith B, Pickard HM, Kidd EA (1990), “1 Why restores teeth?”, Pickard's manual of operative dentistry (6th ed.), Oxford University Press
[8] Daniel Fried, Richard E Glena, John D B Featherstone, and Wolf Seka,
“Nature of light scattering in dental enamel and dentin at visible and near- infrared wavelengths”, 1/3/1995, accessed on 27/02/2019
[9] Cynthia L Darling, Gigi D Huynh, Daniel Fried, “Light scattering properties of nature and artificially demineralized dental enamel at 1310 nm”, Journal of biomedical optic 11(3) (May/June 2006)
[10] “Scattering”, https://en.wikipedia.org/, accessed on 03/03/2020
[11] Gail F Williamson, RDH, MS, “Intraoral Imaging: Basic Principles,
Techniques and Error Correction”, https://dentalcare.com/, accessed on
[12] “Xray”, https://www.facialart.com/, accessed on 03/03/2020
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 42
[13] Dr George Ghidrai, “THE DENTAL RADIOGRAPHY OR DENTAL X-
RAY”, https://infodentis.com,(May 2019), accessed on 03/03/2020
[14] “RPi Camera (F) Raspberry Pi Camera Module, Supports Night Vision”, https://www.waveshare.com/, accessed on 19/05/2020
[15] Prof Nguyễn Thanh Hải, Dr Trần Quốc Cường, “Giáo trình xử lý ảnh y sinh”, NXB Đại học Quốc gia TP Hồ Chí Minh, 2016
[16] Dr Andrew Greensted, “Otsu Thresholding”, http://www.labbookpages.co.uk, accessed on 20/07/2020
[17] “Arduino”, http://en.wikipedia.org, accessed on 19/05/2020
[18] “Raspberry Pi là gì? Các dòng Raspberry Pi phổ biến”, http://bkaii.com.vn, accessed on 22/10/2019
[19] “RPi Camera (F), Supports Night Vision, Adjustable-Focus”, https://www.waveshare.com, accessed on 19/05/2020
[20] “Power management Integrated circuit”, http://en.wikipedia.org, accessed on
[21] Sam Sattel, “How Power Supplies Work”, https://www.autodesk.com/, accessed on 31/07/2020
[22] “Transformer”, https://en.wikipedia.org/, accessed on 31/07/2020
[23] “Bridge Rectifier”, https://www.physics-and-radio-electronics.com/, accessed on 31/07/2020
[24] “Tkinter”, https://en.wikipedia.org, 27/9/2019, accessed on 18/07/2020
[25] “RealVNC- Product”, http://realvnc.com/, accessed on 19/07/2020
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 43
Table 7 1 Comparison of Raspberry Camera
Name Pixels Sensor Adjustable focus
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 44
Table 7 3 The different between raspberry models
CPU Clock 1.5 GHz 1.4 GHz 1.2 GHz 1.4 GHz 1 GHz
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 45
Camera Yes Yes Yes Yes Yes
GPIO Yes Yes Yes Yes Yes
7.4 THE CODE OF MAIN PROGRAM
##import lib import cv2 import os
#Get name name = input("Enter a sample name: ")
# define the name of the directory to be deleted dir_path = "/home/pi/Desktop" path = dir_path+"/"+name print(path)
## create dir try: os.makedirs(path) except OSError:
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 46 print ("Creation of the directory %s failed" % path) else: print ("Successfully created the directory %s" % path)
To capture photos using OpenCV, initialize the camera with `cv2.VideoCapture(0)` and set the frame rate to 15 FPS Users are prompted to press the spacebar to take a photo or the Esc key to exit The program continuously reads frames from the camera, extracting a specific region of interest from the frame, defined by the coordinates [100:280, 220:400].
#Convert RGB to Gray out_gray = cv2.cvtColor(out, cv2.COLOR_BGR2GRAY)
# Loc nhieu bang bo loc GaussianBlur out_blur = cv2.GaussianBlur(out_gray, (3, 3), 0)
#Histogram Equalization hist = cv2.equalizeHist(out_blur)
#Increase contrast and brightness alpha = 1.1 beta = 20 new_out = np.zeros(hist.shape, hist.dtype) for y in range(out.shape[0]): new_out[y] = np.clip(alpha*hist[y] + beta, 0, 255)
# Binary ret1, thresh cv2.threshold(hist,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU) ret2,thre = cv2.threshold(new_out,ret1-60,255,cv2.THRESH_TOZERO)
DEPARTMENT OF ELECTRONICS - BIOMEDICAL ENGINEERING 47 cv2.imshow("Caries", thre) if not ret: break k = cv2.waitKey(1) if k == 27:
# ESC pressed print("Escape hit, closing ") break elif k == 32:
The code captures images from a camera, saving them in various formats including original, grayscale, and caries-detected images Each image is named sequentially based on a counter, which increments after each capture The images are saved to a specified path, and upon completion, the camera is released, and all OpenCV windows are closed.