Isn’t it called transference: Accusing others of what you are yourself?
Actually, that's projection.
An example of transference is when you feel a certain emotion toward a person because they remind you of someone else who evoked such an emotion. And then there is transference in a clinical setting which involves the transference onto your therapist of emotions etc.