Can anybody let me know how I can compare two scans with different clusters in them. I have attached a picture showing both of the scans. I want to keep the clusters which are present in both the scans.
Assuming the two sets contain the same points ( possibly with some noise added), but one of the sets contains extra points.
It should then be fairly simple to check the distance from each point in set A to each point in set B. If there is any point within some radius can mark the point as part of both set A and B. This kind of search will probably benefit greatly from some kind of search structure, like a Kd-Tree, or some other optimization approach.
Without more details it is difficult to provide a more detailed suggestion.