Is the focus stacking done locally on Curiosity to save bandwith, or on Earth after sending multiple images?
NASA's Curiosity Mars Rover
A lemmy community for scientific discussion of the Curiosity Rover and Mars Science Laboratory.
The focus stacking is done locally on the rover, below is a section of the the metadata included with one of those two images. Below that is the metadata of one of the individual images that were also returned to Earth (probably because it was considered a scientifically important target). You can find all the images, including the base images on the image server.
Focus stacked image
Using an onboard focusing process, the Mars Hand Lens Imager (MAHLI) aboard NASA's Mars rover Curiosity created this product by merging two to eight images previously taken by the MAHLI, located on the turret at the end of the rover's robotic arm.
Curiosity performed the merge on July 9, 2025, Sol 4594 of the Mars Science Laboratory Mission, at 10:54:41 UTC. The focus motor count position was 12628. This number indicates the lens position of the first image that was merged.
The onboard focus merge is sometimes performed on images acquired the same sol as the merge, and sometimes uses pictures obtained on an earlier sol. Focus merging is a method to make a composite of images of the same target acquired at different focus positions to bring all (or, as many as possible) features into focus in a single image. Because the MAHLI focus merge is performed on Mars, it also serves as a means to reduce the number of images sent back to Earth. Each focus merge produces two images: a color, best-focus product and a black-and-white image that scientists can use to estimate focus position for each element of the best focus product. Thus, up to eight images can be merged, reducing the number of images returned to Earth to two.
Credits: NASA/JPL-Caltech/MSSS
Single image
NASA's Mars rover Curiosity acquired this image using its Mars Hand Lens Imager (MAHLI), located on the turret at the end of the rover's robotic arm, on July 8, 2025, Sol 4593 of the Mars Science Laboratory Mission, at 08:01:40 UTC.
When this image was obtained, the focus motor count position was 13022. This number indicates the internal position of the MAHLI lens at the time the image was acquired. This count also tells whether the dust cover was open or closed. Values between 0 and 6000 mean the dust cover was closed; values between 12500 and 16000 occur when the cover is open. For close-up images, the motor count can in some cases be used to estimate the distance between the MAHLI lens and target. For example, in-focus images obtained with the dust cover open for which the lens was 2.5 cm from the target have a motor count near 15270. If the lens is 5 cm from the target, the motor count is near 14360; if 7 cm, 13980; 10 cm, 13635; 15 cm, 13325; 20 cm, 13155; 25 cm, 13050; 30 cm, 12970. These correspond to image scales, in micrometers per pixel, of about 16, 25, 32, 42, 60, 77, 95, and 113.
Most images acquired by MAHLI in daylight use the sun as an illumination source. However, in some cases, MAHLI's two groups of white light LEDs and one group of longwave ultraviolet (UV) LEDs might be used to illuminate targets. When Curiosity acquired this image, the group 1 white light LEDs were off, the group 2 white light LEDs were off, and the ultraviolet (UV) LEDS were off.
Credits: NASA/JPL-Caltech/MSSS
Very cool, thank you for an amazing answer!
You're most welcome. There are many folk on this community that will try to answer any questions raised :)