Instead, place detection equipment like used in TFA on places where cars pass by single-file, like freeway on-ramps. This equipment would automatically measure the emissions of each passing car (or truck), and if a particular car was dirty it would snap a photo of the license plate. If a car was flagged repeatedly at multiple stations, the State could then issue the owner a notice requiring him to fix it.
In Colorado, this is exactly what's done. There are multiple fixed and mobile automatic emissions testing systems, and people generally know where they are. You drive through one, and if you pass, you get a card in the mail saying you're good for another year. If you don't pass, you get a card saying you have to go into the emissions testing station, where they do a rolling road test on your car and diagnose exactly what's going on. Importantly, it's widely believed that the automatic emissions testing systems are more lenient, so people have a strong incentive to try to go hit those and avoid having to spend the time and money on going to an emissions testing station. They save everyone money and time, massively reduce the number of cars that have to go through the full emissions test, and do a good job of making sure the only cars that do have to go there are the ones that need to. It's a great program, and as a result the state only has to fund a half dozen emissions testing stations in total, while having massively improved air quality in the heavily populated areas. (And by massively, I mean you can now routinely see mountains over 150km away, whereas I remember times in the 1970's where weeks would go by where we couldn't see the mountains 30km away even though the sky was clear: the smog was just too dense.)