“My mean content conforms, but is it uniform? How many objects, and of what shape? Is this one like the others?” Three questions a point measurement, which returns a mean, does not answer.
Imaging returns a map, and it can count. Two distinct techniques sit under the word.
Where you meet it: counting and morphology of organisms in food, distribution of an active in a tablet.
The essentials in four points
- Returns a map, not a mean: blend uniformity, coating coverage, segregation, agglomerates.
- Counts, measures and classes objects one by one, and spots the odd one, with constant reproducibility.
- Two techniques under one word: machine vision tells you how many objects, of what shape; hyperspectral imaging tells you which constituent, and where.
- Reference texts: in pharma, Ph. Eur. 5.24 and USP <1776>; outside pharma, ISO 13322-1 and -2 for particle size.
How the measurement works
A blend at 5.0 % active can be 5.0 % everywhere, or 0 % here and 15 % three millimetres away. A point measurement returns the mean; imaging returns the map.
It can also count: enumerating objects, measuring their size one by one, classing their shape.
Typical applications
Content uniformity
How matter is distributed across the surface, where a mean value settles nothing.
100 % in-line inspection
Every unit seen whole: what that is worth against a sampling check.
Counting and morphology
Counting, measuring and classing objects one by one, and spotting the one that is out of line.
Application examples
Counting; colour at the baking-oven exit, in food; visual inspection, in pharma.
The worked case further down shows a count of living organisms, from the raw signal to the decision.
Identity card of the technique
| Criterion | Imaging and vision |
|---|---|
| What the measurement sees | A geometry in machine vision: object count, size, shape, colour, presence of a defect. In hyperspectral, one spectrum per pixel — a data cube. |
| Selectivity | Not applicable in machine vision: the image says how many and what shape, not what the objects are. That of NIR or RAMAN in hyperspectral, on markedly noisier spectra. |
| What interferes | Lighting decides, not the camera. An ageing lamp, a fouled window, vibration, ambient light: a vision chain drifts through its mechanics before it drifts through its model. |
| Sample presentation | Contactless, in line, on a hundred per cent of the units — but a surface, or a few tens to hundreds of microns below it in hyperspectral. |
| What the model requires | Nothing for a geometric quantity. A model, and its justification before an auditor, as soon as classification is learned. |
| Reference texts | In pharma: Ph. Eur. 5.24, Chemical imaging, is the general chapter on the subject; USP <1776> Image Analysis of Pharmaceutical Systems describes the descriptors. The method is validated on its own terms, in the sense of ICH Q2(R2). Outside pharma: ISO 13322-1 (static image analysis) and ISO 13322-2 (dynamic) for particle size; for counting or classing, validation against your laboratory’s reference method. |
Two techniques under one word
The word imaging covers two worlds. They share a camera and optics, and neither the entry cost, the nature of the information, nor the validation work.
Machine vision, where the image carries a geometry
A camera, a light, an algorithm. Each pixel carries an intensity or a colour. What comes out is morphological: a number of objects, a length, an area, an aspect ratio, a colour, a defect.
The quantity comes out of the geometry of the image rather than a model learnt on reference analyses. A dimensional standard converts pixels into microns. There is no chemometrics here, which is separate from there being nothing to build.
Hyperspectral imaging, a spectrum per pixel
The same scene, each pixel carrying a full spectrum, NIR or RAMAN according to the variant. What comes out is a data cube, two dimensions of space and one of wavelength.
It is the spectroscopy of this site with the spatial dimension added. It inherits all the chemical power, and all the calibration burden, applied to every pixel.
The rule that avoids the misunderstanding: machine vision tells you how many objects, of what shape. Hyperspectral imaging tells you which constituent, and where. The first stays out of the chemistry, and the second counts objects less well than a fast camera.
A project that starts with we will put a camera in, before settling which of the two questions it asks, usually ends with an oversized instrument.
What the instrument really returns
| Quantity | Where it comes from | What it covers |
|---|---|---|
| Number of objects in the field | Segmentation of the image: the object is separated from the background, the regions counted | A count, with what those objects are chemically, and the ones that overlap, as separate questions |
| Size and size distribution | Area or dimension of each region, converted by a dimensional standard | A projection in two dimensions. The third is estimated rather than measured |
| Shape, elongation, morphological class | Geometric descriptors, then a decision rule or a learnt model | A class is worth what the learning population is worth, and identity is a separate question |
| Distribution map of a constituent | Spectral model applied pixel by pixel on the hyperspectral cube | Contrasts between zones. Per-pixel statistics are far noisier than a single averaged spectrum |
| Blend homogeneity index | Standard deviation of the distribution map, or a statistic on domain distribution | The state, with the cause of the heterogeneity coming from the process |
The engineering factor that decides projects
The lighting decides, rather than the camera.
It is the least intuitive truth in this family, and the most constant. A modest sensor correctly lit gives a usable measurement. An excellent sensor poorly lit gives an image no algorithm will draw anything stable from. The lighting geometry, grazing incidence, backlight, ring light, structured light, determines whether the contrast you care about exists in the image.
A surface defect visible at grazing incidence fades under diffuse light. A transparent object becomes countable in backlight and stays out of reach otherwise. The choice is made by trial, and it comes before the choice of camera.
What holds, and what moves
A vision chain moves through the mechanics and the optics before it moves through the model. A lamp that ages, a window that fouls, a vibration that shifts the field, ambient light entering when a door opens. The enclosure and the shielding of the station are part of the measurement rather than part of the trim.
It is the exact counterpart of what optical coherence tomography asks on the working distance. The entry cost exists, and it has simply moved from the calibration to the installation.
Where another route serves better
It reads a surface
A camera sees a surface, and NIR hyperspectral a few tens to a few hundred microns below it. For the inside of an opaque volume, electrical tomography answers. For a packed product, TERAHERTZ.
Contrasts rather than an absolute value
A hyperspectral map is excellent for comparing zones and detecting a heterogeneity. A point measurement carries further where an absolute value has to be stated. The statistics of one pixel are not those of an averaged spectrum.
A learnt classifier is still a model
A deep-learning classification is one more model, and one whose decision is hard to explain. In a regulated environment that is exactly the question an auditor will put. What an analytical procedure has to demonstrate.
The point to size before you start: the data volume
A point spectrum is a few kilobytes. A hyperspectral image is a cube. And a production line producing several a second generates a flow of another order from everything else on this site. The storage question arises before the installation. What is kept, what is discarded, and what you will be able to find again in three years for an inspection.
It is the one case where the computing sizing can decide the fate of a measurement project. What becomes of the data, and who carries it.
A worked case: counting living organisms
A culture of living organisms grown under controlled conditions poses a counting problem that sums this page up rather well.
The question is other than it looks. Counting the individuals is useful, and the aim is to know when to stop the culture. A population grows, passes through a maximum, then declines. And what the culture has to yield follows the population. Harvesting on a fixed date means harvesting beside the peak.
The usual check leaves that peak unseen. It rests on an enumeration of live individuals per gram, done by eye under a binocular loupe, on a few samples spaced weeks apart. Four points do not locate a maximum. Nor do they say why two trays run the same way behave differently.
The problem is markedly less simple to solve than to state. The objects are small and mobile, they overlap, and the background is a culture medium that in places resembles what is being looked for.
What decides: the light and the geometry
What decides here is the imaging geometry and the light. Transmission is set aside, since nothing usable crosses the substrate, and reflection retained. It is the lighting band that separates the object from its background: the one that tells them apart is found by comparing, and nothing says in advance which it will be. And a dome light, from beneath the tray, removes the reflections that make the images unusable.
The enumeration works from there. With shape descriptors as a bonus, area, circularity, elongation, which open the way to telling the development stages apart.
What this case says about the whole family. None of the decisions above bears on the camera. All of them bear on the lighting and the geometry. That is what is written higher up this page, and this case is the demonstration of it.
It is also what makes vision a lighting project before it is a software project. Better known at the start than at the end.
Frequently asked questions
Machine vision or hyperspectral imaging: how do I know which I need?
Put the question in one sentence. If it contains how many, what size, what shape, is there a defect: machine vision, and the project is first a lighting project. If it contains which constituent or is it well distributed: hyperspectral, and the project is a chemometrics project with one more dimension. If it contains both, they are two projects, and that is the order to run them in.
Does hyperspectral imaging call for more calibration than classical NIR?
Yes, for a reason that is underestimated. The model is the same in principle, and it applies to far noisier spectra. A pixel receives a fraction of the flux a point probe receives. So either more references, or a decision to read contrasts rather than absolute values. The second route is often the sound one, and it is rarely proposed.
Can deep learning be used in a regulated environment?
Nothing forbids it, and it is sometimes the one approach that works on a complex morphology. The burden of demonstration moves, though. The learning population is documented, the behaviour on edge cases shown, and a mechanism put in place to flag an input outside the learnt domain. A model that cannot be explained can at least say when it is out of its depth. That is validation work rather than a box to tick.
Can a camera replace a release check?
For a criterion of presence, integrity or shape, a hundred per cent unit check is a very strong argument, often stronger than a sampling check. For a criterion of composition, the bound stated above on absolute values applies. As always on this site, the answer follows the question put rather than the technology.
Do we find out quickly whether it works?
Very quickly for machine vision, and that is its quality: short lighting trials on your material say whether the contrast exists. Where it does not, no software development will create it, and you will have learnt that at little cost. Longer for hyperspectral, where the lead time is that of an ordinary chemometric proof of concept.
The instruments we implement
ClearView Imaging, machine vision and imaging. Cameras, optics, lighting and vision systems. Our partner on this family of applications.
It is the most recent of our nine families, and the one whose offer is the least standardised. Every application is built to measure, from components. We say so because it is true, and because it changes how a project starts.
Send us images of your product, phone photographs included. That is where it starts.
Forty-five minutes is enough: whether the contrast you care about can exist in an image, which lighting geometry would bring it out, and whether the question belongs to machine vision or to hyperspectral. Where the contrast is not in the image, we will say so — and where to look instead.