@anshul.godha
Glad you found the help you needed. 
For Batch Processing… there are multiple ways to do this:
-
‘Easy’ option using the built in Batch Process window…
-
‘Flexible’ option that uses the following script (see below):
In either case - you want to take advantage of the Recorder, which records the actions you take in ImageJ/Fiji into code - it’s the starting point of starting to script in ImageJ/Fiji…
// @File(label = "Input directory", style = "directory") input
// @File(label = "Output directory", style = "directory") output
// @String(label = "File suffix", value = ".tif") suffix
/*
* Macro template to process multiple images in a folder
*/
// See also Process_Folder.py for a version of this code
// in the Python scripting language.
processFolder(input);
// function to scan folders/subfolders/files to find files with correct suffix
function processFolder(input) {
list = getFileList(input);
list = Array.sort(list);
for (i = 0; i < list.length; i++) {
if(File.isDirectory(input + File.separator + list[i]))
processFolder(input + File.separator + list[i]);
if(endsWith(list[i], suffix))
processFile(input, output, list[i]);
}
}
function processFile(input, output, file) {
// Do the processing here by adding your own code.
// Leave the print statements until things work, then remove them.
print("Processing: " + input + File.separator + file);
print("Saving to: " + output);
}
Here are some other helpful links…
Hope this helps!
eta 