Post on 04-Apr-2018
7/30/2019 91715v00_alkermes
1/4
1 MATLAB Digest www.mathworks.com
Te test method looks beyond simply mea-
suring the amount o powder delivered
through the mouthpiece by quantiying the
capsules motion inside the inhaler. Since
the capsule moves too quickly to be tracked
by the eye or with a conventional camera, a
high-speed video system was used to cap-
ture the capsules motion. We then used
MALAB to analyze the images rame byrame and summarize the results.
In a joint eort with MathWorks Con-
sulting Services, Alkermes developed avideo capture and ana lysis procedure
that uses MALAB and Image Process-
ing oolbox. he position o the cap-
sule was evaluated in each video rame.
Comparison o adjacent video rames
allowed us to characterize the linear
and rotational motion o the capsule.
Quantities such as the velocity, accel-
eration, and momentum o the capsule
were computed. Series o rames were
analyzed using signal processing. his
approach provided inormation on the
physical actors inluencing the inhalers
perormance.
Setting up the Test
We created inhalers with clear plastic
components so that the capsule would be
visible inside the aerosolization chamber
(Figure 1). o enable the development o
Figure 1. A standard inhaler (bottom) and a test inhaler (top).
MATLAB Digest
Tim Coker, Alkermes, and Paul Fricker, The MathWorks
The AIR pulmonary drug delivery technologybeing developed at Alkermes
provides targeted delivery o small-molecule or macromolecule drug particles
rom an easy-to-use, capsule-based, hand-held inhaler. When the patient inhalesthrough the mouthpiece, air is drawn into the aerosolization chamber, agitating a
capsule and releasing dry-powder medicine or systemic or local delivery to the
lungs. To optimize uture inhaler designs, Alkermes developed a test method to
understand the behavior o the capsule under a range o operating conditions
or example, a range o air fows representing patients o diering age and size.
Analyzing High-Speed Video Images to Quantify thePerformance of Innovative Drug Delivery Technology
Products Used
MATLAB
Image Processing Toolbox
Signal Processing Toolbox
7/30/2019 91715v00_alkermes
2/4
2 MATLAB Digest www.mathworks.com
an a lgorithm or automatically processing
the captured video images, we marked the
capsules with a pattern consisting o two
separate lines: an equatorial line traveling
around the capsules circumerence, and a
slanted line that produces a sawtooth pat-
tern as the capsule is rotated (Figure 2).
Tis design provided a continuous image
or analysis.
Videos were captured in grayscale at a
rate o 10,000 rames per second and resolu-
tion o 256 x 256 pixels using a PhantomMonochrome high-speed video camera
rom Vision Research. o assess the mo-
tion (in 2-D) o the major axis o the cap-
sule inside the inhaler, we determined the
angle o the equatorial line or each video
rame as the capsule was agitated within
the chamber. Te peaks and valleys o the
resulting sinusoidal signal enabled us to de-
termine an amplitude and requency o the
wobbling motion o the capsule. A count o
the number o peaks o the continuous saw-
tooth pattern, captured while the capsule
was rotating, provided inormation on the
rotational angular motion o the capsule.
Processing a Single Image
In the experiments, the capsule and inhaler
were placed in several dierent orienta-
tions, ranging rom horizontal to vertical,
upright and inverted. In the image analysis,
the video rames were always rotated so that
the capsule appeared in a vertical orienta-tion, with the equatorial line positioned be-
low the slanted line. Figure 3 shows a single
rame rom one o the captured high-speed
video les. Regardless o the position o the
inhaler in the video, the analysis was com-pleted in the orientation shown.
Afer reorienting the video data, each
grayscale image was rst thresholded us-
ing the graythresh unction in Image
Processing oolbox to produce a binary, or
Boolean, image (Figure 4).
Along with the white lines o the capsule
pattern, Figure 4 shows several smaller ar-
eas produced by noise and glare rom the
experimental lighting. Tese smaller areas
were identied using the regionprops
unction and then eliminated, leaving just
the equatorial and the sawtooth lines.
Once the objects o interest had been
clearly identied in the image, we used
MALAB to automate the analysis.
We used a least squares tting proce-
dure to compute a straight line through
the equatorial line on the capsule. We then
located the end points and midpoint o that
line. A perpendicular line was then com-
puted rom the midpoint o the equato-
rial line to the midpoint o the slanted line
Figure 2. The capsule markings.
Figure 3. A raw image of the marked capsule inthe inhaler.
Figure 4. Boolean image produced by auto-thresholding the video frame.
7/30/2019 91715v00_alkermes
3/4
3 MATLAB Digest www.mathworks.com
directly above. Tis relationship resulted
in a measure o the distance between the
equatorial and sawtooth lines along themajor axis o the capsule.
As the capsule moved about the aero-
solization chamber, we used the midpoint o
the least squares tted line to track capsule
position. Te angle o the least squares tted
line was used to track capsule wobbling, and
the peaks values in the distance between
the equatorial and slanted line were used
to track capsule rotations. We recorded the
coordinates o the equatorial line midpoint,
the distance between the equatorial and
sawtooth lines, and the angle o the equato-
rial line or each rame (Figure 5), and saved
the data in an Excel spreadsheet.
Analyzing the Data
Using MALAB, we post-processed the
stored data and produced summary results
or each experimental run. A typical run
lasted about 1.5 seconds, with approxi-
mately 15,000 video rames being captured
and analyzed or each test.
Te rame-to-rame displacement o the
equatorial lines midpoint was measured
using the Pythagorean theorem and the
coordinates o the midpoint. Dividing the
displacement by time between rames gave
the velocity o the capsule. Te changes in
velocity between rames provided the ac-
celeration o the capsule. Power, momen-
tum, and impulse were also calculated
based on these values.
We used Signal Processing oolbox to
compute a power spectral density (PSD)
rom the equatorial line orientation data
(Figure 6). Tis allowed or quick identi-
cation o the dominant requencies o the
capsules wobbling motion.
Once the image analysis and output
data post-processing algorithms hadbeen rened, we developed a GUI with
MALAB to streamline the execution o
the processing (Figure 7). Beore begin-
ning each analysis, we used the GUI to
record inormation about the test, such
as who conducted the experiment and
when, as well as the inhaler orientation,
test ow rate, and inhaler type. We added
a eature that makes the application pres-Figure 5. Analyzed video frame.
Figure 7. The MATLAB based GUI for executing
the analysis of the experimental video data.
Figure 6. Power spectrum density on a semi-log scale.
7/30/2019 91715v00_alkermes
4/4
4 MATLAB Digest www.mathworks.com
For More Information
Alkermeswww.alkermes.com
Image Processing with MathWorks Toolswww.mathworks.com/applications/
imageprocessing
91715v00 04/09
2009 The MathWorks, Inc. MATLAB and Simulinkare registered trademarks o The MathWorks, Inc. Seewww.mathworks.com/trademarks or a list o additionaltrademarks. Other product or brand names may be trade-marks or registered trademarks o their respective holders.
ent the rst rame o the video when the
video processing begins and enables the
user to crop the image so as to remove the
periphery and isolate the aerosolization
chamber and the capsule. Tis cropping
is subsequently applied to all the rames
in the video.
Refining the Algorithm
Te steps outlined in this article were dis-
tilled rom an iterative experimental devel-
opment process in which the image analysis
algorithmsand even the markings used
on the capsuleswere designed, proto-typed, tested, and improved repeatedly. Te
interactive MALAB environment stream-
lined the data analysis algorithm develop-
ment process by making it easy to try new
approaches and techniques and immedi-
ately visualize the results. Tis allowed the
algorithm to be built step by step and then
rened as data was processed rom more
and more experiments.
Alkermes has already gained insight into
how the capsule moves within the inhaler,
and has correlated experimental variables,
such as ow rate, to a variety o quanti-
able eatures o the capsule motion.
Te long-term objective is to identiy
aspects o the capsule motion that determine
the amount, rate, and distribution o powder
delivery. Tis inormation, along with other
test results, will provide a oundation or op-
timizing uture versions o the inhaler.
Resources
visit
www.mathworks.com
technical support
www.mathworks.com/support
online user community
www.mathworks.com/matlabcentral
Demos
www.mathworks.com/demos
training serviceswww.mathworks.com/training
thirD-party proDucts
anD services
www.mathworks.com/connections
Wdwd contacts
www.mathworks.com/contact
e-mailinfo@mathworks.com