How to perform image processing for an Android/iOS game

Hey,
I am working on a game for smartphones in which I want to detect the shapes in a photograph clicked by the phone. I was hoping if I could use some tools like OpenCV. Do you have any recommendations for possible tools. Could I face some compatibility issues?

Literally the first google result.
It’s not cheap though!

Second google result:

Yay, something for free!