Skip to content

Will-Turchin/cameraPrograms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Microscope Camera Pipeline (Arducam + Raspberry Pi)

Lightweight camera pipeline for capturing microscope slide images using an Arducam connected to a Raspberry Pi, then automatically cropping the region of interest for downstream analysis.

Overview

This project captures an image from an Arducam camera mounted on a microscope and applies basic computer vision to detect the slide area and crop the image automatically. The goal is to reduce manual preprocessing and produce consistent, analysis-ready images.

Features

  • Image capture from Arducam on Raspberry Pi
  • Automatic slide/ROI detection via contour-based processing
  • Cropped output images for analysis or upload

Project Structure

  • ContourTest1.py
    Python script for contour detection and auto-cropping
  • takePhoto.sh
    Shell script to trigger image capture from the camera
  • install_pivariety_pkgs.sh
    Installs Arducam / Pi camera dependencies

Setup

Tested on Raspberry Pi with an Arducam camera.

# Install camera dependencies
bash install_pivariety_pkgs.sh

# (Optional) create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install Python dependencies
pip install opencv-python numpy

Usage

# Capture an image from the camera
bash takePhoto.sh

# Run auto-cropping pipeline
python3 ContourTest1.py

Processed images are saved locally.

Notes

  • Lighting conditions significantly affect contour detection accuracy

  • Camera alignment and focus matter for reliable cropping

  • This is a task-specific pipeline, not a general-purpose vision framework

Future Work

  • More robust slide edge detection under uneven lighting

  • Batch processing for multiple images

  • Optional cloud upload integration

Disclaimer

This repository contains experimental scripts and is intended for prototyping and coursework.

About

Python script that receives an input microscope slide image and converts it into a cropped image

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors