{"action":"closed","issue":{"url":"https://api.github.com/repos/lod/seek-thermal-documentation/issues/3","labels_url":"https://api.github.com/repos/lod/seek-thermal-documentation/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/lod/seek-thermal-documentation/issues/3/comments","events_url":"https://api.github.com/repos/lod/seek-thermal-documentation/issues/3/events","html_url":"https://github.com/lod/seek-thermal-documentation/issues/3","id":109937916,"number":3,"title":"BPC - Less basic bad pixels correction available in libseek","user":{"login":"zougloub","id":998040,"avatar_url":"https://avatars.githubusercontent.com/u/998040?v=3","gravatar_id":"","url":"https://api.github.com/users/zougloub","html_url":"https://github.com/zougloub","followers_url":"https://api.github.com/users/zougloub/followers","following_url":"https://api.github.com/users/zougloub/following{/other_user}","gists_url":"https://api.github.com/users/zougloub/gists{/gist_id}","starred_url":"https://api.github.com/users/zougloub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zougloub/subscriptions","organizations_url":"https://api.github.com/users/zougloub/orgs","repos_url":"https://api.github.com/users/zougloub/repos","events_url":"https://api.github.com/users/zougloub/events{/privacy}","received_events_url":"https://api.github.com/users/zougloub/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-06T05:32:27Z","updated_at":"2015-10-16T06:28:27Z","closed_at":"2015-10-16T06:28:27Z","body":"Hi,\r\n\r\nI just wanted to share that I have set up a pretty flexible bad pixels calibration & correction method in libseek.\r\nSince the Seek imager has some pretty big clusters of bad pixels, just correcting for single bad pixels and interpolating the hexagon pattern is not enough, and performing median filtering for correcting bad pixels is a bit of a hack.\r\n\r\nI came up with something I believe to be not so ugly:\r\n* a functional (but pretty long) calibration step which identifies a contour of good pixels around a bad pixel cluster; the code is basic but the principle is to go in all directions and find the closest good pixel and to keep the list of closest good pixels\r\n* a very basic way of interpolating value of bad pixels, which is a simple weighted sum of inverse distance to contour points... could be better of course!\r\n* a structure used to store the bad pixels information, under the form of\r\n  * number of + list of weights\r\n  * number of + list of contour patterns (each contour is a list of relative pixel positions and pointer to weight index)\r\n  * number of + list of bad pixels (each bad pixel has its position and contour pattern index)\r\n\r\n  The structure is stored in ASCII format, can be written and parsed easily.\r\n* a short implementation of correction in libseek, that uses the same in-memory structure (because speed is not exactly a constraint for this detector size)\r\n\r\nI'm pretty sure this could be useful to other implementations, and I'm very open to comments, suggestions, fixes, whatever!"}}