Slashdot Mirror


Recovering Data From Noise

An anonymous reader tips an account up at Wired of a hot new field of mathematics and applied algorithm research called "compressed sensing" that takes advantage of the mathematical concept of sparsity to recreate images or other datasets from noisy, incomplete inputs. "[The inventor of CS, Emmanuel] Candès can envision a long list of applications based on what he and his colleagues have accomplished. He sees, for example, a future in which the technique is used in more than MRI machines. Digital cameras, he explains, gather huge amounts of information and then compress the images. But compression, at least if CS is available, is a gigantic waste. If your camera is going to record a vast amount of data only to throw away 90 percent of it when you compress, why not just save battery power and memory and record 90 percent less data in the first place? ... The ability to gather meaningful data from tiny samples of information is also enticing to the military."

29 of 206 comments (clear)

  1. CSI by fuzzyfuzzyfungus · · Score: 5, Funny

    Enhance!

    1. Re:CSI by El_Muerte_TDS · · Score: 2

      Enhance!

    2. Re:CSI by ceoyoyo · · Score: 2, Interesting

      Your AC wish is my command.

  2. Why not... by jbb999 · · Score: 4, Insightful

    If your camera is going to record a vast amount of data only to throw away 90 percent of it when you compress, why not just save battery power and memory and record 90 percent less data in the first place? ..

    Because it's hard to know what is needed and what isn't to produce a photograph that still looks good to a human, and pushing that computing power down to the camera sensors where power is more limited than a computer is unlikely to save either time or power.

    1. Re:Why not... by Chrisq · · Score: 4, Insightful

      I think you are missing the point, throwing away 90% of the image was a demonstration of the capabilities of this algorithm. You would use it where you have only managed to capture a small amount of data, not capture the lot and throw away 90%.

    2. Re:Why not... by eldavojohn · · Score: 4, Interesting

      If your camera is going to record a vast amount of data only to throw away 90 percent of it when you compress, why not just save battery power and memory and record 90 percent less data in the first place? ..

      Because it's hard to know what is needed and what isn't to produce a photograph that still looks good to a human, and pushing that computing power down to the camera sensors where power is more limited than a computer is unlikely to save either time or power.

      If you read the article, the rest of that quote makes a lot more sense. Here it is in context:

      If your camera is going to record a vast amount of data only to throw away 90 percent of it when you compress, why not just save battery power and memory and record 90 percent less data in the first place? For digital snapshots of your kids, battery waste may not matter much; you just plug in and recharge. “But when the battery is orbiting Jupiter,” Candès says, “it’s a different story.” Ditto if you want your camera to snap a photo with a trillion pixels instead of a few million.

      So, while this strategy might not be implemented in my Canon Powershot anytime soon, it sounds like a really great idea for exploration or just limited resources in general. I was thinking more along the lines of making really crappy resolution low power cameras that are very cheap but distributing them with this software that takes the images on your computer and processes them to make them highly defined images.

      --
      My work here is dung.
    3. Re:Why not... by Idbar · · Score: 4, Interesting

      In fact, it's expected to be used to increase the aperture of cameras. The advantage of this, is that using random patterns you could be able to determine the kernel of the convolving pattern in the picture, therefore, you would be able to re-focus the image after it was taken. In regular photography that kernel is normally Gaussian and very hard to de-blur. But using certain patterns when taking the picture (probably implemented as micro-mirrors), you could, easily do this in post processing.

    4. Re:Why not... by petermgreen · · Score: 3, Informative

      (a) JPEG doesn't know either
      JPEG is built on the assumption that the higher frequency components are less important, so it spends less bits on representing those components than it does on the lower frequency ones.

      It's a pretty crude model (not least because of the block based architecture that makes it simple to implement but introduces artifacts at block boundries) but it still does a lot better than just throwing away pixels and/or reducing the bits per pixel in the original image.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    5. Re:Why not... by Bakkster · · Score: 2, Interesting

      Kind-of.

      This technique is taking the noisy or incomplete data, and inferring the details already captured but only on a few pixels. So, if there's a line or square on the image but you only catch a few pixels on it, this technique can infer the shape from those few pixels. So, it will enhance the detail on forms you can almost see, but not create the detail from scratch.

      Rather than 'enhancing' the image, a better term would be 'upsampling'. The example used in the article was of a musical performance. This technique could take a 44.1kHz sample of a musical instrument at 8-bit resolution and upsample it to 96kHz and 32-bit resolution. Since instruments create predictable frequencies (aside from percussion, the same frequency is usually present for many times the wavelength) the algorithm can determine which frequencies are present, at which times, and at which amplitude and phase. That information can then be used to 'fill in the gaps' more accurately than normal upsampling (usually done with a Sinc filter). However, it can't recreate information that wasn't recorded in the first place, so if the audio was recorded at 20kHz you would only get output of audio below 10kHz (the Nyquist frequency in this case), although it's conceivable that even more advanced algorithms could infer these frequencies as most instruments have a predictable distribution of harmonics.

      It also seems that most compression algorithms (JPG for example) would destroy these bits of detail that the algorithm would use, so raw data is likely to be needed in most cases. I'm just going off of my knowledge of DSP, I don't know any particulars of this technique beyond this article, but it looks legitimate and very useful as long as you aren't expecting CSI-level miracles.

      --
      Write your representatives! Repeal the 2nd Law of Thermodynamics!
    6. Re:Why not... by gravis777 · · Score: 2, Interesting

      Truthfully, I was thinking along the lines of taking a high resolution camera and making it better, rather than taking a low resolution camera and making it high. My aging Nikon is a 7.1 megapixel, with only a 3x optical zoom. There have been times I wanted to take a picture of something quick, so do not necessaraly have time to zoom or move closer to the object. After cropping, I may end up with a 1-2 megapixel image (sometimes much lower). For the longest, I thought I just needed more megapixels, and a faster and higher powered optical zoom. However, looking at the pictures I have, I am like, if someone could just come up with something to make this look better... There is usually plenty of detail there for my eye, if something would come in and soften jaggie edges, sharpen the overall picture, and understand textures (such as clothing)...

      Truthfully, with what I just talked about, I am looking for them to implement this in Photoshop so I can clean up some existing crappy photography of mine.

    7. Re:Why not... by Matje · · Score: 2, Interesting

      RTFA that's the point of the algorithm: the camera sensors don't need to calculate what is interesting about the picture, they just need to sample a randomly distributed set of pixels. The algorithm calculates the highres image from that sample.

      The idea behind the algorithm is really very elegant. To parafrase their approach: imagine a 1000x1000 pixel image with 24 bit color. There are 24 ^ 1000000 unique pixel configurations to fill that image. The vast majority of those configuration will look like noise. In real life you generally take pictures of non-noise things, like portraits etc. You might define a non-noise image as one where knowing the actual value of a given pixel allows a probability of predicting the value of a neighboring pixel that is greater than chance. A noisy image is one where knowing a given pixel value gives you no information about neighboring pixels at all.

      The algorithm provides a way to distinguish between image configurations that depict random noise and those that depict something non-random. Since, apparently, the ratio of non-random image configurations is so small compared to the noisy image configurations, you need only a couple of hints to figure out which of the non-random image configurations you need. What the algoritm does is take a random sample of a non-random image (10% of the original pixels), and calculates a non-random image configuration that fits the given sample. Even though in theory you might end up with Madonna from a picture of E-T, in practice you don't (and I believe they claim they can prove that the chance of accidentally ending up with Madonna is extremely small).

      It's all about entropy really.

    8. Re:Why not... by girlintraining · · Score: 3, Interesting

      In fact, it's expected to be used to increase the aperture of cameras. The advantage of this, is that using random patterns you could be able to determine the kernel of the convolving pattern in the picture, therefore, you would be able to re-focus the image after it was taken. In regular photography that kernel is normally Gaussian and very hard to de-blur. But using certain patterns when taking the picture (probably implemented as micro-mirrors), you could, easily do this in post processing.

      You people think in such limited terms. The military uses rapid frequency shifting and spread spectrum communications to avoid jamming. Such technology could be used to more rapidly identify the keys and encoding of such transmissions, as well as decreasing the amount of energy required to create an effective jamming signal by several orders of magnitude across the spectrum used if any pattern could be identified. Currently, massive antenna arrays are required to provide the resolution necessary to conduct such an attack. This makes the jamming equipment more mobile, and more effective at the same time. A successful attack on that vector could effectively kill most low-power communications capabilities of a mobile force, or at least increase the error rate (hello Shannon's Law) to the point where the signal becomes unusable. The Air Force is particularily dependent on realtime communications that rely on low-power signal sources.

      If nothing else, getting a signal lock would at least tell you what's in the air. Stealth be damned -- you get a signal lock on the comms, which are on most of the time these days, and you don't need radar. Just shoot in the general direction of Signal X and *bang*. Anything that reduces the noise floor generates a greater exposure area for these classes of sigint attacks. Cryptologists need not apply.

      --
      #fuckbeta #iamslashdot #dicemustdie
    9. Re:Why not... by wfolta · · Score: 2, Interesting

      Actually, you don't process and throw away information. You are not Sensing and then Compressing, you are Compressed Sensing, so you take in less data in the first place.

      A canonical example is a 1-pixel camera that uses a grid of micro-mirrors, each of which can be set to reflect onto the pixel or not. By setting the grid randomly, you are essentially doing a Random Projection of the data before it's recorded, so you are Compressed Sensing. With a sufficient number of these 1-pixel images, each with a different random mirror setup you can reproduce the original image to some level of accuracy, using fewer bits than a JPEG/etc of similar quality. Unlike JPEG, you are not taking in a full set of data, then compressing, so it takes LESS processing power, not more.

      So you save in image transmission bandwidth if the sensor is, say, orbiting Jupiter. And you save energy expended in compressing the image. And you could perhaps afford to make a VERY expensive single pixel imager that has an incredibly wide frequency range, which might be prohibitively expensive, or even impossible to fabricate in a larger array.

      Personally, I think there's a lot of hype to CS, but it's definitely not the same as JPEG/Wavelet/etc compression after taking a full-resolution image.

    10. Re:Why not... by shabtai87 · · Score: 3, Interesting

      Amusingly enough, the idea of compressed sensing (I will rephrase for clarity) that a minimal sampling is needed for working with high dimensional data that can be described in a much smaller subspace at any given time has been used to describe neural processes in the visual cortex (V1). [See Redwood Center for Theoretical Neuroscience, https://redwood.berkeley.edu/%5D. The lingo used is a bit different than the CS community, but the math is essentially the same. The point being that compressed sensing could lead to answers a lot more natural for human perception than simply canceling out high frequencies.

      Also the point is that CS leads to [near] perfect reconstruction for signals of a certain nature rather than the fuzzyness that comes from some other algorithms that do not take the inherent sparsity of the signal into account.

      --
      @humanity: *facepalm*
  3. I am a bit worried about the "fill in the shapes" by Chrisq · · Score: 3, Insightful
    From TFA

    The algorithm then begins to modify the picture in stages by laying colored shapes over the randomly selected image. The goal is to seek what’s called sparsity, a measure of image simplicity.

    The thing is in a medical image couldn't that actually remove a small growth or lesion? I know the article says:

    That image isn’t absolutely guaranteed to be the sparsest one or the exact image you were trying to reconstruct, but Candès and Tao have shown mathematically that the chance of its being wrong is infinitesimally small.

    but how often do analysis like this make assumptions about the data, like you are unlikely to get a small disruption in a regular shape and if you do it is not significant.

    on the bright side, when Moore's law allows real-time processing we can look forward to night vision cameras which really are "as good as daylight", and for this sort of application the odd distortion really won't matter so much.

  4. Military applications by rcb1974 · · Score: 3, Interesting

    The military probably wants the ability to send/receive without revealing the data or the location of its source to the enemy. For example, its nuclear subs need to surface in order to communicate, and they don't want the enemy to be able to use triangulation to pinpoint the location of the subs. So, they make the data they're transmitting appear as noise. That way if the enemy happens to be listening on that frequency, they don't detect anything.

  5. Demo image by ChienAndalu · · Score: 3, Insightful

    I seriously doubt that the Obama demo image is real. There is no way that the teeth and the little badge on his jacket are produced, and that no visual artifacts were created.

    1. Re:Demo image by sammyF70 · · Score: 4, Informative

      indeed. check the caption :
      "Photos: Obama: Corbis; Image Simulation: Jarvis Haupt/Robert Nowak" (emphasis added by me)

      --
      "DRM is like the Ford Pinto: it's a smooth ride, right up the point at which it explodes and ruins your day."-C.Doctorow
    2. Re:Demo image by ceoyoyo · · Score: 2, Informative

      "Image Simulation" likely means that they simulated the acquisition. The recovery of the "after" image from the "before" image is probably as shown, it's just that the "before" image was not acquired from an actual camera. Those results don't look particularly amazing for compressed sensing. See this for example.

  6. Re:I am a bit worried about the "fill in the shape by Yvanhoe · · Score: 4, Insightful

    Exactly. This algorithm doesn't create absent data nor does it infer it, it just makes the uncertainties it has "nicer" than the usual smoothing.

    --
    The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
  7. I could do this in PhotoShop. by jellomizer · · Score: 3, Funny

    After applying the Noise filter to mess up my image I hit Undo and my image is back to normal.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  8. Holy Bad Acronym Batman by damn_registrars · · Score: 3, Insightful

    Did we really need to refer to it as CS in the summary? A quick glance of the summary could lead one to think that this guy is the inventor of Computer Science, rather than the correct Compressed Sensing... In the summary of an article that is concerned (in part) with maintaining information after compression, we lost quite a bit of information in abbreviating the name of his algorithm.

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
  9. Re:Questions... by azaris · · Score: 2, Insightful

    Does this only apply to image data, or will we be able to use this to clean up other databases? Will it work with sampled sounds? Names and addresses and inventory?

    Of course not. It's not magic. There are certain assumptions that can be made about most real-life images, mainly that they have small total variance. That means they have large areas of near-constant intensity/color distribution separated by interfaces with large jumps (like a cartoon image would have).

    Though this method uses the l_1 norm and not total variation.

    More importantly, HOW does it work?

    See here.

  10. Typical science fraud by Futurepower(R) · · Score: 3, Interesting

    MOD PARENT UP for this: "This algorithm doesn't create absent data nor does it infer it, it just makes the uncertainties it has "nicer" than the usual smoothing."

    Fraud alert: The title, "Fill in the Blanks: Using Math to Turn Lo-Res Datasets Into Hi-Res Samples" should have been "A better smoothing algorithm".

    1. Re:Typical science fraud by timeOday · · Score: 3, Interesting

      No, not just "nicer." It fills in the data with what was most likely to have been there in the first place, given the prior probabilities on the data. The axiom of being unable to regain information that was lost or never captured is, as commonly applied, mostly wrong. The fact is, almost all of our data collection is on samples that we already know a LOT about what they look like. Does this let you recapture a license plate from a 4 pixel image, no, but given a photo of Barack Obama's face with half of it blacked out, you can estimate with great accuracy what was in the other half.

  11. Re:I am a bit worried about the "fill in the shape by ceoyoyo · · Score: 2, Insightful

    The description of the algorithm in the article is quite poor. To reconstruct an MR image you effectively model it with wavelet basis functions, subject to someconstraints: a) the wavelet domain should be as sparse as possible, b) the Fourier coefficients you actually acquired (MR is acquired in the Fourier domain, not the image domain) have to match and usually c) the image should be real. You often also require that the total variation of the image should be as low as possible as well.

    Since the image is acquired in the Fourier domain, every measurement you make contains information about all the pixels in the image. For reasonable* under acquisitions CS can produce a perfectly reconstructed image.

    * the exact limits of "reasonable" are still under investigation, but typically you only need to acquire about a quarter of the data to be pretty much guaranteed you'll be able to get a perfect reconstruction.

  12. Overview of Algorithm by Chapter80 · · Score: 3, Funny

    Here's how Compressed Sensing works with standard JPGs.

    First the program takes the target JPG (which you want to be very large), and treats it as random noise. Simply a field of random zeros and ones. Then, within that vast field, the program selects a pattern or frequency to look for variations in the noise pattern.

    The variations in the noise pattern act as a beacon - sort of a signal that the payload is coming. Common variations include mathematical pulses at predictable intervals - say something that would easily be recognizable by a 5th-grader, like say a pattern of prime numbers.

    Then it searches for a second layer, nested within the main signal. Some bits are bits to tell how to interpret the other bits. Use a gray scale with standard interpolation. Rotate the second layer 90 degrees. Make sure there's a string break every 60 characters, and search for an auxiliary sideband channel. Make sure that the second layer is zoomed out sufficiently, and using a less popular protocol language; otherwise it won't be easily recognizable upon first glance.

    Here's the magical part: It then finds a third layer. Sort of like in ancient times when parchment was in short supply people would write over old writing... it was called a palimpsest. Here you can uncompress over 10,000 "frames" of data, which can enhance a simple noise pattern to be a recognizable political figure.

    Further details on this method can be found here.

    --
    Recycle when possible!

  13. Not smoothing by nten · · Score: 4, Insightful

    The article was a bit poor. The data sets aren't really incomplete in most cases. They only seem that way from a traditional standpoint. The missing samples often contain absolutely no information, in which case the original image/signal can be reconstructed perfectly. In brief, nyquist is a rule about sampling non-sparse data, so if you rotate your sparse data into a basis in which it is non-sparse, and you satisfy the nyquist rule in that basis (though not in the original one), you are still fine.

    I like this link better l1 magic

    --
    refactor the law, its bloated, confusing and unmaintainable.
  14. Image stacking by sbjornda · · Score: 3, Informative

    After cropping, I may end up with a 1-2 megapixel image (sometimes much lower)

    Try image stacking. A program I've used successfully for this is PhotoAcute. Provided your body+lens combo is in their database, you can stack multiple near-identical images (use Burst or Auto-bracket mode) and get "super resolution". Of course, this doesn't work so well if your subject is moving. If your body+lens combo isn't in their database, you can volunteer a couple hours of your time to make a set of ~ 100 specific images they can use to create a profile for your gear. If they accept it, they'll offer you a free license for the software. I have no connection with the company other than being a satisfied customer.

    --
    .nosig