{"action":"created","issue":{"url":"https://api.github.com/repos/jcupitt/ruby-vips/issues/138","repository_url":"https://api.github.com/repos/jcupitt/ruby-vips","labels_url":"https://api.github.com/repos/jcupitt/ruby-vips/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/jcupitt/ruby-vips/issues/138/comments","events_url":"https://api.github.com/repos/jcupitt/ruby-vips/issues/138/events","html_url":"https://github.com/jcupitt/ruby-vips/issues/138","id":263504318,"number":138,"title":"Example for working with hough lines output","user":{"login":"xavriley","id":369527,"avatar_url":"https://avatars1.githubusercontent.com/u/369527?v=4","gravatar_id":"","url":"https://api.github.com/users/xavriley","html_url":"https://github.com/xavriley","followers_url":"https://api.github.com/users/xavriley/followers","following_url":"https://api.github.com/users/xavriley/following{/other_user}","gists_url":"https://api.github.com/users/xavriley/gists{/gist_id}","starred_url":"https://api.github.com/users/xavriley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavriley/subscriptions","organizations_url":"https://api.github.com/users/xavriley/orgs","repos_url":"https://api.github.com/users/xavriley/repos","events_url":"https://api.github.com/users/xavriley/events{/privacy}","received_events_url":"https://api.github.com/users/xavriley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-06T16:35:04Z","updated_at":"2017-10-07T16:08:53Z","closed_at":null,"author_association":"NONE","body":"I've been doing some work with hough line transforms in ImageMagick to try to identify and segment tables in scanned documents. This is working great so far with the following output:\r\n\r\n![](https://dl.dropboxusercontent.com/s/qiayht1abl3ctyv/29_hough.png)\r\n\r\nYou can see the red lines where the hough transform has been applied to the original image.\r\n\r\nIn the interests of doing this on a larger scale in a more efficient way I'd love to benchmark this against an equivalent vips implementation, but I'm having a hard time working out what to do with the output of the `hough_lines` command. So far I have:\r\n\r\n```\r\n> require 'vips'\r\n# import the image shown above\r\n> im = Vips::Image.new_from_file \"/Users/xriley/Dropbox (Personal)/Public/29_hough.png\"\r\n# change the colour space to black and white for the hough_lines method\r\n> im = im.colourspace(:'b-w')\r\n=> #<Image 2359x1709 uchar, 1 bands, b-w>\r\n> im = im.hough_line\r\n=> #<Image 256x256 uint, 1 bands, matrix>\r\n```\r\n\r\nAt this point I'd like to use the output from `hough_line` (assuming it has found the lines) to draw, say, 5px wide red lines onto the original image so that I can validate it. After that point I'd be aiming to segment the image based on those coordinates.\r\n\r\nIf there's any existing documentation or pointers you could offer I'd really appreciate it. The final aim with this is to make some open data relating to company ownership but that's a long way off yet! Thanks in advance.\r\n\r\np.s. my (very bad) image magick code is here for reference https://gist.github.com/xavriley/cda9ddd393ad43676b64"},"comment":{"url":"https://api.github.com/repos/jcupitt/ruby-vips/issues/comments/334946128","html_url":"https://github.com/jcupitt/ruby-vips/issues/138#issuecomment-334946128","issue_url":"https://api.github.com/repos/jcupitt/ruby-vips/issues/138","id":334946128,"user":{"login":"jcupitt","id":580843,"avatar_url":"https://avatars2.githubusercontent.com/u/580843?v=4","gravatar_id":"","url":"https://api.github.com/users/jcupitt","html_url":"https://github.com/jcupitt","followers_url":"https://api.github.com/users/jcupitt/followers","following_url":"https://api.github.com/users/jcupitt/following{/other_user}","gists_url":"https://api.github.com/users/jcupitt/gists{/gist_id}","starred_url":"https://api.github.com/users/jcupitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcupitt/subscriptions","organizations_url":"https://api.github.com/users/jcupitt/orgs","repos_url":"https://api.github.com/users/jcupitt/repos","events_url":"https://api.github.com/users/jcupitt/events{/privacy}","received_events_url":"https://api.github.com/users/jcupitt/received_events","type":"User","site_admin":false},"created_at":"2017-10-07T16:08:53Z","updated_at":"2017-10-07T16:08:53Z","author_association":"OWNER","body":"The docs for `hough_line` are here, in case you missed them:\r\n\r\nhttp://jcupitt.github.io/libvips/API/current/libvips-arithmetic.html#vips-hough-line\r\n\r\nI'll try making a sample program. "}}
{"actor":{"display_login":"jcupitt"}}