Measuring multiple physical objects with the same sensor, you can use k-means to separate the measurements from each object, given that you know how many objects are being sensed. I can't get more specific than that.
Built as part of a larger carpet based localisation project [2]
1: https://nbviewer.org/github/tim-fan/carpet_color_classificat...
2: https://github.com/tim-fan/carpet_localisation/wiki/Carpet-L...