ResistorLens is a specialized Android application designed to calculate resistor values from high-resolution photos. Unlike fully automated AI solutions that often fail under different lighting conditions, ResistorLens employs a manual color sampling system enhanced by a magnifier and crosshair for 100% deterministic results.
Designed with a sleek Mocha-inspired dark theme, it provides an intuitive and accessible UX for engineers, hobbyists, and students.
This project was born out of a personal challenge: as a color-blind (daltonic) individual, identifying resistor bands can be extremely difficult and error-prone. ResistorLens was created to bridge this gap, using mathematical color-matching to provide a reliable way to "see" and confirm the colors of electronics components.
- 🔍 Precision Sampling: Interactive magnifier window and fixed central crosshair for pixel-perfect color picking.
- 🎨 Smart Color Recognition: Euclidean distance matching enhanced by heuristics that weight color candidates based on their probability of appearing in specific resistor bands, significantly improving accuracy under real-world conditions.
- 📏 4 & 5 Band Support: Toggle between standard and high-precision resistors with a single tap.
- 📱 Adaptive Visual Resistor: A real-time visual representation of the resistor that updates as you pick colors.
- 🌐 Full English Localization: Professional UI strings and smart ordinal band labels (1st, 2nd, 3rd Digit).
- 🌓 Mocha Palette: High-contrast interface designed for laboratory and workshop environments.
While ResistorLens uses advanced neighborhood sampling to reduce noise, color detection accuracy depends heavily on external factors:
- Lighting Conditions: Extremely warm (yellow) or cool (blue) lighting can shift detected colors. Neutral, bright light is recommended.
- Image Quality: Low-resolution photos or blurry focus can lead to incorrect sampling.
- Surface Reflections: High-gloss resistors may catch light highlights (specular reflections) that "wash out" the actual band color under the crosshair.
- Android 7.0 (API level 24) or higher.
- Go to the Releases section.
- Download the latest
app-release.apk. - Install it on your Android device (ensure "Install from Unknown Sources" is enabled).
- Core Logic: Pure Java 17 for deterministic resistor calculations.
- UI/UX: Android SDK with Material Components and Custom View handling for the visual resistor.
- Color Engine: 3x3 pixel neighborhood sampling to mitigate sensor noise and chromatic aberration.
- CI/CD: Fully automated pipeline via GitHub Actions for testing and signed production releases.
- Testing: Robust test suite using Robolectric with a dataset of real-world calibrated scenarios.
/resistorlens
├── .github/workflows/ # CI/CD (GitHub Actions)
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/... # MainActivity & UI Logic
│ │ │ └── res/... # Layouts, Colors (Mocha), Drawables
│ │ └── test/ # Robolectric & Dataset Tests
│ └── build.gradle # Module Signing & Dependencies
├── gradle/wrapper/ # Gradle Wrapper Files
├── build.gradle # Root Project Configuration
├── settings.gradle # Module Definitions
├── gradle.properties # Build & Heap Config
├── LICENSE # MIT License
└── README.md
Contributions are welcome! Whether it's reporting a bug, suggesting a feature, or submitting a Pull Request, feel free to check the Issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat: some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
