I have cameratrap images from 10 farms where I recorded birds on heaps of cattle feed. I have 10,000 JPEG images total, approx 1000 per farm. Images were taken every 5 minutes for 6 consecutive days, so the sunlight/weather changes dramatically. In order to count birds accurately, I am trying to roughly balance the lighting for each image. In order to do this I need to:
- Select all images in a folder (for a specific farm).
- Crop the area of interest from each image.
- Histogram-match all the cropped images to the clearest image from the specific farm.
- Use the CLAHE plugin to enhance local contrast.
- Save the resulting images in a new folder.
I am performing these parts separately in Fiji and I have only done this with small sample folders containing 5 JPEGS:
1 and 2. Process > Batch > Macro… - This crops my JPEGS and (slowly) makes a new folder of cropped Tiff images.
3. I use File > Import > Image Sequence… Which creates a stack of the 5 images. In order to match histograms of all images to a chosen image, I have been using the script found on the third reply Here . This produces a new stack of histogram-matched images.
4. I then run the CLAHE script found Here . This alters the local contrast for each image in the stack.
5. I then manually save the sequence of images.
As you can see, this is not elegant or time-efficient. When I try to perform these actions on large folders (1000 images), it is far too slow. Also I cannot open a stack big enough to use this method for large folders of hundreds of images.
Can anyone show me how I can do this more efficiently, with large numbers of images, and minimal human input? I have searched the forum but I cannot easily solve this myself.