An imaging and laser based system is needed to help identify the presence of pills during a manufacturing process.
The presence of a pill can be tested by analyzing the histograms of the sample area (about the laser line). In presence of a pill, the average pixel count is 248 (standard deviation 17.83). Without the pill, the grayscale average drops to 104 (standard deviation 37.01).
Components used
Helicoid barrel, C-Mount lens mounts, achromats, red dichroic filter, C-Mount iris, monochromatic camera, line generator laser, capture board and software.

Application Requirements
The system must yield a 10mm field of view at a 250mm working distance onto a 1/3" format CCD. The imaging lens needs to be less than 75mm long.
Specifying Performance
The depth of field requirements are unknown. For this reason, the lens should incorporate a manual iris. The object resolution needed is also uncertain; providing a focusing mechanism will allow us to vary the magnification in order to obtain proper performance.
Fundamental Design Form/Paraxial Solution
This is a finite/finite imaging system. A magnification of 0.48X (4.8mm [sensor] / 10mm [FOV]) in conjunction with the length limit on the imaging lens points us to using a positive and negative element combination.

Real Lens Solution
Achromats are an ideal choice for this application because they are individually corrected for spherical and chromatic aberrations which are both difficult to correct using off-the-shelf singlets. We can use optical design software to verify our solution.

Mechanical Integration
The integrated C-Mount components are ideal for this application because they offer extreme flexibility and are easily interchangeable to adjust for optimum results. The optical components (lenses and filters), aperture control and focusing, as well as illumination, can be incorporated into the assembly. The imaging lens, along with the illumination, will then be adaptable to a C/CS mount camera. The laser diode can be mounted in our diode mount which gives it angular adjustment and can be mounted to our C-Mount ring clamp (1/4-20 set screw).

Evaluation
Flexibility was designed into this prototype in order to determine the different effects that each component has on the overall system performance. The following images provide a visual representation of the different effects.
F-number (F/#)
The gain on the camera can be adjusted to accommodate for the decrease in light with increased F/#. We see that the details are held in focus across the depth of field in the high F/# version.

Magnification (PMAG)
The front achromat is held in a helicoid barrel which allows adjustment in its position for focusing. Reducing the working distance (and subsequently refocusing) can be used to obtain high magnification images.

Filter
Filtering can be used to make the laser line stand out. We see the difference between no filter, blue filter, and red filter (used in the final images above).

Illumination
Different illuminations can be used, including a quartz halogen source with a cylinder lens to generate a line. The laser is optimum because of its high power and monochromatic red output which can easily be filtered to increase the image contrast.
