- Download and install FIJI (FIJI is just ImageJ)
- Download link for PC and MAC: https://imagej.net/software/fiji/downloads
- If you have FIJI already installed, make sure, it is up to date: Help › Update...
- Open Fiji, it should look like this:
- Perform a color threshold as you would do without macro and note down the numbers, you used. The result and color threshold window can be discarded, you will only need the numbers.
- Drag and drop the macro file on to the FIJI Window and press the 'Run' button in the popped-up window.
- Enter the numbers from Step 1 in to the dialog window
- From now on follow the instructions given by the Macro.
- Read the dialogs carefully!
- All numerical result will be printed in the Log-window, save it then you finished your analysis!
- Open your clearly named canopy coverage image by drag and drop or File › Open
- Plugins › Transform › Interactive Perspective
- Four small plus signs should appear on the image, drag them across the image until the frame is just outside the field of view.
- Confirm with ENTER
- Image › Adjust › Color Threshold...
- Set all filters to 'Pass'
- Thresholding method: Default
- Threshold color: B&W
- Color space: HSB
- Dark background: enabled
- Set Hue, Saturation and Brightness, so only plants are white and anything else is black.
- Select the image
- Duplicate the image: Image › Duplicate... (Ctrl + Shift + D)
- Analyze › Histogram (Ctrl + H)
- Press 'List' on the Histogram Window (red in the picture below)
- Note down the count for value=0 (background) and value=255 (canopy)
- Calculate the canopy coverage
- Double click on the color picker (green in the picture below) and select black as background color.
- Use the selection tools from Fiji (red in the picture below) to select one weed or a group of weeds at a time, when selected press the del key. The weeds should now be replaced by solid black color.
- Repeat, until there are no visible weeds left
- You can reverse the last deletion with Cntr + Z