Select rectangle from (business)card and save this rectangle image with camera2 android

I'm trying to recognise a rectangle for example a business card and recognise that there is a picture (if this is too difficult with a fixed position would also be nice), after recognising this picture save it.

Maybe there is already an api out there for this or a library but I didn't find it yet. I will keep everyone updated if I find this before I get response. But if someone would be able to help would I appreciate it a lot!