|
Hi,
I am currently in the process of analysing photographs for my undergraduate dissertation. The photographs are of leaves which have been
converted to black and white and contain various coverage of rust (fungus) which are darker toned areas on the leaves. The images have been
reduced to 15 pixels each in photoshop. I will then calculate percentage rust using the pixel count.
I currently have the following macros which will automate the process of counting the 3000 leaves:
dir1 = getDirectory("Choose Source Directory ");
dir2 = getDirectory("Choose Destination Directory ");
list = getFileList(dir1);
setBatchMode(true);
for (i=0; i<list.length; i++) {
showProgress(i+1, list.length);
open(dir1+list[i]);
getHistogram(values, counts, 256);
for (row=0; row<256; row++) {
setResult("Value", row, row);
setResult("Count", row, counts[row]);
}
updateResults();
selectWindow("Results");
format="txt";
saveAs(format, dir2+list[i]);
}
However, this saves each pixel count in a seperate folder. I was wondering if it would be possible to automate a process where the pixel counts could be
saved in the same excel spreadsheet?
Any help would be greatly appreciated!
Many thanks,
Natascha
|