How to create adaptive meshes

I have a gray scale picture, how can I make more points near the bright area and less grid in dark area?