RANSAC is the most widely used robust regression algorithm in computer vision. However, RANSAC has a few drawbacks which make it difficult to use in a lot of applications. Some of these problems have been addressed through improved sampling algorithms or better cost functions, but an important problem still remains. The algorithms are not user independent, and require some knowledge of the scale of the inlier noise. The projection based M-estimator (pbM) offers a solution to this by reframing the regression problem in a projection pursuit framework. In this paper we derive the pbM algorithm for heteroscedastic data. Our algorithm is applied to various real problems and its performance is compared with RANSAC and MSAC. It is shown that pbM gives better results than RANSAC and MSAC in spite of being user independent.