They might even not be allowed to look at your photos without a court order (since looking at your photos is a search – I’m not sure about that one).
They can only keep your camera around as long as they plan on using it as evidence – meaning that if there is no investigation or as soon as the investigation ends or after the court is finished with the case they have to give it back to you (unchanged if the court doesn’t rule otherwise – which it won’t).
The good news is that the police in Germany cannot make you pay a fine or get you into prison for taking photos of them. The bad news is that they can inconvenience you by temporarily taking away your camera. Which they can do but as soon as they delete so much as one photo you should defend yourself and sue.