Sounds like the visual equivalent of Bose noise cancelling headphones, would that be correct?
I was going to post a reply to the earlier one, then had a thought, hence two posts in a row here replying to the same post - sorry!
Noise cancelling headphones take the external 'noise' - actually in a certain sense an unwanted signal, invert it, and play it back together with the desired signal.
An astronomical image has several components that are unwanted, but all end up recorded on the same detector in a way that can't be directly unentangled.
You have the signal from space you're actually trying to measure - let's call that S.
The camera has a bias level which is always present at the same level no matter the length of exposure - call that B.
It has the dark current, which is a function of the exposure time and the sensor temperature - roughly speaking it goes up proportionally to the exposure time and as some function of temperature too. Call that D(t,T).
And the entire optical system has a throughput per pixel that includes things like vignetting - the image getting darker towards the edge of the image, and things like dust on the sensor causing local reductions in the throughput. I'll call that F.
Then the result R you record at a pixel is
R=B+D(t,T)+F*S
and each one of those except F is also subject to some level of noise as well. The dark current for example will have its own fluctuations, although in the end result you won't be able to tell apart the overall statistical noises.
The astronomer records zero length exposures (or as near as they can zero length) in absolute darkness to try to estimate what B is. They stack these zero length exposures to get an estimate of B without much noise in it. Then they can simply take B off from R.
They do the same sort of thing by taking exposures of length equal to their actual exposures to estimate D. They take B off their stacked dark images to find D (as the darks also have the bias) then take their estimate of D off R as well. You might ask why they don't just take the dark frames with the bias included off and be done with it, but by doing that step to get D separately then you can use estimates of how it varies with time t and temperature T to modify the dark images you used if you want to apply them to the normal exposures taken in different conditions. A DSLR will do that sort of step itself if you turn noise reduction on - it'll immediately take a dark frame and subtract it off the image. This is good because it is convenient and taken at the same temperature and exposure as the image you just shot, but often has the major downside if you're continuously exposing the camera will insist on taking up half your time on the sky by taking darks, so many of us do this manually before or after. Darks also deal with certain kinds of sensor defects - they can help you map dead pixels which always record ~0, or 'hot' pixels that always put out some high value, and exclude those.
Lastly, you take images of as uniformly a lit surface as you can called flat frames, and use (minus the bias and dark) to estimate what F is.
You can then take your actual images, subtract B and D, divide by F and hopefully get something sane at the end, and rely on stacking to take care of the random noise in B+D and S.
Now that's all important in deep sky imaging where S is often tiny, but planetary imaging you can find the bias and dark are not all that important. They're also per-pixel effects so can be averaged out to some extent by imaging the planet on different parts of your sensor over time. I don't bother with bias or darks at all for planetary imaging. I personally don't bother with flats either, as vignetting isn't too severe on the scales I get to view planets at and the image bounces around so much that dust is rarely a major issue (it has been in a couple of cases and I've regretted not flatting after actually)
Finally the signal itself often has the unwanted component of light pollution. Fortunately this has the property of being relatively smooth over the scale of an image, so you separate off bright pixels where you think your actual signal is strong and fit a smooth surface to the rest and subtract it off. Again that's not a major problem for bright planets but it's a really major thing to do for deep sky imaging for some of us.
So... is it like noise cancelling headphones? Well both try to guess what the unwanted signal is and just subtract it, but noise cancelling headphones have a much easier way of doing it on the spot. They know the signal they're trying to get to the detector in your ear and can intercept the additional noise to apply the subtraction. An astronomer has to guess the signal before or after the recording is done and has to hope they can average out the fluctuations alright.