ImageJ macro-mediated image analysis

AR A. Le Ru
GI G. Ibarcq
MB M.- C. Boniface
AB A. Baussart
SM S. Muños
MC M. Chabaud
request Request a Protocol
ask Ask a question
Favorite

For analysis, images were transferred from the Raspberry Pi computer to a standard computer with a USB key, and ImageJ software [40], version 1.52a, was used. Analysis of the number of tubercles was performed taking into account the natural orange color of tubercles, which allowed their discrimination from white roots and the white filter paper. In brief, 5 successive steps were performed (Fig. 3): (i) set a scale, using a ruler, in the image and define the unit as mm, (ii) crop the images by defining the region of interest (the part of the image with inoculated roots), (iii) isolate particles thanks to a color threshold defined on hue, saturation and brightness values corresponding to tubercle color, (iv) convert particles with a binary mask and (v) analyze the number of particles according to a defined size range. A macro was then written for automatic image opening and analysis in a defined directory, leading to a summary table of the number of identified particles in each image. Additionally, a semiautomatic version of the macro was written, derived from the previous version, in which manual corrections could be made for the following steps: scaling, cropping, and correcting the number of tubercles (by adding or deleting tubercles). In this semiautomatic macro, each manual correction is announced by a dialog window. We summarized the various steps of the fully automatic macro (Additional file 1: 3a) and of the semiautomatic version (Additional file 1: 3b) with manual corrections for scaling, cropping and adjusting the numbers of tubercles. Both scripts are furnished as Additional file 4 and Additional file 5. To define the scale in the automatic macro script (Additional file 4), the user has to draw a horizontal line of “x” mm along the horizontal ruler captured in one image using the “straight line” selection tool in the ImageJ tool bar. The length in pixels (“LP”) is indicated in the status bar of ImageJ and has to be reported in the macro script, Step 2: Set scale, as the third value of the “make line” command (0,0, “LP”,0). The real value (“x”) as well as the unit (mm) of the drawn line have to be defined in the next line of the macro script “run(“Set Scale…”, “known = x unit = mm”). Concerning hue, saturation and brightness, the user has to first select “HSB” as the “color space” and then move the sliders until the desired objects are highlighted in red (when “red” is selected as the “threshold color”). For help in this setting, the user can select a small region of the particles to be identified and click the “Sample” button to predefine the hue, saturation and brightness values. The six values indicated at the end of the sliders have to be reported in step 4 of the macro script in the min[0], max[0] (for hue values), min[1], max[1] for saturation values, min[2] and max[2] for brightness values. For additional information about these commands, the user can refer to the ImageJ website on “Documentation” and “Menu Commands” (https://imagej.nih.gov/ij/docs/guide/146-Part-V.html#toc-Part-V). The macro defined for Fig. 4 was set up with the following parameters: scale = 1100 pixels, 50 mm; cropping image = (400, 426, 2634, 1824), hue = 0–55, saturation = 102–255, brightness = 95–255. This set of values was manually defined based on a few randomly chosen images using the Image/Adjust/Threshold command in ImageJ opening a dialog window, as shown in Fig. 3d. The defined size of the particles was between 0.05 and 20 mm2. For Fig. 6b, the parameters of the macro were the same as for Fig. 4, except for the cropping region, which was reduced to 400, 426, 2258, 1824, to avoid false particles at the stem base.

To establish the macro, an initial experiment was conducted using the susceptible genotype 2603 inoculated with the race Bourret in 19 rhizotrons (exp. B). In a second experiment (exp. E), the macro was tested using the 5 sunflower genotypes described above, inoculated with the 2 O. cumana races, with a total of 44 rhizotrons and 5 rhizotrons/condition, except for genotype LC1093, for which 2 rhizotrons/condition were observed.

Do you have any questions about this protocol?

Post your question to gather feedback from the community. We will also invite the authors of this article to respond.

post Post a Question
0 Q&A