Analysis of synthetic ‘rice kernels’ (low resolution)

Introduction
In this post we will analyze a synthetically generated image (with Matlab) that contains objects (ellipsoids) very similar to rice kernels. As we will see, the low image resolution will result on a bad feature extraction and, consequently no valid conclusions can be extracted at the end…

synthetic kernel

Individual objects
We approximate the 2D projection of a rice kernel plotting an ellipsoid with aspect ratio of 2. Real rice kernel are ellipsoids about 6 mm length 3 mm width. To simulate this, we configure the synthetic generator with a0=6 and b0=3. This measures are in pixels and correspond to the semi-axes of the ellipsoid. The matlab script will generate a 9 by 9 matrix containing the pixels of the image. Axes are the 12 and 6 pixels and as it is zoomed in you can check its really low resolution.

synthetic microstructure

Sample presentation & image capture
We merge these both steps by means of the Tschopp’s synthetic microstructure generator configured with the following parametres

  • image size of 2048 by 2048 pixels
  • 10% volume fraction of particles in the final image
  • a0=6, b0=3 (aspect ratio of 2, but low resolution individual objects)
  • lognormal distribution of ellipsoids AR (mean=1, sigma=0,25)
  • a total amount of 4971 particles randomly oriented
overlapped objects

Image processing (feature extraction)
We use ImageJ. The steps to follow are:

  • open the synthetic ‘Rice’, change the image type to 8-bit and set the scale (12 pixels are equal to 6 mm). To this point, all measurements will be computed in mm
  • set the measurements (features) to be extracted. In this case we select: area, perimeter, shape descriptors (circularity or shape factor, aspect ratio, roundness and solidity) and Feret’s diameter
  • adjust threshold to best segment rice from the background (no problem with this 8-bit BW image). Rice kernels should be depicted in red. Due to the low resolution, some of them are overlapped
  • analyze particles showing outlines and excluding objects on edges. We get 4688 results (be aware of overlapped objects). As we want to exclude these overlapped objects in our statistical analysis, we can identify some features from them (as, for example, the area, that is always up to 10 mm2) and repeat the processing setting the area for valid objects from 0 to 10 mm2. This results on 3983 valid objects detected and analyzed. You can download the ‘txt’ results file from here
particle distributions

Statistical analysis
We use Matlab’s statistics toolbox. The steps to follow are:

  • load in Matlab desktop the image processing results from the txt file generated by ImageJ
  • represent number weighted Particle Size Distributions (PSDs) using size features as, for example, area, perimeter and aspect ratio. A fast manual analysis, show histograms and some scatter plots (matlab script here). Because of overlapping, three different clusters are clearly identified
low resolution overlapped kernels

Discussion
Before the statistical analysis, if we zoom the segmented ‘Rice’ image we realize how the image low resolution decreases the quality of the segmentation step. Inn addition to this, in some of the cases, rice kernels next to each other are merged by the same outline. This results on a big amount of detected outilers. In the most of the times, the zoom on the segmented image reveals how, low resolution, degenerates the shape of the objects (and no extracted features will be valid for further analysis). The low resolution and overlapping effect result on the not (statistically) normal PSD and objects appear grouped into (3). We can avoid all this setting (in the sample generation & image capture steps) axes to take higher values (tet’s say a0=40, b0=20) and keeping the aspect ratio of 2.

Conclussion
Images with low resolution degenerate in bad overlay detection, overlapped objects, outliers and so, invalid measurements. Consequently statistical analysis and results have no relevance at all.

Author: Pau Micó

Pau Micó works as assistant professor and researcher at the Alcoi Campus (Universitat Politècnica de València) - SPAIN