{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-image/scikit-image/issues/3057","repository_url":"https://api.github.com/repos/scikit-image/scikit-image","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/3057/labels{/name}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/3057/comments","events_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/3057/events","html_url":"https://github.com/scikit-image/scikit-image/pull/3057","id":320549255,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2MTgwNDYx","number":3057,"title":"WIP: New feature: convert bayer to rgb images","user":{"login":"hmaarrfk","id":90008,"node_id":"MDQ6VXNlcjkwMDA4","avatar_url":"https://avatars0.githubusercontent.com/u/90008?v=4","gravatar_id":"","url":"https://api.github.com/users/hmaarrfk","html_url":"https://github.com/hmaarrfk","followers_url":"https://api.github.com/users/hmaarrfk/followers","following_url":"https://api.github.com/users/hmaarrfk/following{/other_user}","gists_url":"https://api.github.com/users/hmaarrfk/gists{/gist_id}","starred_url":"https://api.github.com/users/hmaarrfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmaarrfk/subscriptions","organizations_url":"https://api.github.com/users/hmaarrfk/orgs","repos_url":"https://api.github.com/users/hmaarrfk/repos","events_url":"https://api.github.com/users/hmaarrfk/events{/privacy}","received_events_url":"https://api.github.com/users/hmaarrfk/received_events","type":"User","site_admin":false},"labels":[{"id":360222353,"node_id":"MDU6TGFiZWwzNjAyMjIzNTM=","url":"https://api.github.com/repos/scikit-image/scikit-image/labels/status:%20needs%20review","name":"status: needs review","color":"fef2c0","default":false},{"id":314658482,"node_id":"MDU6TGFiZWwzMTQ2NTg0ODI=","url":"https://api.github.com/repos/scikit-image/scikit-image/labels/type:%20new%20feature","name":"type: new feature","color":"8a64ae","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scikit-image/scikit-image/milestones/8","html_url":"https://github.com/scikit-image/scikit-image/milestone/8","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/milestones/8/labels","id":1968011,"node_id":"MDk6TWlsZXN0b25lMTk2ODAxMQ==","number":8,"title":"0.15","description":"","creator":{"login":"sciunto","id":335370,"node_id":"MDQ6VXNlcjMzNTM3MA==","avatar_url":"https://avatars0.githubusercontent.com/u/335370?v=4","gravatar_id":"","url":"https://api.github.com/users/sciunto","html_url":"https://github.com/sciunto","followers_url":"https://api.github.com/users/sciunto/followers","following_url":"https://api.github.com/users/sciunto/following{/other_user}","gists_url":"https://api.github.com/users/sciunto/gists{/gist_id}","starred_url":"https://api.github.com/users/sciunto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sciunto/subscriptions","organizations_url":"https://api.github.com/users/sciunto/orgs","repos_url":"https://api.github.com/users/sciunto/repos","events_url":"https://api.github.com/users/sciunto/events{/privacy}","received_events_url":"https://api.github.com/users/sciunto/received_events","type":"User","site_admin":false},"open_issues":139,"closed_issues":113,"state":"open","created_at":"2016-08-28T11:46:48Z","updated_at":"2018-11-20T10:22:20Z","due_on":"2019-05-01T07:00:00Z","closed_at":null},"comments":14,"created_at":"2018-05-05T23:28:27Z","updated_at":"2018-11-21T16:00:04Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/3057","html_url":"https://github.com/scikit-image/scikit-image/pull/3057","diff_url":"https://github.com/scikit-image/scikit-image/pull/3057.diff","patch_url":"https://github.com/scikit-image/scikit-image/pull/3057.patch"},"body":"First attempt at creating functions that would convert from an image with a bayer pattern to an RGB image.\r\n\r\nDemosaic an image using a convolution kernel.\r\nFollows the discussion in\r\nColor Image and Video Enhancement\r\nCelebi, M.E, Leccca M: Smolka B, 2015\r\n\r\nChapter 2: Image Demosaicing\r\nRuiwen Zhen and Robert L. Stevenson\r\n\r\nNote that they mention that this technique introduces artifacts\r\nand they don't recommend it ;).\r\nThey mention a simple method is a 5x5 kernel too. Will try that after\r\nthis speeds up a little bit.\r\n\r\n## Description\r\nI actually obtain raw images from sensors. I wanted to use skimage to obtain RGB images from them. Noticed it wasn't implemented.\r\n\r\nThe naive implementation is rather slow. I have a feeling for 2 reasons:\r\n1. It upcasts to an expensive data type.\r\n2. It computes many 0 multiplications.\r\n\r\nAny ideas on how to speed it up would be appreciated.\r\nI added an unrolled version which speeds things up dramatically for float32 and uint8. Unfortunately, I didn't get to finish it all. This is a WIP to obtain feedback and comments from skimage community.\r\n\r\n## Checklist\r\n[It's fine to submit PRs which are a work in progress! But before they are merged, all PRs should provide:]\r\n- [x] Clean style in [the spirit of PEP8](https://www.python.org/dev/peps/pep-0008/)\r\n- [x] [Docstrings for all functions](https://github.com/numpy/numpy/blob/master/doc/example.py)\r\n- [x] Gallery example in `./doc/examples` (new features only)\r\n- [x] Unit tests\r\n\r\n[For detailed information on these and other aspects see [scikit-image contribution guidelines](http://scikit-image.org/docs/dev/contribute.html)]\r\n\r\n\r\n## References\r\n[If this is a bug-fix or enhancement, it closes issue # ]\r\nIt implements the following paper: \r\nIt uses the proposed 3x3 kernel.\r\n\r\nDemosaic an image using a convolution kernel.\r\nFollows the discussion in\r\nColor Image and Video Enhancement\r\nCelebi, M.E, Leccca M: Smolka B, 2015\r\n\r\n## For reviewers\r\n\r\n(Don't remove the checklist below.)\r\n\r\n- [ ] Check that the PR title is short, concise, and will make sense 1 year\r\n  later.\r\n- [ ] Check that new functions are imported in corresponding `__init__.py`.\r\n- [ ] Check that new features, API changes, and deprecations are mentioned in\r\n      `doc/release/release_dev.rst`.\r\n"},"comment":{"url":"https://api.github.com/repos/scikit-image/scikit-image/issues/comments/440718167","html_url":"https://github.com/scikit-image/scikit-image/pull/3057#issuecomment-440718167","issue_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/3057","id":440718167,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDcxODE2Nw==","user":{"login":"hmaarrfk","id":90008,"node_id":"MDQ6VXNlcjkwMDA4","avatar_url":"https://avatars0.githubusercontent.com/u/90008?v=4","gravatar_id":"","url":"https://api.github.com/users/hmaarrfk","html_url":"https://github.com/hmaarrfk","followers_url":"https://api.github.com/users/hmaarrfk/followers","following_url":"https://api.github.com/users/hmaarrfk/following{/other_user}","gists_url":"https://api.github.com/users/hmaarrfk/gists{/gist_id}","starred_url":"https://api.github.com/users/hmaarrfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmaarrfk/subscriptions","organizations_url":"https://api.github.com/users/hmaarrfk/orgs","repos_url":"https://api.github.com/users/hmaarrfk/repos","events_url":"https://api.github.com/users/hmaarrfk/events{/privacy}","received_events_url":"https://api.github.com/users/hmaarrfk/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T16:00:04Z","updated_at":"2018-11-21T16:00:04Z","author_association":"MEMBER","body":"@soupault, I'd like to answer an earlier question of yours: Does anybody use this with OpenCV: The answer is likely that this is seldom used as I had to fix a few tiny bugs in the opencv implementation:\r\n  * https://github.com/opencv/opencv/pull/12515  <- less critical\r\n  * https://github.com/opencv/opencv/pull/12465  <- more critical?"}}
{"actor":{"display_login":"hmaarrfk"}}