The main criteria in the EU is whether the method embodied in the software is “technical.” (Image recognition as opposed to say a business method.) See: https://mewburn.com/resource/patentability-of-business-metho...
In the US, under Alice, Section 101 has morphed into a very similar analysis.