I am making some images for a project about the hough transform line detection, I am showing the slope-intercept form , the normal form and their accumulator arrays to show the peaks. I am kind of new to Mathematica.
Data = Table[{x, x + 1}, {x, -5, 5}];
Show[
ListPlot[Data, PlotMarkers -> {Automatic, 11}, Joined -> False]
]
pSIF[m_, x_, y_] := -x*m + y
pNF[t_, x_, y_] := x*Cos[t] + y*Sin[t]
Show[
Plot[Apply[pSIF[m, #1, #2] &, Data, {1}], {m, -2.5, 2.5},
Evaluated -> True, PlotRange -> {Automatic, Automatic}]
]
Show[
Plot[Apply[pNF[m, #1, #2] &, Data, {1}], {m, 0, Pi},
Evaluated -> True, PlotRange -> {{0, Pi}, Automatic}]
]
I have done the slope-intercept and normal form plots, but I don't know how to quantize the plot and make the accumulator array. I am trying to round it and move it to a table but without success.
Show[
Plot[Round[Apply[pNF[m, #1, #2] &, Data, {1}]], {m, 0, Pi},
Evaluated -> True, PlotRange -> {{0, Pi}, Automatic}]
]