{"action":"created","issue":{"url":"https://api.github.com/repos/tatsy/lime/issues/3","repository_url":"https://api.github.com/repos/tatsy/lime","labels_url":"https://api.github.com/repos/tatsy/lime/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/tatsy/lime/issues/3/comments","events_url":"https://api.github.com/repos/tatsy/lime/issues/3/events","html_url":"https://github.com/tatsy/lime/issues/3","id":189018452,"number":3,"title":"about examples/vector_field_imaging","user":{"login":"AwenHuang","id":11007204,"avatar_url":"https://avatars.githubusercontent.com/u/11007204?v=3","gravatar_id":"","url":"https://api.github.com/users/AwenHuang","html_url":"https://github.com/AwenHuang","followers_url":"https://api.github.com/users/AwenHuang/followers","following_url":"https://api.github.com/users/AwenHuang/following{/other_user}","gists_url":"https://api.github.com/users/AwenHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/AwenHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AwenHuang/subscriptions","organizations_url":"https://api.github.com/users/AwenHuang/orgs","repos_url":"https://api.github.com/users/AwenHuang/repos","events_url":"https://api.github.com/users/AwenHuang/events{/privacy}","received_events_url":"https://api.github.com/users/AwenHuang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-14T02:58:12Z","updated_at":"2016-11-17T01:29:28Z","closed_at":null,"body":"Hello, I have some question about using your LIC.\r\nI want to use LIC by optical flow.\r\n\r\nThe third parameter of calcOpticalFlowFarneback() is type CV_32FC2.\r\n\r\n`\r\ncalcOpticalFlowFarneback(prevgray, img, flowUmat, 0.5, 1, 12, 2, 5, 1.1, 0);\r\n`\r\n`\r\nflowUmat.copyTo(flow);\r\n`\r\n\r\nI think I can use flow calculated by calcOpticalFlowFarneback.\r\nSo I passed the flow to lic function but had something wrong.\r\n\r\n`\r\nprintf(\"[LIC] Classic     -> \");\r\n`\r\n`\r\nlime::npr::lic(classic, noise, flow, 20, lime::npr::LICType::Classic);\r\n`\r\n`\r\nprintf(\"OK\\n\");\r\n`\r\n\r\nShould I do some pre-process on the flow image first? It seems like type error. \r\n"},"comment":{"url":"https://api.github.com/repos/tatsy/lime/issues/comments/261127605","html_url":"https://github.com/tatsy/lime/issues/3#issuecomment-261127605","issue_url":"https://api.github.com/repos/tatsy/lime/issues/3","id":261127605,"user":{"login":"tatsy","id":1556493,"avatar_url":"https://avatars.githubusercontent.com/u/1556493?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsy","html_url":"https://github.com/tatsy","followers_url":"https://api.github.com/users/tatsy/followers","following_url":"https://api.github.com/users/tatsy/following{/other_user}","gists_url":"https://api.github.com/users/tatsy/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsy/subscriptions","organizations_url":"https://api.github.com/users/tatsy/orgs","repos_url":"https://api.github.com/users/tatsy/repos","events_url":"https://api.github.com/users/tatsy/events{/privacy}","received_events_url":"https://api.github.com/users/tatsy/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T01:29:28Z","updated_at":"2016-11-17T01:29:28Z","body":"Hello @AwenHuang,\r\n\r\nI am really sorry for the delay in responding.\r\n\r\nThank you for explaining your problem in detail. I understand your problem.\r\nI think the problem is that the output of OpenCV's optical flow method includes\r\nflows whose \"length\" or \"L2-norm\" are over 1.\r\n\r\nAs you can see in the example, the ```calcVectorField``` in\r\nhttps://github.com/tatsy/lime/blob/master/examples/vector_field_imaging/vector_field_imaging.cpp#L77\r\nincludes only the flows whose length are between 0 and 1.\r\n\r\nAccordingly, I think normalizing your flows before computing LIC can solve your problem. If it's not working, please try other LIC algorithm than \"Classic\", i.e., Eulerian or Lunge-Kutta. \r\n\r\nIt is still not working, could you tell me the situation again, please?\r\nThank you very much for your cooperation."}}
{"actor":{"display_login":"tatsy"}}