You are on page 1of 7

THE INSTITUTE OF ELECTRONICS,

INFORMATION AND COMMUNICATION ENGINEERS

IEICE ICDV 2013

Design of Portable Ear-Nose-Throat Endoscope


Supporting Image Enhancement
Truong Quang Vinh Nguyen Ngoc Tai and Le Quoc Bao Tri
Faculty of Electrical and Electronics Engineering
Ho Chi Minh City University of Technology
Vietnam National University - Ho Chi Minh City (VNU-HCM), Viet Nam

E-mail: tqvinh@hcmut.edu.vn, {ngoctai0308, baotribk}@gmail.com


Abstract This paper presents a portable embedded system for ear-nose-throat (ENT) endoscope using ARM processor and
Linux operating system. Our design is built based on Friendly ARM development kit powered by ARM Cortex A8 processor.
The system can capture and display the ENT images by using a low-cost USB endoscope camera. Moreover, we develop an
algorithm to enhance the quality of the ENT images. The algorithm consists of lens shading correction, color correction, and
edge enhancement. As a result, the proposed system is low-cost, portable, and ready for ENT diagnosis.
Keyword ear-nose-throat diagnosis; endoscope system; image enhancement; ARM processor; embedded system.

1. Introduction

FPGA-based endoscope system [3]. The FPGA performs real-time

Endoscope systems nowadays are widely used for diagnosis and

processing for image pattern transformation, image interpolation

surgery inside the body or in a cavity of the body. Endoscope

zooming, and image enhancement. This FPGA-based system is

systems are typically based on optical technology including lens,

portable and high integrated, but expensive. Ramin Shahidi et al.

lamps, light transfer fibers, an image sensor, and an image

focused on developing an endoscope system which supports image-

processing system. Although such systems provide high quality

guided surgery called image-enhanced endoscopy [4]. However,

endoscopic images, they are high-cost, complex, and not portable.

this system has a problem with computational issues. The proposed

Besides, the conventional endoscope systems only display medical

processing algorithm requires a high performance PC with a

images, and do not provide supporting functions such as image

graphic accelerator.

enhancement, image storage, or patient data management.

Recently, ARM-based embedded systems are broadly applied for

Therefore, some researchers have improved endoscope systems by

portable medical devices such as EEG system [5], ECG analyzer

using high performance hardware and developing medical image

[6], and telemedicine system [7], because ARM processors are low-

processing algorithms..

cost, low-power, and high performance. Besides, embedded

Jong An Park et al. designed a low-cost PC-based endoscope

systems using ARM processors with Linux operating system

system which supports diagnosis and medical image data

provide facilities for developing functional software for medical

management with user-oriented GUI (graphic user interface) [1].

data processing. Therefore, embedded systems with ARM

However, this system is bulky and not portable. Instead of

processor are highly applicable for portable medical devices.

developing a portable endoscope device, Chung-Hsien Kuo et al.

In this paper, we aim to utilize ARM-based embedded system

have design a system which can provide medical service for

for ENT endoscope with a digital endoscope camera. Moreover, we

patients at a distant location [2]. The system supports remote ENT

develop functions for endoscopy image enhancement, image data

diagnosis by virtual hospital server through the internet. Aiming to

storage, and patients record management. The image enhancement

process medical images in real-time, Jie Jiang et al. proposed a

algorithm consists of lens shading correction, color correction, and

Copyright 2013 by IEICE

edge enhancement which can increase quality endoscope images.


The final product can support physicians to diagnosis patients
ENT at home or at remote locations where hospitals do not exist.

2. System Description
Structure of the proposed endoscope system is divided into two
parts: the hardware and the software. The hardware is powered by
ARM Cortex A8 processor which acquires endoscope images from
a USB endoscope camera and displays them on a TFT LCD. The
software performs endoscope image processing, storing, and
management. The users interact with the control software through
the GUI on a touch-screen LCD.

2.1 Hardware Description

Figure 1. Mini210s board

The hardware of the endoscope system is built on a Friendly

Furthermore, Mini210s board uses SD Card and 4GB NAND

ARM Mini210s development board [8]. Figure 1 shows the

Flash for saving images and data. Large memory enables to store

hardware of system based on Mini210s. The board is powered by 1

large data of images and patients records. Embedded Linux system

GHz Samsung S5PV210 ARM Cortex-A8 processor with

and application can be stored in SD Card or NAND Flash.

PowerVR SGX540 graphics engine. The kit is equipped by many

2.2 Software Description

useful interfaces including microSD card socket, RS232, USB,

Main software structure of our system is showed in Figure 2.

mini-USB, stereo jack, RJ-45, LCD, JTAG, and GPIO. Therefore,

The main software consists of 4 parts, namely Bootloader,

Mini210s is very suitable for portable control systems.

Embedded Linux, Library and Application.

In order to capture ENT image, we utilize a waterproof USB

Bootloader is program which the system runs firstly. The

endoscope camera. The endoscope camera is tubular camera with

bootloader Vivi developed by MIZI Company and U-boot are used

8mm diameter and adjusting brightness using 4 LEDS. This camera

as bootloader in the system. Bootloader supports hardware to

is very fitting for ENT applications. ENT images are captured from

transport the kernel of the operating system into RAM memory. In

camera, processed by CPU, and showed on LCD touch-screen.

addition, the arm-linux-gcc-4.4.3 package is used to compile

Doctors and patients can easily observe the images for diagnosis

necessary files for Embedded Linux.

and treatment.

APPLICATION
APPLICATION
LIBRARY:
LIBRARY: OpenCV
OpenCV and
and V4L
V4L
EMBEDDED
EMBEDDED LINUX:
LINUX:
Kernel
Kernel 2.6.32.2
2.6.32.2
Root
Root File
File System
System
BOOTLOADER:
BOOTLOADER: Vivi
Vivi and
and U-boot
U-boot

Figure 2. Software structure


The Linux kernel and Root File System is loaded into system
memory after the bootloader has run. Linux kernel contains

controlling functions of hardware. In our system, we use Kernel

includes: brightness, contrast, saturation, hue, and especially image

Linux-2.6.32.2 which is suitable for Mini210s board. After building

enhancement. The flow chart of the image acquisition is showed in

bootloader and kernel, we build a root directory tree, which is

Figure 4.

important for Linux OS. Main folders of Root file system in Linux
OS contains bin, sbin, boot, etc, dev, home, lib, usr, opt, root which
keep executable programs, libraries, and system configurations.
The libraries (OpenCV and V4L) are built for the system after
install embedded Linux for Mini210s board. OpenCV (Open
Computer Vision) which contributes an important part in
investigate and development of computer vision area, is developed
by Intel in 1993. OpenCV is an open source library, including 4
parts: CxCore, CV, HighGUI, CvCam which are over 500
commands total. OpenCV supports for many fields such as medical

Figure 3. Structure of Graphical User Interface

3. Endoscope Image Enhancement

image processing, security image processing, robot programming,

ENT images which are captured by endoscope camera usually

identification, and surveillance camera. V4L (Video for Linux) is

have some problems such as blurring, lens shading, color

an application to detect camera in Linux OS. It supports driver

deficiency. To overcome these problems, we proposed an image

libraries which can identity many devices such as webcam, TV,

enhancement algorithm which is a combination of three methods:

radio V4L2 is a second version of V4L which assists some

lens shading correction, color correction, and edge enhancement.

functions for image and video processing. In this paper, we use

3.1 Lens Shading

V4L and V4L2 libraries which capture image data from ENT
camera.

We apply lens shading correction algorithm to process the


endoscope images which are defected by lens shading. This effect

Figure 3 is shown an embedded program which is built base on

causes a reduction of an image's brightness at the periphery

QT and supporting libraries. The application is distributed into two

compared to the image center. The images are processed in RGB

main parts: Graphic User Interface and ENT Image Capturing and

color space. The equations (1), (2), (3) are used to process each

Processing.

pixel of the image.

Graphical user interface (GUI) which helps doctors can manage

D (i. j ) = (i Cx) 2 + ( j Cy ) 2

patients easier, includes 5 functionalities: patient information,


diagnosis note box, Vietnamese virtual keyboard, display image
frame, and tools image processing. We design Vietnamese virtual
keyboard which helps doctors can write Vietnamese language very
suitable for domestic hospital.

W (i, j ) = f c *

(1)

D (i, j ) 2 + * M d * D (i, j )
+ 1 (2)
M d2 * ( + 1)

[ Rn , Gn , Bn ] = W (i, j ) * [ R, G, B ]

(3)

Where (Cx,Cy) is the coordinate of a pixel which is brightest in

The ENT image capturing and processing consists of lens

the endoscope image; (i, j) is the coordinate of a pixel of the input

shading correction, color correction, and edge enhancement effects.

image. D(i, j) is a distance between a pixel (i,j) and the brightest

The ENT images are captured from ENT camera through USB port,

pixel (Cx,Cy). The new pixel (Rn, Gn, Bn) is calculated by W(i, j)

and then stored in pixmap array supported by OpenCV library.

and (R, G, B) values of the original pixel, using equation (3). Md is

Consequently, ENT camera can adjust easily brightness for the

the maximum distance of a pixel (i, j) to the brightest pixel of the

image, using spin button on camera. Our system not only adjusts

image. and fc are the constant values, depending on the geometry

brightness for image but also supports tool processing image

of system and the lens used. Figure 5 shows the ENT endoscope

3.2 Color Correction

images before and after lens shading correction is applied.

After using lens shading algorithm, we propose color correction

Start

method to enhance visual color quality of ENT images. The method


processes in YCbCr color space, and thus system coverts the image

Capturing device information

from RGB to YCbCr. The proposed color correction is given by


N

Y ' = CONT * (Y Yave ) +Yave + BRI 128

(4)

Cb' = SAT * (cos H * (Cb 128) sin H * (Cr 128)) + 128

Looking for hardware device

(5)

Cr ' = SAT * (sin H * (Cb 128) cos H * (Cr 128)) +128

Opening device

(6)
Where Y, Cb, Cr are color components of the original pixel; Y,

Taking IplImage

Cb, Cr are color component of the result pixel. Y ave is an average


Changing to Pixmap Image

value of Y component of all pixels in the image. BRI, CONT, SAT,


HUE are constant values of the brightness, contrast, saturation, and

Using Tool Image Processing

Processing
Image
N

hue of the input image. cosH and sinH value are calculated by
following equations:

sin H = sin(

Displaying Image

N
Close device

hue *
)
180

cos H = cos(

hue *
)
180

(7)

(8)

3.3 Edge enhancement

Edge enhancement is an image processing filter that enhances

End

the edge contrast of an image in an attempt to improve its acutance,


i.e. apparent sharpness. The filter works by identifying sharp edge
boundaries in the image, such as the edge between a subject and a
background of a contrasting color, and increasing the image
contrast in the area immediately around the edge. This algorithm
creates bright and dark highlight on either side of any edges in the
Figure 4. The flow chart of image acquisition

image. Edge enhancement is applied to an image can vary


according to a number of properties; the most common algorithm is
unsharp filter.
The unsharp filter is implemented as a window-based operator,
i.e. it relies on a convolution kernel to perform spatial filtering.
Unsharp filter is to sharpen the image. The unsharp mask as follow:

(a) before

(b) after

Figure 5. The ENT endoscope images before and after lens


shading correction is applied

4. Experimental

Result

Endoscope

Image

Enhancement

(a) before enhancement

The ENT system implemented on Mini210s board using

(b) after enhancement

Figure 8. The result of image enhancement

Embedded Linux 2.6.32.2 has been presented in this paper. The


application is built base on Qt4, OpenCV library, and V4L library.
The experiment has been executed on PC and Mini210s board. The
user interface and Vietnamese virtual keyboard is presented in
Figure 6. The endoscope image which is processed by using image
enhancement is showed on Figure 7.
Figure 9. Endoscope image processing tools

Figure 6. The GUI in Vietnamese of our application.


The original endoscope image and the edge enhancement image
on GUI are shown on Figure 8. Moreover, the system supports
image processing tool which is showed on Figure 9. Figure 10
presents the proposed system built on Mini210s board.

Figure 10. Demonstration of endoscope system on Mini210s


A comparison among the proposed system with other systems is
described in Table 1. According to Table 1, the proposed system
has several advantages over other systems. Our system is
(a) The original
endoscope image

(b) After lens shading


correction is applied

independent of PC, so it is portable. Moreover, our system supports


touch screen GUI which assists ENT doctor to manage patients
easier. Besides, the GUI supports Vietnamese which is helpful for
domestic ENT doctor. Additionally, SD card, flash are assisted for
storage patient records and ENT images. Thus, the proposed system
is very helpful for ENT clinics.

(c) After color correction


(d) After edge enhancement
is applied
is applied

Figure 7. The ear image enhancement process

TABLE 1: A COMPARISON AMONG OUR SYSTEM AND


OTHER SYSTEMS
Specification

[1]

[2]

Proposed system

CPU

Computer-

Computer-

ARM Cotex A8

based

based

S5PV210

Image size

640*480

640x480

320*240

Graphic User

PC-based

Web-

Touch screen GUI

Interface

GUI

based GUI

Language

Korean

Korean

Vietnamese

Image

None

None

Brightness,

Processing

Contrast,

[5]

[6]

[7]

Gamma adjustment,
Lens shading
Edge enhancement
Color correction
Storage

Computer

Computer

SD Card
Flash

5. Conclusion
In this paper, an ENT system based on FriendlyARM Mini210s
board and Embedded Linux was described. The system supports
various useful functions including ENT image capturing, patients
information management, image storing, and especially endoscope
image enhancement. The ENT doctors and patients can observe
ENT images in real time on LCD touch screen. The system is
portable, economic and ready to be applied at ENT clinics.
Furthermore, the proposed system supports physicians to diagnosis
ENT images at home or at remote locations which are far from
hospitals.

References
[1] Jong An Park and Minhhyuk Chang, Development of a
Low-cost PC-based Endoscope System, International
Conference on Hybrid Information Technology - Vol1
(ICHIT'06), 2006.
[2] Chung-Hsien Kuo and Jung-Jie Liu, Development of a webbased telemedicien system for remote ENT diagnoses,
International Conference on System Science and Engineering
(ICSSE), 2010.
[3] Jie Jiang, Daoyin Yu, and Zheng Sun, Real-time image
processing system based on FPGA for electronic endoscope,
IEEE Asia-Pacific Conference on Circuits and Systems, IEEE
APCCAS 2000.
[4] Shahidi, R. ; Bax, M.R. ; Maurer, C.R., Jr. ; Johnson, J.A. ;
Wilkinson, E.P. ; Bai Wang ; West, J.B. ; Citardi, M.J. ;

[8]

Manwaring, K.H. ; Khadem, R., Implementation, calibration


and accuracy testing of an image-enhanced endoscopy
system, IEEE Transactions on Medical Imaging, 2002.
Chiu-Kuo Chen ; Chua, E. ; Zong-Han Hsieh ; Wai-Chi
Fang ; Yu-Te Wang ; Tzyy-Ping Jung, An EEG-based brain
computer interface with real-time artifact removal using
independent component analysis, IEEE International
Conference on Consumer Electronics - Berlin (ICCE-Berlin),
2012.
V.Thulasi Bai, Real Time Portable Telemedicine System For
Cardiac Patient, International Conference on Future
BioMedical Information Engineering, 2009.
Yan Liping ; Song Kai, Design of ARM-Based Telemedicine
Consultation System, International Conference on
Biomedical Engineering and Computer Science (ICBECS),
2010.
Guangzhou FriendlyARM Co., Ltd, Mini210s Manual and
Schematics, http://www.friendlyarm.net/products/mini210s

You might also like