Batch Process Photogrammetry Images for free!
Scan Space Image Processor
Lately I've been digging deep into optimising my processing pipeline, and while my internal tools I use on jobs are largely automated, there are still occasions where I need manual control over my image processing.
This is where my Image Processor comes in.
It all started because a friend wanted some advice on getting away from Adobe Lightroom. It costs money, is clunky and not really designed for the kind of bulk processing work we do in the 3D scanning industry.
Jump over to my public repo on github to download the processor and installation instructions: Scan Space Image Processor
Overview
Once launched, you will see this screen.
The basic layout is simple.
In the top left we have all of our ins and outs.
Here is where you browse to your folders containing all of your raw images, your output directory and if you have a chart in a separate folder, the path to that image.
Note, this application will overwrite ANY images that have the same name in the output folder.
Image List
Below this we have our image list.
Images listed here are selectable, and will display in the preview window.
Additionally we also have a CPU and RAM monitor, as this application is fairly intensive on larger batches.
Preview and Logs
Over to the far right, we have our preview and log windows.
Here you get a preview of your images, which by default is a low resolution thumbnail.
There is also an array of thumbnails below this. You can scroll through it using your mouse wheel, the arrow buttons or your left and right arrow keys.
Selecting an image here will set it as active for the rest of the application's function.
Once an image is processed, the processed version of the image will show in the main preview window instead of the thumbnail image.
Detecting Colour Charts
In the center, we have the core of the application. This column holds all of the primary tools which we will use to calibrate our images, as well as some other features.
At the top we have the Colour chart tools.
When you first import images into the processor, you will need to define a colour chart.
This is not optional. This application will not process images without a chart image.
When you select a colour chart, the program will attempt to detect any charts in the image. If no charts are detected, you will get an error in the logs.
Below this is the Manually Select Chart button. This changes the tool window to let you isolate and manually detect the chart.
When you activate the tool, it will load up the raw image instead of the preview thumbnail. This image may look strange and washed out, a fix for this is coming in a future version.
With the tool open, click and drag around your chart.
You will see a box around where you have selected. The image will be cropped to this region.
After your image is cropped, you can run “Detect Chart.”
Check the log output to see if your chart detection is successful or not
If you did not detect a chart, you can run the “Flatten Chart Image” tool.
To use this tool, click on the four white crosses around your chart.
You must start in the top right corner of the chart, rhe corner that has the “Colorchecker’ logo.
Then, select the next corners in a clockwise orientation.
Once all four corners have been selected, you will see a preview of your chart positions, as well as a dewarped version of the chart.
This works well on charts shot at extreme angles.
While this preview is up, the software will process a preview of your colour correct image in the background.
This will display automatically after processing is complete.
If your detection looks good, click “Finalize Chart” in the top right corner.
Average Exposure
When you import images and select a chart, you can run “Calculate Average Exposure”
Take a look at this video to see how it lifts the dark hammer shots to be in line with the rest of the imagery.
This tool will read your input images and build a multiplication matrix to adjust the processed image, making the overall brightness of each image relatively consistent.
This helps massively with datasets shot in varying conditions.
There is also a debug mode!
This debug mode shows the areas which will be ignored by the algorithm.
If you shoot on a black or white background, it is a good idea to check that you are clipping out your dark and bright areas, as this will impact the exposure correction average.
Check out the debug mode in this video, note the fairly rough masking that comes out of it. this will be fixed in a later version:
New Image Name
This is a straightforward tool. Simply input a new filename or tick “Use Original Filenames.”
The new filename format will be [NewFilename]_[Number].[Extension]
The Padding number is simply the number of digits that will be used for your image number.
For instance:
-
A padding of 2 will mean your images will be Image_01.jpg
-
A padding of 4 means your images name will be Image_0001.jpg
Make sure your padding covers the number of images you are processing.
This prevents your images from displaying out of order.
Processing and Export
This section is where you define your file format and format settings.
Format options
The tool currently supports the following export formats:
-
JPG
-
PNG
-
TIFF
-
EXR
The TIFF format supports both 8 and 16 bit exports.
EXR supports color space corrections, and uses OIIO for this.
Both EXR and TIFF16 export are far more memory-hungry than jpg or png. Please adjust the thread count to reflect this.
Additionally, the ‘Threads’ number field is where you input your total processing threads for the tool.
Thread count
A thread count of 4 will mean your computer will process 4 images at a time.
Increasing this can have massive impacts on system stability.
I run a thread count of 14 on this system, which is an AMD 7950x3d with 128GB ram.
However, a 5900x with 64GB of ram may only handle up to 8 threads.
Make sure to test this tool on a lower thread count before increasing it. Monitor the memory usage, and if it gets too high, reduce the thread count.
Acknowledgments
I would love to thank KelSolaar for his amazing Colour Science package, as well as the wonderful folk over at my 3D scanning discord. I could not have done this without them
Hi!, yes it will work up to 16 bit currently, higher bit depths are not supported, however if there is enough demand I can add this.
Hi can it process more than 12 bit RAW, like can it detect 16bit/20/24bit raw images as well