Giter Site home page Giter Site logo

hough_transform's Introduction

Hough Transform - Line Detection

Build Status

Python implementation of hough transform for detecting lines in images.
Explanation of how the hough transform works in my blog post: Understanding Hough Transform

Requirements

  • Tested on Python 2.7 and Python 3.6
  • pip install -r requirements.txt

Usage

python hough_transform.py

Sample

hough transform image

Tests

python hough_transform_test.py

Resources

License

MIT

hough_transform's People

Contributors

aloknayak29 avatar alyssaq avatar bigeyesung avatar jabsysemb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hough_transform's Issues

License

Thanks for the awesome work! I'd like to modify it and use it for a project of mine. However, as of now, there is no way for me to do this, since the repo has no license and therefore the default copyright rules apply, which are very restrictive (see https://opensource.stackexchange.com/a/1721). So if you would like to give others the chance to use/modify your work (of course with proper credit), then it would be great, if you could include a more permissive license (e.g. the MIT license).

transformation is taking too long

width, height = img.shape ( this returns tuple of 3) how are you expecting only 2 ?
according to my calculation this loo shall run approx. 3 million times (too long)

  for i in range(len(x_idxs)):
    x = x_idxs[i]
    y = y_idxs[i]

    for t_idx in range(num_thetas):
      #print("looping ", t_idx)
      rho = round(x * cos_t[t_idx] + y * sin_t[t_idx]) + diag_len
      accumulator[rho.astype(np.uint64), t_idx] += 1

Not a bug

Hi Alyssa,

Your blog post on the Hough Transform in Python was really helpful when I was trying to learn the concepts.

Many thanks and nice blog!

Regards,
Koon Han

error

I'm new to python and use 'python hough_transform.py' then get:
Traceback (most recent call last):
File "hough_transform.py", line 86, in
show_hough_line(img, accumulator, save_path='imgs/output.png')
TypeError: show_hough_line() missing 2 required positional arguments: 'thetas' and 'rhos'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.