Skip to content

Python script to adjust gamma on all images in a directory. This could be used to improve the quality of the pupil videos in the Burgess Lab pipeline.

Notifications You must be signed in to change notification settings

WEIZHIHONG720/gamma_correction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Python script to adjust gamma on all images in a directory

This is a python script I wrote to adjust the gamma on images either adaptively or with a provided value from (0-1).

After downloading the script, users can save it anywhere, but in order to run the script they must be in the same working directory. How to run: The script takes 4 arguments including the script name.

1st argument: main.py
2nd argument: full path to folder where adjusted images will be saved
3rd argument: full path to folder where raw images reside (input and output folders can bs the same)
4th argument: must be either "clahe" or a numerical value between (0-1) exclusive

For example:

./main.py "/Users/drewmichelini/Images/output" "/Users/drewmichelini/Images/input/" clahe

or:

./main.py "/Users/drewmichelini/Images/output" "/Users/drewmichelini/Images/input/" .95

After running, each image from the input directory will have a corresponding image in the output directory. "adjusted_" will be prepended to each filename in the output directory.

The script uses OpenCV to accomplish most of the work.

About

Python script to adjust gamma on all images in a directory. This could be used to improve the quality of the pupil videos in the Burgess Lab pipeline.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%