Skip to content

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

Notifications You must be signed in to change notification settings

gabrielburnworth/SSD-Reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages