01 · The problem
Cattle methane is large, and hard to measure
Enteric methane from cattle is one of agriculture's largest greenhouse-gas sources. Feed additives, diet changes and selective breeding can all cut a cow's methane, but testing them means measuring many animals, and measurement is the bottleneck.
More than 95% of a cow's methane leaves through its nose and mouth, by belching (eructation) and in exhaled breath. Today it is measured in sealed respiration chambers, or with an SF₆ tracer gas and a sampling halter. Each burp lasts seconds; these methods report averages over minutes to days.
| Technique | Hardware cost | Invasiveness | Where | Time resolution |
|---|---|---|---|---|
| Respiration chamber | Up to $2M (facility) | Confinement | Sealed room | τ ≈ 8–10 min (air turnover) |
| GreenFeed (C-Lock) | Moderate | Feeder visits | Barn or pasture | 3–7 min per visit |
| SF₆ tracer gas | Moderate | Bolus and halter | Barn or pasture | Hours to days |
| Mid-infrared optical gas imaging (this work) | < $0.1M (camera) | None | Chamber and barn | 30 frames/s, single breaths |
The gap: no technology is at once non-invasive, scalable, cost-effective and usable in the animal's natural environment. Optical gas imaging could be, but commercial cameras were never specialised for cows.
Sources: IPCC AR5 WG1 Ch. 8 (2014); Bannink et al. (2011); Tseten et al. (2022); Hammond et al., Anim. Prod. Sci. 56:181 (2016), GreenFeed; Pinares-Patiño et al., GRA Technical Manual on Respiration Chamber Designs (2014). Costs are indicative.
02 · How a camera sees methane
Methane glows, faintly, at 3.3 µm
Methane absorbs and emits infrared light in a narrow band around 3.3 µm. Our camera, a FLIR GIS-320 (cooled GF320 core), images only 3.2–3.4 µm, so a cloud of methane shows up as a change in brightness against whatever is behind it.
The gas is only visible if it is at a different temperature from the background. Warm breath in front of a cooler wall adds light; gas at the wall's temperature is invisible. Every chamber therefore gets a matte black backdrop (Krylon paint, emissivity about 0.95 or higher in the mid-infrared, typical for flat black paint): it reflects almost nothing, so the camera sees the backdrop's own temperature rather than reflections of the warm cow.

The camera measures the light that gets through the plume plus the light the plume emits. Their difference from the plain backdrop is the contrast:
Here \(c_X L\) is the methane column (concentration × path length), \(\alpha\) the absorption coefficient, and \(L_0(T)\) the blackbody radiance at temperature \(T\). No methane, or gas at the backdrop's temperature, gives no contrast.
03 · First look
In a working dairy barn
Before going into chambers, we took a portable OGI rig to Fairvue Farms, a family-owned dairy in Woodstock, Connecticut, to see whether a camera could pick out a cow's breath at the feed bunk.




What a cow burp looks like
The barn showed we can see plumes and behaviour. It could not tell us how much methane each plume carries. For that we needed a reference that measures the same cow at the same time: a respiration chamber.
04 · Into the respiration chamber
A camera inside the reference instrument
A respiration chamber is a sealed stall with a known air flow; analysers measure the methane in the air leaving it. We installed the camera inside chambers at Cornell University and at AgResearch Grasslands in New Zealand, so camera and chamber watch the same cow at the same time.
Cornell University




The first camera package, mounted on the chamber wall:
- FLIR GIS-320 OGI camera (thermal / methane and visible)
- Intel RealSense camera (depth and visible)
- Gremsy T7 gimbal for remote pointing
- Jetson computer and 5 TB drive for recording, streaming and networking
- HDMI transmitter for close-range wireless viewing; Digilent board and RC receiver for gimbal commands
The cow either lies down or stands at the trough, so the backdrop has to cover both views.
AgResearch Grasslands, New Zealand



Here the camera package hangs from the chamber's frame above the stall, looking down on both zones. To follow the cow between them, the camera later moved onto a rail.

A camera on a rail that follows the nose
For the last four trial days the camera rode a motorised ceiling rail (Arduino, stepper motor and limit switches) between the two zones. The cows tolerated it well, since it is quiet and slow, though some got curious and came within 4 inches of the lens.
An Intel NUC finds a stripe of livestock marking paint (tail paint) on the cow's nose bridge 15 times a second and steers the gimbal to keep the nose in frame, with PD control and a dead zone so the camera doesn't chase every twitch. Everything is run from a web page over a Tailscale VPN, from a laptop or a phone, day and night.


How the rig evolved between the trials
05 · Finding usable footage
Most footage breaks the still-scene assumption
The pipeline treats anything slower than about half a second as background and anything faster as possible gas (the filter in §06). That only works when the camera is still, the cow is in profile, and the backdrop is behind its nose.
The best case: still camera, cow in profile
Even here, the raw image is dominated by the warm head and the rails; the plume is too faint to see. Making it visible is the job of the next section.
Everything else
06 · Making the plume visible
A selective filter, then a windowed RMS
A breath plume changes the image by about a count; the camera's noise is 0.6 counts. Three steps separate the two: follow the slow background, average the noise away while letting fast changes through, and measure how much each pixel flickers.

- 1Follow the background. An exponential temporal filter remembers about half a second (at 30 frames/s):\[ I^*_t = p_0\, I_t + (1 - p_0)\, I^*_{t-1}, \qquad p_0 = \tfrac{1}{15} \]
- 2Average noise, pass gas. The change from the background is filtered again, but its averaging switches off when a change is too big to be noise. A sigmoid gate in noise units sets the switch at 2σ:\[ \delta I^*_t = K * \Big[\, p\,(I_t - I^*_{t-1}) + (1-p)\,\delta I^*_{t-1} \Big], \qquad p = p_0 + \frac{1 - p_0}{1 + e^{-3(|\Delta|/\sigma - 2)}} \]where \(K\) is a 1-pixel blur and \(\Delta\) the change since the last output.
- 3Measure the flicker. Turbulent eddies break a plume into puffs, so one pixel's column both shifts and flickers. The RMS over a 0.5 s window keeps both; camera noise averages to zero and adds only a fixed σ²:\[ A(x,t) = \sqrt{\operatorname{mean}_{0.5\,\text{s}}\big(\delta I^{*2}\big)}, \qquad A^2 = \underbrace{\big(\operatorname{mean}\,\delta I^*\big)^2}_{\text{shift}} + \underbrace{\operatorname{var}\,\delta I^*}_{\text{fluctuation}} \]
Controlled releases (0.4% methane): the windowed RMS detects 34% of gas pixels, against 15% from single frames at the same false-alarm rate (2.4×). 59% of the extra signal is in the fluctuation term. The full-trial analysis uses a 1 s window, which gives 3.4× (50% vs 15%) on the same release.
One clip through the pipeline
07 · Masking what isn't gas
A moving cow and shiny rails both look like gas
Masks in action
Some activity still leaks at the moving head's edge, just outside the 8 px margin. The pipeline now keeps a pixel masked for 15 frames (0.5 s) after the cow leaves it, because the background filter still remembers the warm head there.
08 · From activity to plume regions
Connecting the plume in space and time
- 1Grow where activity ≥ 2σout (about 1 in 1,000 gas-free values).
- 2Seed where activity ≥ 3σout (about 1 in a million), in cores of ≥ 5 px.
- 3Connect in space and time, (x, y, t), so a plume is one 3D object.
- 4Keep regions with a seed that touch the outlet: a 10 px circle where the plume leaves the nose, clicked once per clip in review.
- 5Measure each region: start, duration, peak, area and reach.
Two thresholds do what one can't. A high seed threshold means a region is almost never pure noise; a lower growing threshold lets each region spread to the plume's faint edges. Requiring the region to touch the nostril outlet rejects leftover clutter elsewhere in the frame.
09 · Next: lining up with the chamber
Every burp, against the chamber's smoothed view
The camera sees each burp as it happens. The chamber mixes all of them into its air, which is replaced over several minutes, so it sees a smoothed sum. Both should account for the same methane.
A burp of mass \(m\) raises a well-mixed chamber of volume \(V\) by \(m/V\) at once; the air flow \(Q\) then washes it out with time constant \(\tau = V/Q\). Flow times the area under the chamber's curve gives back the methane:
Here \(\Delta C\) is a mass concentration: a reading in ppm times the density of methane (0.716 g/L at STP).
Our chamber. The AgResearch chamber holds \(V\) = 15.8 m³ with an air flow of about 1.9 m³/min, so \(\tau = V/Q \approx\) 8.4 min. Fitting the decay after each door closure gives 9.5 min for CO₂ and 9.8 min for CH₄. A burp that lasts seconds is spread over about ten minutes in the chamber's record.
The trial so far


Next steps
- 1Line up the clocks. Check the camera–chamber time offset.
- 2Respect the chamber's lag. Its air takes about 9 minutes to turn over (measured 8.4–9.8 min), so compare totals over windows of at least one turnover, not single breaths.
- 3Rate vs production. Events per measured minute against the chamber's methane production (flow × CH₄ rise) in the same windows.
- 4Timing. Do bursts of strong events come before chamber rises?
- 5Behaviour, event by event. Because the camera sees single eructations as they happen, emissions can be lined up with what the cow is doing at that moment: eating, ruminating, lying down or standing, head position. Chamber and tracer methods average over minutes to days and cannot make that link. This is the next analysis, not yet a result.