Image processing tools in the study of environmental contamination by microplastics: reliability and perspectives

Microplastic pollution is one of the greatest environmental concerns for contemporary times and the future. In the last years, the number of publications about microplastic contamination has increased rapidly and the list is daily updated. However, the lack of standard analytical approaches might generate data inconsistencies, reducing the comparability among different studies. The present study investigates the potential of two image processing tools (namely the shapeR package for R and ImageJ 1.52v) in providing an accurate characterization of the shape of microplastics using a restricted set of shape descriptors. To ascertain that the selected tools can measure small shape differences, we perform an experiment to verify the detection of pre-post variations in the shape of different microplastic types (i.e., nylon [NY], polyethylene [PE], polyethylene terephthalate [PET], polypropylene [PP], polystyrene [PS], and polyvinylchloride [PVC]) treated with mildly corrosive chemicals (i.e., 10% KOH at 60 °C, 30% H2O2 at 50 °C, and 15% H2O2 + 5% HNO3 at 40 °C; incubation time ≈ 12 h). Analysis of surface area variations returns results about the vulnerability of plastic polymers to digestive solutions that are aligned with most of the acquired knowledge. The largest decrease in surface area occurs for KOH-treated PET particles, while NY results in the most susceptible polymer to the 30% H2O2 treatment, followed by PVC and PS. PE and PP are the most resistant polymers to all the used treatments. The adopted methods to characterize microplastics seem reliable tools for detecting small differences in the shape and size of these particles. Then, the analytic perspectives that can be developed using such widely accessible and low-cost equipment are discussed. Supplementary Information The online version contains supplementary material available at 10.1007/s11356-022-22128-3.


Table of contents
Workflow diagram Script 1 -Image Processing using shapeR Phase I -Image archiving Phase II -Data files preparation Phase III -Image processing Script 2 -Computation of shape descriptors using ImageJ Processing times

Supplementary Information
This supplementary document provides a brief guide to the image elaboration process. The workflow diagram shows an overview of the process. The Script 1 section illustrates the use of the shapeR package (including image archiving rules and data files preparation). The Script 2 section describes the employment of macros in ImageJ. The last section provides an estimation of the processing times.

Workflow diagram
Script 1 -Image processing using shapeR

Phase I -Image archiving
The shapeR package requires images to be archived according to the following steps: i) Images of each sampling unit must be grouped in a single folder. For instance, in our study we grouped all the images of KOH-treated nylon particles in a folder called "NYKOH_post", and the images of the same particles before their treatment in a folder called "NYKOH_pre". ii) Store the sampling unit folders in a folder called "Original". iii) Create a copy of "Original" called "Fixed". iv) Include "Original" and "Fixed" in a folder called "ShapeAnalysis".

Phase II -Data files preparation
Data for each image must be provided in a *.csv file stored in "ShapeAnalysis". In this file, each row corresponds to an image and the following variables (columns) should be included: • pop: name of the sampling unit (e.g., pre or post); • folder: folder name (e.g., NYKOH_post or NYKOH_pre); • picname: file name (e.g., NYKOH_post_01, NYKOH_post_02, etc.); • cal: calibration measurement for setting the scale (e.g., pixel/mm). The columns "folder" and "picname" are mandatory.

Phase III -Image processing
Following is reported an illustrative R script that allows the collection of surface area measurements in a *.csv file. The last command produces a mean shape reconstruction based on wavelet coefficients. It is sufficient specify the file paths at lines 4, 6 and 29, and then run the script in R after installing the shapeR package.
NB: This script is optimized for the pictures analyzed in the present study (2560 • 1920 pixel, 1143 pixel • mm -1

Script 2 -Computation of shape descriptors using ImageJ
Following is reported an illustrative script to obtain shape descriptors (i.e., surface area, compactness, solidity, and convexity) from a set of images stored in the same folder and export the results in a *.csv file. The script was developed starting from the macro code "ConvexitySolidarity.txt" available at https://imagej.nih.gov/ij/macros, which requires ImageJ 1.31g. Since the particles were photographed on standard background and interferences were further reduced using an image manipulation program (i.e., Adobe Photoshop® version 19.1.6; see Fig. 2 in the main text for a sample image), the extraction of the particles was performed by setting up an automatic threshold routine. A smoothing function was also applied to remove residual noise around the edges of the particles.
NB: This script is optimized for the pictures analyzed in the present study (2560 • 1920 pixel, 1143 pixel • mm -1 ). The default options require the particle to be placed in the center of the image. Adapting the script to images with different standards requires some modifications. Comments and suggestions in the code start with "//" and are highlighted in bold. For more information, codes, and tutorials visit https://imagej.nih.gov/ij // Specific default options for this script: