A1. Image segmentation procedure

The image segmentation procedure is shown in Figure A1. A 5×5 Gaussian low pass filter was implemented on the SE1 image (Figure A2a) to smooth the MR image (Figure A2b). An additive image of the second derivatives of the filtered image in the x and y direction was obtained to identify the boundary between the red layer and the inner pericarp layer (Figure A2c). Image erosion (disk, r = 2) was applied to the derivative image to fill in the gap between the inner and outer perimeter of the red layer (Figure A2d). A binary mask of the whole tomato was created using Otsu's auto thresholding method (Figure A2e). The eroded image was multiplied by the binary mask to remove background voxels (Figure A2f). A rough mask of red layer is generated by image thresholding (Figure A2g). However, some small foreign objects were attached to the mask or scattered in the image. Scattered small objects were removed from the mask by “bwareaopen.m” (Figure A2h). Because the red layer mask was an elliptical ring with thickness of about 5 voxels, image operations “imopen.m” and “imclose.m” would change the shape of the mask dramatically. In order to remove the small objects attached to the mask and small gaps within the red layer mask, further morphology operations including “imclose.m”, “imfill.m”, and “imopen.m” were implemented on the complement of the rough red layer mask (Figure A2i). A smooth red layer mask was obtained by calculating the complement of the polished complement of the rough red layer mask. Then, the stem end and blossom end of the red layer mask were clipped off due to the discontinuity of red layer in the two end sections (Figure A2j). The Euclidean distances of all voxels on the inner perimeter of the red layer mask to the outermost edge of the mask were average to calculate the red layer thickness.

Figure A1. Schematic flow chart of image segmentation procedure.

Figure A2. Results of each image segmentation step. (a) original Spin Echo 1 image, (b) Gaussian low pass filter smoothed image, (c) second derivative of the smoothed image, (d) eroded image, (e) binary mask of the tomato, (f) background removed from the image, (g) rough red layer mask, (h) small objects removed from the mask, (i) complement of the rough red layer mask, (j) red layer mask, (k) the red layer mask overlaid on the Spin Echo 1 image.

JFDS_3007_sm_suppmat.doc707KSupporting info item

Please note: Wiley Blackwell is not responsible for the content or functionality of any supporting information supplied by the authors. Any queries (other than missing content) should be directed to the corresponding author for the article.