ars.els-cdn.com · web viewchallenges in development of paper-based analytical devices:...

13
Electronic Supplementary Material Chemometric challenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,* , Paolo Oliveri b,** , Riccardo Leardi b , and Daniel Citterio c a Institute of Industrial Science, The University of Tokyo, 4-6- 1 Komaba, Meguro-ku, Tokyo, 153-8505, Japan b Department of Pharmacy, University of Genova, Viale Cembrano, 4, I-16148 Genova, Italy c Department of Applied Chemistry, Faculty of Science and Technology, Keio University, 3-14-1 Hiyoshi, Kohoku-ku, Yokohama 223-8522, Japan *Corresponding author: [email protected] (V. Hamedpour) **Corresponding author: [email protected] (P. Oliveri) S1

Upload: others

Post on 21-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Electronic Supplementary Material

Chemometric challenges in development of paper-based analytical devices:

optimization and image processing

Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib, and Daniel Citterioc

aInstitute of Industrial Science, The University of Tokyo, 4-6-1 Komaba, Meguro-ku, Tokyo,

153-8505, Japan

bDepartment of Pharmacy, University of Genova, Viale Cembrano, 4, I-16148 Genova, Italy

cDepartment of Applied Chemistry, Faculty of Science and Technology, Keio University, 3-

14-1 Hiyoshi, Kohoku-ku, Yokohama 223-8522, Japan

*Corresponding author: [email protected] (V. Hamedpour)

**Corresponding author: [email protected] (P. Oliveri)

S1

Page 2: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Table of Contents

Figure S1 Transferred image of a real device to MATLAB environment S3

Figure S2 Intensity histogram for cut-off level selection S3

Figure S3 Segmented image of the device after adjusting the threshold S4

Figure S4 Logical image of the upper blinded device S4

Figure S5 Sensing zone selection of logical image S4

Figure S6 Sensing zone selection of real device S5

Figure S7 Leverage plot of effective interactions S6

Table S1 Design matrix and the responses for D-optimal design S7

Developed script for rectangle detection of isoniazid device S9

S2

Page 3: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Image processing

First of all, the total number of squares (N) including blanks and samples, in the image is

indicated (Eq. 1).

[md,crops,RGB] = sqdetect('imagefile.jpg',N) Eq. 1

For instance, the total number of the squares to be detected in Fig. S1 is 12 (N = 12).

Figure S1. Fabricated μPADs by D-optimal design for the detection of isoniazid. This picture demonstrates an original RGB image including 6 pairs of devices with a total number of 12 squares.

The next step involves segmentation of the RGB image, which is performed by setting a cut-

off value for the intensity of each channel of the image. In more detail, the intensity

histogram of each channel is built (Fig. S2) and the suitable cut-off level is selected for

segmentation (Fig. S3). In the current work, for the purpose of appropriate detection of

outliers, all R, G and B channels were obtained.

0 50 100 150 200 250Intensity of RED channel

0

2

4

6

8

10

12

Freq

uenc

y

104

S3

Page 4: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Figure S2. Intensity histogram of the red channel. The cut-off level is adjusted to 160.

Figure S3. Segmented image of the device after adjusting the threshold.

Pixels with an intensity of the red channel lower than 160 (corresponding to black-ink areas)

are coded as 0, while other pixels (with an intensity of the red channel equal or higher than

160, corresponding to red and white areas) are coded as 1. Furthermore, the upper half part of

the image is blinded (all of the pixels are coded as 0), mainly to avoid interferences arising

from the written text (Fig. S4).

Figure S4. Logical image of the device after blinding the upper part of the device.

Such a logical binary image is then submitted to morphological analysis. The recognition

algorithm automatically recognizes all the portions inside the image that contain pixels with a

coded value of 1 and can be modeled by a rectangular shape (Fig S5).

Figure S5. Complete detection of the rectangles after blinding the upper part of the image.

S4

Page 5: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

The area of each rectangle is evaluated, and rectangles are then sorted from the biggest to the

lowest one (descending order). The biggest rectangle always corresponds to the external

boundaries of the image, and it is not of interest. The subsequent N rectangles, corresponding

to the areas to be detected, are retained by the algorithm. Further rectangles identified,

corresponding to very small defects in the edges of black squares and, being of null interest,

are deleted. At the end of this sorting procedure, only N rectangles of interest, corresponding

to the inner parts of black-ink squares, are retained (Fig S6).

By default, the left side rectangles of pairs are considered as blank spots and marked with odd

numbers. Further rectangles towards the right side of pairs are sample spots and marked with

even numbers. Rectangular areas detected and coded as described are then used for

computations of descriptive parameters related to samples. It should be mentioned that the

subtracted mean R, G and B values of each image pair in this study were utilized.

Figure S6. Complete detection of the rectangles after blinding the upper part of the image.

It is worth mentioning that the image profiles of processed devices are available in “RGB”

file (also saved in “DIP.mat” file) and can be used for outlier detection purposes.

S5

Page 6: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Figure S7. Leverage plots of a) A–E (diameter of inlet area–volumes of sample); b) D–E (area of channel–volumes of sample); c) D–F (area of channel–volume of methyl orange); and d) E–G (volumes of sample–volume of phosphate buffer) planes.

S6

Page 7: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Table S1

Design matrix and the responses for D-optimal design (DO). The following is a list of the codes used to describe the relevant parameters:

A: Diameter of inlet area (cm)

B: Area of sensing zone (cm2)

C: Diameter of indicator area (cm)

D: Area of channel (cm2)

E, F, G: Volumes of sample, methyl orange, and phosphate buffer (µL)

Response: Difference of blue color intensity between respective sample and a blank

Run order A B C D E F G Response (∆B)

1 0 0 0 0 0 0 0 27.1

2 -1 -1 -1 -1 -1 -1 -1 24.4

3 1 1 1 0 -1 -1 -1 15.3

4 -1 1 -1 1 -1 -1 -1 32.4

5 1 1 0 -1 0 -1 -1 27.2

6 0 -1 1 1 0 -1 -1 9.4

7 -1 0 1 -1 1 -1 -1 21.6

8 1 0 -1 1 1 -1 -1 32.5

9 -1 -1 1 1 -1 0 -1 10.8

10 -1 0 -1 0 0 0 -1 35.1

11 0 1 -1 -1 1 0 -1 34.5

12 -1 1 1 -1 -1 1 -1 35.8

13 -1 0 0 0 -1 1 -1 35.7

14 1 -1 -1 1 -1 1 -1 14.9

15 1 -1 1 -1 1 1 -1 17.8

16 -1 -1 -1 1 1 1 -1 22.4

17 0 1 1 1 1 1 -1 20.3

18 0 1 1 -1 -1 -1 0 22

19 1 0 1 1 -1 -1 0 5.8

20 0 -1 0 0 1 -1 0 16.1

21 -1 -1 0 -1 1 0 0 16.4

22 -1 1 1 0 1 0 0 24.7

23 1 1 -1 -1 -1 1 0 39.6

24 -1 -1 1 -1 0 1 0 20.7

S7

Page 8: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

25 1 -1 1 1 1 1 0 15.1

26 1 1 -1 -1 -1 -1 1 27.6

27 -1 -1 1 -1 -1 -1 1 15.7

28 1 -1 -1 1 -1 -1 1 8.9

29 -1 1 -1 -1 1 -1 1 28.8

30 1 -1 1 -1 1 -1 1 13.2

31 -1 -1 -1 1 1 -1 1 20.2

32 1 1 1 1 1 -1 1 19.3

33 0 0 0 -1 -1 0 1 27.9

34 -1 1 -1 -1 -1 1 1 40.4

35 1 -1 1 -1 -1 1 1 15.3

36 -1 -1 -1 1 -1 1 1 16.1

37 1 1 -1 1 -1 1 1 25.1

38 -1 1 1 1 -1 1 1 13.5

39 1 -1 -1 -1 1 1 1 22

40 1 1 1 -1 1 1 1 26.3

41 -1 1 -1 1 1 1 1 36.3

42 -1 -1 1 1 1 1 1 11.7

43 1 1 1 1 1 1 1 19.2

44 0 0 0 0 0 0 0 27.6

S8

Page 9: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

Developed script for rectangle detection:

function [meandiff,crops,RGB] = sqdetect(imagefile,n) % [md,crops,RGB] = sqdetect('imagefile.jpg',n);% % n = number of rectangles to be detected (samples + blanks)% md = means of the R, G and B channels for differences of pairs of coupled images% crops = structure containing the cropped images%% warning off a=imread(imagefile);%aa=mean(double(a),3);aa=a(:,:,1);k=find(aa<165);b=255*ones(size(a,1),size(a,2));b(k)=0; %blinding the upper part of the image:b(1:round(size(b,1)/2),:)=0; %morphological analysis:Ibw=logical(b);stat=regionprops(Ibw,'boundingbox');for i=1:numel(stat) bb(i,:)=stat(i).BoundingBox;end %evaluation of areas of detected rectangles:area=bb(:,3).*bb(:,4); %sorting and retention of the n biggest rectangles:[~,ks]=sort(area);bb=bb(ks,:);bb=bb(end-n:end-1,:); [~,kb]=sort(bb(:,1));bb=bb(kb,:); for i=1:2:n m=min(bb(i:i+1,3:4)); bb(i,3:4)=m; bb(i+1,3:4)=m;end %visualisation:figurehold onimshow(a)axis offaxis image for i=1:size(bb,1) rectangle('position',bb(i,:),'edgecolor','g','linewidth',2);

S9

Page 10: ars.els-cdn.com · Web viewchallenges in development of paper-based analytical devices: optimization and image processing Vahid Hamedpour a,c,*, Paolo Oliverib,**, Riccardo Leardib,

text(bb(i,1)+fix(bb(i,3)/2),bb(i,2)+fix(bb(i,4)/2),int2str(i),'HorizontalAlignment','center','VerticalAlignment','middle','FontSize',12,'Color','g') crops(i).image=a(round(bb(i,2)):round(bb(i,2))+round(bb(i,4)),round(bb(i,1)):round(bb(i,1))+round(bb(i,3)),:);end %computation of mean values (for the R, G and B channels) of differences between paired images:meandiffR=[];meandiffG=[];meandiffB=[];for i=1:2:size(bb,1)-1 diffR=crops(i).image(:,:,1)-crops(i+1).image(:,:,1); %difference between paired images for the RED channel meandiffR=[meandiffR;mean(mean(diffR))]; %mean computation diffG=crops(i).image(:,:,2)-crops(i+1).image(:,:,2); %difference between paired images for the GREEN channel meandiffG=[meandiffG;mean(mean(diffG))]; %mean computation diffB=crops(i).image(:,:,3)-crops(i+1).image(:,:,3); %difference between paired images for the BLUE channel meandiffB=[meandiffB;mean(mean(diffB))]; %mean computationend meandiff=[meandiffR meandiffG meandiffB]; disp(' ')disp('Mean values of differences between paired images for R, G and B channels')disp('From left to right:')disp(' ')disp(['n.' ' ' 'R' ' ' 'G' ' ' 'B']) for i=1:size(meandiff,1) disp([int2str(i) ') ' num2str(meandiff(i,:))])end disp(' ')disp('All information are saved as "DIP.mat" in your PC')disp('Raw matrixes of images are available in "crops" file')disp('') save('DIP.mat'); warning on

S10