#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Python coding for pixel interpolation?


    New to python coding.

    Basically i have a 3D numpy array, 365 layers. Each layer is an array which is an image of the same mountain different day -

    The image consists of mainly - snow (DN of 200), cloud (DN of 50), land no snow (DN 37) and some other misc data.

    I want to get rid of cloud pixels - by taking pixel data from day before or two days before - if for example there is cloud the day before. or a function for interpolation?

    any ideas. Thanks.
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    If the camera is in the same place facing the same direction every day you could make a mask of 0 where the sky is, 1 on the part you want to keep, multiply each layer by the mask, then multiply the logical inverse of the map by "skyblue" and add it to each layer.

    Even if you (the photographer, that is) made some effort to take the photos when the sun was in about the same position each day you can still have big lighting or perhaps shadow differences.

    I don't like my idea much except it is along the lines of the simplest thing that could possibly work.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo