Selecting a rectangle to set colour balance on one image before applying to all images.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Selecting a rectangle to set colour balance on one image before applying to all images.

Jodels
Hi

I'm trying to white balance one image before I apply those settings to all image in a directory, but I don't know how to get my macro to select the rectangle and use that to run the color balance on.  Here's the top of my code before I do the loop on all image.

set1 = getNumber("Enter scaling factor for colour balance correction", 0.500)

        waitForUser("Select image to set white balance");
        waitForUser("Select rectangle round area to white balance");
        makeRectangle=setTool(0);
        run("Color Balance", "enter="+set1);

        dir = getDirectory("directory");
        File.makeDirectory(dir + "Processed Images");
        dirf = getDirectory("image directory")
       
      list = getFileList(dir);
    for (h=0; h<list.length-1; h++) {

Any suggestions of how to edit my code?

I'm using the set1, as I have other settings I alter later on in the macro during the loop.

Thanks Jo