{"action":"created","issue":{"url":"https://api.github.com/repos/akvo/akvo-caddisfly/issues/48","labels_url":"https://api.github.com/repos/akvo/akvo-caddisfly/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/akvo/akvo-caddisfly/issues/48/comments","events_url":"https://api.github.com/repos/akvo/akvo-caddisfly/issues/48/events","html_url":"https://github.com/akvo/akvo-caddisfly/issues/48","id":122241454,"number":48,"title":"Create strip image to be returned to FLOW","user":{"login":"mtwestra","id":478954,"avatar_url":"https://avatars.githubusercontent.com/u/478954?v=3","gravatar_id":"","url":"https://api.github.com/users/mtwestra","html_url":"https://github.com/mtwestra","followers_url":"https://api.github.com/users/mtwestra/followers","following_url":"https://api.github.com/users/mtwestra/following{/other_user}","gists_url":"https://api.github.com/users/mtwestra/gists{/gist_id}","starred_url":"https://api.github.com/users/mtwestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtwestra/subscriptions","organizations_url":"https://api.github.com/users/mtwestra/orgs","repos_url":"https://api.github.com/users/mtwestra/repos","events_url":"https://api.github.com/users/mtwestra/events{/privacy}","received_events_url":"https://api.github.com/users/mtwestra/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akvo/akvo-caddisfly/labels/Strip%20test","name":"Strip test","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"ldporsius","id":9623423,"avatar_url":"https://avatars.githubusercontent.com/u/9623423?v=3","gravatar_id":"","url":"https://api.github.com/users/ldporsius","html_url":"https://github.com/ldporsius","followers_url":"https://api.github.com/users/ldporsius/followers","following_url":"https://api.github.com/users/ldporsius/following{/other_user}","gists_url":"https://api.github.com/users/ldporsius/gists{/gist_id}","starred_url":"https://api.github.com/users/ldporsius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldporsius/subscriptions","organizations_url":"https://api.github.com/users/ldporsius/orgs","repos_url":"https://api.github.com/users/ldporsius/repos","events_url":"https://api.github.com/users/ldporsius/events{/privacy}","received_events_url":"https://api.github.com/users/ldporsius/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-12-15T10:34:14Z","updated_at":"2016-01-18T16:19:29Z","closed_at":null,"body":"After a strip test is completed, the results need to be forwarded to FLOW, so they can be synchronised with a central database. The data returned should include the interpreted results for each patch, some metadata such as calibration quality and timestamp, and the actual (calibrated) strip image for each patch, including the colour swatches used. In short, for each patch we need to create an image such as this:\r\n\r\n![stripresult](https://cloud.githubusercontent.com/assets/478954/11808173/1345290c-a31f-11e5-9dd4-35e0aeae4dd0.png)\r\n\r\nThis images includes the following:\r\n1) the calibrated strip image\r\n2) the swatches as defined in the JSON file\r\n3) a circle of the interpreted colour, together with the interpolated value\r\n4) a supporting line to clarify the meaning of the circle.\r\n\r\nTechnically, this can be accomplished as follows:\r\n\r\n1) create a new Mat object (in Lab) to hold the image\r\n2) put the strip image in the Mat object\r\n3) create squares for the patches with the right Lab patch colours, as identified in the JSON file\r\n4) using the putText function of openCV, add the text of the values (http://docs.opencv.org/java/2.4.2/org/opencv/core/Core.html#putText(org.opencv.core.Mat, java.lang.String, org.opencv.core.Point, int, double, org.opencv.core.Scalar))\r\n5) put the line and circle with the interpolated text.\r\n6) transform the whole image to an RGB bitmap."},"comment":{"url":"https://api.github.com/repos/akvo/akvo-caddisfly/issues/comments/172575325","html_url":"https://github.com/akvo/akvo-caddisfly/issues/48#issuecomment-172575325","issue_url":"https://api.github.com/repos/akvo/akvo-caddisfly/issues/48","id":172575325,"user":{"login":"ldporsius","id":9623423,"avatar_url":"https://avatars.githubusercontent.com/u/9623423?v=3","gravatar_id":"","url":"https://api.github.com/users/ldporsius","html_url":"https://github.com/ldporsius","followers_url":"https://api.github.com/users/ldporsius/followers","following_url":"https://api.github.com/users/ldporsius/following{/other_user}","gists_url":"https://api.github.com/users/ldporsius/gists{/gist_id}","starred_url":"https://api.github.com/users/ldporsius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldporsius/subscriptions","organizations_url":"https://api.github.com/users/ldporsius/orgs","repos_url":"https://api.github.com/users/ldporsius/repos","events_url":"https://api.github.com/users/ldporsius/events{/privacy}","received_events_url":"https://api.github.com/users/ldporsius/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T16:19:29Z","updated_at":"2016-01-18T16:19:29Z","body":"Do we want to show this image in ResultActivity, or is it meant to only send it back to FLOW?"}}