MVisionPro Engineering Library · guide
Setting up a camera to inspect bottle caps, fill level and labels on a conveyor
In short
Find a view and light that show each defect: a side backlight for cap height, tilt and a visible liquid line, and front or dome light for cap color and print. Checks can share a frame that shows everything they need; a separate view is for a hidden side, clashing lights or too little field or resolution. Belt speed is bottle rate times pitch, and the exposure limit is the allowed blur divided by the product of speed and sampling. In the example's 80 mm cap view, the 4096 px smart cameras get a 35.2 µs limit (calculated) against a 45 µs minimum exposure (datasheet), so they need a light pulse within that limit or a wider field. Every camera here exceeds the 5.56 fps that one frame per bottle asks of it (calculated), so choose PC or smart camera on software, inputs and outputs, and trigger-to-reject time measured on the line.
Which defects a camera sees, and from which side
Pressco's full-bottle inspection system looks for a missing cap, a high or cocked cap, a damaged tamper band (the ring that breaks when the bottle is first opened), the wrong cap color and a fill level off target. It covers the bottle all round, 360°, with several cameras. That shows how the job splits, not what one Hikrobot camera will catch.
A camera sees only its own side. Tilt judged from one side can miss a defect on the hidden side, and a label flaw there is not in the frame at all. Front, side and top views answer different questions, so write down each question before you count cameras.
For labels, decide whether you check presence, position, artwork or code, or the whole wrap. A side camera cannot see all round a bottle that is not rotated, so a full-wrap check needs more views.
Which light shows which defect
A backlight shines through from behind the bottle, so the camera sees a silhouette with the cap as a sharp dark outline. That makes a side backlight the first trial for cap presence, height and tilt. In clear or translucent bottles, enough light passes through for the liquid boundary to show as a line, so the same setup is the first trial for fill level.
Front light, including ring and dome lights, comes from the camera side and shows the surface: cap color, print or texture, with glare kept under control. For labels, the light must keep the contrast between label and background stable from bottle to bottle, so test wet bottles with glare.
Each pairing is a first trial, not a recipe, because the light must suit your container and your liquid. For front-light trials, the catalog has dome lights and ring lights.
From bottles per hour to exposure and frame rate
Bottle rate alone does not give conveyor speed; you also need the pitch, the center-to-center distance between bottles. At an assumed 20,000 bottles per hour and 100 mm pitch, a bottle arrives every 180 ms on average, or 5.56 per second, and the belt runs at 555.6 mm/s (calculated).
Exposure, the time the sensor collects light for one image, has a ceiling set by motion. It is the blur allowance, how many pixels the image may smear, divided by the product of belt speed and sampling, the pixels per millimeter on the bottle. In symbols, t_max = blurPx / (speedMmS × pxPerMm) gives seconds; multiply by 1,000,000 for microseconds. The exposure and strobe article derives it. Under continuous light, the camera must be able to set an exposure at or below that ceiling. If the ceiling is shorter than the camera's minimum exposure, change the field, the speed or the blur allowance, or pulse the light.
A strobe, a short light pulse synchronized with the camera, can freeze motion while the exposure itself runs longer. It does so when the pulse supplies nearly all the light in the image: then the pulse length, not the exposure, goes into the blur calculation and has to fit under the ceiling. If ambient or line lighting adds a noticeable share during the rest of the exposure, a smeared copy of the cap lies over the sharp one. The whole pulse must also fall inside the exposure window and be bright enough for a usable image; the exposure article shows the timing. Check the remaining smear at the station with the line's real background light on.
Frame rate, in frames per second (fps), is a separate gate, and each camera has its own. One triggered frame per bottle needs at least the bottle rate plus a margin for timing spread. A second frame per bottle from the same camera raises that camera's required frame rate. A separate camera for another view can still take one frame per bottle; what grows is the total image data and processing the station must handle.
A smart camera or a camera with a PC
A PC camera sends frames to software on a host computer, where capture, inspection logic and reject coordination run. You specify the lens, light, host software and inputs and outputs (I/O) yourself. The MV-CA050-12UM (2448 × 2048 px mono, 47 fps, USB3) and the MV-CA032-10GM (2048 × 1536 px mono, 37.5 fps, Gigabit Ethernet) belong to this branch (datasheet).
A smart camera runs the vision software inside the camera and talks to the plant directly. The MV-SC5120XM lists Hikrobot's Vision Master software. Its 4096 × 2944 px mono sensor has a global shutter, which exposes all pixels over the same interval, and it runs at 30 fps with exposure from 45 µs to 1 s. It has three opto-isolated (electrically isolated) inputs and three outputs, plus industrial network protocols for the programmable logic controller (PLC) that runs the line. Its light source is listed as not included (all datasheet).
In both branches, someone builds the cap, level and label logic and proves it on your bottles. The recipe's processing time and the delay from trigger to reject are measured on the configured system at line speed. So the choice rests on where that logic and the reject decision live, and who maintains them.
With the smart camera, also compare its 45 µs minimum exposure with the ceiling: its 4096 px put more pixels on each millimeter of the same field, so the ceiling is shorter.
Worked example
Both stations share the assumed line at 555.6 mm/s (calculated), a 1 px blur allowance, one image per bottle and bottles moving along the image width (assumptions). The working distance (WD) is measured from the lens principal plane, the optical reference plane of the calculation. Its position relative to the lens housing comes from the drawing of the exact lens, so set the mounting distance from that drawing.
| Step | D1: cap view | D2: bottle and neck view | Origin |
|---|---|---|---|
| Camera | MV-CA050-12UM | MV-CA032-10GM | example choice |
| Camera pixels | 2448 × 2048 px | 2048 × 1536 px | datasheet |
| Field of view | 80 × 66.9 mm | 200 × 150 mm | assumption; D1 height follows the sensor's aspect ratio |
| Working distance | 300 mm | 500 mm | assumption |
| Cap width | 30 mm | 30 mm | assumption |
| Smallest feature and pixel budget | 0.5 mm at 5 px | 1 mm at 5 px | assumption |
| Sampling | 30.6 px/mm | 10.24 px/mm | calculated |
| One pixel on the bottle | 32.7 µm | 97.7 µm | calculated |
| Pixels across the cap | 918 px | 307.2 px | calculated |
| Smallest feature at 5 px | 0.16 mm | 0.49 mm | calculated |
| Pixels needed across the width | 800 px | 1,000 px | calculated |
| Exposure ceiling at 1 px of blur | 58.8 µs | 175.8 µs | calculated |
| Frame rate | 47 fps | 37.5 fps | datasheet |
The pixel budget, how many pixels must fall across the smallest feature, is this example's assumption; how many pixels a feature needs explains how to set yours.
In D1, the camera's 2448 px cover the 800 px a 0.5 mm feature needs, and the 58.8 µs ceiling lies inside its standard exposure range of 15 µs to 10 s (datasheet).
In D2, the wider field raises the ceiling to 175.8 µs, but the 30 mm cap drops from 918 px to 307.2 px, and it is still a single side view.
On the MV-SC5120XM or its color version, the MV-SC5120XC-00C-NNN, the same 80 mm cap view gets 4096 px across it, or 51.2 px/mm (calculated). The ceiling falls to 35.2 µs (calculated). The shortest exposure both datasheets allow is 45 µs, and at that exposure the cap smears by 1.28 px (calculated). Under continuous light, the smart cameras therefore fail this view's 1 px budget. They stay trial candidates with a pulse of 35.2 µs or less that meets the strobe conditions above, or with a wider field, lower speed or larger blur allowance, recalculated from 4096 px across the new field width.
Both PC cameras clear the frame-rate screen: 47 and 37.5 fps (datasheet) against 5.56 bottles per second (calculated). The calculation and the datasheets screen geometry, exposure and frame rate. The station test answers the rest: whether the light is bright enough at the chosen exposure, how long processing and the trigger-to-reject path take, and whether tilted caps, damaged tamper bands and wrong colors are actually found.
Calculate for your case
The cap view link and the bottle and neck view link open the camera and lens calculator. Each carries the camera, the requested field width and height, the working distance, the feature size and pixel budget, the belt speed and the direction of motion.
The blur allowance does not travel in the address. In the defect-check mode the links select, the page fixes it at 1 px, the same as this example, and has no control for it.
The page then picks a standard lens and shows the field of that camera and lens pair instead of the requested field. With a 25 mm lens, D1 becomes about 92.9 × 77.7 mm, 26.4 px/mm and 68 µs; with a 16 mm lens, D2 becomes about 213.7 × 160.3 mm, 9.6 px/mm and 188 µs (calculated by the page). The wider field lowers sampling and lengthens the ceiling. For both views, the page concludes that the selected equipment does not meet the current parameters, so treat that camera and lens as a starting point rather than an approved station. Choose the real lens, then recompute sampling as choosing a lens when the working distance is fixed describes.
To reproduce the table for the requested fields, use the optics route of our tools API. The cap view request and the bottle and neck view request return values.maxExposureUs of about 58.8 µs and 175.8 µs (calculated). Change blurPx in the address for another allowance. For your own line, enter bottles per second times the pitch in millimeters as the speed.
Equipment that fits this example
Both PC cameras also offer an UltraShort exposure mode of 1 to 14 µs (datasheet). With either, you still choose the lens and light, specify host capture and processing, and plan mounting and protection at the line.
The MV-SC5120XM remains a candidate for the cap view on the worked example's terms: a pulse of 35.2 µs or less, or a recalculated field, speed or blur allowance. Choose the light and its controller separately, and prove the camera's recipe, processing time and PLC behavior on your bottles. If the check must tell cap colors apart, the MV-SC5120XC-00C-NNN has the same 4096 × 2944 px, 30 fps, 45 µs minimum exposure and three inputs and three outputs (datasheet), so the same terms apply.
Common mistakes
- The camera is sized from bottles per hour alone, and cap edges come out smeared along the direction of travel. The belt speed rested on a pitch nobody measured. Measure pitch and speed at the station and recompute the ceiling.
- The pulse is cut to fit the ceiling while the line lighting stays on, and a faint smeared copy of the cap lies over the sharp image. Shield the station from ambient light or shorten the exposure, then check the smear with the line lights on.
- Cap height or fill level is set as a pixel threshold, and the reject limit does not match the tolerance in millimeters. Calibrate against a reference of known height in the same view, then set the threshold in millimeters.
- The station passes on frame rate, and the reject fires on the neighboring bottle. Track each bottle from trigger to reject by a bottle ID or by encoder position, the belt travel counted by a sensor on the conveyor.
When this rule breaks
The speed conversion assumes evenly spaced bottles. Where they bunch up or the gaps change, measure the speed at the camera instead of deriving it from the rate. The exposure ceiling assumes constant speed, so if the line speed varies, calculate and test at the highest speed it reaches.
The backlight stops working for fill level when the level cannot be seen through the bottle. Opaque bottles, dark liquid, foam or a printed sleeve can hide it. KEYENCE names foam as a fill-level challenge and notes that another sensing method may be needed. Test with your worst-case product before you commit to a camera.
Next step
Write down the bottle and cap dimensions, the pitch and belt speed at the station, and each defect with its tolerance. Then calculate sampling and the exposure limit for each view, and compare the limit with each candidate camera's minimum exposure.
Build the acceptance set before anyone calls the station finished. It should hold the worst foam and fill levels, every cap color and height, caps skewed in different directions, label positions, wet bottles with glare, speed changes, and missed or doubled triggers; with a pulsed light, add the line's normal background light. Tie every image to its bottle ID or encoder position and to its reject event. Count correct decisions, missed defects, false rejects and wrong-bottle rejects separately. Send us sample bottles, this list, your bottle drawing and the part numbers of the camera, lens, light and controller you are considering. We will confirm the pairing, work out the station geometry with you and plan the test.
Sources
- MVisionPro field-of-view calculator and Hikrobot datasheets; calculations and calculator results checked on 2026-09-25
- Pressco, full plastic bottle inspection (multi-camera 360° inspection; missing cap, high or cocked cap, damaged tamper band, wrong cap color and off-target fill level as defect classes): https://www.pressco.com/applications/filling-line-inspection/full-plastic-bottle/ (checked 2026-09-25)
- KEYENCE, basics of lighting selection (backlight silhouette, diffuse and direct lighting): https://www.keyence.com/products/vision/resources/vision-resources/basics-of-lighting-selection.jsp (checked 2026-09-25)
- KEYENCE, fill-level inspection (foam as a challenge; other modalities may be needed): https://www.keyence.com/products/vision/industries/food-beverage-packaging/fill-level-inspection.jsp (checked 2026-09-25)
- KEYENCE, food and beverage packaging vision tasks (presence and alignment as separate checks): https://www.keyence.com/products/vision/industries/food-beverage-packaging/ (checked 2026-09-25)
- KEYENCE, vision basics examples for food and other products (cap and level examples): https://www.keyence.com/ss/products/vision/visionbasics/examples/food_other.jsp (checked 2026-09-25)
- Hikrobot, VisionMaster platform: https://www.hikrobotics.com/en/machinevision/visionmaster/ (checked 2026-09-25)
Related
How this material was prepared
Prepared by MVisionPro from the stated sources and the MVisionPro calculation engine. A physical test is claimed only when the material says so explicitly. Read the editorial method.
Editorial status: verified. Content updated 2026-09-25.