Is there a way to reduce the noise in cells?


    Feb 26 2017 | 3:46 pm
    Hello,
    I have a camera aimed at a still image and am collecting cell values via jit.spill. For my purposes I am reducing the matrix size to 20x 20. My problem is that even though the camera and image are completely still the cell values are not - I assume there is an inherent noise that causes the values to always vary slightly. Is there a way to eliminate this noise so that the values would change only if I move the camera (or the image).
    Thanks

    • Feb 26 2017 | 5:47 pm
      jit.slide is a good one to try. You can separately tune smoothing for increase or decrease of luminosity. You might also try applying a blur filter such as jit.fastblur.
    • Feb 26 2017 | 5:54 pm
      Here's one possible way.
    • Feb 27 2017 | 3:54 am
      Thank you for your help!
      Christopher: Thanks for the patch. It seems to be a more of a patch for frame subtraction very useful for motion detection rather than something to eliminate cell noise, unless I'm missing something.
      Morgan: thanks for the advice. Jit.slide does reduce noise quite a bit, although the values still fluctuate.
    • Feb 27 2017 | 11:35 pm
      Sorry if my example was too terse. I wasn't trying to supply a "solution" (because I don't know precisely what you're trying to do) so much as illustrate a technique: using a threshold to suppress small changes while allowing larger changes to pass, which seems to me it might be what you're trying to do. I think there are two main approaches to suppressing small changes. One approach is to use some sort of lowpass filter to smooth out the changes, such as with jit.slide as suggested by Morgan, but that doesn't eliminate the small changes, it just reduces them. Another approach, which I was suggesting, is to ignore the changes when they're smaller than some established threshold.
      Here's an example that uses that thresholding idea. It looks for changes (in any plane) between subsequent frames of video that are greater than some threshold (e.g. ± 0.2). If such a change is found in any plane of any pixel, all planes of that pixel are allowed to pass through to the output matrix. But for the pixels that do not change significantly, this example passes through the pixel from the previous output frame. The result is that the pixels that change quite a bit get through, but the pixels that change only a little don't get through. (The previous pixel values are reused instead.) Compare the upper video, which has a lot of noisy jitter in my computer, to the lower (output) video, which has relatively little jitter. I hope that helps clarify.
    • Feb 28 2017 | 4:04 pm
      Thank you, Christopher. You solved my problem.
      What I am trying to do is build a system similar to a player piano score. Basically a camera sees patterns on an advancing scroll which starts and stops. Data obtained from jit.spill is used to create sound. The thing is when the scroll stops I would like the cell values to freeze.
      This will accomplish this well.
      Greg