Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.13 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.13 KB

SSD-Reader

Read a seven-segment display (SSD) using OpenCV and the Raspberry Pi Camera

Install OpenCV and required modules on Raspbian:

sudo apt-get install python-opencv python-numpy python-picamera python-matplotlib python-scipy

Run the script:

Run the script: python SSD_Reader.py

Alternatively, use a python command line:

After running python SSD_Reader.py with calibration_image = True and modifying calibration values to locate SSD:

from SSD_Reader import read_SSD
read_SSD()

Screenshot:

ssd_reader_plot

Method:

  1. Take a photo with the Raspberry Pi Camera
  2. Crop image to the seven-segment display (SSD)
  3. Process and filter image to binary (black and white)
  4. Calculate average pixel value over segment regions
  5. Display segment regions whose average pixel values exceed a threshold
  6. Convert to a number and return the value
  7. (Optional) Plot the value over time along with the SSD and processing images
  8. (Optional) Save the value with timestamp to file for later manipulation