are you sure? I mean I think in most states, if you were parked outside a person's house with a thermal camera pointed at the house, and the police drove up and asked what you were doing and you said "I'm using my thermal camera to spy on what people are doing in that house, and they don't know I'm doing it LOL!" I think the police would probably take you in.
Now as to whether they could find anything to charge you with that would stick that would depend on if the state had any sort of peeping tom laws, and if the police went up to the house and found if anyone was naked or partially naked in the house while the thermal camera was being used.
That said if there was a peeping tom law, and there was a naked person, the party with the camera that was charged could then argue that thermal cameras don't show enough to be considered under the law.
However it is my experience that police can be creative when they want to charge someone when that someone is doing something they don't like, so not sure that just a peeping tom law would be brought into play on such a circumstance.
I suppose after all this you might argue that police overreach does not make it actually illegal, but in general my viewpoint is that something being illegal is determined by power and in the case under discussion the court wanted what the police did not to be illegal because they felt it benefited the power of the system that it be so, and therefore shaped their arguments to their wants, not to any particular logic or moral sense. Thus when later another court wants the people on the street using the tech to be illegal, power gets what it wants.