For anyone in Apple's ecosystem: photos on iPhone (I believe on Mac too but haven't checked) does this out of the box; details of how to use it are here: https://support.apple.com/en-au/guide/iphone/iph21c29a1cf/io...
As with their live text (ocr on an image), subject selection (remove background) etc, there are probably slightly better implementations in dedicated apps, but for most casual uses the built in is likely more than sufficient.
replies(2):