├── doc ├── form_0.png ├── form_1.png ├── form_2.png ├── form_3.png ├── form_4.png ├── form_5.png ├── form_6.png ├── form_7.png ├── form_8.png ├── form_9.png ├── doxygen.png ├── form_10.png ├── graph_legend.png ├── lsd_8c__incl.png ├── lsd_8h_a0_cgraph.png ├── lsd_8h_a1_cgraph.png ├── lsd_8h_a2_cgraph.png ├── lsd_8h_a3_cgraph.png ├── lsd_8c_a19_cgraph.png ├── lsd_8c_a20_cgraph.png ├── lsd_8c_a21_cgraph.png ├── lsd_8c_a22_cgraph.png ├── lsd_8c_a23_cgraph.png ├── lsd_8c_a24_cgraph.png ├── lsd_8c_a25_cgraph.png ├── lsd_8c_a26_cgraph.png ├── lsd_8c_a27_cgraph.png ├── lsd_8c_a28_cgraph.png ├── lsd_8c_a29_cgraph.png ├── lsd_8c_a30_cgraph.png ├── lsd_8c_a31_cgraph.png ├── lsd_8c_a32_cgraph.png ├── lsd_8c_a33_cgraph.png ├── lsd_8c_a34_cgraph.png ├── lsd_8c_a39_cgraph.png ├── lsd_8c_a40_cgraph.png ├── lsd_8c_a41_cgraph.png ├── lsd_8c_a42_cgraph.png ├── lsd_8c_a43_cgraph.png ├── lsd_8c_a44_cgraph.png ├── lsd_8c_a45_cgraph.png ├── lsd_8c_a46_cgraph.png ├── lsd_8c_a47_cgraph.png ├── lsd_8c_a48_cgraph.png ├── lsd_8c_a49_cgraph.png ├── lsd_8c_a50_cgraph.png ├── lsd_8c_a51_cgraph.png ├── lsd_8c_a52_cgraph.png ├── lsd_8c_a53_cgraph.png ├── lsd_8c_a54_cgraph.png ├── lsd_8c_a55_cgraph.png ├── lsd_8c_a56_cgraph.png ├── lsd_8c_a57_cgraph.png ├── lsd_8h__dep__incl.png ├── structcoorlist__coll__graph.png ├── formula.repository ├── files.html ├── globals_type.html ├── globals_defs.html ├── annotated.html ├── graph_legend.dot ├── index.html ├── functions_vars.html ├── functions.html ├── structpoint.html ├── structcoorlist.html ├── graph_legend.html ├── structimage__int__s.html ├── globals_func.html ├── doxygen.css ├── structimage__char__s.html ├── structimage__double__s.html ├── globals.html ├── structntuple__list__s.html ├── structrect__iter.html ├── structrect.html └── lsd_8h-source.html ├── lsd_call_example.c ├── Makefile ├── README.txt ├── lsd.h └── COPYING /doc/form_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_0.png -------------------------------------------------------------------------------- /doc/form_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_1.png -------------------------------------------------------------------------------- /doc/form_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_2.png -------------------------------------------------------------------------------- /doc/form_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_3.png -------------------------------------------------------------------------------- /doc/form_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_4.png -------------------------------------------------------------------------------- /doc/form_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_5.png -------------------------------------------------------------------------------- /doc/form_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_6.png -------------------------------------------------------------------------------- /doc/form_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_7.png -------------------------------------------------------------------------------- /doc/form_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_8.png -------------------------------------------------------------------------------- /doc/form_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_9.png -------------------------------------------------------------------------------- /doc/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/doxygen.png -------------------------------------------------------------------------------- /doc/form_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/form_10.png -------------------------------------------------------------------------------- /doc/graph_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/graph_legend.png -------------------------------------------------------------------------------- /doc/lsd_8c__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c__incl.png -------------------------------------------------------------------------------- /doc/lsd_8h_a0_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8h_a0_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8h_a1_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8h_a1_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8h_a2_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8h_a2_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8h_a3_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8h_a3_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a19_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a19_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a20_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a20_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a21_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a21_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a22_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a22_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a23_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a23_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a24_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a24_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a25_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a25_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a26_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a26_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a27_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a27_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a28_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a28_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a29_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a29_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a30_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a30_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a31_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a31_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a32_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a32_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a33_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a33_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a34_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a34_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a39_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a39_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a40_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a40_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a41_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a41_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a42_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a42_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a43_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a43_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a44_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a44_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a45_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a45_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a46_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a46_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a47_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a47_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a48_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a48_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a49_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a49_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a50_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a50_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a51_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a51_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a52_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a52_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a53_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a53_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a54_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a54_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a55_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a55_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a56_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a56_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8c_a57_cgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8c_a57_cgraph.png -------------------------------------------------------------------------------- /doc/lsd_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/lsd_8h__dep__incl.png -------------------------------------------------------------------------------- /doc/structcoorlist__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theWorldCreator/LSD/HEAD/doc/structcoorlist__coll__graph.png -------------------------------------------------------------------------------- /lsd_call_example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "lsd.h" 4 | 5 | int main(void) 6 | { 7 | double * image; 8 | double * out; 9 | int x,y,i,j,n; 10 | int X = 128; /* x image size */ 11 | int Y = 128; /* y image size */ 12 | 13 | /* create a simple image: left half black, right half gray */ 14 | image = (double *) malloc( X * Y * sizeof(double) ); 15 | if( image == NULL ) 16 | { 17 | fprintf(stderr,"error: not enough memory\n"); 18 | exit(EXIT_FAILURE); 19 | } 20 | for(x=0;x 2 | 3 | LSD: File Index 4 | 5 | 6 | 7 | 8 |

LSD File List

Here is a list of all files with brief descriptions: 9 | 10 | 11 |
lsd.c [code]LSD module code
lsd.h [code]LSD module header
12 |
Generated on Fri Nov 11 11:11:11 2011 for LSD by 13 | 14 | doxygen 15 | 1.3.4
16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/globals_type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: File Member Index 4 | 5 | 6 | 7 | 8 | 9 | 10 |

11 |

    12 |
  • image_char 13 | : lsd.c
  • image_double 14 | : lsd.c
  • image_int 15 | : lsd.c
  • ntuple_list 16 | : lsd.c
17 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 18 | 19 | doxygen 20 | 1.3.4
21 | 22 | 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # 3 | # LSD - Line Segment Detector on digital images 4 | # 5 | # Copyright 2007-2011 rafael grompone von gioi (grompone@gmail.com) 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # ----------------------------------------------------------------------------- 21 | 22 | all: lsd lsd_call_example 23 | 24 | lsd: lsd.c lsd.h lsd_cmd.c 25 | cc -O3 -o lsd lsd_cmd.c lsd.c -lm 26 | 27 | lsd_call_example: lsd.c lsd.h lsd_call_example.c 28 | cc -o lsd_call_example lsd_call_example.c lsd.c -lm 29 | 30 | doc: lsd.c lsd.h doxygen.config 31 | doxygen doxygen.config 32 | 33 | clean: 34 | rm -f lsd lsd_call_example 35 | 36 | cleandoc: 37 | rm -rf doc 38 | 39 | # ----------------------------------------------------------------------------- 40 | -------------------------------------------------------------------------------- /doc/globals_defs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: File Member Index 4 | 5 | 6 | 7 | 8 | 9 | 10 |

11 |

25 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 26 | 27 | doxygen 28 | 1.3.4
29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: Annotated Index 4 | 5 | 6 | 7 | 8 |

LSD Data Structures

Here are the data structures with brief descriptions: 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
coorlistChained list of coordinates
image_char_sChar image data type
image_double_sDouble image data type
image_int_sInt image data type
ntuple_list_s'list of n-tuple' data type
pointA point (or pixel)
rectRectangle structure: line segment with width
rect_iterRectangle points iterator
18 |
Generated on Fri Nov 11 11:11:38 2011 for LSD by 19 | 20 | doxygen 21 | 1.3.4
22 | 23 | 24 | -------------------------------------------------------------------------------- /doc/graph_legend.dot: -------------------------------------------------------------------------------- 1 | digraph G 2 | { 3 | edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10]; 4 | node [fontname="Helvetica",fontsize=10,shape=record]; 5 | Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",style="filled" fontcolor="white"]; 6 | Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; 7 | Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPublicBase.html"]; 8 | Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; 9 | Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="red",URL="$classTruncated.html"]; 10 | Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="Helvetica"]; 11 | Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classProtectedBase.html"]; 12 | Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="Helvetica"]; 13 | Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPrivateBase.html"]; 14 | Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; 15 | Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="grey75"]; 16 | Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; 17 | Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"]; 18 | Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="Helvetica"]; 19 | Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"]; 20 | Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="Helvetica"]; 21 | Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classUsed.html"]; 22 | } 23 | -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: LSD code documentation 4 | 5 | 6 | 7 | 8 |

LSD code documentation

9 |

10 | This is an implementation of the Line Segment Detector described in the paper:

11 | "LSD: A Fast Line Segment Detector with a False Detection Control" by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel, and Gregory Randall, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, no. 4, pp. 722-732, April, 2010.

12 | and in more details in the CMLA Technical Report:

13 | "LSD: A Line Segment Detector, Technical Report", by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel, Gregory Randall, CMLA, ENS Cachan, 2010.

14 | The version implemented here includes some further improvements described on the LSD page at www.ipol.im. That same page includes more information, including this code and an online demo version:

15 | http://www.ipol.im/pub/algo/gjmr_line_segment_detector

16 | The module's main function is lsd().

17 | The source code is contained in two files: lsd.h and lsd.c.

18 | HISTORY:

    19 |
  • version 1.6 - nov 2011: Changes in the interface, max_grad parameter removed, the factor 11 was added to the number of test to consider the different precision values tested, a minor bug corrected in the gradient sorting code.
  • version 1.5 - dec 2010: Changes in 'refine', -W option added, and more comments added.
  • version 1.4 - jul 2010: lsd_scale interface added and doxygen doc.
  • version 1.3 - feb 2010: Multiple bug correction and improved code.
  • version 1.2 - dec 2009: First full Ansi C Language version.
  • version 1.1 - sep 2009: Systematic subsampling to scale 0.8 and correction to partially handle"angle problem".
  • version 1.0 - jan 2009: First complete Megawave2 and Ansi C Language version.
20 |

21 |

Author:
rafael grompone von gioi (grompone@gmail.com)
22 |
Generated on Fri Nov 11 11:11:11 2011 for LSD by 23 | 24 | doxygen 25 | 1.3.4
26 | 27 | 28 | -------------------------------------------------------------------------------- /doc/functions_vars.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: Compound Member Index 4 | 5 | 6 | 7 | 8 | 9 | 10 |

11 |

37 |
Generated on Fri Nov 11 11:11:38 2011 for LSD by 38 | 39 | doxygen 40 | 1.3.4
41 | 42 | 43 | -------------------------------------------------------------------------------- /doc/functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: Compound Member Index 4 | 5 | 6 | 7 | 8 | 9 | 10 |

11 | Here is a list of all struct and union fields with links to the structures/unions they belong to:

37 |
Generated on Fri Nov 11 11:11:38 2011 for LSD by 38 | 39 | doxygen 40 | 1.3.4
41 | 42 | 43 | -------------------------------------------------------------------------------- /doc/structpoint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: point struct Reference 4 | 5 | 6 | 7 | 8 |

point Struct Reference


Detailed Description

9 | A point (or pixel). 10 |

11 | 12 |

13 | Definition at line 129 of file lsd.c. 14 | 15 | 16 | 17 | 18 | 19 | 20 |

Data Fields

int x
int y
21 |


Field Documentation

22 |

23 | 24 | 25 | 31 | 32 |
26 | 27 | 28 |
int point::x 29 |
30 |
33 | 34 | 35 | 38 | 46 | 47 |
36 |   37 | 39 | 40 |

41 | 42 |

43 | Definition at line 129 of file lsd.c. 44 |

45 | Referenced by get_theta(), reduce_region_radius(), refine(), region2rect(), and region_grow().

48 |

49 | 50 | 51 | 57 | 58 |
52 | 53 | 54 |
int point::y 55 |
56 |
59 | 60 | 61 | 64 | 72 | 73 |
62 |   63 | 65 | 66 |

67 | 68 |

69 | Definition at line 129 of file lsd.c. 70 |

71 | Referenced by get_theta(), reduce_region_radius(), refine(), region2rect(), and region_grow().

74 |


The documentation for this struct was generated from the following file: 76 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 77 | 78 | doxygen 79 | 1.3.4
80 | 81 | 82 | -------------------------------------------------------------------------------- /doc/structcoorlist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: coorlist struct Reference 4 | 5 | 6 | 7 | 8 |

coorlist Struct Reference

Collaboration diagram for coorlist:

Collaboration graph
9 |
[legend]

Detailed Description

10 | Chained list of coordinates. 11 |

12 | 13 |

14 | Definition at line 120 of file lsd.c. 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

Data Fields

int x
int y
coorlistnext
24 |


Field Documentation

25 |

26 | 27 | 28 | 34 | 35 |
29 | 30 | 31 |
struct coorlist* coorlist::next 32 |
33 |
36 | 37 | 38 | 41 | 47 | 48 |
39 |   40 | 42 | 43 |

44 | 45 |

46 | Definition at line 123 of file lsd.c.

49 |

50 | 51 | 52 | 58 | 59 |
53 | 54 | 55 |
int coorlist::x 56 |
57 |
60 | 61 | 62 | 65 | 71 | 72 |
63 |   64 | 66 | 67 |

68 | 69 |

70 | Definition at line 122 of file lsd.c.

73 |

74 | 75 | 76 | 82 | 83 |
77 | 78 | 79 |
int coorlist::y 80 |
81 |
84 | 85 | 86 | 89 | 95 | 96 |
87 |   88 | 90 | 91 |

92 | 93 |

94 | Definition at line 122 of file lsd.c.

97 |


The documentation for this struct was generated from the following file: 99 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 100 | 101 | doxygen 102 | 1.3.4
103 | 104 | 105 | -------------------------------------------------------------------------------- /doc/graph_legend.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: Graph Legend 4 | 5 | 6 | 7 | 8 |

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

9 | Consider the following example:

/*! Invisible class because of truncation */
10 | class Invisible { };
11 | 
12 | /*! Truncated class, inheritance relation is hidden */
13 | class Truncated : public Invisible { };
14 | 
15 | /* Class not documented with doxygen comments */
16 | class Undocumented { };
17 | 
18 | /*! Class that is inherited using public inheritance */
19 | class PublicBase : public Truncated { };
20 | 
21 | /*! A template class */
22 | template<class T> class Templ { };
23 | 
24 | /*! Class that is inherited using protected inheritance */
25 | class ProtectedBase { };
26 | 
27 | /*! Class that is inherited using private inheritance */
28 | class PrivateBase { };
29 | 
30 | /*! Class that is used by the Inherited class */
31 | class Used { };
32 | 
33 | /*! Super class that inherits a number of other classes */
34 | class Inherited : public PublicBase,
35 |                   protected ProtectedBase,
36 |                   private PrivateBase,
37 |                   public Undocumented
38 |                   public Templ<int>
39 | {
40 |   private:
41 |     Used *m_usedClass;
42 | };
43 | 
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

44 |

45 | graph_legend.png 46 |
47 |

48 | The boxes in the above graph have the following meaning:

    49 |
  • 50 | A filled black box represents the struct or class for which the graph is generated.
  • 51 |
  • 52 | A box with a black border denotes a documented struct or class.
  • 53 |
  • 54 | A box with a grey border denotes an undocumented struct or class.
  • 55 |
  • 56 | A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • 57 |
58 | The arrows have the following meaning:
    59 |
  • 60 | A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • 61 |
  • 62 | A dark green arrow is used for protected inheritance.
  • 63 |
  • 64 | A dark red arrow is used for private inheritance.
  • 65 |
  • 66 | A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • 67 |
  • 68 | A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • 69 |
70 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 71 | 72 | doxygen 73 | 1.3.4
74 | 75 | 76 | -------------------------------------------------------------------------------- /doc/structimage__int__s.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: image_int_s struct Reference 4 | 5 | 6 | 7 | 8 |

image_int_s Struct Reference


Detailed Description

9 | int image data type 10 |

11 | The pixel value at (x,y) is accessed by:

12 | image->data[ x + y * image->xsize ]

13 | with x and y integer. 14 |

15 | 16 |

17 | Definition at line 394 of file lsd.c. 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

Data Fields

int * data
unsigned int xsize
unsigned int ysize
27 |


Field Documentation

28 |

29 | 30 | 31 | 37 | 38 |
32 | 33 | 34 |
int* image_int_s::data 35 |
36 |
39 | 40 | 41 | 44 | 52 | 53 |
42 |   43 | 45 | 46 |

47 | 48 |

49 | Definition at line 396 of file lsd.c. 50 |

51 | Referenced by LineSegmentDetection(), new_image_int(), and new_image_int_ini().

54 |

55 | 56 | 57 | 63 | 64 |
58 | 59 | 60 |
unsigned int image_int_s::xsize 61 |
62 |
65 | 66 | 67 | 70 | 78 | 79 |
68 |   69 | 71 | 72 |

73 | 74 |

75 | Definition at line 397 of file lsd.c. 76 |

77 | Referenced by LineSegmentDetection(), and new_image_int().

80 |

81 | 82 | 83 | 89 | 90 |
84 | 85 | 86 |
unsigned int image_int_s::ysize 87 |
88 |
91 | 92 | 93 | 96 | 104 | 105 |
94 |   95 | 97 | 98 |

99 | 100 |

101 | Definition at line 397 of file lsd.c. 102 |

103 | Referenced by LineSegmentDetection(), and new_image_int().

106 |


The documentation for this struct was generated from the following file: 108 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 109 | 110 | doxygen 111 | 1.3.4
112 | 113 | 114 | -------------------------------------------------------------------------------- /doc/globals_func.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: File Member Index 4 | 5 | 6 | 7 | 8 | 9 |
a | d | e | f | g | i | l | n | r
10 | 11 |

12 | 13 |

14 |

- a -

    15 |
  • add_7tuple() 16 | : lsd.c
  • angle_diff() 17 | : lsd.c
  • angle_diff_signed() 18 | : lsd.c
19 |

- d -

    20 |
  • dist() 21 | : lsd.c
  • double_equal() 22 | : lsd.c
23 |

- e -

    24 |
  • enlarge_ntuple_list() 25 | : lsd.c
  • error() 26 | : lsd.c
27 |

- f -

    28 |
  • free_image_char() 29 | : lsd.c
  • free_image_double() 30 | : lsd.c
  • free_ntuple_list() 31 | : lsd.c
32 |

- g -

    33 |
  • gaussian_kernel() 34 | : lsd.c
  • gaussian_sampler() 35 | : lsd.c
  • get_theta() 36 | : lsd.c
37 |

- i -

    38 |
  • inter_hi() 39 | : lsd.c
  • inter_low() 40 | : lsd.c
  • isaligned() 41 | : lsd.c
42 |

- l -

51 |

- n -

    52 |
  • new_image_char() 53 | : lsd.c
  • new_image_char_ini() 54 | : lsd.c
  • new_image_double() 55 | : lsd.c
  • new_image_double_ptr() 56 | : lsd.c
  • new_image_int() 57 | : lsd.c
  • new_image_int_ini() 58 | : lsd.c
  • new_ntuple_list() 59 | : lsd.c
  • nfa() 60 | : lsd.c
61 |

- r -

74 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 75 | 76 | doxygen 77 | 1.3.4
78 | 79 | 80 | -------------------------------------------------------------------------------- /doc/doxygen.css: -------------------------------------------------------------------------------- 1 | H1 { 2 | text-align: center; 3 | font-family: Arial, Helvetica, sans-serif; 4 | } 5 | H2 { 6 | font-family: Geneva, Arial, Helvetica, sans-serif; 7 | } 8 | CAPTION { font-weight: bold } 9 | DIV.qindex { width: 100%; 10 | background-color: #eeeeff; 11 | border: 4px solid #eeeeff; 12 | text-align: center; 13 | margin-bottom: 2px 14 | } 15 | A.qindex { text-decoration: none; font-weight: bold; color: #0000ee } 16 | A.qindex:visited { text-decoration: none; font-weight: bold; color: #0000ee } 17 | A.qindex:hover { text-decoration: none; background-color: #ddddff } 18 | A.qindexHL { text-decoration: none; font-weight: bold; 19 | background-color: #6666cc; 20 | color: #ffffff 21 | } 22 | A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff } 23 | A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } 24 | A.el { text-decoration: none; font-weight: bold } 25 | A.elRef { font-weight: bold } 26 | A.code { text-decoration: none; font-weight: normal; color: #4444ee } 27 | A.codeRef { font-weight: normal; color: #4444ee } 28 | A:hover { text-decoration: none; background-color: #f2f2ff } 29 | DL.el { margin-left: -1cm } 30 | DIV.fragment { 31 | width: 98%; 32 | border: 1px solid #CCCCCC; 33 | background-color: #f5f5f5; 34 | padding-left: 4px; 35 | margin: 4px; 36 | } 37 | DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } 38 | TD.md { background-color: #f2f2ff; font-weight: bold; } 39 | TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } 40 | TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } 41 | DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } 42 | DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } 43 | BODY { 44 | background: white; 45 | color: black; 46 | margin-right: 20px; 47 | margin-left: 20px; 48 | } 49 | TD.indexkey { 50 | background-color: #eeeeff; 51 | font-weight: bold; 52 | padding-right : 10px; 53 | padding-top : 2px; 54 | padding-left : 10px; 55 | padding-bottom : 2px; 56 | margin-left : 0px; 57 | margin-right : 0px; 58 | margin-top : 2px; 59 | margin-bottom : 2px 60 | } 61 | TD.indexvalue { 62 | background-color: #eeeeff; 63 | font-style: italic; 64 | padding-right : 10px; 65 | padding-top : 2px; 66 | padding-left : 10px; 67 | padding-bottom : 2px; 68 | margin-left : 0px; 69 | margin-right : 0px; 70 | margin-top : 2px; 71 | margin-bottom : 2px 72 | } 73 | TR.memlist { 74 | background-color: #f0f0f0; 75 | } 76 | P.formulaDsp { text-align: center; } 77 | IMG.formulaDsp { } 78 | IMG.formulaInl { vertical-align: middle; } 79 | SPAN.keyword { color: #008000 } 80 | SPAN.keywordtype { color: #604020 } 81 | SPAN.keywordflow { color: #e08000 } 82 | SPAN.comment { color: #800000 } 83 | SPAN.preprocessor { color: #806020 } 84 | SPAN.stringliteral { color: #002080 } 85 | SPAN.charliteral { color: #008080 } 86 | .mdTable { 87 | border: 1px solid #868686; 88 | background-color: #f2f2ff; 89 | } 90 | .mdRow { 91 | padding: 8px 20px; 92 | } 93 | .mdescLeft { 94 | font-size: smaller; 95 | font-family: Arial, Helvetica, sans-serif; 96 | background-color: #FAFAFA; 97 | padding-left: 8px; 98 | border-top: 1px none #E0E0E0; 99 | border-right: 1px none #E0E0E0; 100 | border-bottom: 1px none #E0E0E0; 101 | border-left: 1px none #E0E0E0; 102 | margin: 0px; 103 | } 104 | .mdescRight { 105 | font-size: smaller; 106 | font-family: Arial, Helvetica, sans-serif; 107 | font-style: italic; 108 | background-color: #FAFAFA; 109 | padding-left: 4px; 110 | border-top: 1px none #E0E0E0; 111 | border-right: 1px none #E0E0E0; 112 | border-bottom: 1px none #E0E0E0; 113 | border-left: 1px none #E0E0E0; 114 | margin: 0px; 115 | padding-bottom: 0px; 116 | padding-right: 8px; 117 | } 118 | .memItemLeft { 119 | padding: 1px 0px 0px 8px; 120 | margin: 4px; 121 | border-top-width: 1px; 122 | border-right-width: 1px; 123 | border-bottom-width: 1px; 124 | border-left-width: 1px; 125 | border-top-style: solid; 126 | border-top-color: #E0E0E0; 127 | border-right-color: #E0E0E0; 128 | border-bottom-color: #E0E0E0; 129 | border-left-color: #E0E0E0; 130 | border-right-style: none; 131 | border-bottom-style: none; 132 | border-left-style: none; 133 | background-color: #FAFAFA; 134 | font-family: Geneva, Arial, Helvetica, sans-serif; 135 | font-size: 12px; 136 | } 137 | .memItemRight { 138 | padding: 1px 0px 0px 8px; 139 | margin: 4px; 140 | border-top-width: 1px; 141 | border-right-width: 1px; 142 | border-bottom-width: 1px; 143 | border-left-width: 1px; 144 | border-top-style: solid; 145 | border-top-color: #E0E0E0; 146 | border-right-color: #E0E0E0; 147 | border-bottom-color: #E0E0E0; 148 | border-left-color: #E0E0E0; 149 | border-right-style: none; 150 | border-bottom-style: none; 151 | border-left-style: none; 152 | background-color: #FAFAFA; 153 | font-family: Geneva, Arial, Helvetica, sans-serif; 154 | font-size: 13px; 155 | } 156 | .search { color: #0000ee; 157 | font-weight: bold; 158 | } 159 | FORM.search { 160 | margin-bottom: 0px; 161 | margin-top: 0px; 162 | } 163 | INPUT.search { font-size: 75%; 164 | color: #000080; 165 | font-weight: normal; 166 | background-color: #eeeeff; 167 | } 168 | TD.tiny { font-size: 75%; 169 | } 170 | -------------------------------------------------------------------------------- /doc/structimage__char__s.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: image_char_s struct Reference 4 | 5 | 6 | 7 | 8 |

image_char_s Struct Reference


Detailed Description

9 | char image data type 10 |

11 | The pixel value at (x,y) is accessed by:

12 | image->data[ x + y * image->xsize ]

13 | with x and y integer. 14 |

15 | 16 |

17 | Definition at line 323 of file lsd.c. 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

Data Fields

unsigned char * data
unsigned int xsize
unsigned int ysize
27 |


Field Documentation

28 |

29 | 30 | 31 | 37 | 38 |
32 | 33 | 34 |
unsigned char* image_char_s::data 35 |
36 |
39 | 40 | 41 | 44 | 52 | 53 |
42 |   43 | 45 | 46 |

47 | 48 |

49 | Definition at line 325 of file lsd.c. 50 |

51 | Referenced by free_image_char(), LineSegmentDetection(), new_image_char(), new_image_char_ini(), reduce_region_radius(), refine(), and region_grow().

54 |

55 | 56 | 57 | 63 | 64 |
58 | 59 | 60 |
unsigned int image_char_s::xsize 61 |
62 |
65 | 66 | 67 | 70 | 78 | 79 |
68 |   69 | 71 | 72 |

73 | 74 |

75 | Definition at line 326 of file lsd.c. 76 |

77 | Referenced by LineSegmentDetection(), new_image_char(), reduce_region_radius(), refine(), and region_grow().

80 |

81 | 82 | 83 | 89 | 90 |
84 | 85 | 86 |
unsigned int image_char_s::ysize 87 |
88 |
91 | 92 | 93 | 96 | 104 | 105 |
94 |   95 | 97 | 98 |

99 | 100 |

101 | Definition at line 326 of file lsd.c. 102 |

103 | Referenced by new_image_char(), and region_grow().

106 |


The documentation for this struct was generated from the following file: 108 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 109 | 110 | doxygen 111 | 1.3.4
112 | 113 | 114 | -------------------------------------------------------------------------------- /doc/structimage__double__s.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: image_double_s struct Reference 4 | 5 | 6 | 7 | 8 |

image_double_s Struct Reference


Detailed Description

9 | double image data type 10 |

11 | The pixel value at (x,y) is accessed by:

12 | image->data[ x + y * image->xsize ]

13 | with x and y integer. 14 |

15 | 16 |

17 | Definition at line 449 of file lsd.c. 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

Data Fields

double * data
unsigned int xsize
unsigned int ysize
27 |


Field Documentation

28 |

29 | 30 | 31 | 37 | 38 |
32 | 33 | 34 |
double* image_double_s::data 35 |
36 |
39 | 40 | 41 | 44 | 52 | 53 |
42 |   43 | 45 | 46 |

47 | 48 |

49 | Definition at line 451 of file lsd.c. 50 |

51 | Referenced by free_image_double(), gaussian_sampler(), get_theta(), isaligned(), LineSegmentDetection(), ll_angle(), new_image_double(), new_image_double_ptr(), reduce_region_radius(), refine(), region2rect(), and region_grow().

54 |

55 | 56 | 57 | 63 | 64 |
58 | 59 | 60 |
unsigned int image_double_s::xsize 61 |
62 |
65 | 66 | 67 | 70 | 78 | 79 |
68 |   69 | 71 | 72 |

73 | 74 |

75 | Definition at line 452 of file lsd.c. 76 |

77 | Referenced by gaussian_sampler(), get_theta(), isaligned(), LineSegmentDetection(), ll_angle(), new_image_double(), new_image_double_ptr(), rect_nfa(), refine(), region2rect(), and region_grow().

80 |

81 | 82 | 83 | 89 | 90 |
84 | 85 | 86 |
unsigned int image_double_s::ysize 87 |
88 |
91 | 92 | 93 | 96 | 104 | 105 |
94 |   95 | 97 | 98 |

99 | 100 |

101 | Definition at line 452 of file lsd.c. 102 |

103 | Referenced by gaussian_sampler(), isaligned(), LineSegmentDetection(), ll_angle(), new_image_double(), new_image_double_ptr(), rect_nfa(), and region_grow().

106 |


The documentation for this struct was generated from the following file: 108 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 109 | 110 | doxygen 111 | 1.3.4
112 | 113 | 114 | -------------------------------------------------------------------------------- /doc/globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: File Member Index 4 | 5 | 6 | 7 | 8 | 9 |
a | d | e | f | g | i | l | m | n | r | t | u
10 | 11 |

12 | 13 |

14 | Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

    15 |
  • add_7tuple() 16 | : lsd.c
  • angle_diff() 17 | : lsd.c
  • angle_diff_signed() 18 | : lsd.c
19 |

- d -

    20 |
  • dist() 21 | : lsd.c
  • double_equal() 22 | : lsd.c
23 |

- e -

    24 |
  • enlarge_ntuple_list() 25 | : lsd.c
  • error() 26 | : lsd.c
27 |

- f -

    28 |
  • FALSE 29 | : lsd.c
  • free_image_char() 30 | : lsd.c
  • free_image_double() 31 | : lsd.c
  • free_ntuple_list() 32 | : lsd.c
33 |

- g -

    34 |
  • gaussian_kernel() 35 | : lsd.c
  • gaussian_sampler() 36 | : lsd.c
  • get_theta() 37 | : lsd.c
38 |

- i -

46 |

- l -

56 |

- m -

62 |

- n -

    63 |
  • new_image_char() 64 | : lsd.c
  • new_image_char_ini() 65 | : lsd.c
  • new_image_double() 66 | : lsd.c
  • new_image_double_ptr() 67 | : lsd.c
  • new_image_int() 68 | : lsd.c
  • new_image_int_ini() 69 | : lsd.c
  • new_ntuple_list() 70 | : lsd.c
  • nfa() 71 | : lsd.c
  • NOTDEF 72 | : lsd.c
  • NOTUSED 73 | : lsd.c
  • ntuple_list 74 | : lsd.c
75 |

- r -

    76 |
  • rect_copy() 77 | : lsd.c
  • rect_improve() 78 | : lsd.c
  • rect_nfa() 79 | : lsd.c
  • reduce_region_radius() 80 | : lsd.c
  • refine() 81 | : lsd.c
  • region2rect() 82 | : lsd.c
  • region_grow() 83 | : lsd.c
  • RELATIVE_ERROR_FACTOR 84 | : lsd.c
  • ri_del() 85 | : lsd.c
  • ri_end() 86 | : lsd.c
  • ri_inc() 87 | : lsd.c
  • ri_ini() 88 | : lsd.c
89 |

- t -

93 |

- u -

96 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 97 | 98 | doxygen 99 | 1.3.4
100 | 101 | 102 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | LSD - Line Segment Detector 2 | =========================== 3 | 4 | Version 1.6 - November 11, 2011 5 | 6 | by Rafael Grompone von Gioi 7 | 8 | 9 | Introduction 10 | ------------ 11 | 12 | LSD is an implementation of the Line Segment Detector on digital 13 | images described in the paper: 14 | 15 | "LSD: A Fast Line Segment Detector with a False Detection Control" 16 | by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel, 17 | and Gregory Randall, IEEE Transactions on Pattern Analysis and 18 | Machine Intelligence, vol. 32, no. 4, pp. 722-732, April, 2010. 19 | 20 | and in more details in the CMLA Technical Report: 21 | 22 | "LSD: A Line Segment Detector, Technical Report", 23 | by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel, 24 | Gregory Randall, CMLA, ENS Cachan, 2010. 25 | 26 | The version implemented here includes some further improvements 27 | described on the LSD page at www.ipol.im. That same page includes more 28 | information, including this code and an online demo version: 29 | 30 | http://www.ipol.im/pub/algo/gjmr_line_segment_detector 31 | 32 | 33 | Files 34 | ----- 35 | 36 | README.txt - This file. 37 | COPYING - GNU AFFERO GENERAL PUBLIC LICENSE Version 3. 38 | Makefile - Compilation instructions for 'make'. 39 | lsd.c - LSD module ANSI C code. 40 | lsd.h - LSD module ANSI C header. 41 | lsd_cmd.c - LSD command line interface, ANSI C code. 42 | lsd_call_example.c - Minimal example of calling LSD from a C language program. 43 | chairs.pgm - Test image in PGM format. 44 | chairs.lsd.txt - Expected result for 'chairs.pgm' image as an ASCII file. 45 | chairs.lsd.eps - Expected result for 'chairs.pgm' image as an EPS file. 46 | doc - Html code documentation. 47 | doxygen.config - doxygen configuration file for documentation generation. 48 | 49 | 50 | Compiling 51 | --------- 52 | 53 | LSD is an ANSI C Language program and can be used as a module 54 | to be called from a C language program or as an independent 55 | command. 56 | 57 | In the distribution is included a Makefile file with instructions 58 | to build the command lines program 'lsd', as well as minimal 59 | example program on how to call LSD from C code. 60 | 61 | To build both programs, a C compiler (called with 'cc') must be 62 | installed on your system, as well as the program 'make'. 63 | LSD only uses the standard C library so it should compile 64 | in any ANSI C Language environment. In particular, it should 65 | compile in an Unix like system. 66 | 67 | The compiling instruction is just 68 | 69 | make 70 | 71 | from the directory where the source codes and the Makefile are located. 72 | 73 | To verify a correct compilation you can apply LSD to the test 74 | image 'chairs.pgm' and compare the result to the provided ones. 75 | 76 | An explicit example of how to compile a program using LSD as a module 77 | is provided. The compilation line for 'lsd_call_example.c' is just 78 | 79 | cc -lm -o lsd_call_example lsd_call_example.c lsd.c 80 | 81 | 82 | Running LSD Command 83 | ------------------- 84 | 85 | The simplest LSD command execution is just 86 | 87 | lsd 88 | 89 | or 90 | 91 | ./lsd 92 | 93 | if the command is not in the path. That should print LSD version 94 | and the command line interface, including the available options. 95 | The only input image format handled by LSD is PGM, in its two 96 | versions, ASCII and Binary. A useful execution would be: 97 | 98 | lsd chairs.pgm chairs.result.txt 99 | 100 | That should give the result as an ASCII file 'chairs.result.txt' 101 | where each line corresponds to a detected line segment. Each 102 | line is composed of seven numbers separated by spaces, that are 103 | x1, y1, x2, y2, width, p, -log_nfa. For example, the line: 104 | 105 | 159.232890 134.369601 160.325338 105.613616 2.735466 0.125000 17.212465 106 | 107 | means that a line segment starting at point (159.232890,134.369601) 108 | and ending at point (160.325338 105.613616) and of width 2.735466 was 109 | detected. An angle precision of 0.125 used, which means an angle of 110 | 0.125*180 = 22.5 degree. The negative of the logarithm to base 10 of 111 | the NFA value of the detection was 17.212465, so the NFA value was 112 | 6.13e-18. The unit is the pixel and the origin of coordinates is the 113 | center of pixel (0,0). 114 | 115 | For easier visualization of the result, the LSD command can also 116 | give the output in EPS or SVG file formats. For example, 117 | 118 | lsd -P chairs.result.eps chairs.pgm chairs.result.txt 119 | 120 | will, in addition to the ASCII output file, produce the EPS file 121 | 'chairs.result.eps'. 122 | 123 | To see the full options, execute LSD command without parameters, 124 | as in './lsd'. 125 | 126 | Optional arguments should always appear before the needed arguments 127 | input and output. For example, the following line is wrong: 128 | 129 | lsd chairs.pgm -s 0.5 chairs.result.txt -> WRONG!! 130 | 131 | and should be 132 | 133 | lsd -s 0.5 chairs.pgm chairs.result.txt 134 | 135 | If the name of an input file is just - (one dash), then that 136 | file will be read from the standard input. Analogously, if the 137 | name of an output file is just - (one dash), then that file 138 | will be written to the standard output. For example, 139 | 140 | lsd - - 141 | 142 | will work as a filter, taking the input from standard input and 143 | giving the output to standard output. 144 | 145 | 146 | Code Documentation 147 | ------------------ 148 | 149 | There is a HTML documentation of the code on the directory 'doc'. The 150 | entry point is the file 'doc/index.html' that should be opened with a 151 | web browser. The documentation was automatically generated from the 152 | source code files using the Doxygen documentation system, see 153 | http://www.stack.nl/~dimitri/doxygen/. 154 | 155 | 156 | Copyright and License 157 | --------------------- 158 | 159 | Copyright 2007-2011 rafael grompone von gioi (grompone@gmail.com) 160 | 161 | LSD is free software: you can redistribute it and/or modify 162 | it under the terms of the GNU Affero General Public License as 163 | published by the Free Software Foundation, either version 3 of the 164 | License, or (at your option) any later version. 165 | 166 | LSD is distributed in the hope that it will be useful, 167 | but WITHOUT ANY WARRANTY; without even the implied warranty of 168 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 169 | GNU Affero General Public License for more details. 170 | 171 | You should have received a copy of the GNU Affero General Public License 172 | along with this program. If not, see . 173 | 174 | 175 | Thanks 176 | ------ 177 | 178 | I would be grateful to receive any comment, especially about errors, 179 | bugs, or strange results. 180 | -------------------------------------------------------------------------------- /doc/structntuple__list__s.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: ntuple_list_s struct Reference 4 | 5 | 6 | 7 | 8 |

ntuple_list_s Struct Reference


Detailed Description

9 | 'list of n-tuple' data type 10 |

11 | The i component, of the n-tuple number j, of an n-tuple list 'ntl' is accessed with:

12 | ntl->values[ i + j * ntl->dim ]

13 | The dimension of the n-tuple (n) is:

14 | ntl->dim

15 | The number of n-tuples in the list is:

16 | ntl->size

17 | The maximum number of n-tuples that can be stored in the list with the allocated memory at a given time is given by:

18 | ntl->max_size 19 |

20 | 21 |

22 | Definition at line 218 of file lsd.c. 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |

Data Fields

unsigned int size
unsigned int max_size
unsigned int dim
double * values
34 |


Field Documentation

35 |

36 | 37 | 38 | 44 | 45 |
39 | 40 | 41 |
unsigned int ntuple_list_s::dim 42 |
43 |
46 | 47 | 48 | 51 | 59 | 60 |
49 |   50 | 52 | 53 |

54 | 55 |

56 | Definition at line 222 of file lsd.c. 57 |

58 | Referenced by add_7tuple(), enlarge_ntuple_list(), gaussian_kernel(), gaussian_sampler(), and new_ntuple_list().

61 |

62 | 63 | 64 | 70 | 71 |
65 | 66 | 67 |
unsigned int ntuple_list_s::max_size 68 |
69 |
72 | 73 | 74 | 77 | 85 | 86 |
75 |   76 | 78 | 79 |

80 | 81 |

82 | Definition at line 221 of file lsd.c. 83 |

84 | Referenced by add_7tuple(), enlarge_ntuple_list(), gaussian_kernel(), and new_ntuple_list().

87 |

88 | 89 | 90 | 96 | 97 |
91 | 92 | 93 |
unsigned int ntuple_list_s::size 94 |
95 |
98 | 99 | 100 | 103 | 111 | 112 |
101 |   102 | 104 | 105 |

106 | 107 |

108 | Definition at line 220 of file lsd.c. 109 |

110 | Referenced by add_7tuple(), gaussian_kernel(), LineSegmentDetection(), and new_ntuple_list().

113 |

114 | 115 | 116 | 122 | 123 |
117 | 118 | 119 |
double* ntuple_list_s::values 120 |
121 |
124 | 125 | 126 | 129 | 137 | 138 |
127 |   128 | 130 | 131 |

132 | 133 |

134 | Definition at line 223 of file lsd.c. 135 |

136 | Referenced by add_7tuple(), enlarge_ntuple_list(), free_ntuple_list(), gaussian_kernel(), gaussian_sampler(), LineSegmentDetection(), and new_ntuple_list().

139 |


The documentation for this struct was generated from the following file: 141 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 142 | 143 | doxygen 144 | 1.3.4
145 | 146 | 147 | -------------------------------------------------------------------------------- /doc/structrect__iter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: rect_iter struct Reference 4 | 5 | 6 | 7 | 8 |

rect_iter Struct Reference


Detailed Description

9 | Rectangle points iterator. 10 |

11 | The integer coordinates of pixels inside a rectangle are iteratively explored. This structure keep track of the process and functions ri_ini(), ri_inc(), ri_end(), and ri_del() are used in the process. An example of how to use the iterator is as follows:

      struct rect * rec = XXX; // some rectangle
 12 |       rect_iter * i;
 13 |       for( i=ri_ini(rec); !ri_end(i); ri_inc(i) )
 14 |         {
 15 |           // your code, using 'i->x' and 'i->y' as coordinates
 16 |         }
 17 |       ri_del(i); // delete iterator
 18 | 
The pixels are explored 'column' by 'column', where we call 'column' a set of pixels with the same x value that are inside the rectangle. The following is an schematic representation of a rectangle, the 'column' being explored is marked by colons, and the current pixel being explored is 'x,y'.
 19 | 
 20 |               vx[1],vy[1]
 21 |                  *   *
 22 |                 *       *
 23 |                *           *
 24 |               *               ye
 25 |              *                :  *
 26 |         vx[0],vy[0]           :     *
 27 |                *              :        *
 28 |                   *          x,y          *
 29 |                      *        :              *
 30 |                         *     :            vx[2],vy[2]
 31 |                            *  :                *
 32 |         y                     ys              *
 33 |         ^                        *           *
 34 |         |                           *       *
 35 |         |                              *   *
 36 |         +---> x                      vx[3],vy[3]
 37 | 
 38 |     
The first 'column' to be explored is the one with the smaller x value. Each 'column' is explored starting from the pixel of the 'column' (inside the rectangle) with the smallest y value.

39 | The four corners of the rectangle are stored in order that rotates around the corners at the arrays 'vx[]' and 'vy[]'. The first point is always the one with smaller x value.

40 | 'x' and 'y' are the coordinates of the pixel being explored. 'ys' and 'ye' are the start and end values of the current column being explored. So, 'ys' < 'ye'. 41 |

42 | 43 |

44 | Definition at line 1239 of file lsd.c. 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

Data Fields

double vx [4]
double vy [4]
double ys
double ye
int x
int y
60 |


Field Documentation

61 |

62 | 63 | 64 | 70 | 71 |
65 | 66 | 67 |
double rect_iter::vx[4] 68 |
69 |
72 | 73 | 74 | 77 | 85 | 86 |
75 |   76 | 78 | 79 |

80 | 81 |

82 | Definition at line 1241 of file lsd.c. 83 |

84 | Referenced by ri_end(), ri_inc(), and ri_ini().

87 |

88 | 89 | 90 | 96 | 97 |
91 | 92 | 93 |
double rect_iter::vy[4] 94 |
95 |
98 | 99 | 100 | 103 | 111 | 112 |
101 |   102 | 104 | 105 |

106 | 107 |

108 | Definition at line 1242 of file lsd.c. 109 |

110 | Referenced by ri_inc(), and ri_ini().

113 |

114 | 115 | 116 | 122 | 123 |
117 | 118 | 119 |
int rect_iter::x 120 |
121 |
124 | 125 | 126 | 129 | 137 | 138 |
127 |   128 | 130 | 131 |

132 | 133 |

134 | Definition at line 1244 of file lsd.c. 135 |

136 | Referenced by rect_nfa(), ri_end(), ri_inc(), and ri_ini().

139 |

140 | 141 | 142 | 148 | 149 |
143 | 144 | 145 |
int rect_iter::y 146 |
147 |
150 | 151 | 152 | 155 | 163 | 164 |
153 |   154 | 156 | 157 |

158 | 159 |

160 | Definition at line 1244 of file lsd.c. 161 |

162 | Referenced by rect_nfa(), ri_inc(), and ri_ini().

165 |

166 | 167 | 168 | 174 | 175 |
169 | 170 | 171 |
double rect_iter::ye 172 |
173 |
176 | 177 | 178 | 181 | 189 | 190 |
179 |   180 | 182 | 183 |

184 | 185 |

186 | Definition at line 1243 of file lsd.c. 187 |

188 | Referenced by ri_inc(), and ri_ini().

191 |

192 | 193 | 194 | 200 | 201 |
195 | 196 | 197 |
double rect_iter::ys 198 |
199 |
202 | 203 | 204 | 207 | 215 | 216 |
205 |   206 | 208 | 209 |

210 | 211 |

212 | Definition at line 1243 of file lsd.c. 213 |

214 | Referenced by ri_inc(), and ri_ini().

217 |


The documentation for this struct was generated from the following file: 219 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 220 | 221 | doxygen 222 | 1.3.4
223 | 224 | 225 | -------------------------------------------------------------------------------- /lsd.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | 3 | LSD - Line Segment Detector on digital images 4 | 5 | Copyright 2007-2011 rafael grompone von gioi (grompone@gmail.com) 6 | 7 | This program is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU Affero General Public License as 9 | published by the Free Software Foundation, either version 3 of the 10 | License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU Affero General Public License for more details. 16 | 17 | You should have received a copy of the GNU Affero General Public License 18 | along with this program. If not, see . 19 | 20 | ----------------------------------------------------------------------------*/ 21 | 22 | /*----------------------------------------------------------------------------*/ 23 | /** @file lsd.h 24 | LSD module header 25 | @author rafael grompone von gioi (grompone@gmail.com) 26 | */ 27 | /*----------------------------------------------------------------------------*/ 28 | #ifndef LSD_HEADER 29 | #define LSD_HEADER 30 | 31 | /*----------------------------------------------------------------------------*/ 32 | /** LSD Full Interface 33 | 34 | @param n_out Pointer to an int where LSD will store the number of 35 | line segments detected. 36 | 37 | @param img Pointer to input image data. It must be an array of 38 | doubles of size X x Y, and the pixel at coordinates 39 | (x,y) is obtained by img[x+y*X]. 40 | 41 | @param X X size of the image: the number of columns. 42 | 43 | @param Y Y size of the image: the number of rows. 44 | 45 | @param scale When different from 1.0, LSD will scale the input image 46 | by 'scale' factor by Gaussian filtering, before detecting 47 | line segments. 48 | Example: if scale=0.8, the input image will be subsampled 49 | to 80% of its size, before the line segment detector 50 | is applied. 51 | Suggested value: 0.8 52 | 53 | @param sigma_scale When scale!=1.0, the sigma of the Gaussian filter is: 54 | sigma = sigma_scale / scale, if scale < 1.0 55 | sigma = sigma_scale, if scale >= 1.0 56 | Suggested value: 0.6 57 | 58 | @param quant Bound to the quantization error on the gradient norm. 59 | Example: if gray levels are quantized to integer steps, 60 | the gradient (computed by finite differences) error 61 | due to quantization will be bounded by 2.0, as the 62 | worst case is when the error are 1 and -1, that 63 | gives an error of 2.0. 64 | Suggested value: 2.0 65 | 66 | @param ang_th Gradient angle tolerance in the region growing 67 | algorithm, in degrees. 68 | Suggested value: 22.5 69 | 70 | @param log_eps Detection threshold, accept if -log10(NFA) > log_eps. 71 | The larger the value, the more strict the detector is, 72 | and will result in less detections. 73 | (Note that the 'minus sign' makes that this 74 | behavior is opposite to the one of NFA.) 75 | The value -log10(NFA) is equivalent but more 76 | intuitive than NFA: 77 | - -1.0 gives an average of 10 false detections on noise 78 | - 0.0 gives an average of 1 false detections on noise 79 | - 1.0 gives an average of 0.1 false detections on nose 80 | - 2.0 gives an average of 0.01 false detections on noise 81 | . 82 | Suggested value: 0.0 83 | 84 | @param density_th Minimal proportion of 'supporting' points in a rectangle. 85 | Suggested value: 0.7 86 | 87 | @param n_bins Number of bins used in the pseudo-ordering of gradient 88 | modulus. 89 | Suggested value: 1024 90 | 91 | @param reg_img Optional output: if desired, LSD will return an 92 | int image where each pixel indicates the line segment 93 | to which it belongs. Unused pixels have the value '0', 94 | while the used ones have the number of the line segment, 95 | numbered 1,2,3,..., in the same order as in the 96 | output list. If desired, a non NULL int** pointer must 97 | be assigned, and LSD will make that the pointer point 98 | to an int array of size reg_x x reg_y, where the pixel 99 | value at (x,y) is obtained with (*reg_img)[x+y*reg_x]. 100 | Note that the resulting image has the size of the image 101 | used for the processing, that is, the size of the input 102 | image scaled by the given factor 'scale'. If scale!=1 103 | this size differs from XxY and that is the reason why 104 | its value is given by reg_x and reg_y. 105 | Suggested value: NULL 106 | 107 | @param reg_x Pointer to an int where LSD will put the X size 108 | 'reg_img' image, when asked for. 109 | Suggested value: NULL 110 | 111 | @param reg_y Pointer to an int where LSD will put the Y size 112 | 'reg_img' image, when asked for. 113 | Suggested value: NULL 114 | 115 | @return A double array of size 7 x n_out, containing the list 116 | of line segments detected. The array contains first 117 | 7 values of line segment number 1, then the 7 values 118 | of line segment number 2, and so on, and it finish 119 | by the 7 values of line segment number n_out. 120 | The seven values are: 121 | - x1,y1,x2,y2,width,p,-log10(NFA) 122 | . 123 | for a line segment from coordinates (x1,y1) to (x2,y2), 124 | a width 'width', an angle precision of p in (0,1) given 125 | by angle_tolerance/180 degree, and NFA value 'NFA'. 126 | If 'out' is the returned pointer, the 7 values of 127 | line segment number 'n+1' are obtained with 128 | 'out[7*n+0]' to 'out[7*n+6]'. 129 | */ 130 | double * LineSegmentDetection( int * n_out, 131 | double * img, int X, int Y, 132 | double scale, double sigma_scale, double quant, 133 | double ang_th, double log_eps, double density_th, 134 | double union_ang_th, int union_use_NFA, double union_log_eps, 135 | int n_bins, int need_to_union, 136 | int ** reg_img, int * reg_x, int * reg_y, 137 | double length_threshold, double dist_threshold ); 138 | 139 | /*----------------------------------------------------------------------------*/ 140 | /** LSD Simple Interface with Scale and Region output. 141 | 142 | @param n_out Pointer to an int where LSD will store the number of 143 | line segments detected. 144 | 145 | @param img Pointer to input image data. It must be an array of 146 | doubles of size X x Y, and the pixel at coordinates 147 | (x,y) is obtained by img[x+y*X]. 148 | 149 | @param X X size of the image: the number of columns. 150 | 151 | @param Y Y size of the image: the number of rows. 152 | 153 | @param scale When different from 1.0, LSD will scale the input image 154 | by 'scale' factor by Gaussian filtering, before detecting 155 | line segments. 156 | Example: if scale=0.8, the input image will be subsampled 157 | to 80% of its size, before the line segment detector 158 | is applied. 159 | Suggested value: 0.8 160 | 161 | @param reg_img Optional output: if desired, LSD will return an 162 | int image where each pixel indicates the line segment 163 | to which it belongs. Unused pixels have the value '0', 164 | while the used ones have the number of the line segment, 165 | numbered 1,2,3,..., in the same order as in the 166 | output list. If desired, a non NULL int** pointer must 167 | be assigned, and LSD will make that the pointer point 168 | to an int array of size reg_x x reg_y, where the pixel 169 | value at (x,y) is obtained with (*reg_img)[x+y*reg_x]. 170 | Note that the resulting image has the size of the image 171 | used for the processing, that is, the size of the input 172 | image scaled by the given factor 'scale'. If scale!=1 173 | this size differs from XxY and that is the reason why 174 | its value is given by reg_x and reg_y. 175 | Suggested value: NULL 176 | 177 | @param reg_x Pointer to an int where LSD will put the X size 178 | 'reg_img' image, when asked for. 179 | Suggested value: NULL 180 | 181 | @param reg_y Pointer to an int where LSD will put the Y size 182 | 'reg_img' image, when asked for. 183 | Suggested value: NULL 184 | 185 | @return A double array of size 7 x n_out, containing the list 186 | of line segments detected. The array contains first 187 | 7 values of line segment number 1, then the 7 values 188 | of line segment number 2, and so on, and it finish 189 | by the 7 values of line segment number n_out. 190 | The seven values are: 191 | - x1,y1,x2,y2,width,p,-log10(NFA) 192 | . 193 | for a line segment from coordinates (x1,y1) to (x2,y2), 194 | a width 'width', an angle precision of p in (0,1) given 195 | by angle_tolerance/180 degree, and NFA value 'NFA'. 196 | If 'out' is the returned pointer, the 7 values of 197 | line segment number 'n+1' are obtained with 198 | 'out[7*n+0]' to 'out[7*n+6]'. 199 | */ 200 | double * lsd_scale_region( int * n_out, 201 | double * img, int X, int Y, double scale, 202 | int ** reg_img, int * reg_x, int * reg_y ); 203 | 204 | /*----------------------------------------------------------------------------*/ 205 | /** LSD Simple Interface with Scale 206 | 207 | @param n_out Pointer to an int where LSD will store the number of 208 | line segments detected. 209 | 210 | @param img Pointer to input image data. It must be an array of 211 | doubles of size X x Y, and the pixel at coordinates 212 | (x,y) is obtained by img[x+y*X]. 213 | 214 | @param X X size of the image: the number of columns. 215 | 216 | @param Y Y size of the image: the number of rows. 217 | 218 | @param scale When different from 1.0, LSD will scale the input image 219 | by 'scale' factor by Gaussian filtering, before detecting 220 | line segments. 221 | Example: if scale=0.8, the input image will be subsampled 222 | to 80% of its size, before the line segment detector 223 | is applied. 224 | Suggested value: 0.8 225 | 226 | @return A double array of size 7 x n_out, containing the list 227 | of line segments detected. The array contains first 228 | 7 values of line segment number 1, then the 7 values 229 | of line segment number 2, and so on, and it finish 230 | by the 7 values of line segment number n_out. 231 | The seven values are: 232 | - x1,y1,x2,y2,width,p,-log10(NFA) 233 | . 234 | for a line segment from coordinates (x1,y1) to (x2,y2), 235 | a width 'width', an angle precision of p in (0,1) given 236 | by angle_tolerance/180 degree, and NFA value 'NFA'. 237 | If 'out' is the returned pointer, the 7 values of 238 | line segment number 'n+1' are obtained with 239 | 'out[7*n+0]' to 'out[7*n+6]'. 240 | */ 241 | double * lsd_scale(int * n_out, double * img, int X, int Y, double scale); 242 | 243 | /*----------------------------------------------------------------------------*/ 244 | /** LSD Simple Interface 245 | 246 | @param n_out Pointer to an int where LSD will store the number of 247 | line segments detected. 248 | 249 | @param img Pointer to input image data. It must be an array of 250 | doubles of size X x Y, and the pixel at coordinates 251 | (x,y) is obtained by img[x+y*X]. 252 | 253 | @param X X size of the image: the number of columns. 254 | 255 | @param Y Y size of the image: the number of rows. 256 | 257 | @return A double array of size 7 x n_out, containing the list 258 | of line segments detected. The array contains first 259 | 7 values of line segment number 1, then the 7 values 260 | of line segment number 2, and so on, and it finish 261 | by the 7 values of line segment number n_out. 262 | The seven values are: 263 | - x1,y1,x2,y2,width,p,-log10(NFA) 264 | . 265 | for a line segment from coordinates (x1,y1) to (x2,y2), 266 | a width 'width', an angle precision of p in (0,1) given 267 | by angle_tolerance/180 degree, and NFA value 'NFA'. 268 | If 'out' is the returned pointer, the 7 values of 269 | line segment number 'n+1' are obtained with 270 | 'out[7*n+0]' to 'out[7*n+6]'. 271 | */ 272 | double * lsd(int * n_out, double * img, int X, int Y); 273 | 274 | #endif /* !LSD_HEADER */ 275 | /*----------------------------------------------------------------------------*/ 276 | -------------------------------------------------------------------------------- /doc/structrect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: rect struct Reference 4 | 5 | 6 | 7 | 8 |

rect Struct Reference


Detailed Description

9 | Rectangle structure: line segment with width. 10 |

11 | 12 |

13 | Definition at line 1149 of file lsd.c. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |

Data Fields

double x1
double y1
double x2
double y2
double width
double x
double y
double theta
double dx
double dy
double prec
double p
41 |


Field Documentation

42 |

43 | 44 | 45 | 51 | 52 |
46 | 47 | 48 |
double rect::dx 49 |
50 |
53 | 54 | 55 | 58 | 66 | 67 |
56 |   57 | 59 | 60 |

61 | 62 |

63 | Definition at line 1155 of file lsd.c. 64 |

65 | Referenced by rect_copy(), rect_improve(), region2rect(), and ri_ini().

68 |

69 | 70 | 71 | 77 | 78 |
72 | 73 | 74 |
double rect::dy 75 |
76 |
79 | 80 | 81 | 84 | 92 | 93 |
82 |   83 | 85 | 86 |

87 | 88 |

89 | Definition at line 1155 of file lsd.c. 90 |

91 | Referenced by rect_copy(), rect_improve(), region2rect(), and ri_ini().

94 |

95 | 96 | 97 | 103 | 104 |
98 | 99 | 100 |
double rect::p 101 |
102 |
105 | 106 | 107 | 110 | 118 | 119 |
108 |   109 | 111 | 112 |

113 | 114 |

115 | Definition at line 1157 of file lsd.c. 116 |

117 | Referenced by LineSegmentDetection(), rect_copy(), rect_improve(), rect_nfa(), and region2rect().

120 |

121 | 122 | 123 | 129 | 130 |
124 | 125 | 126 |
double rect::prec 127 |
128 |
131 | 132 | 133 | 136 | 144 | 145 |
134 |   135 | 137 | 138 |

139 | 140 |

141 | Definition at line 1156 of file lsd.c. 142 |

143 | Referenced by rect_copy(), rect_improve(), rect_nfa(), and region2rect().

146 |

147 | 148 | 149 | 155 | 156 |
150 | 151 | 152 |
double rect::theta 153 |
154 |
157 | 158 | 159 | 162 | 170 | 171 |
160 |   161 | 163 | 164 |

165 | 166 |

167 | Definition at line 1154 of file lsd.c. 168 |

169 | Referenced by rect_copy(), rect_nfa(), and region2rect().

172 |

173 | 174 | 175 | 181 | 182 |
176 | 177 | 178 |
double rect::width 179 |
180 |
183 | 184 | 185 | 188 | 196 | 197 |
186 |   187 | 189 | 190 |

191 | 192 |

193 | Definition at line 1152 of file lsd.c. 194 |

195 | Referenced by LineSegmentDetection(), rect_copy(), rect_improve(), reduce_region_radius(), refine(), region2rect(), and ri_ini().

198 |

199 | 200 | 201 | 207 | 208 |
202 | 203 | 204 |
double rect::x 205 |
206 |
209 | 210 | 211 | 214 | 222 | 223 |
212 |   213 | 215 | 216 |

217 | 218 |

219 | Definition at line 1153 of file lsd.c. 220 |

221 | Referenced by rect_copy(), and region2rect().

224 |

225 | 226 | 227 | 233 | 234 |
228 | 229 | 230 |
double rect::x1 231 |
232 |
235 | 236 | 237 | 240 | 248 | 249 |
238 |   239 | 241 | 242 |

243 | 244 |

245 | Definition at line 1151 of file lsd.c. 246 |

247 | Referenced by LineSegmentDetection(), rect_copy(), rect_improve(), reduce_region_radius(), refine(), region2rect(), and ri_ini().

250 |

251 | 252 | 253 | 259 | 260 |
254 | 255 | 256 |
double rect::x2 257 |
258 |
261 | 262 | 263 | 266 | 274 | 275 |
264 |   265 | 267 | 268 |

269 | 270 |

271 | Definition at line 1151 of file lsd.c. 272 |

273 | Referenced by LineSegmentDetection(), rect_copy(), rect_improve(), reduce_region_radius(), refine(), region2rect(), and ri_ini().

276 |

277 | 278 | 279 | 285 | 286 |
280 | 281 | 282 |
double rect::y 283 |
284 |
287 | 288 | 289 | 292 | 300 | 301 |
290 |   291 | 293 | 294 |

295 | 296 |

297 | Definition at line 1153 of file lsd.c. 298 |

299 | Referenced by rect_copy(), and region2rect().

302 |

303 | 304 | 305 | 311 | 312 |
306 | 307 | 308 |
double rect::y1 309 |
310 |
313 | 314 | 315 | 318 | 326 | 327 |
316 |   317 | 319 | 320 |

321 | 322 |

323 | Definition at line 1151 of file lsd.c. 324 |

325 | Referenced by LineSegmentDetection(), rect_copy(), rect_improve(), reduce_region_radius(), refine(), region2rect(), and ri_ini().

328 |

329 | 330 | 331 | 337 | 338 |
332 | 333 | 334 |
double rect::y2 335 |
336 |
339 | 340 | 341 | 344 | 352 | 353 |
342 |   343 | 345 | 346 |

347 | 348 |

349 | Definition at line 1151 of file lsd.c. 350 |

351 | Referenced by LineSegmentDetection(), rect_copy(), rect_improve(), reduce_region_radius(), refine(), region2rect(), and ri_ini().

354 |


The documentation for this struct was generated from the following file: 356 |
Generated on Fri Nov 11 11:11:39 2011 for LSD by 357 | 358 | doxygen 359 | 1.3.4
360 | 361 | 362 | -------------------------------------------------------------------------------- /doc/lsd_8h-source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | LSD: lsd.h Source File 4 | 5 | 6 | 7 | 8 |

lsd.h

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------------
  9 | 00002 
 10 | 00003   LSD - Line Segment Detector on digital images
 11 | 00004 
 12 | 00005   Copyright 2007-2011 rafael grompone von gioi (grompone@gmail.com)
 13 | 00006 
 14 | 00007   This program is free software: you can redistribute it and/or modify
 15 | 00008   it under the terms of the GNU Affero General Public License as
 16 | 00009   published by the Free Software Foundation, either version 3 of the
 17 | 00010   License, or (at your option) any later version.
 18 | 00011 
 19 | 00012   This program is distributed in the hope that it will be useful,
 20 | 00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
 21 | 00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 22 | 00015   GNU Affero General Public License for more details.
 23 | 00016 
 24 | 00017   You should have received a copy of the GNU Affero General Public License
 25 | 00018   along with this program. If not, see <http://www.gnu.org/licenses/>.
 26 | 00019 
 27 | 00020   ----------------------------------------------------------------------------*/
 28 | 00021 
 29 | 00022 /*----------------------------------------------------------------------------*/
 30 | 00023 /** @file lsd.h
 31 | 00024     LSD module header
 32 | 00025     @author rafael grompone von gioi (grompone@gmail.com)
 33 | 00026  */
 34 | 00027 /*----------------------------------------------------------------------------*/
 35 | 00028 #ifndef LSD_HEADER
 36 | 00029 #define LSD_HEADER
 37 | 00030 
 38 | 00031 /*----------------------------------------------------------------------------*/
 39 | 00032 /** LSD Full Interface
 40 | 00033 
 41 | 00034     @param n_out       Pointer to an int where LSD will store the number of
 42 | 00035                        line segments detected.
 43 | 00036 
 44 | 00037     @param img         Pointer to input image data. It must be an array of
 45 | 00038                        doubles of size X x Y, and the pixel at coordinates
 46 | 00039                        (x,y) is obtained by img[x+y*X].
 47 | 00040 
 48 | 00041     @param X           X size of the image: the number of columns.
 49 | 00042 
 50 | 00043     @param Y           Y size of the image: the number of rows.
 51 | 00044 
 52 | 00045     @param scale       When different from 1.0, LSD will scale the input image
 53 | 00046                        by 'scale' factor by Gaussian filtering, before detecting
 54 | 00047                        line segments.
 55 | 00048                        Example: if scale=0.8, the input image will be subsampled
 56 | 00049                        to 80% of its size, before the line segment detector
 57 | 00050                        is applied.
 58 | 00051                        Suggested value: 0.8
 59 | 00052 
 60 | 00053     @param sigma_scale When scale!=1.0, the sigma of the Gaussian filter is:
 61 | 00054                        sigma = sigma_scale / scale,   if scale <  1.0
 62 | 00055                        sigma = sigma_scale,           if scale >= 1.0
 63 | 00056                        Suggested value: 0.6
 64 | 00057 
 65 | 00058     @param quant       Bound to the quantization error on the gradient norm.
 66 | 00059                        Example: if gray levels are quantized to integer steps,
 67 | 00060                        the gradient (computed by finite differences) error
 68 | 00061                        due to quantization will be bounded by 2.0, as the
 69 | 00062                        worst case is when the error are 1 and -1, that
 70 | 00063                        gives an error of 2.0.
 71 | 00064                        Suggested value: 2.0
 72 | 00065 
 73 | 00066     @param ang_th      Gradient angle tolerance in the region growing
 74 | 00067                        algorithm, in degrees.
 75 | 00068                        Suggested value: 22.5
 76 | 00069 
 77 | 00070     @param log_eps     Detection threshold, accept if -log10(NFA) > log_eps.
 78 | 00071                        The larger the value, the more strict the detector is,
 79 | 00072                        and will result in less detections.
 80 | 00073                        (Note that the 'minus sign' makes that this
 81 | 00074                        behavior is opposite to the one of NFA.)
 82 | 00075                        The value -log10(NFA) is equivalent but more
 83 | 00076                        intuitive than NFA:
 84 | 00077                        - -1.0 gives an average of 10 false detections on noise
 85 | 00078                        -  0.0 gives an average of 1 false detections on noise
 86 | 00079                        -  1.0 gives an average of 0.1 false detections on nose
 87 | 00080                        -  2.0 gives an average of 0.01 false detections on noise
 88 | 00081                        .
 89 | 00082                        Suggested value: 0.0
 90 | 00083 
 91 | 00084     @param density_th  Minimal proportion of 'supporting' points in a rectangle.
 92 | 00085                        Suggested value: 0.7
 93 | 00086 
 94 | 00087     @param n_bins      Number of bins used in the pseudo-ordering of gradient
 95 | 00088                        modulus.
 96 | 00089                        Suggested value: 1024
 97 | 00090 
 98 | 00091     @param reg_img     Optional output: if desired, LSD will return an
 99 | 00092                        int image where each pixel indicates the line segment
100 | 00093                        to which it belongs. Unused pixels have the value '0',
101 | 00094                        while the used ones have the number of the line segment,
102 | 00095                        numbered 1,2,3,..., in the same order as in the
103 | 00096                        output list. If desired, a non NULL int** pointer must
104 | 00097                        be assigned, and LSD will make that the pointer point
105 | 00098                        to an int array of size reg_x x reg_y, where the pixel
106 | 00099                        value at (x,y) is obtained with (*reg_img)[x+y*reg_x].
107 | 00100                        Note that the resulting image has the size of the image
108 | 00101                        used for the processing, that is, the size of the input
109 | 00102                        image scaled by the given factor 'scale'. If scale!=1
110 | 00103                        this size differs from XxY and that is the reason why
111 | 00104                        its value is given by reg_x and reg_y.
112 | 00105                        Suggested value: NULL
113 | 00106 
114 | 00107     @param reg_x       Pointer to an int where LSD will put the X size
115 | 00108                        'reg_img' image, when asked for.
116 | 00109                        Suggested value: NULL
117 | 00110 
118 | 00111     @param reg_y       Pointer to an int where LSD will put the Y size
119 | 00112                        'reg_img' image, when asked for.
120 | 00113                        Suggested value: NULL
121 | 00114 
122 | 00115     @return            A double array of size 7 x n_out, containing the list
123 | 00116                        of line segments detected. The array contains first
124 | 00117                        7 values of line segment number 1, then the 7 values
125 | 00118                        of line segment number 2, and so on, and it finish
126 | 00119                        by the 7 values of line segment number n_out.
127 | 00120                        The seven values are:
128 | 00121                        - x1,y1,x2,y2,width,p,-log10(NFA)
129 | 00122                        .
130 | 00123                        for a line segment from coordinates (x1,y1) to (x2,y2),
131 | 00124                        a width 'width', an angle precision of p in (0,1) given
132 | 00125                        by angle_tolerance/180 degree, and NFA value 'NFA'.
133 | 00126                        If 'out' is the returned pointer, the 7 values of
134 | 00127                        line segment number 'n+1' are obtained with
135 | 00128                        'out[7*n+0]' to 'out[7*n+6]'.
136 | 00129  */
137 | 00130 double * LineSegmentDetection( int * n_out,
138 | 00131                                double * img, int X, int Y,
139 | 00132                                double scale, double sigma_scale, double quant,
140 | 00133                                double ang_th, double log_eps, double density_th,
141 | 00134                                int n_bins,
142 | 00135                                int ** reg_img, int * reg_x, int * reg_y );
143 | 00136 
144 | 00137 /*----------------------------------------------------------------------------*/
145 | 00138 /** LSD Simple Interface with Scale and Region output.
146 | 00139 
147 | 00140     @param n_out       Pointer to an int where LSD will store the number of
148 | 00141                        line segments detected.
149 | 00142 
150 | 00143     @param img         Pointer to input image data. It must be an array of
151 | 00144                        doubles of size X x Y, and the pixel at coordinates
152 | 00145                        (x,y) is obtained by img[x+y*X].
153 | 00146 
154 | 00147     @param X           X size of the image: the number of columns.
155 | 00148 
156 | 00149     @param Y           Y size of the image: the number of rows.
157 | 00150 
158 | 00151     @param scale       When different from 1.0, LSD will scale the input image
159 | 00152                        by 'scale' factor by Gaussian filtering, before detecting
160 | 00153                        line segments.
161 | 00154                        Example: if scale=0.8, the input image will be subsampled
162 | 00155                        to 80% of its size, before the line segment detector
163 | 00156                        is applied.
164 | 00157                        Suggested value: 0.8
165 | 00158 
166 | 00159     @param reg_img     Optional output: if desired, LSD will return an
167 | 00160                        int image where each pixel indicates the line segment
168 | 00161                        to which it belongs. Unused pixels have the value '0',
169 | 00162                        while the used ones have the number of the line segment,
170 | 00163                        numbered 1,2,3,..., in the same order as in the
171 | 00164                        output list. If desired, a non NULL int** pointer must
172 | 00165                        be assigned, and LSD will make that the pointer point
173 | 00166                        to an int array of size reg_x x reg_y, where the pixel
174 | 00167                        value at (x,y) is obtained with (*reg_img)[x+y*reg_x].
175 | 00168                        Note that the resulting image has the size of the image
176 | 00169                        used for the processing, that is, the size of the input
177 | 00170                        image scaled by the given factor 'scale'. If scale!=1
178 | 00171                        this size differs from XxY and that is the reason why
179 | 00172                        its value is given by reg_x and reg_y.
180 | 00173                        Suggested value: NULL
181 | 00174 
182 | 00175     @param reg_x       Pointer to an int where LSD will put the X size
183 | 00176                        'reg_img' image, when asked for.
184 | 00177                        Suggested value: NULL
185 | 00178 
186 | 00179     @param reg_y       Pointer to an int where LSD will put the Y size
187 | 00180                        'reg_img' image, when asked for.
188 | 00181                        Suggested value: NULL
189 | 00182 
190 | 00183     @return            A double array of size 7 x n_out, containing the list
191 | 00184                        of line segments detected. The array contains first
192 | 00185                        7 values of line segment number 1, then the 7 values
193 | 00186                        of line segment number 2, and so on, and it finish
194 | 00187                        by the 7 values of line segment number n_out.
195 | 00188                        The seven values are:
196 | 00189                        - x1,y1,x2,y2,width,p,-log10(NFA)
197 | 00190                        .
198 | 00191                        for a line segment from coordinates (x1,y1) to (x2,y2),
199 | 00192                        a width 'width', an angle precision of p in (0,1) given
200 | 00193                        by angle_tolerance/180 degree, and NFA value 'NFA'.
201 | 00194                        If 'out' is the returned pointer, the 7 values of
202 | 00195                        line segment number 'n+1' are obtained with
203 | 00196                        'out[7*n+0]' to 'out[7*n+6]'.
204 | 00197  */
205 | 00198 double * lsd_scale_region( int * n_out,
206 | 00199                            double * img, int X, int Y, double scale,
207 | 00200                            int ** reg_img, int * reg_x, int * reg_y );
208 | 00201 
209 | 00202 /*----------------------------------------------------------------------------*/
210 | 00203 /** LSD Simple Interface with Scale
211 | 00204 
212 | 00205     @param n_out       Pointer to an int where LSD will store the number of
213 | 00206                        line segments detected.
214 | 00207 
215 | 00208     @param img         Pointer to input image data. It must be an array of
216 | 00209                        doubles of size X x Y, and the pixel at coordinates
217 | 00210                        (x,y) is obtained by img[x+y*X].
218 | 00211 
219 | 00212     @param X           X size of the image: the number of columns.
220 | 00213 
221 | 00214     @param Y           Y size of the image: the number of rows.
222 | 00215 
223 | 00216     @param scale       When different from 1.0, LSD will scale the input image
224 | 00217                        by 'scale' factor by Gaussian filtering, before detecting
225 | 00218                        line segments.
226 | 00219                        Example: if scale=0.8, the input image will be subsampled
227 | 00220                        to 80% of its size, before the line segment detector
228 | 00221                        is applied.
229 | 00222                        Suggested value: 0.8
230 | 00223 
231 | 00224     @return            A double array of size 7 x n_out, containing the list
232 | 00225                        of line segments detected. The array contains first
233 | 00226                        7 values of line segment number 1, then the 7 values
234 | 00227                        of line segment number 2, and so on, and it finish
235 | 00228                        by the 7 values of line segment number n_out.
236 | 00229                        The seven values are:
237 | 00230                        - x1,y1,x2,y2,width,p,-log10(NFA)
238 | 00231                        .
239 | 00232                        for a line segment from coordinates (x1,y1) to (x2,y2),
240 | 00233                        a width 'width', an angle precision of p in (0,1) given
241 | 00234                        by angle_tolerance/180 degree, and NFA value 'NFA'.
242 | 00235                        If 'out' is the returned pointer, the 7 values of
243 | 00236                        line segment number 'n+1' are obtained with
244 | 00237                        'out[7*n+0]' to 'out[7*n+6]'.
245 | 00238  */
246 | 00239 double * lsd_scale(int * n_out, double * img, int X, int Y, double scale);
247 | 00240 
248 | 00241 /*----------------------------------------------------------------------------*/
249 | 00242 /** LSD Simple Interface
250 | 00243 
251 | 00244     @param n_out       Pointer to an int where LSD will store the number of
252 | 00245                        line segments detected.
253 | 00246 
254 | 00247     @param img         Pointer to input image data. It must be an array of
255 | 00248                        doubles of size X x Y, and the pixel at coordinates
256 | 00249                        (x,y) is obtained by img[x+y*X].
257 | 00250 
258 | 00251     @param X           X size of the image: the number of columns.
259 | 00252 
260 | 00253     @param Y           Y size of the image: the number of rows.
261 | 00254 
262 | 00255     @return            A double array of size 7 x n_out, containing the list
263 | 00256                        of line segments detected. The array contains first
264 | 00257                        7 values of line segment number 1, then the 7 values
265 | 00258                        of line segment number 2, and so on, and it finish
266 | 00259                        by the 7 values of line segment number n_out.
267 | 00260                        The seven values are:
268 | 00261                        - x1,y1,x2,y2,width,p,-log10(NFA)
269 | 00262                        .
270 | 00263                        for a line segment from coordinates (x1,y1) to (x2,y2),
271 | 00264                        a width 'width', an angle precision of p in (0,1) given
272 | 00265                        by angle_tolerance/180 degree, and NFA value 'NFA'.
273 | 00266                        If 'out' is the returned pointer, the 7 values of
274 | 00267                        line segment number 'n+1' are obtained with
275 | 00268                        'out[7*n+0]' to 'out[7*n+6]'.
276 | 00269  */
277 | 00270 double * lsd(int * n_out, double * img, int X, int Y);
278 | 00271 
279 | 00272 #endif /* !LSD_HEADER */
280 | 00273 /*----------------------------------------------------------------------------*/
281 | 

Generated on Fri Nov 11 11:11:11 2011 for LSD by 282 | 283 | doxygen 284 | 1.3.4
285 | 286 | 287 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published by 637 | the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | --------------------------------------------------------------------------------