Pocket Microscope Slide Scanner

The goal of the project is to develop a handheld device that will allow doctors to scan slides whilst out in the field in order to detect signs of cancer in patients.

=Problem Definition=

Background
According to the World Health Organization, 70% of deaths caused by cancer worldwide occur in developing countries (Chan, 2010). The overwhelming majority of these cases when diagnosed are late-stage terminal cancers. To alleviate this calamity, it is imperative that these countries have the accessibility to affordable cancer diagnostic equipment. The objective of this product is to provide a solution to diagnosing childhood cancers in developing countries where access to biomedical tools are limited.

Deliverables
Handheld device encapsulated in a harden case to protect against the elements and user abuse. Will allow a user through an Apollo App interface to scan, import, export, store image acquisitions and handle image processing. To include a fully functional prototype of the device, by late April 2020. The fully functional prototype includes an imaging system that is able to accept a standard microscope slide and control the region of interest, among other controls, via a smartphone app. Then, the smartphone app will tell the device to begin image acquisition and within 30 minutes an image of a 1 cm2 area of the slide will be available for distribution.

Specifications
 Image magnification 400x (equivalent to a 40x objective commercial slide scan) Optimization for histology using hematoxylin & eosin stains (pink & purple) Use of daylight illumination (LED illumination optional) Auto-focus Auto white-balance +/-use existing camera in the smartphone No moving parts Resistant to dirt and dust (ie, if a surface needs to be cleaned, you rub it on your pants)</li> Transfer image to smartphone by Bluetooth, wifi or wire/cable​</li> Optional in-device jpeg compression (in order to transmit image by smartphone in the field)</li> </ul> =Design Considerations=

User Interface Requirements
The device will feature a smartphone interface via an Apollo app that supports the device functionality. This app will allow the user a live-view of the slide and controls for fine and coarse adjustment to adjust the focus of the camera. The images captured via the app will be saved as TIFF and JPEG file types to allow for easy management outside of the app and device. The user will have the ease of using an inductive charger and only one port for loading the slide. These features aid in ruggedness but also in usability of the product.

Optics and Camera Requirements
To achieve the desired scope and objective of the product, a 0.25 micron per pixel resolution is needed, which corresponds roughly to 20-40x zoom. The product, by client requirement, will feature a large format imaging capability of up to 1 cm2. To aid in taking high quality images, a 5600K LED light source is desired. The camera system will also feature an auto white-balance and an auto-focus feature.

Storage and Battery Requirements
Per charge, the battery should accommodate a minimum of 8000 acquisitions. The device will feature connectivity to online cloud storage and utilization of phone storage with secondary MicroSD card support, as back-up

Networking Requirements
The device will feature Wi-Fi connectivity (802.11 b/g/n) and Bluetooth 4.1 compliant. In addition, 4G LTE will be available when paired with a smartphone.

Mechanical Requirements
The enclosure of the device will feature a durable plastic, potentially ABS, and maintain function at approximately 100 kPa of compressive pressure. To protect the delicate optics system, a shock dampening system will be implemented along with minimal ports to prevent water seepage. The durability of the product is denoted by an Ingress Protection rating of 67 (IP67). It will also be designed to withstand a drop of up to 2 meters and feature scratch resistant coating. The usage of continuous solid pieces will be given preference, with a minimalist and simple design. Spatially, the final product shall fit within a maximum of 150mm in length, 80mm in width, and 30mm in depth, all while staying under a weight of 1 kg. All components will work within a 95% reliability standard.

Electrical Requirements
The power for the device will come from an onboard battery. This battery will have a capacity of 4000mAh, or 20 W-h at 5.0V. This provides a 5.0V power source and allows an operational voltage range of 3.3-5.0V. The battery will support USB or inductive charging also.

Software Requirements
There will need to be full app support for Android. This will include controls to adjust the field of view from the smartphone, adjust the ROI by controlling the stage, on the app. The app would also feature a photo stitching algorithm, built-in. The app features some good user interface features, such as a full-screen view of the sample and a 1cm2 image acquisition progress bar. A file viewer within the app to view the TIFF and JPEG files is needed.

Environmental and Regulatory Requirements
The device will maintain full functionality at a temperature range of 0-70°C. Device enclosure should provide protection against harmful dust and protection from immersion in water with a depth of up to 1 meter for up to 30 minutes as dictated by IP67 guidelines. For regulatory requirements, there are no UL, shipping, or production requirements. The cost of the final prototype must not exceed $1000 to build, including purchasing parts and labor.

=Project Learning=

Literature Review
Cancer diagnosis is a difficult task many physicians. Many forms of cancer such as prostate and cervical cancer are curable if caught early enough. Modern technology has improved cancer diagnostic techniques over the past several decades by introducing computer assisted image analysis to histology samples. These computer programs use parameterized algorithms that detect unique features within the sample such as variance in cell shape, nucleation, and disorganization (Figure 1) (Srivastava et al, 2015). This technology is known as computer assisted diagnosis (CAD) and can successfully detect various forms of carcinomas (He, Lei et al 2012). This technology has great implications for providing low-cost diagnostics to remote regions of the world that do not have access to healthcare. According to the World Health Organization, 70% of deaths caused by cancer worldwide occur in developing countries (Chan, 2010). The overwhelming majority of these cases when diagnosed are late-stage terminal cancers. To alleviate this calamity, it is imperative that these countries have the accessibility to affordable cancer diagnostic equipment. Ideally, a portable device that could image histology samples could provide the data for CAD to fix its malady.

Current products available for portable microscope slide scanners are either too expensive or do not provide the adequate resolving power for successful CAD. The uSCOPE MXII (Figure 2a) is advertised as a low-cost microscope scanner that resolves images up to 60X optical zoom at 0.25 microns per pixel and provides stitching capabilities. Though the features are promising, the unit is hardly low-cost, retailing for $10,0000. Another available product is the PathScan Enabler 5 low power scanner (Figure 2b) provides 4X magnification up to 2.54 microns per pixel. While this device costs significantly less at $1,900, it does not provide enough resolution for affective CAD.



In order to achieve the proper resolution, size and cost for providing affective cancer diagnostic tools to remote regions of the world, the design philosophy of the device needs to be revaluated. Physicians in the field require battery powered device that is both hand-held and rugged to withstand dust, dirt and rain in hostile conditions. The device should operate at IP67 standards and maintain functionality while enclosing all components in a small enclosure (Association, National Electrical Manufacturers, 2004).

In order to maintain small size, a compact optics system is necessary. One-low cost compact lens product that is available is the Nurugo (Figure 3). This is compact lens provides up to 15X resolving power and has universal adapters to connect to most smart phones. This device is marketed toward amateur microscope enthusiasts at the price of $65 but proves that high-magnification can be achieved with a small device. Another option for achieving high magnification is using a compact device is using a Raspberry Pi Cam V2.1 and a Raspberry Pi Zero in conjunction with 40X microscope objective (Figure 4). This configuration can resolve 0.075 microns per pixel (PublicLab, 2019).

In order to montage large format images, the device must have a native image stitching feature. In conjunction with an electronic stage, images of the sample can be stitched together sequentially. The calculated image size for a 1cm2 field of view at 0.25 microns per pixel ~ 1.60 gb at  1600 megapixels (approximately 1mb= 1 megapixel) Figure 5 shows an example of an Open CV Python stitching alorithim that can be used in conjuction of an automated x-y stage to produce large format images (Roseblock, 2018).

Image Stitching
The following link gave us better insight into image stitching algorithms:
 * Image Stitching

OpenCV
OpenCV, or open source computer vision library, is a collection of open source computer vision and machine learning software libraries. We will be using OpenCV’s python libraries to construct our image stitching library. After multiple tests, we have found that most of the algorithms are factorial, O(n!). This means that we will need substantial hardware to run the algorithms on stitching 1600 image captures, which is not feasible to because of the size requirement of device. We will need to develop an algorithm that runs linear, O(n). Following are the links we have used for OpenCV:
 * Python stitching
 * Python and OpenCV stitching
 * Real time panoramic stitching
 * Install OpenCV on Windows
 * OpenCV courses
 * uSCOPE image stitching example

Flutter
Flutter is the application we will be using to develop the app for either the standalone or addon device. This application allows us to program in a single language developed by Google, DART, while simultaneously developing for both Apple and Android platforms. In order to use Python with DART, we will need to use StarFlut which is a library that allows DART to communicate with Python. DART will be used to create the GUI while Python will be used to build the image stitching algorithm:
 * Flutter homepage
 * StarFlut download
 * Flutter tutorials
 * Dart tutorials and guides

Raspberry Pi
We have been using a Raspberry Pi 0 W for the standalone device build. The Pi will be what the phone communicates with in order to control the standalone as well as act as the main picture capture device. Because of the low computational power of the Pi 0, all image stitching will be done on the phone. Following is documentation on all Pi camera commands and a guide on how to setup a raspberry Pi:
 * Raspberry Pi Camera Documentation
 * How to Setup Raspberry Pi

RealVNC
For early stage prototyping, VNC will be used to control the standalone device. VNC is a free remote desktop control software. Only drawback of VNC is the inability to show the camera preview from the Pi. Following is documentation on how to setup and run VNC:
 * RealVNC homepage
 * RealVNC Download page
 * RealVNC setup page

=Final Design=

=Validation=

=Team Members=

=Additional Documentation=

Project Schedule



Meeting Minutes

Presentations



Client Interview