<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "http://dtd.nlm.nih.gov/publishing/2.0/journalpublishing.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="2.0">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">JMI</journal-id>
      <journal-id journal-id-type="nlm-ta">JMIR Med Inform</journal-id>
      <journal-title>JMIR Medical Informatics</journal-title>
      <issn pub-type="epub">2291-9694</issn>
      <publisher>
        <publisher-name>JMIR Publications</publisher-name>
        <publisher-loc>Toronto, Canada</publisher-loc>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="publisher-id">v9i7e26000</article-id>
      <article-id pub-id-type="pmid">34319239</article-id>
      <article-id pub-id-type="doi">10.2196/26000</article-id>
      <article-categories>
        <subj-group subj-group-type="heading">
          <subject>Original Paper</subject>
        </subj-group>
        <subj-group subj-group-type="article-type">
          <subject>Original Paper</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Effects of Background Colors, Flashes, and Exposure Values on the Accuracy of a Smartphone-Based Pill Recognition System Using a Deep Convolutional Neural Network: Deep Learning and Experimental Approach</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="editor">
          <name>
            <surname>Eysenbach</surname>
            <given-names>Gunther</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Montmirail</surname>
            <given-names>Valentin</given-names>
          </name>
        </contrib>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Krukowski</surname>
            <given-names>Rebecca</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib id="contrib1" contrib-type="author" equal-contrib="yes">
          <name name-style="western">
            <surname>Cha</surname>
            <given-names>KyeongMin</given-names>
          </name>
          <degrees>MSc</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0001-9868-9253</ext-link>
        </contrib>
        <contrib id="contrib2" contrib-type="author">
          <name name-style="western">
            <surname>Woo</surname>
            <given-names>Hyun-Ki</given-names>
          </name>
          <degrees>MSc</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <xref rid="aff2" ref-type="aff">2</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-4868-6270</ext-link>
        </contrib>
        <contrib id="contrib3" contrib-type="author">
          <name name-style="western">
            <surname>Park</surname>
            <given-names>Dohyun</given-names>
          </name>
          <degrees>MSc</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-9452-212X</ext-link>
        </contrib>
        <contrib id="contrib4" contrib-type="author">
          <name name-style="western">
            <surname>Chang</surname>
            <given-names>Dong Kyung</given-names>
          </name>
          <degrees>MD, PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <xref rid="aff3" ref-type="aff">3</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0001-8925-4629</ext-link>
        </contrib>
        <contrib id="contrib5" contrib-type="author" corresp="yes">
          <name name-style="western">
            <surname>Kang</surname>
            <given-names>Mira</given-names>
          </name>
          <degrees>MD, PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <address>
            <institution>Department of Digital Health</institution>
            <institution>Samsung Advanced Institute of Health Sciences &#38; Technology</institution>
            <institution>Sungkyunkwan University</institution>
            <addr-line>81 Irwon-ro, Gangnam-gu</addr-line>
            <addr-line>Seoul, 06351</addr-line>
            <country>Republic of Korea</country>
            <fax>82 0234101000</fax>
            <phone>82 01099336838</phone>
            <email>kang.mirad@gmail.com</email>
          </address>
          <xref rid="aff4" ref-type="aff">4</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-7842-0035</ext-link>
        </contrib>
      </contrib-group>
      <aff id="aff1">
        <label>1</label>
        <institution>Department of Digital Health</institution>
        <institution>Samsung Advanced Institute of Health Sciences &#38; Technology</institution>
        <institution>Sungkyunkwan University</institution>
        <addr-line>Seoul</addr-line>
        <country>Republic of Korea</country>
      </aff>
      <aff id="aff2">
        <label>2</label>
        <institution>EvidNet Inc</institution>
        <addr-line>Seongnam-si, Gyeonggi-do</addr-line>
        <country>Republic of Korea</country>
      </aff>
      <aff id="aff3">
        <label>3</label>
        <institution>Division of Gastroenterology, Department of Internal Medicine</institution>
        <institution>Samsung Medical Center</institution>
        <institution>Sungkyunkwan University School of Medicine</institution>
        <addr-line>Seoul</addr-line>
        <country>Republic of Korea</country>
      </aff>
      <aff id="aff4">
        <label>4</label>
        <institution>Center for Health Promotion</institution>
        <institution>Samsung Medical Center</institution>
        <institution>Sungkyunkwan University School of Medicine</institution>
        <addr-line>Seoul</addr-line>
        <country>Republic of Korea</country>
      </aff>
      <author-notes>
        <corresp>Corresponding Author: Mira Kang <email>kang.mirad@gmail.com</email></corresp>
      </author-notes>
      <pub-date pub-type="collection">
        <month>7</month>
        <year>2021</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>28</day>
        <month>7</month>
        <year>2021</year>
      </pub-date>
      <volume>9</volume>
      <issue>7</issue>
      <elocation-id>e26000</elocation-id>
      <history>
        <date date-type="received">
          <day>24</day>
          <month>11</month>
          <year>2020</year>
        </date>
        <date date-type="rev-request">
          <day>2</day>
          <month>12</month>
          <year>2020</year>
        </date>
        <date date-type="rev-recd">
          <day>4</day>
          <month>4</month>
          <year>2021</year>
        </date>
        <date date-type="accepted">
          <day>3</day>
          <month>6</month>
          <year>2021</year>
        </date>
      </history>
      <copyright-statement>©KyeongMin Cha, Hyun-Ki Woo, Dohyun Park, Dong Kyung Chang, Mira Kang. Originally published in JMIR Medical Informatics (https://medinform.jmir.org), 28.07.2021.</copyright-statement>
      <copyright-year>2021</copyright-year>
      <license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/">
        <p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Medical Informatics, is properly cited. The complete bibliographic information, a link to the original publication on https://medinform.jmir.org/, as well as this copyright and license information must be included.</p>
      </license>
      <self-uri xlink:href="https://medinform.jmir.org/2021/7/e26000" xlink:type="simple"/>
      <abstract>
        <sec sec-type="background">
          <title>Background</title>
          <p>Pill image recognition systems are difficult to develop due to differences in pill color, which are influenced by external factors such as the illumination from and the presence of a flash.</p>
        </sec>
        <sec sec-type="objective">
          <title>Objective</title>
          <p>In this study, the differences in color between reference images and real-world images were measured to determine the accuracy of a pill recognition system under 12 real-world conditions (ie, different background colors, the presence and absence of a flash, and different exposure values [EVs]).</p>
        </sec>
        <sec sec-type="methods">
          <title>Methods</title>
          <p>We analyzed 19 medications with different features (ie, different colors, shapes, and dosages). The average color difference was calculated based on the color distance between a reference image and a real-world image.</p>
        </sec>
        <sec sec-type="results">
          <title>Results</title>
          <p>For images with black backgrounds, as the EV decreased, the top-1 and top-5 accuracies increased independently of the presence of a flash. The top-5 accuracy for images with black backgrounds increased from 26.8% to 72.6% when the flash was on and increased from 29.5% to 76.8% when the flash was off as the EV decreased. However, the top-5 accuracy increased from 62.1% to 78.4% for images with white backgrounds when the flash was on. The best top-1 accuracy was 51.1% (white background; flash on; EV of +2.0). The best top-5 accuracy was 78.4% (white background; flash on; EV of 0).</p>
        </sec>
        <sec sec-type="conclusions">
          <title>Conclusions</title>
          <p>The accuracy generally increased as the color difference decreased, except for images with black backgrounds and an EV of −2.0. This study revealed that background colors, the presence of a flash, and EVs in real-world conditions are important factors that affect the performance of a pill recognition model.</p>
        </sec>
      </abstract>
      <kwd-group>
        <kwd>pill recognition</kwd>
        <kwd>deep neural network</kwd>
        <kwd>image processing</kwd>
        <kwd>color space</kwd>
        <kwd>color difference</kwd>
        <kwd>pharmaceutical</kwd>
        <kwd>imaging</kwd>
        <kwd>photography</kwd>
        <kwd>neural network</kwd>
        <kwd>mobile phone</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec sec-type="introduction">
      <title>Introduction</title>
      <p>Recently, smartphone cameras have been used to not only take photos but also recognize objects via models with enhanced performance and artificial intelligence models [<xref ref-type="bibr" rid="ref1">1</xref>,<xref ref-type="bibr" rid="ref2">2</xref>]. The study of photo recognition is not only limited to a person or a thing, such as a car; it can even extend to analyzing a person’s hair color or specifying the color of an object, such as a red car [<xref ref-type="bibr" rid="ref3">3</xref>].</p>
      <p>Many researchers are exploring new algorithms related to color in the field of image learning. For example, gray-scale images can be colored automatically by using a convolutional neural network (CNN) through a new method [<xref ref-type="bibr" rid="ref4">4</xref>]. Additionally, Lunit—a well-known medical artificial intelligence company—presented an algorithm that enhances the color of an image as if it was corrected by a professional [<xref ref-type="bibr" rid="ref5">5</xref>].</p>
      <p>Color is an important component that is used to recognize objects, especially pharmaceuticals. The United States Federal Drug Administration approves solid pharmaceuticals and pills, which have physical identifiers. Each pill should have its own unique physical features, that is, unique shapes, sizes, colors, and imprints (the letter or number carved onto the medicine), which need to be approved [<xref ref-type="bibr" rid="ref6">6</xref>]. However, in some cases, all features of medicines, except for the color, can be the same [<xref ref-type="bibr" rid="ref7">7</xref>]. For instance, Amaryl (glimepiride)—an oral pill for controlling the blood sugar levels of patients with diabetes—has identical physical features across all 1-mg, 2-mg, and 4-mg dosages except for their colors (<xref rid="figure1" ref-type="fig">Figure 1</xref>).</p>
      <fig id="figure1" position="float">
        <label>Figure 1</label>
        <caption>
          <p>Examples of pills with the same physical features (except for color).</p>
        </caption>
        <graphic xlink:href="medinform_v9i7e26000_fig1.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
      <p>In 2016, the National Institutes of Health hosted a competition to promote the easy recognition of unknown medications. Even though the competition used reference images that were photographed in a professionally supervised setting, the accuracy of drug recognition was not very high. Since the quality of a picture taken by a smartphone can be greatly influenced by illumination (lighting), shading, and background color, it is difficult to develop a system for image recognition [<xref ref-type="bibr" rid="ref8">8</xref>]. Pill colors are especially affected by lighting hues and fluorescent light (<xref rid="figure2" ref-type="fig">Figure 2</xref>). In addition, there are no quantitative analyses for determining how a pill recognition system can be affected by external factors [<xref ref-type="bibr" rid="ref6">6</xref>,<xref ref-type="bibr" rid="ref9">9</xref>]. The most recent work related to drug recognition studies that involve deep learning has been conducted on wearable smart glasses developed for patients with visual impairment. Additionally, drug detection has been enhanced with feature pyramid networks and CNNs. However, despite recent improvements in pill recognition via a model approach, the effects of environmental factors have not been analyzed [<xref ref-type="bibr" rid="ref10">10</xref>,<xref ref-type="bibr" rid="ref11">11</xref>].</p>
      <p>In this study, we sought to determine the accuracy of a pill recognition system under 12 different real-world conditions (ie, different background colors, the presence and absence of a flash, and different exposure values [EVs]).</p>
      <fig id="figure2" position="float">
        <label>Figure 2</label>
        <caption>
          <p>Effects that external environments (fluorescent lighting) have on the colors of pills in images. A: Flash is on. B: Flash is off.</p>
        </caption>
        <graphic xlink:href="medinform_v9i7e26000_fig2.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
    </sec>
    <sec sec-type="methods">
      <title>Methods</title>
      <sec>
        <title>Photo Shooting Equipment and Image Preprocessing</title>
        <sec>
          <title>Data Acquisition Process for Reference Images</title>
          <p>The smartphone used in this study was the Samsung Galaxy S7 Edge, which was equipped with a dual-pixel 12.0-megapixel front camera with an aperture of f/1.7. An already intact camera app and the autofocus feature of the smartphone software were used. For lighting, 2 light-emitting diode panels were used. The flash was positioned at a height of 20 cm, and the intensity of illumination was set to 1145 lux. The background color was black, and the flash was turned off (<xref rid="figure3" ref-type="fig">Figure 3</xref>).</p>
          <fig id="figure3" position="float">
            <label>Figure 3</label>
            <caption>
              <p>Photographic equipment (photo box) for taking images under the reference condition. LED: light-emitting diode.</p>
            </caption>
            <graphic xlink:href="medinform_v9i7e26000_fig3.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
        </sec>
        <sec>
          <title>Data Acquisition Process for Real-World Images</title>
          <p>The photos were taken under 12 conditions that involved different background colors (black or white), the presence or absence of a flash, and 3 different EVs (+2.0, 0, and −2.0; <xref ref-type="table" rid="table1">Table 1</xref>).</p>
          <table-wrap position="float" id="table1">
            <label>Table 1</label>
            <caption>
              <p>Real-world image sets for the 12 conditions.</p>
            </caption>
            <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
              <col width="250"/>
              <col width="250"/>
              <col width="250"/>
              <col width="250"/>
              <thead>
                <tr valign="top">
                  <td>Image set name</td>
                  <td colspan="3">Condition</td>
                </tr>
                <tr valign="top">
                  <td>
                    <break/>
                  </td>
                  <td>Background color</td>
                  <td>Flash</td>
                  <td>Exposure value</td>
                </tr>
              </thead>
              <tbody>
                <tr valign="top">
                  <td>B_O_EV-2.0</td>
                  <td>Black</td>
                  <td>On</td>
                  <td>−2.0</td>
                </tr>
                <tr valign="top">
                  <td>B_O_EV0</td>
                  <td>Black</td>
                  <td>On</td>
                  <td>0</td>
                </tr>
                <tr valign="top">
                  <td>B_O_EV+2.0</td>
                  <td>Black</td>
                  <td>On</td>
                  <td>+2.0</td>
                </tr>
                <tr valign="top">
                  <td>W_O_EV-2.0</td>
                  <td>White</td>
                  <td>On</td>
                  <td>−2.0</td>
                </tr>
                <tr valign="top">
                  <td>W_O_EV0</td>
                  <td>White</td>
                  <td>On</td>
                  <td>0</td>
                </tr>
                <tr valign="top">
                  <td>W_O_EV+2.0</td>
                  <td>White</td>
                  <td>On</td>
                  <td>+2.0</td>
                </tr>
                <tr valign="top">
                  <td>B_X_EV-2.0</td>
                  <td>Black</td>
                  <td>Off</td>
                  <td>−2.0</td>
                </tr>
                <tr valign="top">
                  <td>B_X_EV0</td>
                  <td>Black</td>
                  <td>Off</td>
                  <td>0</td>
                </tr>
                <tr valign="top">
                  <td>B_X_EV+2.0</td>
                  <td>Black</td>
                  <td>Off</td>
                  <td>+2.0</td>
                </tr>
                <tr valign="top">
                  <td>W_X_EV-2.0</td>
                  <td>White</td>
                  <td>Off</td>
                  <td>−2.0</td>
                </tr>
                <tr valign="top">
                  <td>W_X_EV0</td>
                  <td>White</td>
                  <td>Off</td>
                  <td>0</td>
                </tr>
                <tr valign="top">
                  <td>W_X_EV+2.0</td>
                  <td>White</td>
                  <td>Off</td>
                  <td>+2.0</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
        </sec>
        <sec>
          <title>Image Preprocessing</title>
          <p><xref rid="figure4" ref-type="fig">Figure 4</xref> shows the 9 steps for processing images of the region of interest (ROI). This process was conducted to improve deep neural network–based image recognition accuracy by eliminating image noise and improving the quality of the picture [<xref ref-type="bibr" rid="ref12">12</xref>]. Python 3.5.3 and the OpenCV 3.2 library were used to process each image [<xref ref-type="bibr" rid="ref13">13</xref>]. The photos were converted to gray-scale images and blurred to reduce image noise. Afterward, we experimented with applying the different threshold options of the OpenCV library to each pill image. The Canny edge detector algorithm was used to define the ROI (a drug’s edge) [<xref ref-type="bibr" rid="ref14">14</xref>,<xref ref-type="bibr" rid="ref15">15</xref>]. Next, the processed picture was combined with the original picture, and all other areas except for the pill were omitted. Finally, the inner edge of the pill image was set within a square-shaped boundary, and this image was saved.</p>
          <fig id="figure4" position="float">
            <label>Figure 4</label>
            <caption>
              <p>Image preprocessing algorithm for extracting an object. Step 1 (A): take pictures using a smartphone. Step 2 (B): convert image to a gray-scale image. Step 3 (C): use the blur and threshold options to process the image. Step 4 (D): Canny edge detection. Step 5 (E): create a black background. Step 6 (F): use the FillPoly function to process the image. Step 7 (G): use the bitwise operation to combine the original image with the processed image. Step 8 (H): draw a rectangle-shaped boundary and perform object extraction. Step 9 (I): use the final pill image as the reference image to train the model.</p>
            </caption>
            <graphic xlink:href="medinform_v9i7e26000_fig4.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
        </sec>
      </sec>
      <sec>
        <title>Test Drug Type</title>
        <p>A total of 19 different types of pills were used in this study. The different features of the pills (7 colors, 7 shapes, and 7 types) can be seen in <xref ref-type="table" rid="table2">Table 2</xref>. <xref rid="figure5" ref-type="fig">Figure 5</xref> shows all of the example images of the pills; the numbers on the upper left-hand corners were the labels used in the deep learning process.</p>
        <table-wrap position="float" id="table2">
          <label>Table 2</label>
          <caption>
            <p>Characteristics of the reference set (shape, color, and dosage form).</p>
          </caption>
          <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
            <col width="30"/>
            <col width="470"/>
            <col width="500"/>
            <thead>
              <tr valign="top">
                <td colspan="2">Characteristic</td>
                <td>Instances, n</td>
              </tr>
            </thead>
            <tbody>
              <tr valign="top">
                <td colspan="3">
                  <bold>Shape</bold>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig10.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>6</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig11.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>3</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig12.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>4</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig13.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>1</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig14.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>2</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig15.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>2</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>
                  <inline-graphic xlink:href="medinform_v9i7e26000_fig16.png" xlink:type="simple" mimetype="image"/>
                </td>
                <td>1</td>
              </tr>
              <tr valign="top">
                <td colspan="3">
                  <bold>Color</bold>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Pink</td>
                <td>1</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Blue</td>
                <td>5</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>White</td>
                <td>5</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Yellow</td>
                <td>4</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Green</td>
                <td>1</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Yellow-green</td>
                <td>2</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Orange</td>
                <td>1</td>
              </tr>
              <tr valign="top">
                <td colspan="3">
                  <bold>Dosage form</bold>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Film-coated tablet</td>
                <td>10</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Sugar-coated tablet</td>
                <td>2</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Uncoated tablet</td>
                <td>6</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>Hard capsule</td>
                <td>1</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <fig id="figure5" position="float">
          <label>Figure 5</label>
          <caption>
            <p>Sample images of the pills used in the experiment. Yellow pills include pills 6, 12, 13, 14, and 16. Green pills include pills 5, 7, and 11. “Other” pills include the rest of the pills.</p>
          </caption>
          <graphic xlink:href="medinform_v9i7e26000_fig5.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
        </fig>
      </sec>
      <sec>
        <title>Color Difference</title>
        <sec>
          <title>Factors Affecting the Color</title>
          <p><xref rid="figure6" ref-type="fig">Figure 6</xref> shows the pill images that were taken under the reference condition and under the 12 real-world conditions. The colors of the pills differed based on the background colors, the presence of a flash, and EVs.</p>
          <fig id="figure6" position="float">
            <label>Figure 6</label>
            <caption>
              <p>Representative examples of pill images. A: reference condition. B: 12 real-world conditions (image sets: B_O_EV-2.0, B_O_EV0, B_O_EV+2.0, W_O_EV-2.0, W_O_EV0, W_O_EV+2.0, B_X_EV-2.0, B_X_EV0, B_X_EV+2.0, W_X_EV-2.0, W_X_EV0, and W_X_EV+2.0).</p>
            </caption>
            <graphic xlink:href="medinform_v9i7e26000_fig6.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
        </sec>
        <sec>
          <title>Color Space</title>
          <p>The spatial color concept, which is expressed as a 3D chart, was used to calculate the differences in color quantitatively. The Commission Internationale de l’Eclairage (CIE) L*a*b* color space is a spatial color chart that is used worldwide to represent colors that can be detected by the human eye. After the red, green, and blue (RGB) color space is converted to a CIE XYZ color space, it is then converted to a CIE L*a*b* color space that separates the lighting and the color [<xref ref-type="bibr" rid="ref16">16</xref>]. The CIE and CIE 1976 L*a*b* include some colors that human eyes cannot detect. L* represents brightness with values that range from 0 to 100. Parameters a* (green to red) and b* (blue to yellow) range from −120 to 120 [<xref ref-type="bibr" rid="ref17">17</xref>,<xref ref-type="bibr" rid="ref18">18</xref>].</p>
          <p>To quantify the color of the ROI, the process shown in <xref rid="figure7" ref-type="fig">Figure 7</xref> was followed. By using the RGB analysis plugin of the ImageJ 1.52 program (National Institutes of Health), the RGB color space was changed to an XYZ color space [<xref ref-type="bibr" rid="ref19">19</xref>] via the following equations:</p>
          <p>
            <disp-formula>X = 0.4303R + 0.3416G + 0.1784B</disp-formula>
            <bold>(1)</bold>
          </p>
          <p>
            <disp-formula>Y = 0.2219R + 0.7068G + 0.0713B</disp-formula>
            <bold>(2)</bold>
          </p>
          <p>
            <disp-formula>Z = 0.0202R + 0.1296G + 0.9393B</disp-formula>
            <bold>(3)</bold>
          </p>
          <p>The XYZ color space was then converted to an L*a*b* color space, as follows:</p>
          <p>
            <disp-formula>L* = 116f(Y/Y<sub>n</sub>) – 16</disp-formula>
            <bold>(4)</bold>
          </p>
          <p>
            <disp-formula>a* = 500(f[X/X<sub>n</sub>] – f[Y/Y<sub>n</sub>])</disp-formula>
            <bold>(5)</bold>
          </p>
          <p>
            <disp-formula>b* = 200(f[Y/Y<sub>n</sub>] − f(Z/Z<sub>n</sub>)]</disp-formula>
            <bold>(6)</bold>
          </p>
          <p>
            <disp-formula>
              <graphic xlink:href="medinform_v9i7e26000_fig17.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
            </disp-formula>
          </p>
          <p>
            <disp-formula>f(q) = 7.787q + (16/116) (q≤0.008856)</disp-formula>
            <bold>(8)</bold>
          </p>
          <p>After computing the values of L*, a*, and b*, ∆E was calculated with the following equation, where ∆E is the color difference:</p>
          <p>
            <disp-formula>
              <graphic xlink:href="medinform_v9i7e26000_fig18.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
            </disp-formula>
          </p>
          <p>The color differences were calculated by subtracting the color distances in images taken under the real-world conditions from the color distances in images taken under the reference condition. The color distance of 19 medications was presented as means with SDs. A three-way repeated measures analysis of variance (ANOVA), which was followed by a Bonferroni posthoc test, was used to examine the effects that background color (black vs white), the presence of a flash (flash on vs flash off), and EV (+2.0, 0, and −2.0) had on color differences. A <italic>P</italic> value of &#60;.05 was considered to be statistically significant. The statistical analysis was performed by using R software, version 3.6.2 (The R Foundation).</p>
          <fig id="figure7" position="float">
            <label>Figure 7</label>
            <caption>
              <p>Color space conversion process. The conversion of RGB to CIE L*a*b* involves equations 1-8. △E is calculated by using equation 9. CIE: Commission Internationale de l’Eclairage; RGB: red, green, and blue.</p>
            </caption>
            <graphic xlink:href="medinform_v9i7e26000_fig7.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
        </sec>
      </sec>
      <sec>
        <title>Model Learning Process</title>
        <p>A total of 34,000 images were taken manually by using a smartphone. We used images without augmentation. The number of images in the training set was 19,000, and the number of images in the validation set was 5000. We used 5000 images for the tests conducted under the reference condition and 5000 images for the tests conducted under real-world conditions.</p>
        <p>The model architecture used in this study was a CNN that used a deep learning algorithm (GoogLeNet) with 22 layers and 9 inception modules [<xref ref-type="bibr" rid="ref20">20</xref>]. We used the NVIDIA Deep Learning Graphics Processing Unit Training System (DIGITS) for the learning framework [<xref ref-type="bibr" rid="ref21">21</xref>]. In this framework, top-1 accuracy refers to the extent to which a model’s answer exactly matches the expected answer. Top-5 accuracy refers to the extent to which the five highest model answers match the expected answer. Accuracy refers to the number of correct predictions divided by the total number of predictions. Loss refers to the penalty for a bad prediction. GoogLeNet has two auxiliary classifiers for combating the vanishing gradient problem. Loss1 is the first auxiliary classifier’s output, and Loss2 is the second auxiliary classifier’s output [<xref ref-type="bibr" rid="ref20">20</xref>].</p>
      </sec>
    </sec>
    <sec sec-type="results">
      <title>Results</title>
      <p><xref rid="figure8" ref-type="fig">Figure 8</xref> shows the results of model training via the DIGITS framework. Our model recognized the correct pill with a top-1 accuracy of 84.54% and a top-5 accuracy of 99.89% for the reference test image set. <xref rid="figure9" ref-type="fig">Figure 9</xref> shows the top-1 and top-5 accuracies and the average color differences for images taken under the 12 real-world conditions. For images with black backgrounds, as the EV decreased, the top-1 and top-5 accuracies increased independently of the presence of a flash. The top-5 accuracy for images with black backgrounds increased from 26.8% to 72.6% when the flash was on and increased from 29.5% to 76.8% when the flash was off as the EV decreased. However, the top-5 accuracy increased from 62.1% to 78.4% for images with white backgrounds when the flash was on. The best top-1 accuracy was 51.1% (white background; flash on; EV of +2.0). The best top-5 accuracy was 78.4% (white background; flash on; EV of 0). The results of the repeated measures ANOVA and the Bonferroni posthoc test for over 19 medications, as displayed in <xref rid="figure9" ref-type="fig">Figure 9</xref>, were used to assess the variances in color differences. Color differences based on EV values varied significantly (all <italic>P</italic> values in the repeated measures ANOVA were &#60;.05). The results of the repeated measures ANOVA for color differences among 19 medications are as follows: <italic>P</italic>=.02 (black background and flash on); <italic>P</italic>=.02 (black background and flash off); <italic>P</italic>&#60;.001 (white background and flash on); and <italic>P&#60;</italic>.001 (white background and flash off). With regard to the Bonferroni posthoc test results, for images with white backgrounds that were taken with the flash turned on or off, all <italic>P</italic> values were &#60;.001 between the image groups with different EVs. Color differences among images with black backgrounds that were taken with the flash turned on were statistically different between the EV +2.0 and EV 0 groups (<italic>P=.</italic>004) and between the EV0 and EV −2.0 groups (<italic>P</italic>=.004). Color differences among images with black backgrounds that were taken with the flash turned off were significantly different between the EV +2.0 and EV 0 groups (<italic>P</italic>=.005) and between the EV 0 and EV −2.0 groups (<italic>P</italic>=.03). When excluding the conditions of black backgrounds and an EV of −2.0, the accuracy generally increased as the color difference decreased. When the 19 medications were sorted into 3 groups by pill color (ie, yellow, green, and other), the color differences among the color subgroups were not dependent on the colors of pills in images with white backgrounds. However, the color differences among the color subgroups were dependent on the colors of pills in images with black backgrounds. The pill color, as well as environmental factors such as the background color, the presence of a flash, and EVs, can affect the accuracy of a pill recognition system (<xref rid="figure9" ref-type="fig">Figure 9</xref>).</p>
      <fig id="figure8" position="float">
        <label>Figure 8</label>
        <caption>
          <p>Model learning results. Top-1 accuracy refers to the extent to which a model’s answer exactly matches the expected answer. Top-5 accuracy refers to the extent to which the five highest model answers match the expected answer. Accuracy refers to the number of correct predictions divided by the total number of predictions. “(train)” refers to the training process and “(val)” refers to the validation process. Loss refers to the penalty for a bad prediction. Loss1 and Loss2 are two auxiliary classifiers of GoogLeNet.</p>
        </caption>
        <graphic xlink:href="medinform_v9i7e26000_fig8.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
      <fig id="figure9" position="float">
        <label>Figure 9</label>
        <caption>
          <p>A: Comparison of top-1 and top-5 accuracies. B: Comparison of color differences based on background color, the presence of a flash, and EV. Color differences are presented as means with SDs. EV: exposure value.</p>
        </caption>
        <graphic xlink:href="medinform_v9i7e26000_fig9.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
    </sec>
    <sec sec-type="discussion">
      <title>Discussion</title>
      <p>The National Library of Medicine Pill Image Recognition Challenge was hosted by the National Institutes of Health in 2016. The three winners obtained a mean average precision of 0.27, 0.09, and 0.08. Their top-5 accuracy values were 43%, 12%, and 11% for 5000 query and consumer images. Although the competition can be seen as a promising initial step for pill identification, solid medication recognition systems are still in the difficult process of development. The reason for this seems to be that the quality of real-world images tends to be affected by illumination, shading, background color, or shooting direction, unlike reference images.</p>
      <p>In our study, it was shown that smaller color differences yielded higher recognition accuracy except for images with black backgrounds and images with an EV of −2.0. In other words, the accuracy of pill recognition is generally inversely proportional to color difference. These exceptions may have been due to the following: (1) it is believed that the Euclidean distance between two colors may not be proportional to the precise color difference; and (2) other factors, such as pill imprints, shapes, and colors, can influence the recognition rate.</p>
      <p>Color differences are a crucial problem, especially for pill recognition systems. In previous studies, a few methods were suggested for enhancing pill recognition. MedSnap (MedSnap LLC) is a smartphone-based pill identification system that uses an adaptive color correction algorithm. However, despite the fact that it corrects for color differences, this system has a disadvantage; it has to use a controlled surface to improve its pill recognition rate [<xref ref-type="bibr" rid="ref22">22</xref>]. In a study on a deep learning model for dermatology, the authors recommended retaking the photo if it is of poor quality due to brightness or noise levels. Thus, adjusting the camera settings to match the optimized settings for a photo can yield better quality photos and improve the accuracy of medicine recognition systems [<xref ref-type="bibr" rid="ref23">23</xref>,<xref ref-type="bibr" rid="ref24">24</xref>]. Furthermore, the enhancement of drug detection via a model approach for minimizing color differences is warranted in the future.</p>
      <p>This study reveals that background colors, the presence of a flash, and EVs in real-world conditions are important factors that affect the performance of pill recognition models. Depending on certain image conditions, pill colors can also affect pill recognition accuracy. However, this factor may not affect accuracy as much as environmental factors [<xref ref-type="bibr" rid="ref25">25</xref>]. Further study is warranted on other factors, such as photography angles and heights, pill shapes, background colors, tablet and capsule conditions, and smartphone models that affect color differences and pill recognition accuracy [<xref ref-type="bibr" rid="ref26">26</xref>-<xref ref-type="bibr" rid="ref28">28</xref>].</p>
    </sec>
  </body>
  <back>
    <app-group/>
    <glossary>
      <title>Abbreviations</title>
      <def-list>
        <def-item>
          <term id="abb1">ANOVA</term>
          <def>
            <p>analysis of variance</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb2">CIE</term>
          <def>
            <p>Commission Internationale de l’Eclairage</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb3">CNN</term>
          <def>
            <p>convolutional neural network</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb4">DIGITS</term>
          <def>
            <p>Deep Learning Graphics Processing Unit Training System</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb5">EV</term>
          <def>
            <p>exposure value</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb6">RGB</term>
          <def>
            <p>red, green, and blue</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb7">ROI</term>
          <def>
            <p>region of interest</p>
          </def>
        </def-item>
      </def-list>
    </glossary>
    <ack>
      <p>This work was supported by a National IT Industry Promotion Agency grant funded by the Ministry of Science and ICT and Ministry of Health and Welfare (project number: S1906-21-1001; Development Project of The Precision Medicine Hospital Information System). This work was also supported by the Technology Innovation Program (program 20005021: Establishment of Standardization and Anonymization Guidelines Based on a Common Data Model; program 20011642: common data model–based algorithm for treatment protocol service system development and spread), which was funded by the Ministry of Trade, Industry &#38; Energy in Korea.</p>
    </ack>
    <fn-group>
      <fn fn-type="conflict">
        <p>None declared.</p>
      </fn>
    </fn-group>
    <ref-list>
      <ref id="ref1">
        <label>1</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Rivenson</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Ceylan Koydemir</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Wang</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Wei</surname>
              <given-names>Z</given-names>
            </name>
            <name name-style="western">
              <surname>Ren</surname>
              <given-names>Z</given-names>
            </name>
            <name name-style="western">
              <surname>Günaydın</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Zhang</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Göröcs</surname>
              <given-names>Z</given-names>
            </name>
            <name name-style="western">
              <surname>Liang</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Tseng</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Ozcan</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>Deep learning enhanced mobile-phone microscopy</article-title>
          <source>ACS Photonics</source>
          <year>2018</year>
          <month>03</month>
          <day>15</day>
          <volume>5</volume>
          <issue>6</issue>
          <fpage>2354</fpage>
          <lpage>2364</lpage>
          <pub-id pub-id-type="doi">10.1021/acsphotonics.8b00146</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref2">
        <label>2</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Fan</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Zhu</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Du</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Tang</surname>
              <given-names>Y</given-names>
            </name>
          </person-group>
          <article-title>A novel color based object detection and localization algorithm</article-title>
          <year>2010</year>
          <conf-name>2010 3rd International Congress on Image and Signal Processing</conf-name>
          <conf-date>October 16-18, 2010</conf-date>
          <conf-loc>Yantai, China</conf-loc>
          <pub-id pub-id-type="doi">10.1109/CISP.2010.5646875</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref3">
        <label>3</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>van de Weijer</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Schmid</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Verbeek</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Larlus</surname>
              <given-names>D</given-names>
            </name>
          </person-group>
          <article-title>Learning color names for real-world applications</article-title>
          <source>IEEE Trans Image Process</source>
          <year>2009</year>
          <month>07</month>
          <volume>18</volume>
          <issue>7</issue>
          <fpage>1512</fpage>
          <lpage>1523</lpage>
          <pub-id pub-id-type="doi">10.1109/TIP.2009.2019809</pub-id>
          <pub-id pub-id-type="medline">19482579</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref4">
        <label>4</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Iizuka</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Simo-Serra</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Ishikawa</surname>
              <given-names>H</given-names>
            </name>
          </person-group>
          <article-title>Let there be color!: joint end-to-end learning of global and local image priors for automatic image colorization with simultaneous classification</article-title>
          <source>ACM Trans Graph</source>
          <year>2016</year>
          <month>07</month>
          <day>11</day>
          <volume>35</volume>
          <issue>4</issue>
          <fpage>1</fpage>
          <lpage>11</lpage>
          <pub-id pub-id-type="doi">10.1145/2897824.2925974</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref5">
        <label>5</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Park</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Lee</surname>
              <given-names>JY</given-names>
            </name>
            <name name-style="western">
              <surname>Yoo</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Kweon</surname>
              <given-names>IS</given-names>
            </name>
          </person-group>
          <article-title>Distort-and-recover: Color enhancement using deep reinforcement learning</article-title>
          <source>arXiv.</source>
          <comment>Preprint posted online on April 16, 2018
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://arxiv.org/pdf/1804.04450.pdf"/>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref6">
        <label>6</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Yaniv</surname>
              <given-names>Z</given-names>
            </name>
            <name name-style="western">
              <surname>Faruque</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Howe</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Dunn</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Sharlip</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Bond</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Perillan</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Bodenreider</surname>
              <given-names>O</given-names>
            </name>
            <name name-style="western">
              <surname>Ackerman</surname>
              <given-names>MJ</given-names>
            </name>
            <name name-style="western">
              <surname>Yoo</surname>
              <given-names>TS</given-names>
            </name>
          </person-group>
          <article-title>The national library of medicine pill image recognition challenge: An initial report</article-title>
          <year>2017</year>
          <month>08</month>
          <day>17</day>
          <conf-name>2016 IEEE Applied Imagery Pattern Recognition Workshop (AIPR)</conf-name>
          <conf-date>October 18-20, 2016</conf-date>
          <conf-loc>Washington, DC, USA</conf-loc>
          <pub-id pub-id-type="doi">10.1109/AIPR.2016.8010584</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref7">
        <label>7</label>
        <nlm-citation citation-type="web">
          <article-title>NLM to retire Pillbox on January 29, 2021</article-title>
          <source>National Library of Medicine</source>
          <access-date>2021-07-06</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://pillbox.nlm.nih.gov">https://pillbox.nlm.nih.gov</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref8">
        <label>8</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Zeng</surname>
              <given-names>X</given-names>
            </name>
            <name name-style="western">
              <surname>Cao</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Zhang</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>MobileDeepPill: A small-footprint mobile deep learning system for recognizing unconstrained pill images</article-title>
          <year>2017</year>
          <month>06</month>
          <conf-name>MobiSys'17: The 15th Annual International Conference on Mobile Systems, Applications, and Services</conf-name>
          <conf-date>June 19-23, 2017</conf-date>
          <conf-loc>Niagara Falls, New York, USA</conf-loc>
          <fpage>56</fpage>
          <lpage>67</lpage>
          <pub-id pub-id-type="doi">10.1145/3081333.3081336</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref9">
        <label>9</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Larios Delgado</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Usuyama</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Hall</surname>
              <given-names>AK</given-names>
            </name>
            <name name-style="western">
              <surname>Hazen</surname>
              <given-names>RJ</given-names>
            </name>
            <name name-style="western">
              <surname>Ma</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Sahu</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Lundin</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Fast and accurate medication identification</article-title>
          <source>NPJ Digit Med</source>
          <year>2019</year>
          <month>02</month>
          <day>28</day>
          <volume>2</volume>
          <fpage>10</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://doi.org/10.1038/s41746-019-0086-0"/>
          </comment>
          <pub-id pub-id-type="doi">10.1038/s41746-019-0086-0</pub-id>
          <pub-id pub-id-type="medline">31304359</pub-id>
          <pub-id pub-id-type="pii">86</pub-id>
          <pub-id pub-id-type="pmcid">PMC6550183</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref10">
        <label>10</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Chang</surname>
              <given-names>WJ</given-names>
            </name>
            <name name-style="western">
              <surname>Chen</surname>
              <given-names>LB</given-names>
            </name>
            <name name-style="western">
              <surname>Hsu</surname>
              <given-names>CH</given-names>
            </name>
            <name name-style="western">
              <surname>Chen</surname>
              <given-names>JH</given-names>
            </name>
            <name name-style="western">
              <surname>Yang</surname>
              <given-names>TC</given-names>
            </name>
            <name name-style="western">
              <surname>Lin</surname>
              <given-names>CP</given-names>
            </name>
          </person-group>
          <article-title>MedGlasses: A wearable smart-glasses-based drug pill recognition system using deep learning for visually impaired chronic patients</article-title>
          <source>IEEE Access</source>
          <year>2020</year>
          <volume>8</volume>
          <fpage>17013</fpage>
          <lpage>17024</lpage>
          <pub-id pub-id-type="doi">10.1109/access.2020.2967400</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref11">
        <label>11</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Ou</surname>
              <given-names>YY</given-names>
            </name>
            <name name-style="western">
              <surname>Tsai</surname>
              <given-names>AC</given-names>
            </name>
            <name name-style="western">
              <surname>Zhou</surname>
              <given-names>XP</given-names>
            </name>
            <name name-style="western">
              <surname>Wang</surname>
              <given-names>JF</given-names>
            </name>
          </person-group>
          <article-title>Automatic drug pills detection based on enhanced feature pyramid network and convolution neural networks</article-title>
          <source>IET Computer Vision</source>
          <year>2020</year>
          <month>01</month>
          <day>20</day>
          <volume>14</volume>
          <issue>1</issue>
          <fpage>9</fpage>
          <lpage>17</lpage>
          <pub-id pub-id-type="doi">10.1049/iet-cvi.2019.0171</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref12">
        <label>12</label>
        <nlm-citation citation-type="book">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Parker</surname>
              <given-names>JR</given-names>
            </name>
          </person-group>
          <source>Algorithms for Image Processing and Computer Vision</source>
          <year>2010</year>
          <publisher-loc>New Jersey, United States</publisher-loc>
          <publisher-name>John Wiley &#38; Sons</publisher-name>
          <fpage>1118021886</fpage>
        </nlm-citation>
      </ref>
      <ref id="ref13">
        <label>13</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Bradski</surname>
              <given-names>G</given-names>
            </name>
            <name name-style="western">
              <surname>Kaehler</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>OpenCV</article-title>
          <source>Dr Dobb's journal of software tools</source>
          <year>2000</year>
          <volume>3</volume>
          <fpage>1</fpage>
          <lpage>81</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://roswiki.autolabor.com.cn/attachments/Events(2f)ICRA2010Tutorial/ICRA_2010_OpenCV_Tutorial.pdf"/>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref14">
        <label>14</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Cunha</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Adão</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Trigueiros</surname>
              <given-names>P</given-names>
            </name>
          </person-group>
          <article-title>HelpmePills: A mobile pill recognition tool for elderly persons</article-title>
          <source>Procedia Technology</source>
          <year>2014</year>
          <volume>16</volume>
          <fpage>1523</fpage>
          <lpage>1532</lpage>
          <pub-id pub-id-type="doi">10.1016/j.protcy.2014.10.174</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref15">
        <label>15</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Canny</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>A computational approach to edge detection</article-title>
          <source>Readings in Computer Vision</source>
          <year>1987</year>
          <fpage>184</fpage>
          <lpage>203</lpage>
          <pub-id pub-id-type="doi">10.1016/b978-0-08-051581-6.50024-6</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref16">
        <label>16</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Rachmadi</surname>
              <given-names>RF</given-names>
            </name>
            <name name-style="western">
              <surname>Purnama</surname>
              <given-names>IKE</given-names>
            </name>
          </person-group>
          <article-title>Vehicle color recognition using convolutional neural network</article-title>
          <source>arXiv.</source>
          <comment>Preprint posted online on August 15, 2018
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://arxiv.org/pdf/1510.07391.pdf"/>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref17">
        <label>17</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>León</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Mery</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Pedreschi</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>León</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Color measurement in L∗a∗b∗ units from RGB digital images</article-title>
          <source>Food Res Int</source>
          <year>2006</year>
          <month>12</month>
          <volume>39</volume>
          <issue>10</issue>
          <fpage>1084</fpage>
          <lpage>1091</lpage>
          <pub-id pub-id-type="doi">10.1016/j.foodres.2006.03.006</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref18">
        <label>18</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Robertson</surname>
              <given-names>AR</given-names>
            </name>
          </person-group>
          <article-title>The CIE 1976 Color-Difference Formulae</article-title>
          <source>Color Res Appl</source>
          <year>1977</year>
          <volume>2</volume>
          <issue>1</issue>
          <fpage>7</fpage>
          <lpage>11</lpage>
          <pub-id pub-id-type="doi">10.1002/j.1520-6378.1977.tb00104.x</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref19">
        <label>19</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>CA</given-names>
            </name>
            <name name-style="western">
              <surname>Rasband</surname>
              <given-names>WS</given-names>
            </name>
            <name name-style="western">
              <surname>Eliceiri</surname>
              <given-names>KW</given-names>
            </name>
          </person-group>
          <article-title>NIH Image to ImageJ: 25 years of image analysis</article-title>
          <source>Nat Methods</source>
          <year>2012</year>
          <month>07</month>
          <volume>9</volume>
          <issue>7</issue>
          <fpage>671</fpage>
          <lpage>675</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/22930834"/>
          </comment>
          <pub-id pub-id-type="doi">10.1038/nmeth.2089</pub-id>
          <pub-id pub-id-type="medline">22930834</pub-id>
          <pub-id pub-id-type="pmcid">PMC5554542</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref20">
        <label>20</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Szegedy</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Liu</surname>
              <given-names>W</given-names>
            </name>
            <name name-style="western">
              <surname>Jia</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Sermanet</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Reed</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Anguelov</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Erhan</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Vanhoucke</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Rabinovich</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>Going deeper with convolutions</article-title>
          <year>2015</year>
          <conf-name>2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)</conf-name>
          <conf-date>June 7-12, 2015</conf-date>
          <conf-loc>Boston, MA, USA</conf-loc>
          <pub-id pub-id-type="doi">10.1109/cvpr.2015.7298594</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref21">
        <label>21</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Yeager</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Bernauer</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Gray</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Houston</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>DIGITS: the Deep learning GPU Training System</article-title>
          <year>2015</year>
          <conf-name>ICML 2015 AutoML Workshop</conf-name>
          <conf-date>July 11, 2015</conf-date>
          <conf-loc>Lille, France</conf-loc>
          <publisher-loc>DIGITS</publisher-loc>
        </nlm-citation>
      </ref>
      <ref id="ref22">
        <label>22</label>
        <nlm-citation citation-type="web">
          <article-title>System and method of adaptive color correction for pill recognition in digital images</article-title>
          <source>Google Patents</source>
          <access-date>2021-07-09</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://patentimages.storage.googleapis.com/68/38/45/c944a87f5be101/WO2014070871A1.pdf">https://patentimages.storage.googleapis.com/68/38/45/c944a87f5be101/WO2014070871A1.pdf</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref23">
        <label>23</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Han</surname>
              <given-names>SS</given-names>
            </name>
            <name name-style="western">
              <surname>Park</surname>
              <given-names>GH</given-names>
            </name>
            <name name-style="western">
              <surname>Lim</surname>
              <given-names>W</given-names>
            </name>
            <name name-style="western">
              <surname>Kim</surname>
              <given-names>MS</given-names>
            </name>
            <name name-style="western">
              <surname>Na</surname>
              <given-names>JI</given-names>
            </name>
            <name name-style="western">
              <surname>Park</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Chang</surname>
              <given-names>SE</given-names>
            </name>
          </person-group>
          <article-title>Deep neural networks show an equivalent and often superior performance to dermatologists in onychomycosis diagnosis: Automatic construction of onychomycosis datasets by region-based convolutional deep neural network</article-title>
          <source>PLoS One</source>
          <year>2018</year>
          <month>01</month>
          <day>19</day>
          <volume>13</volume>
          <issue>1</issue>
          <fpage>e0191493</fpage>
          <pub-id pub-id-type="doi">10.1371/journal.pone.0191493</pub-id>
          <pub-id pub-id-type="medline">29352285</pub-id>
          <pub-id pub-id-type="pii">PONE-D-17-25566</pub-id>
          <pub-id pub-id-type="pmcid">PMC5774804</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref24">
        <label>24</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Maron</surname>
              <given-names>RC</given-names>
            </name>
            <name name-style="western">
              <surname>Utikal</surname>
              <given-names>JS</given-names>
            </name>
            <name name-style="western">
              <surname>Hekler</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Hauschild</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Sattler</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Sondermann</surname>
              <given-names>W</given-names>
            </name>
            <name name-style="western">
              <surname>Haferkamp</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Schilling</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Heppt</surname>
              <given-names>MV</given-names>
            </name>
            <name name-style="western">
              <surname>Jansen</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Reinholz</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Franklin</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Schmitt</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Hartmann</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Krieghoff-Henning</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Schmitt</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Weichenthal</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>von Kalle</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Fröhling</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Brinker</surname>
              <given-names>TJ</given-names>
            </name>
          </person-group>
          <article-title>Artificial intelligence and its effect on dermatologists' accuracy in dermoscopic melanoma image Classification: Web-Based survey study</article-title>
          <source>J Med Internet Res</source>
          <year>2020</year>
          <month>09</month>
          <day>11</day>
          <volume>22</volume>
          <issue>9</issue>
          <fpage>e18091</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.jmir.org/2020/9/e18091/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/18091</pub-id>
          <pub-id pub-id-type="medline">32915161</pub-id>
          <pub-id pub-id-type="pii">v22i9e18091</pub-id>
          <pub-id pub-id-type="pmcid">PMC7519424</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref25">
        <label>25</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Wang</surname>
              <given-names>Z</given-names>
            </name>
            <name name-style="western">
              <surname>Peng</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Huang</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Sun</surname>
              <given-names>G</given-names>
            </name>
          </person-group>
          <article-title>Classification for plastic bottles recycling based on image recognition</article-title>
          <source>Waste Manag</source>
          <year>2019</year>
          <month>04</month>
          <day>01</day>
          <volume>88</volume>
          <fpage>170</fpage>
          <lpage>181</lpage>
          <pub-id pub-id-type="doi">10.1016/j.wasman.2019.03.032</pub-id>
          <pub-id pub-id-type="medline">31079629</pub-id>
          <pub-id pub-id-type="pii">S0956-053X(19)30164-3</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref26">
        <label>26</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Silva</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Rondon</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Cabrera</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Pineda Lezama</surname>
              <given-names>OB</given-names>
            </name>
          </person-group>
          <article-title>Influence of lighting and noise on visual color assessment in textiles</article-title>
          <source>IOP Conf Ser Mater Sci Eng</source>
          <year>2020</year>
          <month>06</month>
          <day>27</day>
          <volume>872</volume>
          <fpage>012033</fpage>
          <pub-id pub-id-type="doi">10.1088/1757-899x/872/1/012033</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref27">
        <label>27</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Lee</surname>
              <given-names>YB</given-names>
            </name>
            <name name-style="western">
              <surname>Park</surname>
              <given-names>U</given-names>
            </name>
            <name name-style="western">
              <surname>Jain</surname>
              <given-names>AK</given-names>
            </name>
            <name name-style="western">
              <surname>Lee</surname>
              <given-names>SW</given-names>
            </name>
          </person-group>
          <article-title>Pill-ID: Matching and retrieval of drug pill images</article-title>
          <source>Pattern Recognit Lett</source>
          <year>2012</year>
          <month>05</month>
          <volume>33</volume>
          <issue>7</issue>
          <fpage>904</fpage>
          <lpage>910</lpage>
          <pub-id pub-id-type="doi">10.1016/j.patrec.2011.08.022</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref28">
        <label>28</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Chokchaitam</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Sukpornsawan</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Pungpiboon</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Tharawut</surname>
              <given-names>S</given-names>
            </name>
          </person-group>
          <article-title>RGB compensation based on background shadow subtraction for low-luminance pill recognition</article-title>
          <year>2019</year>
          <conf-name>2019 4th International Conference on Control, Robotics and Cybernetics (CRC)</conf-name>
          <conf-date>September 27-30, 2019</conf-date>
          <conf-loc>Tokyo, Japan</conf-loc>
          <pub-id pub-id-type="doi">10.1109/crc.2019.00032</pub-id>
        </nlm-citation>
      </ref>
    </ref-list>
  </back>
</article>
