You cannot do that.
Cosmic Microwave Background Radiation (CMBR) was thought to be instrument error when it was first noticed while observing stars -- something to be filtered out as noise. When they went to track down the source of the instrument error, they discovered that it is instead a low level signal, and that as they studied more it turned out to have lots of texture. These days they are busy building some of the most sensitive observing devices ever in order to measure it more accurately -- observing devices that have to deliberately block out stars because the stars are too bright.
Thus, considering any one photograph, the CMBR might be noise to be removed if the intention is to observe the stars, but given the same photograph, the stars might be the noise to be removed if the intention is to observe the CMBR.
Therefore there cannot possibly be a fully automated algorithm that removes noise, because "noise" is situational according to intention rather than according to physical characteristics of what is being monitored.