High-end, PC-based vision systems (PPT) do all the processing within a PC. They use a simple CCD or CMOS camera, and transfer the image to a framegrabber card. The inspection and decision is all performed within the PC; these types of vision systems are, of course, PC dependent, and can be VERY expensive. But most of them come with a way to save images based on condition (since the image is already in a PC anyways).
PC-based vision systems have been all but replaced in the last 5 years by stand-alone vision systems (DVT, Cognex, Banner), where the CCD and processor are all housed in one unit, and the only main interface with the machine is a 'pass/fail' type discrete signal. Although most of these vision systems have ActiveX components that you can use in Visual Basic, or some other SCADA systems like Wonderware, RSLogix32, and iFix, to import images on the fly, and save them. So the cheapest solution would be to get a stand-alone vision system to perform inspections, and connect it over Ethernet to a PC running a custom VB application that saves failed images with a time and date stamp.
Easy enough!