A camera does not use existing paintings to create an image, it captures light.
And the "idea" of a frozen, materialized, two dimensional projection of what we see with our eyes, aka an image, transcends cultures and tools.
It does not depend on a particular tradition of art.
You might argue that it depends on human culture, but that's a different thing.
Also, making a portrait photo does not need concrete instances of portrait paintings.
So I don't really follow your argument.
Also, yes, I'd say the invention if the camera could be motivated by reasons that have nothing to do with art at all (documenting the physical world). The lines get blurry depending on how you define "art".
But none of that implies that the invention of the camera depends on recycling prior art.
An image AI is incapable of depicting something that's entirely missing from its training data.