How to make a Selection Tool

Hi. I am fairly new to Android Programming. What I am trying to make is an image editing app. The part where I am stuck is at creating a selection tool which would be activated by a button. Like the image editing programs like gimp and PS I want to be able to select certain areas from a picture(ex: the face in a profile pic) so that as long as the selection is in place the image editing would only be effective/visible in that area. How could I do that and what do I need to make something like that?