  Cellphones equipped with high-quality cameras and powerful CPUs as well as
GPUs are widespread. This opens new prospects to use such existing
computational and imaging resources to perform medical diagnosis in developing
countries at a very low cost.
  Many relevant samples, like biological cells or waterborn parasites, are
almost fully transparent. As they do not exhibit absorption, but alter the
light's phase only, they are almost invisible in brightfield microscopy.
Expensive equipment and procedures for microscopic contrasting or sample
staining often are not available.
  By applying machine-learning techniques, such as a convolutional neural
network (CNN), it is possible to learn a relationship between samples to be
examined and its optimal light source shapes, in order to increase e.g. phase
contrast, from a given dataset to enable real-time applications. For the
experimental setup, we developed a 3D-printed smartphone microscope for less
than 100 \$ using off-the-shelf components only such as a low-cost video
projector. The fully automated system assures true Koehler illumination with an
LCD as the condenser aperture and a reversed smartphone lens as the microscope
objective. We show that the effect of a varied light source shape, using the
pre-trained CNN, does not only improve the phase contrast, but also the
impression of an improvement in optical resolution without adding any special
optics, as demonstrated by measurements.
