BatchHotPixelmover v1.02

1. Intro

BatchHotPixelRemover is a console application intended for removing hotpixels from your digital images quickly and precisely. It is written in VC++ + OpenCV.
There are two modes of the program: detecting and healing.

2. Installation

Just extract the zip into an empty directory.

3. Detecting mode

This mode creates a hotpixel map file from from some "dark shots" (pictures taken in dark, hotpixels are supposed to be the only bright spots) created with your camera - this phase have to be run *only once* per camera. 
You can configure this mode in a configuration file, let's call it *config.xml*, let's check the content of this file. 
The first section of it (<detect>...</detect>) controls the detection. Here are the parameters can be set in config.xml driving the detection, see the comments in <!-- ... -->:

...
	<detect>
		<filter>*.jpg</filter>
		<indir>d:/temp/_black/</indir>
		<outfile>d:/temp/_out/casio-profile.xml</outfile>
		<outimage dxtext="-50" dytext="-10">d:/temp/_out/casio-profile.png</outimage>
		<channels>32</channels>
		<amount>0,999</amount>
		<hprad>3</hprad>
	</detect>
...

filter:   pattern for image file names to be processed
indir:    directory contains the dark shots
outfile:  output map file to be created, will be used for healing
outimage: output hotpixel image showing the hotpixels, optional to fill
channels: 10..51, default:32 (less means less hotpixel will be found, more means more)
amount:   0,999..1,0 default:0,999 (a param of the spot healing, you don't need to change)
hprad:    3..4 default:3 (radius of the spot healing, you don't need to change)

Example call:
batchhotpixelremover detect config.xml
(..supposed the exe and the xml is in the same dir)

In our example, will produce 2 files: casio-profile.xml and casio-profile.png. You can see the positions of the hotpixels visually on the png, it is just for fun.

4. Healing mode
This mode removes the hotpixels from images. Once you've run the detecting phase, you can run the healing any time, using the generated hotpixel map file as parameter. Config.xml also required for this mode too. Let's check the last part of the config.xml:

...
	<heal>
		<filter>cim*.jpg</filter>
		<indir>d:/temp/_in/</indir>
		<outdir>d:/temp/_out/</outdir>
		<method>1</method><!-- 0|1, default:1 (opencv retouch method)-->
		<range>1,0</range><!--  -->
		<saveformat>jpg</saveformat><!--jpg|png, default:jpg-->
		<diffimages mul="60,0">0</diffimages><!--0|1, default:0-->
	</heal>
...

filter: pattern for image file names to be healed
indir:  directory contains the images to be healed
outdir: output directory, healed images will be saved here
method: 0 or 1, default:1 (opencv spot healing method, you don't need to change)
range:  1..100, default:3 (param of the spot healing method, you don't need to change)
saveformat: jpg or png, default:jpg
diffimages: 0 or 1, default:0 (means do you want to create difference images or not)
"mul" in diffimages: multiplicator of the difference pixel values for visualization the healing effect, you may experiment with it - it does not affects the healing at all of course

Example call:
batchhotpixelremover heal config.xml casio-profile.xml
(..supposed the exe and the xmls are in the same dir)

4. It is suggested to run the program by BAT files, see and edit do_detect.bat and do_heal.bat 

That's all, enjoy. 
Please donate this project if you find it useful on http://nlacsoft.net

Copyright @2010 nlacsoft, All rights reserved.
