Important factors to consider before selecting a lens:
-
Lens mount - C, S, EF, F or other mounts
-
Focal distance vs image area (FOV - field of view) vs working distance
-
Image circle vs sensor size
-
Resolution - nominal pixel size of the lens is not larger than the pixel size of the sensor
-
Aperture vs lighting conditions vs depth of field
Basically, what is important to check is Object height and width, working distance, lens mount of the camera and resolution.
If the available Focal length of the lenses does not match, the next best thing would be the nearest lower value.
For example in the case of f 18mm it would be f 16mm.
NOTE: Each lens has its minimum object distance (MOD), if the working distance is less than the MOD, it won't be possible to focus the lens any more. This issue can be resolved by the use of the extension rings putting them between the lens and the camera.