I guess you src
bitmap variable is null. You need to assign the image as below: And you do not need to initialize your ImageView
two times as you have already declared it in onCreate()
Change you onClick code as below:
To get the image from your ImageView
you need to get the image as below:
Bitmap src= ((BitmapDrawable)iv.getDrawable()).getBitmap();
public void onClick(View arg0) {
System.out.println("Inside onClick()");
src = doHighlightImage(src);
System.out.println("doHighlightImage has been passed");
iv.setImageBitmap(src);
}