Did the invention of the camera influence artists?

Yes, it certainly did. Some painters used a camera instead of sketching in front of a subject. Later on, around 1900, we find painters (and groups of painters) who held the view that painting should not try to achieve the same thing as photography, i.e. to copy reality. So there are all the -isms that are not realistic.