Talk:Hough transform: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Can I get some pseudo-code...and possibly an amen: Differences are fine, and we need more examples.)
Line 2: Line 2:
I have read about the Hough Transform in an attempt to create a MATLAB implementation, but every resource I use has a different take on this transform. The background theory is the same, but the algorithms that I have seen are different. Even the TCL and C implementations on this site are somewhat different from some other implementations I have found. Can we possibly get some solid pseudo-code to implement to make sure any other solutions provided in different languages conform to some standard specification? Because, at this point, my MATLAB implementation is not going to come close to resembling the algorithm implemented in TCL and C. Can I get an Amen?!--[[User:Cferri|Chris Ferri]]
I have read about the Hough Transform in an attempt to create a MATLAB implementation, but every resource I use has a different take on this transform. The background theory is the same, but the algorithms that I have seen are different. Even the TCL and C implementations on this site are somewhat different from some other implementations I have found. Can we possibly get some solid pseudo-code to implement to make sure any other solutions provided in different languages conform to some standard specification? Because, at this point, my MATLAB implementation is not going to come close to resembling the algorithm implemented in TCL and C. Can I get an Amen?!--[[User:Cferri|Chris Ferri]]
: Not really. What's important at the surface is that the inputs match and the outputs match. How different examples achieve this will vary by how the problem best maps to each language. MATLAB's implementation ''should'' differ, because MATLAB looks at mathematical problems differently from TCL or C. Though, yes, we definitely need more examples. --[[User:Short Circuit|Michael Mol]] 18:35, 9 August 2010 (UTC)
: Not really. What's important at the surface is that the inputs match and the outputs match. How different examples achieve this will vary by how the problem best maps to each language. MATLAB's implementation ''should'' differ, because MATLAB looks at mathematical problems differently from TCL or C. Though, yes, we definitely need more examples. --[[User:Short Circuit|Michael Mol]] 18:35, 9 August 2010 (UTC)
::But, I thought the point of Rosetta Code was to be able to compare implementations of a common task between languages. I understand that this definition doesn't invalidate your response, but I don't see the point of ''not'' specifying a pseudo-code to implement. It would be much easier for: not only novices trying to figure out how to do something using the solutions as examples, but also developers who are confused about how to implement this particular algorithm, if there were pseudo-code to refer to. I say this especially since my implementation requires an "edge-detected" version of the image as the input (a boolean array where the array member at the index of an "edge" pixel is true). And, from what I can tell, the TCL and C solutions don't. So, I am not exactly sure what is going on in those algorithms which allows them to produce valid output. This is why pseudo-code is important.--[[User:Cferri|Chris Ferri]]


==PNG Image==
==PNG Image==

Revision as of 18:52, 9 August 2010

Can I get some pseudo-code...and possibly an amen

I have read about the Hough Transform in an attempt to create a MATLAB implementation, but every resource I use has a different take on this transform. The background theory is the same, but the algorithms that I have seen are different. Even the TCL and C implementations on this site are somewhat different from some other implementations I have found. Can we possibly get some solid pseudo-code to implement to make sure any other solutions provided in different languages conform to some standard specification? Because, at this point, my MATLAB implementation is not going to come close to resembling the algorithm implemented in TCL and C. Can I get an Amen?!--Chris Ferri

Not really. What's important at the surface is that the inputs match and the outputs match. How different examples achieve this will vary by how the problem best maps to each language. MATLAB's implementation should differ, because MATLAB looks at mathematical problems differently from TCL or C. Though, yes, we definitely need more examples. --Michael Mol 18:35, 9 August 2010 (UTC)
But, I thought the point of Rosetta Code was to be able to compare implementations of a common task between languages. I understand that this definition doesn't invalidate your response, but I don't see the point of not specifying a pseudo-code to implement. It would be much easier for: not only novices trying to figure out how to do something using the solutions as examples, but also developers who are confused about how to implement this particular algorithm, if there were pseudo-code to refer to. I say this especially since my implementation requires an "edge-detected" version of the image as the input (a boolean array where the array member at the index of an "edge" pixel is true). And, from what I can tell, the TCL and C solutions don't. So, I am not exactly sure what is going on in those algorithms which allows them to produce valid output. This is why pseudo-code is important.--Chris Ferri

PNG Image

I have a small png file available (320x240)to use with this task, created with Inkscape, but I don't know how to upload it to the site. --Rldrenth 21:01, 21 January 2010 (UTC)

Choose “Upload file” in the “toolbox” sidebar, or by any other means go to Special:Upload. —Kevin Reid 21:25, 21 January 2010 (UTC)
Thanks. --Rldrenth 22:20, 21 January 2010 (UTC)
I had to replace that image; it was done with a transparent background rather than a white one, which is highly unhelpful for this task. –Donal Fellows 00:02, 22 January 2010 (UTC)
Running the current Tcl code gives black in the (lower) unaffected area ("#000000" as default fieldColor); (my C impl does so without chance to change it but recompiling). --ShinTakezou 08:42, 6 August 2010 (UTC)

Expand To Print Peaks

Should we expand the scope so the program to determine the location of peaks in the transformed image and then print then r & theta that correspond to the lines? --Rldrenth 21:01, 21 January 2010 (UTC)

Probably better done as another task that builds on top of this one as locating the peaks is not part of the Hough transform itself. –Donal Fellows 00:02, 22 January 2010 (UTC)

I think I am missing something

How is this useful? If I try and implement this, how can I tell if I have implemented it correctly? I look at the description of the task, and then I look at that result image and I look at the references and I feel like I am missing something. --Rdm 15:37, 19 May 2010 (UTC)

Being a type of transform, I suppose I'd try to use it as part of image fingerprinting. Just a rough idea, one could run the transform, find the median value M, max everything there and above M, drop everything below M, find center points and store their relative positions. (I'd probably go back and adjust M until I had a certain fixed number of center points, or as close to it as possible.) --Michael Mol 18:22, 19 May 2010 (UTC)

I must be missing something. Is there a reason the tcl implementation (the only one at this time) is looping theta through two complete circles? --Coderjoe 17:04, 22 July 2010 (UTC)

Semantic MediaWiki

I'm going to use this task as a guinea pig for the new Semantic MediaWiki features. --Michael Mol 10:07, 27 July 2010 (UTC)

Ok, so looking at it, I'm thinking:
  • satisfies the Hough transform task' is a property of the Tcl code example. There should be a way to make this imply that it satisfies the Hough transform task, but I don't know what it is.
  • uses Tk is a property of the Tcl code example
  • demonstrates (Tcl code example identifier) would be a property of the demonstration code.
  • uses Tk is a property of the demonstration code. I'm sure there's a way to tie the library version range in there, but I don't know what it is.
  • uses TkImg is a property of the demonstration code
  • uses (support image identifier) is a property of that support image
  • supports the Hough transform task is a property of that support image
  • explicitly requires the Hough transform is a property of the Hough Transform task
  • example output of (demonstration code) is a property of that demonstration code's example
Those are the properties I'm seeing. I could use some help figuring out how to apply them. --Michael Mol 10:50, 27 July 2010 (UTC)