1. A method for inspecting products that move on a production line for defects, marks, and dimensional accuracy with the use of a sensor and a processing unit having a memory, comprising: (a) providing and saving in said memory a plurality of computer-generated artificial template images, each of said plurality of computer-generated artificial template images having a plurality of predetermined coordinates and addresses mapped within said memory, said plurality of computer-generated artificial template images together defining a full template image, (b) assigning a plurality of predetermined gray levels to each of said plurality of computer-generated artificial template images, (c) creating a respective plurality of histogram vectors of said plurality of computer-generated artificial template images, each of said histogram vectors having values which are correlated to said coordinates and addresses mapped within said memory, (d) creating a product image by sensing one of said products with said sensor, said product image comprising a multiplicity of pixels with intensity levels expressed as a plurality of respective gray levels, (e) modifying said product image to produce a modified product image by converting said plurality of gray levels of said product image to a plurality of modified gray levels, (f) creating a plurality of additional gray levels by mathematically combining said plurality of modified gray levels with said plurality of predetermined gray levels so that said plurality of additional gray levels are different from said plurality of modified gray levels or said plurality of predetermined gray levels, and (g) analyzing said plurality of computer-generated artificial template images, said modified product image, and said plurality of additional gray levels for product inspection.