Function Repository Resource:

LinesImage

Source Notebook

Calculates straight lines which collectively approximate a given image

Contributed by: Henrik Schachner

ResourceFunction["LinesImage"][image]

returns a list of InfiniteLine objects which collectively approximate image.

Details and Options

ResourceFunction["LinesImage"] accepts the following options:
"RadonLimit".0003minimal value of Radon data which is included.
"ShowProgress"Trueshow ProgressIndicator during calculation.
"AngleIncrement"1difference between any two consecutive angles of lines.

Examples

Basic Examples (1) 

Calculate from an image a collection of straight lines which approximate that image:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/c56a2ae6-71c2-4d7f-9335-5f781f847159"]
Out[1]=

Options (2) 

RadonLimit (1) 

When "RadonLimit" is increased, only bigger projection values (Radon data) are taken into account. As a result, fewer lines per angle are created:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/0504d603-aa5f-4e89-9812-04c2256132d1"]
Out[2]=

AngleIncrement (1) 

"AngleIncrement" can be given as some positive integer n and specifies that only any nth angle (between 1° and 180°) of the lines appear:

Publisher

Henrik Schachner

Version History

  • 1.0.0 – 23 March 2020

License Information