zhaojiahai / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Perform HoughLineTransform on a list of white points. #145

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a situation where I have a list of coordinates of white points, and I 
want to run a HoughLineTransform on them. (The points in question are from 
BlobCounter.GetBlobsEdgePoints; I'm trying to find lines in the edges of a blob 
that is neither a triangle nor a quadrilateral.)

Rather than creating a new sufficiently-large bitmap, locking it, setting the 
appropriate pixels to white, and passing the BitmapData to ProcessImage, I 
wanted to be able to simply pass the list of points and process them directly.

The patch is attached. There is some code duplication between the two 
non-wrapper versions of ProcessImage; I'm not sure if the duplication is 
warranted. Some could clearly be refactored, while other portions would take 
more thought.

For consistency, I also added the corresponding method to HoughCircleTransform, 
but I did not test it beyond verifying that it compiles.

Original issue reported on code.google.com by dales...@gmail.com on 17 Aug 2010 at 5:38

Attachments:

GoogleCodeExporter commented 8 years ago
This is one of the changes that drove the issue 182.

I'm still doing a Hough transform on a collection of points, but now it's just 
an IEnumerable, not necessarily a full-blown List.

Original comment by dales...@gmail.com on 11 Jan 2011 at 5:15

Attachments: