Automation of microplastic analysis