Skip to content

image_tools

Pragmatismo edited this page Feb 19, 2023 · 2 revisions

Image Tools

scripts that are used with the captured images

log_cap_data.py

This is designed to be run directly after an image is taken, ideally using a .sh script. It looks for the most recent image in the supplied directory and analyses it for basic information which is stored in a log which can be used in triggers or to create graphs.

folder=<folderpath>
     folder to find most recent image in

log=<filepath>
      log file to append data into

focus=false
      skip the focus check

Currently the data it collects is very simple, and somewhat useless.

r=       The total value of all red pixels 
g=       The total value of all green pixels
b=       The total value of all blue pixels
total=   The sum value of all pixels 

focus=   uses cv2 module to detect the amount of sharp edges, higher value tend to mean better focus 
         this is not a good metric and is due to be updated now better computer vision tools are
         available on the pi.

image= image name
date=  datetime.now()
Clone this wiki locally