I don't blame you for not being able to get this out of your mind. You're still in the shock and fog phase of being cheated on, and your mind is having trouble processing.
I'm very sorry you had to see that, but I do commend you for thinking quickly. A couple of questions: did they hear or see you? You say you took pictures-- did the SEE you take pictures of them? If they did I strongly recommend that you, right now, go somewhere like the nearest public library with PC stations and email yourself the pictures. THEN, create a new Google account your husband could never guess the name of in a million years. Google accounts come with Google Drives. Upload the files to that Google Drive.
Make double sure the password to that google drive is something he'd never guess randomly-- no birthdays, no favorite pets, no housenumbers, nothing obvious. Memorize the password. At this point you have a digital backup of the file that is safe from both him and them.
Next, make an appointment to get checked for STIs and STDs. They're your neighbors, but that doesn't mean you trust them to have had safe sex. Your hubs has basically shared someone's sexual health without consulting you about it.
Next step, while you are still out, is to call a really good divorce lawyer (or three). NOBODY is saying "divorce" yet but you really need to be prepared for he next conversation you have with your husband. Don't make any long term decisions yet without thinking about the consequences for YOU and your family. You don't mention children, do you have any? This is a whole other tier of concerns.
Last thing, if you have access to counseling through your health plan or whatever, NOW is the time to book an appointment.
It will be stupid to say "relax, you got this" right now. Way too early to even let this sink in. You've been betrayed rather brazenly, and there's no magic wand for this feeling right now. My suggestion is breathe in, breathe out, and focus on those things you can control. It did happen-- you are in a different reality than what you woke up with today. It will take a while to adjust to this no matter what happens in the near future.
Best of luck, be strong and resolute in the days ahead, keep us updated. There are people here whose counsel I value that you should talk to.
Rex Nihilo, the King of Nothing
----------------------------------
“If you’re going through hell, keep going. Just please stop screaming, it’s not good for morale.”
— Winston Churchill
BS 3 DDays/Attempted R, it failed. In a better place