|N||Blackfly S IMX 252 Mono 3.2 MP USB3 Vision Camera|
|N||6 pins, 1m GPIO Cable, Hirose HR10 Circular Connector|
|N||USB 3, 1m, Type-A to Micro-B Cable|
|1||1 kiloohm resistor|
I decided to go with Flir Blackfly S IMX252 Mono USB3 vision cameras; I choose them because they offer a good overall balance between image quality, resolution, price, and they use Flir’s Spinnaker SDK.
The setup I’m using for synchronized capture is a primary/secondary setup. One camera (in my case, the left-most camera) is set as the “primary” camera. This camera sends out a strobe signal when it begins exposure of an image to the secondary camera(s) to trigger them to acquire images at the same(ish) time.
To set this up, it requires a “hardware” trigger. This requires a direct connection from the primary camera to the secondary cameras via GPIO cable (The Blackfly S specifically needs a 6-pin GPIO cable).
The documentation for synchronized capture for the BlackFly S states the following GPIO connection for each secondary camera is required:
The only additional component beside the gpio cables is a 10 kiloohm resistor (which uses a Brown, Black, Orange, Gold color code). The connections should look something like:
This will allow for the strobe to get sent from the primary to secondary cameras, although all cameras will still need to be set up via the Spinnaker API (I’ll go over this in the next article).
|N||12mm Focal Length, HP Series Fixed Focal Length Lens|
|1||AmScope 6 Watt LED Dual Gooseneck Lights Illuminator|
The next component to consider is the optics. The first step is determining the required focal length of the lens. The pertinent equation (from here) is:
- f = focal length in mm
- h = horizontal sensor size in mm
- WD = working distance in mm
- FOV = horizontal field of view in mm
There are a few constraints that I need to be satisfied:
- FOV ~= 100 mm
- WD ~= 200 mm
In addition, the sensor for the Black Fly S is a Sony IMX252 which has a “sensor type” of 1/1.8″ which has a width of 7.18 mm and a height of 5.32 mm; hence:
- h = 7.18 mm
The lens I was looking at came in either 12 mm or 16 mm focal lengths. 12 mm results in a slightly larger FOV, which is ok for my application.
The next thing to consider is the depth of field. For my application, I will need a large depth of field (i.e. objects with a varying range of distances should be in focus). Smaller apertures result in a larger depth of field. This lens actually has an adjustable aperture; the aperture is typically adjustable in increments called “f-stops”, with larger “f-numbers” corresponding to smaller apertures. I’ve gone ahead and set this lens to a large f-number, although it’s important to realize that smaller apertures mean less light will hit the sensor. So, to compensate you will either need to increase the exposure (not ideal, since any movement during acquisition will be acquired during the exposure window, and may result in a blurry image), increase the gain (again, not ideal, as it increases noise), or increase the lighting (most ideal, but requires a light source).
It’s also important to check the maximum sensor format supported (this lens has a max of 1.1″) and the mount type (this lens is a C-Mount). Both of these requirements are met by this lens and the Blackfly S.
|N||60mm Rotary Stage|
|1||250mm Travel Metric Long Travel Rack|
|N||One Knob Stage|
|N||M16 x 1.0 Male to M6 x 1.0 Male|
|N||M6 x 1.0 Female and ¼-20 Male|
|N||26.9mm by 17.9mm, 1/4"-20 Tripod Adapter|
|1||M4x0.7 x 16 SHCS, 50/Pack|
The most important requirement for the rig is it must be sturdy; if it isn’t, then there might be relative movement between the cameras which would ruin the calibration. In my case, I’d also like the relative camera positions to be adjustable.
The rack and pinion allows the baseline to be adjusted while the rotary stages allow the relative angles to be adjusted to modify the working distance. Most everything on this list is machined metal with relatively high tolerances, so rig is very sturdy, yet adjustable.
The Assembled Multi Camera Setup
After carefully assembling everything, the overall setup looks like:
The next step is to configure the cameras for synchronized capture via the Spinnaker API. This is discussed in the next post.