{"action":"closed","issue":{"url":"https://api.github.com/repos/votchallenge/trax/issues/10","labels_url":"https://api.github.com/repos/votchallenge/trax/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/votchallenge/trax/issues/10/comments","events_url":"https://api.github.com/repos/votchallenge/trax/issues/10/events","html_url":"https://github.com/votchallenge/trax/issues/10","id":105628834,"number":10,"title":"Overlap calculation error","user":{"login":"lukacu","id":875641,"avatar_url":"https://avatars.githubusercontent.com/u/875641?v=3","gravatar_id":"","url":"https://api.github.com/users/lukacu","html_url":"https://github.com/lukacu","followers_url":"https://api.github.com/users/lukacu/followers","following_url":"https://api.github.com/users/lukacu/following{/other_user}","gists_url":"https://api.github.com/users/lukacu/gists{/gist_id}","starred_url":"https://api.github.com/users/lukacu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukacu/subscriptions","organizations_url":"https://api.github.com/users/lukacu/orgs","repos_url":"https://api.github.com/users/lukacu/repos","events_url":"https://api.github.com/users/lukacu/events{/privacy}","received_events_url":"https://api.github.com/users/lukacu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-09T16:04:23Z","updated_at":"2015-09-09T16:06:44Z","closed_at":"2015-09-09T16:06:44Z","body":"*(Submitted by Christian Bailer from DFKI)*\r\n\r\nPossibly, there is an error in the function \"region_compute_overlap\" in the VOT framework. It affects shift on the y axis.\r\nI am using this version: https://github.com/votchallenge/trax/blob/master/lib/region.c\r\n\r\nIf I calculate the overlap of 2 bounding boxes of the size 10x10 a shift of 1 on the x axes works correctly (There are 9 units overlap and 2 units outside the overlap i.e. the expected overlap is 9/(9+2) = 0.818182):\r\n\r\n    region_container a,b;\r\n    a.type = b.type = RECTANGLE;\r\n    a.data.rectangle.x=1;\r\n    a.data.rectangle.y=0;\r\n    a.data.rectangle.width=10;\r\n    a.data.rectangle.height=10;\r\n    b.data.rectangle.x=0;\r\n    b.data.rectangle.y=0;\r\n    b.data.rectangle.width=10;\r\n    b.data.rectangle.height=10;\r\n    cout << region_compute_overlap(&a, &b).overlap << endl;\r\n\r\nResult: 0.818182  (Expected: 0.818182)\r\n\r\nHowever, a shift of 1 on the y axis leads to a different wrong result:\r\n\r\n    region_container a,b;\r\n    a.type = b.type = RECTANGLE;\r\n    a.data.rectangle.x=0;\r\n    a.data.rectangle.y=1;\r\n    a.data.rectangle.width=10;\r\n    a.data.rectangle.height=10;\r\n    b.data.rectangle.x=0;\r\n    b.data.rectangle.y=0;\r\n    b.data.rectangle.width=10;\r\n    b.data.rectangle.height=10;\r\n    cout << region_compute_overlap(&a, &b).overlap << endl;\r\n\r\nResult: 0.9  (Expected: 0.818182)"}}