Is there a way to reduce the noise in cells?
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).
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.
Here’s one possible way.
----------begin_max5_patcher---------- 925.3ocyXssahCCD8Y3qvJOSQ9RHA1G1ejUqpbHtA2MINqiokpp9uu9RBkkR BgKNpHQh7fuLmyb73w79zIAIhcr5.vO.+BLYx6SmLwZxXXRS6IAEzcqyo01t ErVTTvJUAyb+lhsSYsmKD+APU.ZdNnJmVxpmADRPq4DIOaiRastcj47R1Zw1 R6vwMFK2VvKyYJ6ZgZLVqdKmYWjfO6lXqpsevFqUT05M7xrGkr0JGlHvv4vY .T3J6Kj8EgLGB9cyf3o1YVj77CDbfw1GSmZdLafDRV8qb85hCNEDvCDB3tg. NFe.DHKZedRD.amd2bqdqh4lE85p+teLUTIsfoXxGYkzDmqAuBvWxdUuteQL 7LWMWlkfy2VPCtkPae7xxkVdYkkdhIlmX7o4E7pN4Esq9XAUI46ZXnqfE5ZO QMSATajr5Mh7z.uIwWLegF5KgVdvpRvvN3A30nvMQypW4kohWa8tJMnzHlp3 hxCiIQwV4IxFSfMO16ImD5W5FARjKtisuh6HhiVdtcB2W0NMo1yI.vqhLuBw 8IzQwdUn+TtP61sKwSBodBM+PTeAX8LvKzixXZdqPV2uViv8FuARhfgGPRKf 8RRQ8pMRnkYiZlxe5YkCgXIER+jRnWUNCOGBwkCAuXgGxg3RRNvTHjwMExC9 NARTnaKh83ht.M1qxfNfuBjCx8VgBMvmfG.7QdHleBs+sohQtyWQKvCQFC8. jJzExSyXeIPJpXk2jLF0SbLD1hS8V339Rl0SB96or8u5CFjBy8IH1O9B4Mw6 lKB.W1Gz6NMdy4ZWA7Uhrrb1Ms+77nyEcwgsOO48a5Dbby8HGwyryjzD.JBr xWYsZ2iiFv0aPWUNa6LYuF9Q+A.VuwX++olZwV451It81l.zdGJkUq3k1iyO nSlqdA9zq2vSSYkGdklTdsIFk1cP5h7G3Y7GSF9QxePCvcNhC+p6TvSqDZ0c SLBgQlyuPgH2gYw6a84Bc2.vQwtqjPOBAM9LVKlsWaEsukGPfop1yifkimjH dH9S32L+gbgQXWLknqKQ+Z4p8M7Q.FOD.DOdDZzPCvWvldBtgCir6UVg22xG LJZ.Y0Oh18JiNjznV+A8sIqNBNZzyfRvMZdSzcvaNNaRnU7ifVUe64eP+bdA Y.9+0lc1UuEsp5ElrtYJsNhtnymERSy3YSc+2XtlDaSI6Eda+sEVFPk5pEU5 RE2JcUWtKxU1ePgHkIK2xs8cpYk+X5+.rUK3nB -----------end_max5_patcher-----------
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.
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.
----------begin_max5_patcher---------- 1068.3ocyY0tahqCD82vSQT96kEEamOW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mH.LYxDDmo85fPmH+oOAX0QKN9.L.E +HivZmqWQXvjvn98lQmlHbXObGvvp.Ah0EchzwUS4nnGS8G+6fyemSdgWK4M ZxjZZ+A0G+Yh3mn9TbKXThMPhmtJhozhdzi30EA8AASW6LH+9xnCo7bL3XFE F+PYzd0AAZXZhidAi2hSF8HPPO.vzUN+rdUFYC2s1RIBo25IR++T3jAfDf4b GZDNfGBQ2KngBGIUa1pCtr7cBup4YpcE4t8diwUCiVL2bD4lg5iN1kSTGvqw d8N5bwb414Dx8xUyMa8ZenYa4t4rTBunl1bVvxU9Oy+KG3pxE -----------end_max5_patcher-----------
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.
Forums > Jitter