Vision icon indicating copy to clipboard operation
Vision copied to clipboard

Implement Hough Line2D/Ray2D detection

Open ShaharMS opened this issue 2 years ago • 7 comments

the voting part is unimplemented for now because i couldn't figure it out 🙃

this is an important part of the library, and needs to be implemented asap

ShaharMS avatar Jul 27 '22 12:07 ShaharMS

Progress: a simple version of the hough transform works pretty nicely, might need some tweaking, but that's still progress :)

ShaharMS avatar Jan 03 '23 08:01 ShaharMS

Another progress note: hough transform works, but needs to filter garbage rays and turn them into line segments. Will probably try implementing a RANSAC-style filter for that.

ShaharMS avatar Jun 13 '23 04:06 ShaharMS

Another progress note: hough transform works, but needs to filter garbage rays and turn them into line segments. Will probably try implementing a RANSAC-style filter for that.

RANSAC-style filter? Could you tell me what does it do?

Wither362 avatar Jun 13 '23 12:06 Wither362

RANSAC is a method of detecting patterns within a data set, by using random samples from the set, and searching for a predetermined wanted pattern

RANSAC implementation here is:

  • taking a ray, selecting n random points on it
  • checking along the ray of this point is withthin a line, if so, add a line segment to an array
  • repeat that t times with different randomization of n points until we find the set of points whithin an array, and return these lines for the array
  • repeat for the rest of the detected rays

ShaharMS avatar Jun 14 '23 16:06 ShaharMS

Actually, seems like I misunderstood some stuff, RANSAC is probably not the answer here. A better way is probably just going over each ray and scanning from lines, beginning to end

ShaharMS avatar Jun 14 '23 16:06 ShaharMS

RANSAC is a method of detecting patterns within a data set, by using random samples from the set, and searching for a predetermined wanted pattern

RANSAC implementation here is:

  • taking a ray, selecting n random points on it
  • checking along the ray of this point is withthin a line, if so, add a line segment to an array
  • repeat that t times with different randomization of n points until we find the set of points whithin an array, and return these lines for the array
  • repeat for the rest of the detected rays

Pretty interesting…

Wither362 avatar Jun 15 '23 07:06 Wither362

Impelemented - will close this soon🙏

ShaharMS avatar Jun 03 '24 16:06 ShaharMS