1 | initial version |
You may be able to separate them if they have been distinguished in some way, for example different color or gray scales. Another thing to consider will be a filter like Kalman that keeps track of their motion. Such filter will track them while the pedestrians move towards each other, lose them while they are merged, and track them again after they have been separated. You may have to play with some fine tuning on the filter.