Skip to content
caelricluoPublic

About

On-device microscope cell counting for iOS and Android· iOS及安卓显微图像细胞计数

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

cellscope

English · 简体中文

cellscope is a native iOS and Android application for counting cells in microscope images of improved Neubauer hemocytometers. It combines grid alignment, editable cell detection, concentration calculations and suspension volume planning in an on-device workflow.

Features

  • Capture images with the camera or import from the photo library.
  • Keep the selected counting mode when a central grid is detected; switch to RBC mode with an optional shortcut.
  • Restore chamber or detection parameters with reset controls.
  • Locate grid boundaries automatically; adjust corners, sides or the entire frame using touch handles, a magnifier and 1/5 px controls.
  • Detect faint cells with noise-adaptive sensitivity and automatic, dark or bright target selection.
  • View images, markers, cell counts, concentration, total stock cells and required volume while tuning detection parameters.
  • Count a full 3×3 grid, four separately photographed corner squares, selected central RBC groups or a custom area.
  • Apply top/left inclusion and bottom/right exclusion. Count each connected cluster as one object.
  • Save samples locally and export CSV reports with annotated images.
  • Use English or Simplified Chinese according to the device's app language.

Get started

Requires iOS 17+ or Android 8.0+. Android APK downloads are available from GitHub Releases.

For iOS development, use macOS and Xcode with an iOS SDK:

git clone https://github.com/caelricluo/cellscope.git
cd cellscope
open cellscope.xcodeproj

Select the cellscope scheme and an iPhone simulator or device. Choose a counting mode, then capture/import an image or load a demo sample. Results update automatically as the frame, markers and calculation parameters change.

For a desktop preview, run Open cellscope.command. The Mac Catalyst preview uses the same application code and also supports importing a local image file.

For Android development, open android/ in Android Studio with JDK 17 or 21, install Android SDK 36 and build with the included Gradle wrapper:

cd android
./gradlew :app:assemblePreview

The installable APK is generated at app/build/outputs/apk/preview/app-preview.apk. See the Android guide for build, test and signing commands.

Counting modes

Mode Reference region Counted area
Full grid Complete 3×3 mm grid 9 mm², four corners at 4 mm², or selected large squares
Four corners Separate A1, A3, C1 and C3 images 1–4 counted 1 mm² squares; running mean, then the full four-corner mean
RBC Central 1×1 mm square with 5×5 groups Standard four corners plus center: 0.2 mm²
Custom User-defined region Enter the physical area in mm²
Sampled volume (mL) = area (mm²) × chamber depth (mm) / 1000
Stock concentration (cells/mL) = count × dilution / sampled volume
Total stock cells = concentration × stock volume (mL)
Required stock volume (µL) = target cells / concentration × 1000

Build and test

swift test -c release
python3 scripts/check_localizations.py
xcodebuild -project cellscope.xcodeproj -scheme cellscope \
  -sdk iphonesimulator -configuration Release \
  -derivedDataPath build CODE_SIGNING_ALLOWED=NO build
scripts/build_unsigned_ipa.sh

The packaging script creates an unsigned iPhoneOS arm64 IPA, a JSON manifest and a SHA-256 file in dist/. Device installation uses an appropriately signed build. See distribution.

Documentation

Android · User guide · Development · Algorithm and calculations · Verification · Changelog

Releases are available from GitHub Releases.

Authors

See AUTHORS.md and CONTRIBUTING.md.

About

On-device microscope cell counting for iOS and Android· iOS及安卓显微图像细胞计数

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages