Shenzhen Chenkun Vision Technology Co.,Ltd.

M12 Lens Selection Guide: Focal Length, FOV, Sensor Size & Distortion

Table of Content [Hide]
    M12 / S-Mount Lens Engineering Guide

    Choosing an M12 lens is not simply a matter of selecting  a 2.8mm, 4mm or 6mm focal length. The correct lens must match the  sensor size, required field of view, working distance,  aperture, image circle, distortion and image resolution of the complete camera system.

    This guide explains how to select an M12 camera lens for embedded vision,  robotics, inspection, automotive and other board-level camera applications.

    M12 camera lens for embedded camera module
    Example M12 camera lens from CK Vision
    Quick Answer: How Do You Choose an M12 Lens?

    Start with the actual sensor size and the field of view your application must capture. Then determine the required focal length, working distance and image circle. After that, check aperture, distortion, resolution, CRA, relative illumination, TTL and mechanical clearance. For wide-angle and fisheye lenses, simple focal-length formulas alone are not enough because optical distortion changes the real field of view.      

    What Is an M12 Lens?

    An M12 lens, commonly called an  S-mount lens or board-camera lens, normally uses an M12 threaded mount with a 0.5mm thread pitch: M12 × 0.5.

    The compact mount makes M12 lenses useful for embedded camera modules where traditional C-mount or CS-mount optics would be too large.

    Compact Mount            M12 × 0.5 threading is widely used in board-level cameras.
    Fixed Focus            Frequently used in embedded cameras with a defined working-distance range.
    Many Focal Lengths            Available from ultra-wide and fisheye designs to longer focal-length lenses.
    Embedded Vision            Common in robotics, automotive, inspection, IoT and compact vision devices.

    See CK Vision's  camera lens product range for board-level lens options.

    Step 1: Match the M12 Lens to the Sensor Size

    Sensor format should be checked before focal length because the same lens produces a different field of view on different sensor sizes.

    Common descriptions such as 1/4", 1/3", 1/2.8", 1/2.5" and 1/1.8" are optical-format names. They should not be treated as literal measurements of the sensor diagonal. For engineering calculations, use the actual active sensor width and height        from the image-sensor datasheet.

               Practical Rule                The lens image circle must be large enough to cover the active sensor area. If the sensor is larger than the usable image circle, corner shading or vignetting can occur.

    Edmund Optics provides a useful explanation of why  sensor size affects field of view and lens selection.

    Step 2: Choose Focal Length from the Required Field of View

    Focal length is one of the main parameters controlling field of view. With the same sensor, a shorter focal length normally produces a wider view, while a longer focal length produces a narrower view.

    Approximate Rectilinear Lens Formula
    Angular FOV ≈ 2 × arctan  ( Sensor Dimension ÷ 2Focal Length )
    Use actual horizontal, vertical or diagonal sensor dimensions.  This is a first-pass approximation for lenses with relatively low distortion.

    Real Example: The Same 4mm M12 Lens on Different Sensors

    CK Vision's 4mm F/1.0 M12 lens provides a useful example. The physical lens does not change, but the field of view changes when it is paired with different sensor formats.

    SensorFocal LengthHorizontal FOVVertical FOVDiagonal FOV
    1/2.7"4.0mm87.0°46.2°103.7°
    1/2.8"4.0mm83.5°44.6°99.1°
    1/2.9"4.0mm80.2°43.0°94.7°

    This is why asking only for a “4mm M12 lens” is incomplete. The sensor must also be specified.

    For more detailed optical theory, see Edmund Optics'   guide to focal length and field of view.

    Step 3: Define Working Distance and Required Scene Size

    Working distance is the distance between the lens and the target being imaged. It must be considered together with focal length and sensor size.

    If the lens and sensor stay the same, moving the camera farther from the object usually increases the visible scene size. Moving it closer reduces the scene size and increases the relative size of the target in the image.

    Input 1
    Working distance
    Input 2
    Required scene width / height
    Input 3
    Actual sensor dimensions

    These three values can be used to estimate the required lens focal length. For a quick theoretical calculation, Edmund Optics provides an  Imaging System Parameter Calculator .

    Important: theoretical calculations are a starting point. Real FOV can differ because of lens distortion, principal-plane location, focus position and manufacturing tolerance.

    Step 4: Choose the Right F-Number for Light and Depth of Field

    The F-number describes the relative aperture of the lens. A lower F-number such as F/1.0 generally allows more light to reach the sensor than a higher F-number such as F/2.8, assuming other factors are comparable.

    ApertureTypical BenefitTrade-Off to Evaluate
    Lower F-numberMore light collectionDepth of field and optical performance may become more demanding
    Higher F-numberGreater depth of field in many configurationsLess light reaches the sensor

    CK Vision's F/1.0 4mm M12 lens  is an example of an M12 optical configuration designed around a large relative aperture.

    Aperture should not be selected independently from exposure time, sensor sensitivity,        motion blur, depth of field and the available illumination.

    Step 5: Check Optical Distortion — Especially for Wide-Angle Lenses

    A wide field of view does not automatically mean the lens is suitable for measurement,        OCR or geometric inspection.

    Lens distortion changes the geometric relationship between objects in the scene        and their positions in the image. Barrel distortion is particularly common in short-focal-length wide-angle lenses.

    Distortion Matters More When You Need:
    Dimensional measurement
    Machine vision gauging
    Document scanning
    OCR / barcode geometry

    For ultra-wide and fisheye optics, the normal rectilinear FOV formula becomes much less reliable.  The real projection model and distortion curve need to be evaluated.

    Edmund Optics provides a detailed technical explanation of optical distortion in imaging systems .

    Step 6: Match Lens Resolution to the Camera Sensor

    A high-megapixel sensor does not guarantee a high-detail image if the lens cannot resolve  enough spatial detail onto the sensor.

    As pixel size becomes smaller and sensor resolution increases, the optical system normally needs better contrast at higher spatial frequencies. This is commonly evaluated using MTF — Modulation Transfer Function.

               Common Selection Mistake                A lens described as “5MP” or “8MP” should not be selected from the megapixel label alone. Sensor size, pixel pitch, image circle, wavelength, field position, focus condition and MTF performance also matter.

    For an OEM project, evaluate image sharpness at the center and corners of the actual sensor rather than judging only the center image.

    Image Circle, CRA and Relative Illumination

    Focal length and aperture are not the only optical parameters that matter. For compact camera modules, also review:

    ParameterWhy It Matters
    Image CircleMust adequately cover the active sensor area.
    CRAChief Ray Angle compatibility can affect sensor-edge response and color shading.
    Relative IlluminationDescribes how image brightness changes from center toward the edge.
    Wavelength RangeVisible, 850nm IR and 940nm IR applications may require different optical considerations.

    Step 7: Confirm TTL, Back Focal Length and Mechanical Clearance

    Even when the optical specification is correct, an M12 lens can still fail mechanically if it interferes with the lens holder, sensor board, enclosure, IR filter or nearby components.

    TTL            Total optical / mechanical length of the lens configuration.
    BFL            Back focal length affects sensor and filter positioning.
    Lens Diameter            Lens housing must fit the available enclosure opening.
    Focus Travel            Enough thread engagement must remain after focus adjustment.

    This mechanical check is particularly important in thin embedded devices, compact robotics and camera modules with limited Z-height.

    Which Type of M12 Lens Do You Need?

    Lens TypeMain GoalKey Parameters
    Wide-Angle M12Capture a larger scene in limited spaceFOV, distortion, corner resolution
    Fisheye M12Ultra-wide or panoramic coverageProjection model, distortion, image circle
    Low-Light M12Increase optical light collectionF-number, flare, edge performance
    Macro / Close FocusImage small targets at short working distancesWorking distance, magnification, focus
    Low-Distortion M12Preserve image geometryTV / geometric distortion, edge MTF

    CK Vision also provides  M12 fisheye lens options  and  alternative M12 lens configurations.

    If an M12 lens is too large for the mechanical envelope, compare the site's  M8 camera lens options.

    M12 Lens Selection by Application

    ApplicationPriorityLens Factors to Check
    RoboticsScene coverage and compact sizeFOV, distortion, focus range, enclosure clearance
    Machine InspectionDetail and geometryResolution, distortion, working distance, DOF
    AutomotiveWide coverage and environmental stabilityFOV, temperature, distortion, flare, CRA
    Low-Light CameraLight collectionF-number, transmission, sensor sensitivity
    Document / OCRGeometric accuracy and detailDistortion, MTF, edge sharpness, illumination
    Surveillance / OverviewLarge scene coverageWide FOV, low light, distortion tolerance

    M12 Lens Selection Process: 7 Steps

    01.             Confirm the image sensor.  Record the actual active sensor width, height, pixel size and resolution.
    02.             Define the scene. Determine the required horizontal and vertical field of view.
    03.             Define working distance. Specify the minimum, nominal and maximum target distances.
    04.             Estimate focal length. Use sensor size, FOV and working distance for the initial calculation.
    05.             Check optical quality. Evaluate distortion, resolution, MTF, relative illumination and CRA.
    06.             Check light and focus. Choose F-number, focus range and depth of field for the application.
    07.             Validate the real prototype. Confirm the selected lens on the actual sensor, holder, filter, enclosure and target scene.

    Sunex also provides a useful  M12 / S-mount lens selection methodology covering FOV, focal length, F-number, optical performance and mechanical constraints.

    What Information Should You Send to an M12 Lens Supplier?

    Sending only “we need a 4mm lens” usually does not provide enough information. Prepare the following details:

    • Image sensor model

    • Active sensor size / optical format

    • Resolution and pixel size

    • Required horizontal / vertical / diagonal FOV

    • Working distance

    • Target width and height

    • Required distortion limit

    • Lighting conditions

    • Visible / 850nm / 940nm wavelength requirement

    • Maximum lens diameter and TTL

    • Focus range / depth of field

    • Application and environmental requirements

    6 Common M12 Lens Selection Mistakes

                   1. Choosing focal length without specifying the sensor.            
               The same lens produces a different FOV on different sensor sizes.
                   2. Selecting the widest possible FOV without checking distortion.            
               Wide coverage can come with substantial barrel or fisheye distortion.
                   3. Matching only the megapixel label.            
               Real optical resolution depends on pixel pitch, MTF and field position.
                   4. Ignoring image circle.            
               A lens that cannot cover the sensor can produce dark or degraded corners.
                   5. Ignoring mechanical clearance.            
               A lens can be optically suitable but too long or too wide for the final enclosure.
                   6. Skipping prototype validation.            
               Calculations and lens specifications should always be verified with the actual sensor and target scene.

    M12 Lens FAQs

    What does M12 mean on a camera lens?

    M12 refers to the nominal 12mm threaded lens mount. A common S-mount configuration is M12 × 0.5, meaning a 12mm nominal thread diameter with a 0.5mm pitch.

    Does a shorter focal length always mean a wider FOV?

    When sensor size and lens projection are otherwise comparable, a shorter focal length normally produces a wider field of view. Sensor size and distortion must also be considered.

    Does sensor size affect M12 lens FOV?

    Yes. A larger active sensor normally captures a wider portion of the image circle from the same lens, which increases the resulting field of view if the lens can cover the sensor.

    Is a 2.8mm M12 lens always wide angle?

    It is usually wider than a longer focal-length lens on the same sensor, but the actual FOV depends on sensor dimensions and the optical design. Two 2.8mm lenses can also have different distortion and usable image circles.

    What is the difference between FOV and focal length?

    Focal length is a property of the lens. Field of view describes how much of the scene the complete camera system captures. FOV therefore depends on both the lens and the sensor.

    Is F/1.0 always better than F/2.0?

    No. F/1.0 allows a larger relative aperture, which can help in low-light conditions, but depth of field, optical complexity, edge performance and application requirements must also be considered.

    Can an M12 fisheye lens be used for machine measurement?

    A fisheye lens can provide extremely wide coverage, but its strong geometric distortion makes it unsuitable for many direct measurement tasks unless the imaging system includes appropriate calibration and distortion correction.

    Need Help Selecting an M12 Lens for Your Camera Module?

    Send CK Vision your image sensor model, sensor size, target resolution, working distance, required field of view, distortion requirement, lighting environment and mechanical limits. These parameters allow the optical configuration to be evaluated against the actual application.

               Discuss Your M12 Lens Requirement        
    References
    PREV: No information