<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Synthesis of the General Structure and Algorithm of Controlling the Functions of a Mobile Photo- Ophthalmoscope</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexander Gushchin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yuri Mukha</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>The Volgograd State Medical University, Department of Biomedical Technique and Technologies</institution>
          ,
          <addr-line>Volgograd</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>The Volgograd State Technical University, Department of Computer Engineering</institution>
          ,
          <addr-line>Volgograd</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>45</fpage>
      <lpage>53</lpage>
      <abstract>
        <p>This paper is about the development of a PO - a mobile device for direct examination of the eye fundus, in which a shifting mirror, a lens unit, a photo sensor, a microprocessor and an interface part are added to the currently known ophthalmoscope for direct ophthalmoscopy. The device can work in such modes as the mode of ophthalmoscopy, when the optical circuit of the device fully corresponds to the scheme of the traditional ophthalmoscope and in the mode of photo fixation, when the sliding mirror briefly blocks the main optical axis of the device, directing the rays reflected from the investigated eye fundus not to the eye of the researcher, but to the photosensor. This makes possible to make a photograph of the observed picture of the fundus. The device provides for the possibility of adjusting the optical scheme of photographic fixation to the clinical refraction of the researcher so that the routine use of the device as little as possible differs from the use of a traditional manual ophthalmoscope. In addition, in the hardware and software complex of the photo-ophthalmoscope (PO), the functions of storing and transmitting the received information are provided, as well as a software interface for integrating the device into the local network of the medical institution. There provided the detailed information on the development of a general scheme of the device, on the development of a diagram of the optical part of the instrument, and on the development of the structure of the integrated software for the PO.</p>
      </abstract>
      <kwd-group>
        <kwd>ophthalmoscopy</kwd>
        <kwd>ophthalmoscope</kwd>
        <kwd>photographic registration</kwd>
        <kwd>algorithm</kwd>
        <kwd>built-in software algorithms</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        2]. To use this method, various models of hand-held mobile ophthalmoscopes are
currently being mass-produced [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The important task is to record the picture of the
eye fundus observed with such devices with the purpose of archiving, measuring the
observed objects, evaluating the long-term dynamics of pathological changes, and
determining the success rate of the therapy [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        The known types of handheld mobile photo-ophthalmoscopes (PO) proposed in the
world literature [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] are a mechanical combination of an ophthalmoscope and a digital
camera, and differ in that they do not have the possibility of a direct examination by
the researcher of the fundus of the subject. Instead, the researcher observes the picture
of the fundus through a small LCD-screen of a digital camera. Such a method of
image transmission is associated with a significant decrease in its usefulness for the
researcher, since the amount of visual information that can be displayed on a
smallsized LCD screen is much less than the amount of information obtained by direct
examination of the fundus [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>So, the overall goal of this work is to realize the possibility of automatic
documentary photographic recording of the results of a study performed with the help
of a hand-held mobile ophthalmoscope.</p>
      <p>This goal is achieved by adding to the ophthalmoscope optical, electromechanical
and electronic components, which are the hardware base of the software, which
makes it possible to photograph the visible picture of the fundus.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Synthesis of the General Structure of PO</title>
      <p>
        At the first stage of the work, a synthesis of the graphical representation of the general
structure of the hardware-software complex of the PO in the form shown in Fig. 1 [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
was carried out.
      </p>
      <p>In Fig. 1, the central processor (CPU) is the main component of the device. When
user press the button switches on the IO device (IO Dev), the processor performs the
actions specified by the firmware of the device. It controls the position of the mirror
(EM Mirr) and brightness of fundus illuminator (Illum) in accordance with the
userselected operating mode of the device (ophthalmoscopy or fundus photo). In
photographic mode CPU receives information from CCD sensor (PM), process it,
store it in the EEPROM memory and transfer for further processing on a PC over a
wired (USB) or a wireless (BT) interface channels. Also, the processor through the
power controller (PCont) monitors the level of the battery's charge and gives a
lowcharge warning signal to the indicator on IO device.
3</p>
    </sec>
    <sec id="sec-3">
      <title>The Optical Subsystem of PO</title>
      <p>The structure of the optical scheme of the PO, which combines both the possibility of
direct observation and the fixation of the image, can be represented as follows (Fig.
2).</p>
      <p>
        It is proposed to use the Tessar scheme [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] as an optical scheme of the photo lens
(2). This choice is due primarily to the widespread use of compact photographic
devices based in this manner. Also, in comparison with other optical schemes, Tessar
that makes it possible to achieve an optimal ratio of the image's price / quality /
geometric dimensions in order to reduce the cost and simplify the design and mass
production of the PO [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        The CCD matrix [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ] diagonal size is 1/2.5" and a length to width ratio of 2.31
/ 1.75 mm. The relative aperture of the diaphragm is determined by the ratio 2.8 / 5.6,
where 5.6 is the back focal length of the lens, expressed in millimeters. Based on the
available data and formulated requirements, the Camera Module 12C VGA from Carl
Zeiss, which is used in Nokia N73 and Nokia N73-1 mobile phones [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], can be
considered the best choice for use in these conditions. It is assumed that the length of
the head of the ophthalmoscope, with the moving mirror, the CCD sensor, the
objective and the focusing drum, will not exceed 25 mm, so that the increasing
dimensions of the photo-ophthalmoscope head do not cause a significant reduction in
the viewing angle for the ophthalmologist during direct examination of the patient's
fundus.
      </p>
    </sec>
    <sec id="sec-4">
      <title>The Structure of the Firmware of PO</title>
      <sec id="sec-4-1">
        <title>The General Structure of the Firmware</title>
        <p>The general block diagram of the firmware of the device is shown in Fig. 3.</p>
        <p>
          Based on the created block diagram describing the algorithm of the manual PO, the
main structural elements of this scheme were analyzed [
          <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
          ].
        </p>
        <p>
          Functions of the built-in software: initialization at power-on; IO sensors polling;
processing operator actions (drives of electromechanical nodes of the
photoophthalmoscope; Automation of the process of transmission of received images);
Safely turn off the device.
turned on is shown in the graph (Fig. 4):
optimized by the method of block-functional distributions (i-initialization mode) [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
        </p>
        <p>The first step is to check the status of the sliding mirror. To continue to work with
the device, the software must check the position of the sliding mirror. This
mechanism provides 2 states, which corresponds to the on and off states of mirror
position sensors. It is supposed to use 2 contact sensors, when triggered, the processor
will stop supplying power to the electromagnet in order to stop the movement of the
mirror. Proceeding from this, we get two working positions of the mirror:
1) Mirror is down – the starting point;
2) The mirror is raised and is at the end point.
4.3</p>
      </sec>
      <sec id="sec-4-2">
        <title>User Input Processing</title>
        <p>The keypad polling procedure is the main control procedure of the processor. After
the main control program is switched on and loaded, the device goes into the button
response mode. The structure of this section of the program is presented on the graph
(Fig. 5).</p>
        <p>The device constantly polls the buttons, waiting to receive a response at any time.
The frequency of polling buttons will be determined by the frequency of the used
processor. The graph (Fig. 6) shows the structure of the algorithm describing the
process of controlling the survey.</p>
        <p>After pressing the "Shot" button, voltage is applied to the electromagnet, which
moves the mirror. The time for raising the mirror will vary from 0.2 to 0.6 seconds.
Such a time interval may depend on the level of charge of the battery, and hence on
the voltage output from it. So, because of the lowering of the voltage level received
from the battery in 20% of the rated value, the time of the mirror rise can increase by
0.5 seconds.</p>
        <p>
          After lifting the mirror, the device goes directly to the image capture procedure.
1. The initial adjustment values for a particular CCD sensor are loaded.
2. The processor needs to assess the average light level of the CCD sensor.
3. Next, it`s need to evaluate the exposure values. We expect to set the shutter speed
in the range from 0.15 to 0.35 seconds. This time will be enough for the camera
exposure in the operating conditions of our device.
4. At the next stage, the necessary level of increase in the power of the illuminator is
calculated to balance the lack of illumination level of the room. However, the power
is calculated only if the level of illumination is not sufficient.
5. The received parameters are saved, and the system switches to the mode of reading
the illumination values from the CCD sensor x.
6. And further, proceeding from the illumination of the environment, the program
increases the power of the illuminator to the calculated value, if necessary.
7. The procedure for exhibiting the matrix begins.
8 ... 9. After the shutter is closed, the power of the illuminator is reduced to the initial
value.
10. After the shutter is closed, the information is read from the matrix into the
operative memory of the device.
11. Next, the image is converted to a color image.
12. After converting the original image from the matrix to a color one, the white
balance correction is performed.
13. Ultimately, the image is converted to the format we selected. In our case, the
JPEG format is sufficient and optimal for us [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ].
The graph (Fig. 7) shows the algorithm of switching off the PO.
1. Even before turning off the device, the software must perform a number of
procedures. If the operator turned off the device, this does not mean that the device
should immediately shut down. So, you need to finish processing the pictures taken
earlier, which are in the RAM of the device, and also transfer them to the PC, if there
is a connection or save the received images to a flash card.
2. The software needs to find out whether there is a file in the RAM or not.
3. In case there are still files in the memory, the processor should postpone the
shutdown until there is no image file in the RAM. The processing time of the images
will depend on the level of CPU utilization, that is, the number of images not
processed. If, there are no such files in memory, the program can proceed to the next
stage of disconnection.
4. In the next step, the program should check whether the transfer of processed files
has ended on a flash card or PC. To do this, the program must check whether all the
processes of transferring files with images have been completed.
5. If the processor is transferring images to external or removable media, you must
first wait for the transfer process to complete. The time for transferring the image
from the internal memory to another medium can vary widely. This will depend on
several factors.
6. After completing the above tasks, the processor should check the status of the
sliding mirror.
7. If there is an activated start point sensor (mirror is omitted), the device can proceed
to the next shutdown stage. In the event that the sensor that fixes the initial position of
the mirror is not involved, the program turns on the electromagnet and returns the
mirror to the starting point.
8 ... 9. At the final stage of the processor, it is necessary to stop the indication, and
also to terminate the power supply of the device.
        </p>
        <p>Thus, a synthesis of the general structure, the optical part and the integrated software
of the mobile photo-ophthalmoscope-the original device that combines all the
functions of traditional ophthalmoscopes for direct ophthalmoscopy with the
functions of photographic fixation of the user's observed eye-fund picture was
performed.
5</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Riordan-Eva</surname>
          </string-name>
          , Paul, and John Whitcher, eds. Vaughan &amp;
          <article-title>Asbury's general ophthalmology</article-title>
          .
          <source>Lange Medical Books/McGraw-Hill Medical Pub. Division</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Urmaher</surname>
            <given-names>LS</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aizenshtat</surname>
            <given-names>LI</given-names>
          </string-name>
          <article-title>Ophthalmic devices</article-title>
          [Oftalmologicheskie pribory]. - Moscow: Medicine,
          <year>2008</year>
          . - 288 p.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. GOST 14934-
          <fpage>08</fpage>
          .
          <article-title>Ophthalmic optics. Terms and Definitions [Oftal'mologicheskaja optika</article-title>
          .
          <source>Terminy i opredelenija.]</source>
          . - Moscow: Publishing house of standards,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Sergienko</surname>
            <given-names>NM</given-names>
          </string-name>
          <article-title>Ophthalmic optics [Oftal'mologicheskaja optika]</article-title>
          . - Мoscow: Medicine,
          <year>2004</year>
          . - 144 p.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Goldenholz, Daniel M.
          <article-title>"Portable digital direct ophthalmoscope." U.S</article-title>
          . Patent Application No.
          <volume>13</volume>
          /152,
          <fpage>113</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Itigin</surname>
            <given-names>A. M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khatsevich</surname>
            <given-names>TN</given-names>
          </string-name>
          <article-title>Effect of the screen brightness of the image intensifier on the diameter of the eye pupil of the observer [Vlijanie jarkosti jekrana JeOP na diametr zrachka</article-title>
          glaza nabljudatelja] // OMP,
          <year>2009</year>
          . -
          <fpage>№</fpage>
          5. - from.
          <fpage>8</fpage>
          -
          <lpage>10</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. GOST 19.
          <fpage>701</fpage>
          -
          <lpage>90</lpage>
          (ISO 5807-
          <fpage>85</fpage>
          ).
          <article-title>Unified system of program documentation. Schemes of algorithms, data programs and systems. Conventional symbols and execution rules [Edinaja sistema programmnoj dokumentacii. Shemy algoritmov, programm dannyh i sistem</article-title>
          .
          <source>Uslovnye oboznachenija i pravila vypolnenija]</source>
          .
          <source>- Intro</source>
          .
          <year>1992</year>
          .
          <volume>01</volume>
          .01.
          <string-name>
            <surname>-M .:</surname>
          </string-name>
          <article-title>State Committee of the USSR for the management of product quality</article-title>
          and standards,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Bebchuk</surname>
            <given-names>LG</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Bogachev</given-names>
            <surname>Yu</surname>
          </string-name>
          . V.,
          <source>Zaprinov NP Applied Optics [Prikladnaja optika]</source>
          . - Moscow: Mechanical Engineering,
          <year>2007</year>
          . - 312 p.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pat</surname>
          </string-name>
          . US 399499 USA, Photographic Lens / Flvan G. Clark.
          <source>Publication date</source>
          <year>1989</year>
          -
          <volume>03</volume>
          -12.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>George</surname>
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Smith Nobel</surname>
          </string-name>
          <article-title>Lecture: The invention and early history of the CCD // Rev</article-title>
          . Mod.
          <source>Phys .. -2010</source>
          . - Vol.
          <volume>82</volume>
          ,
          <issue>fasc</issue>
          . 3. - P.
          <fpage>2307</fpage>
          -
          <lpage>2312</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Willard S. Boyle Nobel</surname>
          </string-name>
          <article-title>Lecture: CCD-An extension of man's view</article-title>
          .
          <source>Mod. Phys .. - 2010</source>
          . - Vol.
          <volume>82</volume>
          ,
          <issue>fasc</issue>
          . 3. P.
          <volume>2305</volume>
          -
          <fpage>2306</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. Sears - Online &amp; In Store Shopping: Applinces, Clothing &amp; More [Electronic Resource]. Access mode: http: //с.shld.
          <source>net/assets/203253 2f6e86d0-ee35-4222- 99b4- 5bll4d923946.pdf- Nokia N73 Data Sheet</source>
          . - (
          <volume>30</volume>
          .
          <fpage>10</fpage>
          .
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Levitin</surname>
          </string-name>
          <article-title>A. Algorithms: introduction to development and analysis [Algoritmy: vvedenie v razrabotku i analiz] / Levitin A</article-title>
          . - Moscow: Williams,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Skiena</surname>
            <given-names>S. S.</given-names>
          </string-name>
          <article-title>The algorithm design manual: Text</article-title>
          . - Springer Science &amp; Business
          <string-name>
            <surname>Media</surname>
          </string-name>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Yanshin</surname>
            <given-names>V. V.</given-names>
          </string-name>
          <article-title>Analysis and processing of images: principles and algorithms [Analiz i obrabotka izobrazhenij: principy i algoritmy] /</article-title>
          <string-name>
            <given-names>V. V.</given-names>
            <surname>Yanshin</surname>
          </string-name>
          , - Moscow.: Mechanical Engineering,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Mukha</surname>
            ,
            <given-names>Yu.P.</given-names>
          </string-name>
          <article-title>Algebraic theory of synthesis of complex systems: monograph [Algebraicheskaja teorija sinteza slozhnyh sistem] /</article-title>
          <string-name>
            <given-names>Yu.P.</given-names>
            <surname>Mukha</surname>
          </string-name>
          ,
          <source>OA Avdeyuk, I.Yu. Koroleva; VolgGTU. - Volgograd: RPK "Polytechnic"</source>
          ,
          <year>2003</year>
          . - 320 p.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>