Showing preview only (2,414K chars total). Download the full file or copy to clipboard to get everything.
Repository: Vincentqyw/LineSegmentsDetection
Branch: master
Commit: b6ae4fd08643
Files: 220
Total size: 2.3 MB
Directory structure:
gitextract_wpkbhclo/
├── .gitmodules
├── README.md
├── assets/
│ └── run.sh
└── thirdparty/
├── CannyLines/
│ ├── CMakeLists.txt
│ └── src/
│ ├── CannyLine.cpp
│ ├── CannyLine.h
│ ├── MetaLine.cpp
│ ├── MetaLine.h
│ ├── QuickSort.h
│ ├── buffer_2d.cpp
│ ├── buffer_2d.h
│ ├── main.cpp
│ └── types.h
├── LSD/
│ ├── COPYING
│ ├── Makefile
│ ├── README.md
│ ├── chairs.lsd.eps
│ ├── chairs.lsd.txt
│ ├── chairs.pgm
│ ├── doc/
│ │ ├── annotated.html
│ │ ├── doxygen.css
│ │ ├── files.html
│ │ ├── formula.repository
│ │ ├── functions.html
│ │ ├── functions_vars.html
│ │ ├── globals.html
│ │ ├── globals_defs.html
│ │ ├── globals_func.html
│ │ ├── globals_type.html
│ │ ├── graph_legend.dot
│ │ ├── graph_legend.html
│ │ ├── index.html
│ │ ├── lsd_8c-source.html
│ │ ├── lsd_8c.html
│ │ ├── lsd_8h-source.html
│ │ ├── lsd_8h.html
│ │ ├── structcoorlist.html
│ │ ├── structimage__char__s.html
│ │ ├── structimage__double__s.html
│ │ ├── structimage__int__s.html
│ │ ├── structntuple__list__s.html
│ │ ├── structpoint.html
│ │ ├── structrect.html
│ │ └── structrect__iter.html
│ ├── doxygen.config
│ ├── lsd.c
│ ├── lsd.h
│ ├── lsd_call_example.c
│ └── lsd_cmd.c
├── LSWMS/
│ ├── CMakeLists.txt
│ ├── LSWMS.cpp
│ ├── LSWMS.h
│ └── main.cpp
└── MCMLSD/
├── MCMLSD/
│ ├── Readme.txt
│ ├── code/
│ │ ├── ElderZuckerEdgeDetector/
│ │ │ ├── code/
│ │ │ │ ├── checkInParam.m
│ │ │ │ ├── checkOutParam.m
│ │ │ │ ├── check_save_requirements.m
│ │ │ │ ├── convolve_2.m
│ │ │ │ ├── d2gauss.m
│ │ │ │ ├── derivative2nd.m
│ │ │ │ ├── elderEdge.m
│ │ │ │ ├── elderEdge.m~
│ │ │ │ ├── find_edges.c
│ │ │ │ ├── find_edges.mexa64
│ │ │ │ ├── find_edges.mexmaci64
│ │ │ │ ├── find_edges.mexw64
│ │ │ │ ├── g1scale.m
│ │ │ │ ├── g1steer.m
│ │ │ │ ├── g2scale.m
│ │ │ │ ├── g2steer.m
│ │ │ │ ├── gauss.m
│ │ │ │ ├── gradient.m
│ │ │ │ ├── main_edge.m
│ │ │ │ ├── mat2hough_scale.m
│ │ │ │ ├── plot_edgelmap.m
│ │ │ │ ├── round2frac.m
│ │ │ │ ├── run_elderEdge.m
│ │ │ │ ├── scalespace.m
│ │ │ │ └── setvalues.m
│ │ │ └── filters/
│ │ │ ├── g1x05.ascii
│ │ │ ├── g1x1.ascii
│ │ │ ├── g1y05.ascii
│ │ │ ├── g1y1.ascii
│ │ │ ├── g2x05.ascii
│ │ │ ├── g2x1.ascii
│ │ │ ├── g2y05.ascii
│ │ │ ├── g2y1.ascii
│ │ │ ├── gx05.ascii
│ │ │ ├── gx1.ascii
│ │ │ ├── gy05.ascii
│ │ │ └── gy1.ascii
│ │ ├── computeKernel.m
│ │ ├── determine_hough_lines_kernel_vote_remove.m
│ │ ├── get_all_segments_assoc_edgeremoval.m
│ │ ├── get_line_segment_DP_edgeremoval.m
│ │ ├── hough_find_peaks_vote_removal.m
│ │ ├── kernelInitialization.m
│ │ ├── lineSegmentation_HighRes.m
│ │ ├── mexfiles/
│ │ │ ├── hmmParameters.m
│ │ │ ├── hmmParameters.mexa64
│ │ │ ├── hmmParameters.mexmaci64
│ │ │ ├── hmmParameters.prj
│ │ │ ├── mexRemoveVotes_v3_scale.c
│ │ │ ├── mexRemoveVotes_v3_scale.mexa64
│ │ │ ├── mexRemoveVotes_v3_scale.mexmaci64
│ │ │ ├── mexVoteEdges_v3_scale.c
│ │ │ ├── mexVoteEdges_v3_scale.mexa64
│ │ │ ├── mexVoteEdges_v3_scale.mexmaci64
│ │ │ ├── returnLines.m
│ │ │ ├── returnLines.mexa64
│ │ │ ├── returnLines.mexmaci64
│ │ │ ├── returnLines.prj
│ │ │ ├── sampleLine.m
│ │ │ ├── sampleLine.mexa64
│ │ │ ├── sampleLine.mexmaci64
│ │ │ └── sampleLine.prj
│ │ ├── parameters/
│ │ │ └── likelihood_model.mat
│ │ ├── precompute_kernels_sparse_res2.m
│ │ ├── project_point_to_line_segment_vec.m
│ │ ├── run_lineSegmentAlgorithm.m
│ │ ├── trace_Back.m
│ │ └── utils/
│ │ ├── getDebug.m
│ │ ├── getImg.m
│ │ ├── getLegend.m
│ │ ├── setDebug.m
│ │ ├── setImg.m
│ │ └── setLegend.m
│ └── demo_start_v2.m
└── __MACOSX/
├── ._MCMLSD
└── MCMLSD/
├── ._.DS_Store
├── ._Imgs
├── ._Readme.txt
├── ._code
├── ._demo_start_v2.m
├── Imgs/
│ └── ._.DS_Store
└── code/
├── ._.DS_Store
├── ._ElderZuckerEdgeDetector
├── ._computeKernel.m
├── ._determine_hough_lines_kernel_vote_remove.m
├── ._get_all_segments_assoc_edgeremoval.m
├── ._get_line_segment_DP_edgeremoval.m
├── ._hough_find_peaks_vote_removal.m
├── ._kernelInitialization.m
├── ._lineSegmentation_HighRes.m
├── ._mexfiles
├── ._parameters
├── ._precompute_kernels_sparse_res2.m
├── ._project_point_to_line_segment_vec.m
├── ._run_lineSegmentAlgorithm.m
├── ._trace_Back.m
├── ._utils
├── ElderZuckerEdgeDetector/
│ ├── ._code
│ ├── ._filters
│ ├── ._images
│ ├── code/
│ │ ├── ._checkInParam.m
│ │ ├── ._checkOutParam.m
│ │ ├── ._check_save_requirements.m
│ │ ├── ._convolve_2.m
│ │ ├── ._d2gauss.m
│ │ ├── ._derivative2nd.m
│ │ ├── ._elderEdge.m
│ │ ├── ._elderEdge.m~
│ │ ├── ._find_edges.c
│ │ ├── ._find_edges.mexa64
│ │ ├── ._find_edges.mexmaci64
│ │ ├── ._find_edges.mexw64
│ │ ├── ._g1scale.m
│ │ ├── ._g1steer.m
│ │ ├── ._g2scale.m
│ │ ├── ._g2steer.m
│ │ ├── ._gauss.m
│ │ ├── ._gradient.m
│ │ ├── ._main_edge.m
│ │ ├── ._mat2hough_scale.m
│ │ ├── ._plot_edgelmap.m
│ │ ├── ._round2frac.m
│ │ ├── ._run_elderEdge.m
│ │ ├── ._scalespace.m
│ │ └── ._setvalues.m
│ ├── filters/
│ │ ├── ._g1x05.ascii
│ │ ├── ._g1x1.ascii
│ │ ├── ._g1y05.ascii
│ │ ├── ._g1y1.ascii
│ │ ├── ._g2x05.ascii
│ │ ├── ._g2x1.ascii
│ │ ├── ._g2y05.ascii
│ │ ├── ._g2y1.ascii
│ │ ├── ._gx05.ascii
│ │ ├── ._gx1.ascii
│ │ ├── ._gy05.ascii
│ │ ├── ._gy1.ascii
│ │ └── ._resource.frk
│ └── images/
│ └── ._peppers
├── mexfiles/
│ ├── ._.DS_Store
│ ├── ._hmmParameters.m
│ ├── ._hmmParameters.mexa64
│ ├── ._hmmParameters.mexmaci64
│ ├── ._hmmParameters.prj
│ ├── ._mexRemoveVotes_v3_scale.c
│ ├── ._mexRemoveVotes_v3_scale.mexa64
│ ├── ._mexRemoveVotes_v3_scale.mexmaci64
│ ├── ._mexVoteEdges_v3_scale.c
│ ├── ._mexVoteEdges_v3_scale.mexa64
│ ├── ._mexVoteEdges_v3_scale.mexmaci64
│ ├── ._returnLines.m
│ ├── ._returnLines.mexa64
│ ├── ._returnLines.mexmaci64
│ ├── ._returnLines.prj
│ ├── ._sampleLine.m
│ ├── ._sampleLine.mexa64
│ ├── ._sampleLine.mexmaci64
│ └── ._sampleLine.prj
├── parameters/
│ ├── ._.DS_Store
│ └── ._likelihood_model.mat
└── utils/
├── ._getDebug.m
├── ._getImg.m
├── ._getLegend.m
├── ._setDebug.m
├── ._setImg.m
└── ._setLegend.m
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitmodules
================================================
[submodule "thirdparty/DeepLSD"]
path = thirdparty/DeepLSD
url = https://github.com/cvg/DeepLSD.git
[submodule "thirdparty/MLSD"]
path = thirdparty/MLSD
url = https://github.com/navervision/mlsd.git
[submodule "thirdparty/F-Clip"]
path = thirdparty/F-Clip
url = https://github.com/Delay-Xili/F-Clip.git
[submodule "thirdparty/SOLD2"]
path = thirdparty/SOLD2
url = https://github.com/cvg/SOLD2.git
[submodule "thirdparty/LETR"]
path = thirdparty/LETR
url = https://github.com/mlpc-ucsd/LETR.git
[submodule "thirdparty/HAWP"]
path = thirdparty/HAWP
url = https://github.com/cherubicXN/hawp.git
[submodule "thirdparty/TP-LSD"]
path = thirdparty/TP-LSD
url = https://github.com/Siyuada7/TP-LSD.git
[submodule "thirdparty/ULSD"]
path = thirdparty/ULSD
url = https://github.com/lh9171338/Unified-Line-Segment-Detection.git
[submodule "thirdparty/DHTLP"]
path = thirdparty/DHTLP
url = https://github.com/yanconglin/Deep-Hough-Transform-Line-Priors.git
[submodule "thirdparty/AFM-LSD"]
path = thirdparty/AFM-LSD
url = https://github.com/cherubicXN/afm_cvpr2019.git
[submodule "thirdparty/LCNN"]
path = thirdparty/LCNN
url = https://github.com/zhou13/lcnn.git
[submodule "thirdparty/LBD"]
path = thirdparty/LBD
url = https://github.com/mtamburrano/LBD_Descriptor.git
================================================
FILE: README.md
================================================
<p align="center">
<h1 align="center"><br><ins>Line Segment Detection</ins><br>A collection of line segment detection algorithms</h1>
</p>
##
This repository hosts the papers with code for line segment detection, enjoy yourself.
<!--  -->

<!--  -->
## Usage
``` bash
git clone --recurse-submodules https://github.com/Vincentqyw/LineSegmentsDetection.git
```
## DeepLSD
- Title: "DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients", Arxiv 2022.
- Paper: https://arxiv.org/abs/2212.07766
- Code: https://github.com/cvg/DeepLSD
## M-LSD
- Title: "M-LSD: Towards Light-weight and Real-time Line Segment Detection", AAAI 2022.
- Paper: [https://arxiv.org/abs/2106.00186](https://arxiv.org/abs/2106.00186)
- Code: https://github.com/navervision/mlsd
## F-Clip
- Title: "Fully Convolutional Line Parsing", Neurocomputing 2022.
- Paper: [https://arxiv.org/abs/2104.11207](https://arxiv.org/abs/2104.11207)
- Code: https://github.com/Delay-Xili/F-Clip
## SOLD2
- Title: "SOLD2: Self-supervised Occlusion-aware Line Description and Detection", CVPR 2021.
- Paper: https://arxiv.org/abs/2104.03362
- Code: https://github.com/cvg/SOLD2, [[Kornia Tutorial]](https://kornia-tutorials.readthedocs.io/en/latest/line_detection_and_matching_sold2.html)
## LETR
- Title: "Line Segment Detection Using Transformers without Edges", CVPR 2021.
- Paper: [https://arxiv.org/abs/2101.01909](https://arxiv.org/abs/2101.01909)
- Code: https://github.com/mlpc-ucsd/LETR
## HAWP
- Title: "Holistically-Attracted Wireframe Parsing: From Supervised Learning to Self-Supervised Learning", CVPR 2020.
- Paper: https://arxiv.org/abs/2210.12971
- Code: https://github.com/cherubicXN/hawp
## TP-LSD
- Title: "TP-LSD: Tri-Points Based Line Segment Detector", ECCV 2020.
- Paper: https://arxiv.org/abs/2009.05505
- Code: https://github.com/Siyuada7/TP-LSD
## ULSD
- Title: "ULSD: Unified Line Segment Detection across Pinhole, Fisheye, and Spherical Cameras", ISPRS 2020.
- Paper: https://arxiv.org/abs/2011.03174
- Code: https://github.com/lh9171338/Unified-Line-Segment-Detection
## Deep-Hough-Transform-Line-Priors
- Title: "Deep Hough-Transform Line Priors", ECCV 2020.
- Paper: [https://arxiv.org/abs/2007.09493](https://arxiv.org/abs/2007.09493)
- Code: https://github.com/yanconglin/Deep-Hough-Transform-Line-Priors
## AFM-LSD
- Title: "Learning Attraction Field Representation for Robust Line Segment Detection", CVPR 2019.
- Paper: [https://arxiv.org/abs/1812.02122](https://arxiv.org/abs/1812.02122)
- Code: https://github.com/cherubicXN/afm_cvpr2019
## L-CNN
- Title: "End-to-End Wireframe Parsing", ICCV 2019.
- Paper: [https://arxiv.org/abs/1905.03246](https://arxiv.org/abs/1905.03246)
- Code: https://github.com/zhou13/lcnn
## MCMLSD
- Title: "MCMLSD: A Dynamic Programming Approach to Line Segment Detection", CVPR 2017.
- Paper: http://openaccess.thecvf.com/content_cvpr_2017/papers/Almazan_MCMLSD_A_Dynamic_CVPR_2017_paper.pdf
- Code: http://www.elderlab.yorku.ca/?smd_process_download=1&download_id=8423
## CannyLines
- Title: "CannyLines: A Parameter-Free Line Segment Detector", ICIP 2015.
- Project Page: https://cvrs.whu.edu.cn/cannylines
- Paper: http://cvrs.whu.edu.cn/projects/cannyLines/papers/CannyLines-ICIP2015.pdf
- Code: http://cvrs.whu.edu.cn/projects/cannyLines/codes/CannyLines-v3.rar
## EDline
- Title: "Edge Drawing: A Combined Real-Time Edge and Segment Detector", JVCIR 2012.
- Paper: https://www.sciencedirect.com/science/article/abs/pii/S1047320312000831
- Code: https://github.com/mtamburrano/LBD_Descriptor
## LSD
- Title: "LSD: a Line Segment Detector", Image Processing On Line 2012.
- Project Page: http://www.ipol.im/pub/art/2012/gjmr-lsd/
- Paper: http://www.ipol.im/pub/art/2012/gjmr-lsd/article.pdf
- Code: http://www.ipol.im/pub/art/2012/gjmr-lsd/lsd_1.5.zip
## LSWMS
- Title: "Line segment detection using weighted mean shift procedures on a 2D slice sampling strategy", Pattern Analysis and Applications 2011.
- Paper: [https://www.researchgate.net/LSWMS.pdf](https://www.researchgate.net/profile/Marcos_Nieto3/publication/220654859_Line_segment_detection_using_weighted_mean_shift_procedures_on_a_2D_slice_sampling_strategy/links/56a5d56a08aef91c8c16b1ac.pdf?inViewer=0&origin=publication_detail&pdfJsDownload=0)
- Code: https://sourceforge.net/projects/lswms/
================================================
FILE: assets/run.sh
================================================
## [DELETE SUBMODULES]
# git rm --cached SOLD2
# git rm --cached DeepLSD
# git rm --cached TP-LSD
# git rm --cached Unified-Line-Segment-Detection
# git rm --cached LETR
# git rm --cached Deep-Hough-Transform-Line-Priors
# git rm --cached F-Clip
# git rm --cached mlsd
# git rm --cached afm_cvpr2019
# git rm --cached lcnn
# git rm --cached hawp
# rm -rf SOLD2
# rm -rf DeepLSD
# rm -rf TP-LSD
# rm -rf Unified-Line-Segment-Detection
# rm -rf LETR
# rm -rf Deep-Hough-Transform-Line-Priors
# rm -rf F-Clip
# rm -rf mlsd
# rm -rf afm_cvpr2019
# rm -rf lcnn
# rm -rf hawp
# rm .gitmodules
## [ADD SUBMODULES]
# mkdir thirdparty
# git submodule add https://github.com/cvg/DeepLSD.git thirdparty/DeepLSD
# git submodule add https://github.com/navervision/mlsd.git thirdparty/MLSD
# git submodule add https://github.com/Delay-Xili/F-Clip.git thirdparty/F-Clip
# git submodule add https://github.com/cvg/SOLD2.git thirdparty/SOLD2
# git submodule add https://github.com/mlpc-ucsd/LETR.git thirdparty/LETR
# git submodule add https://github.com/cherubicXN/hawp.git thirdparty/HAWP
# git submodule add https://github.com/Siyuada7/TP-LSD.git thirdparty/TP-LSD
# git submodule add https://github.com/lh9171338/Unified-Line-Segment-Detection.git thirdparty/ULSD
# git submodule add https://github.com/yanconglin/Deep-Hough-Transform-Line-Priors.git thirdparty/DHTLP
# git submodule add https://github.com/cherubicXN/afm_cvpr2019.git thirdparty/AFM-LSD
# git submodule add https://github.com/zhou13/lcnn.git thirdparty/LCNN
# git submodule add https://github.com/mtamburrano/LBD_Descriptor.git thirdparty/LBD
================================================
FILE: thirdparty/CannyLines/CMakeLists.txt
================================================
# set project's name
PROJECT( CannyLine )
###############################################################################
# CMake settings
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
# this command finds OpenCV libraries and sets all required variables
FIND_PACKAGE(OpenCV REQUIRED)
FILE(GLOB_RECURSE HDRS_FILES *.h *.hpp)
FILE(GLOB_RECURSE SRCS_FILES *.c *.cpp)
#ADD_LIBRARY(${PROJECT_NAME} ${HDRS_FILES} ${SRCS_FILES})
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS_FILES} ${HDRS_FILES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})
================================================
FILE: thirdparty/CannyLines/src/CannyLine.cpp
================================================
#include "CannyLine.h"
#include "MetaLine.h"
CannyLine::CannyLine(void)
{
}
CannyLine::~CannyLine(void)
{
}
void CannyLine::cannyLine(cv::Mat &image,std::vector<std::vector<float> > &lines)
{
MetaLine deterctor;
float gausSigma=1.0;
int gausHalfSize=1;
deterctor.MetaLineDetection(image,gausSigma,gausHalfSize,lines);
}
================================================
FILE: thirdparty/CannyLines/src/CannyLine.h
================================================
#ifndef _CANNY_LINE_H_
#define _CANNY_LINE_H_
#pragma once
#include "cv.h"
#include "highgui.h"
#include "cxcore.h"
class CannyLine
{
public:
CannyLine(void);
~CannyLine(void);
static void cannyLine(cv::Mat &image,std::vector<std::vector<float> > &lines);
};
#endif // _CANNY_LINE_H_
================================================
FILE: thirdparty/CannyLines/src/MetaLine.cpp
================================================
#include "MetaLine.h"
#include "QuickSort.h"
#define INF 10000000000
MetaLine::MetaLine(void)
{
visualMeaningfulGradient=70;
p=0.125;
sigma=1.0;
thAngle=0.0;
}
MetaLine::~MetaLine(void)
{
}
bool MetaLine::gradientWeightedLeastSquareFitting(string_t &string,float *parameters,float sigma)
{
int i,j;
int N=string.size();
float kCoarse=0.0;
if (string[0].x==string[string.size()-1].x)
kCoarse=INF;
else
kCoarse=float(string[0].y-string[string.size()-1].y)/(string[0].x-string[string.size()-1].x);
float k=0.0,b=0.0,dev=0.0,temp=0.0;
float totalGradient=0;
std::vector<float> weight(N,0);
float *ptr=(float*) gradientMap.data;
for (i=0;i<N;++i)
{
weight[i]=*(ptr+int(string[i].y)*cols+int(string[i].x));
totalGradient+=weight[i];
}
for (i=0;i<N;++i)
weight[i]/=totalGradient;
if (abs(kCoarse)<1)
{
float sumX=0.0;
float sumY=0.0;
float sumX2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=weight[i]*string[i].x;
sumY+=weight[i]*string[i].y;
sumX2+=weight[i]*string[i].x*string[i].x;
sumXY+=weight[i]*string[i].x*string[i].y;
}
b=(sumX2*sumY-sumX*sumXY)/(sumX2-sumX*sumX);
k=(sumXY-sumX*sumY)/(sumX2-sumX*sumX);
for (i=0;i<N;++i)
{
temp=string[i].y-k*string[i].x-b;
dev+=temp*temp;
}
dev=sqrt(dev/float(N-2));
parameters[0]=0; //label
}
else
{
float sumX=0.0;
float sumY=0.0;
float sumY2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=weight[i]*string[i].x;
sumY+=weight[i]*string[i].y;
sumY2+=weight[i]*string[i].y*string[i].y;
sumXY+=weight[i]*string[i].x*string[i].y;
}
b=(sumY2*sumX-sumY*sumXY)/(sumY2-sumY*sumY);
k=(sumXY-sumX*sumY)/(sumY2-sumY*sumY);
for (i=0;i<N;++i)
{
temp=string[i].x-k*string[i].y-b;
dev+=temp*temp;
}
dev=sqrt(dev/float(N-2));
parameters[0]=1; //label
}
parameters[1]=k;
parameters[2]=b;
parameters[3]=dev;
if (dev<sigma)
return true;
else
return false;
}
bool MetaLine::leastSquareFitting(string_t &string, float *parameters,float sigma)
{
int i,j;
int N=string.size();
float kCoarse=0.0;
if (string[0].x==string[N-1].x)
kCoarse=INF;
else
kCoarse=float(string[0].y-string[N-1].y)/(string[0].x-string[N-1].x);
float k=0.0,b=0.0,dev=0.0,temp=0.0,devMax=0.0;
if (abs(kCoarse)<1)
{
float sumX=0.0;
float sumY=0.0;
float sumX2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=string[i].x;
sumY+=string[i].y;
sumX2+=string[i].x*string[i].x;
sumXY+=string[i].x*string[i].y;
}
b=(sumX2*sumY-sumX*sumXY)/(N*sumX2-sumX*sumX);
k=(N*sumXY-sumX*sumY)/(N*sumX2-sumX*sumX);
for (i=0;i<N;++i)
{
temp=abs(string[i].y-k*string[i].x-b);
if (temp>devMax) devMax=temp;
dev+=temp*temp;
}
dev=sqrt(dev/float(N-2));
parameters[0]=0; //label
}
else
{
float sumX=0.0;
float sumY=0.0;
float sumY2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=string[i].x;
sumY+=string[i].y;
sumY2+=string[i].y*string[i].y;
sumXY+=string[i].x*string[i].y;
}
b=(sumY2*sumX-sumY*sumXY)/(N*sumY2-sumY*sumY);
k=(N*sumXY-sumX*sumY)/(N*sumY2-sumY*sumY);
for (i=0;i<N;++i)
{
temp=abs(string[i].x-k*string[i].y-b);
if (temp>devMax) devMax=temp;
dev+=temp*temp;
}
dev=sqrt(dev/float(N-2));
parameters[0]=1; //label
}
parameters[1]=k;
parameters[2]=b;
parameters[3]=dev;
if (dev<sigma&&devMax<3*sigma)
return true;
else
return false;
}
bool MetaLine::leastSquareFitting(cluster_t &cluster, float *parameters,float sigma)
{
int i,j;
int N=cluster.size;
float kCoarse=0.0;
if (cluster.pixels[0].x==cluster.pixels[N-1].x)
kCoarse=INF;
else
kCoarse=float(cluster.pixels[0].y-cluster.pixels[N-1].y)/(cluster.pixels[0].x-cluster.pixels[N-1].x);
float k=0.0,b=0.0,dev=0.0,temp=0.0;
if (abs(kCoarse)<1)
{
float sumX=0.0;
float sumY=0.0;
float sumX2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=cluster.pixels[i].x;
sumY+=cluster.pixels[i].y;
sumX2+=cluster.pixels[i].x*cluster.pixels[i].x;
sumXY+=cluster.pixels[i].x*cluster.pixels[i].y;
}
b=(sumX2*sumY-sumX*sumXY)/(N*sumX2-sumX*sumX);
k=(N*sumXY-sumX*sumY)/(N*sumX2-sumX*sumX);
std::vector<float> offsets(N,0);
for (i=0;i<N;++i)
{
temp=cluster.pixels[i].y-k*cluster.pixels[i].x-b;
offsets[i]=temp;
dev+=temp*temp;
}
float thegma=sqrt(dev/float(N-2));
int start=0,end=N-1;
int index=0;
float devOutliers=0.0;
for (i=0;i<N;++i)
{
if (offsets[i]<1.0)
index++;
if (index==2)
{
start=i;
break;
}
else
devOutliers+=offsets[i]*offsets[i];
}
index=0;
for (i=N-1;i>=0;--i)
{
if (offsets[i]<1.0)
index++;
if (index==2)
{
end=i;
break;
}
else
devOutliers+=offsets[i]*offsets[i];
}
if (end<=start) return false;
dev=sqrt((dev-devOutliers)/float(N-2));
cluster.pixels=&(cluster.pixels[start]);
cluster.size=end-start+1;
parameters[0]=0; //label
}
else
{
float sumX=0.0;
float sumY=0.0;
float sumY2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=cluster.pixels[i].x;
sumY+=cluster.pixels[i].y;
sumY2+=cluster.pixels[i].y*cluster.pixels[i].y;
sumXY+=cluster.pixels[i].x*cluster.pixels[i].y;
}
b=(sumY2*sumX-sumY*sumXY)/(N*sumY2-sumY*sumY);
k=(N*sumXY-sumX*sumY)/(N*sumY2-sumY*sumY);
std::vector<float> offsets(N,0);
for (i=0;i<N;++i)
{
temp=cluster.pixels[i].x-k*cluster.pixels[i].y-b;
offsets[i]=temp;
dev+=temp*temp;
}
float thegma=sqrt(dev/float(N-2));
int start=0,end=N-1;
int index=0;
float devOutliers=0.0;
for (i=0;i<N;++i)
{
if (offsets[i]<1.0)
index++;
if (index==2)
{
start=i;
break;
}
else
devOutliers+=offsets[i]*offsets[i];
}
index=0;
for (i=N-1;i>=0;--i)
{
if (offsets[i]<1.0)
index++;
if (index==2)
{
end=i;
break;
}
else
devOutliers+=offsets[i]*offsets[i];
}
if (end<=start) return false;
dev=sqrt((dev-devOutliers)/float(N-2));
cluster.pixels=&(cluster.pixels[start]);
cluster.size=end-start+1;
parameters[0]=1; //label
}
parameters[1]=k;
parameters[2]=b;
parameters[3]=dev;
return true;
}
bool MetaLine::leastSquareFitting(std::vector<Point2f> &points, float *parameters,float sigma)
{
int i,j;
int N=points.size();
float kCoarse=0.0;
if (points[0].x==points[N-1].x)
kCoarse=INF;
else
kCoarse=float(points[0].y-points[N-1].y)/(points[0].x-points[N-1].x);
float k=0.0,b=0.0,dev=0.0,temp=0.0,devMax=0.0;
if (abs(kCoarse)<1)
{
float sumX=0.0;
float sumY=0.0;
float sumX2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=points[i].x;
sumY+=points[i].y;
sumX2+=points[i].x*points[i].x;
sumXY+=points[i].x*points[i].y;
}
b=(sumX2*sumY-sumX*sumXY)/(N*sumX2-sumX*sumX);
k=(N*sumXY-sumX*sumY)/(N*sumX2-sumX*sumX);
for (i=0;i<N;++i)
{
temp=abs(points[i].y-k*points[i].x-b);
if (temp>devMax) devMax=temp;
dev+=temp*temp;
}
dev=sqrt(dev/float(N-2));
parameters[0]=0; //label
}
else
{
float sumX=0.0;
float sumY=0.0;
float sumY2=0.0;
float sumXY=0.0;
for (i=0;i<N;++i)
{
sumX+=points[i].x;
sumY+=points[i].y;
sumY2+=points[i].y*points[i].y;
sumXY+=points[i].x*points[i].y;
}
b=(sumY2*sumX-sumY*sumXY)/(N*sumY2-sumY*sumY);
k=(N*sumXY-sumX*sumY)/(N*sumY2-sumY*sumY);
for (i=0;i<N;++i)
{
temp=abs(points[i].x-k*points[i].y-b);
if (temp>devMax) devMax=temp;
dev+=temp*temp;
}
dev=sqrt(dev/float(N-2));
parameters[0]=1; //label
}
parameters[1]=k;
parameters[2]=b;
parameters[3]=dev;
if (dev<sigma&&devMax<3*sigma)
return true;
else
return false;
}
int MetaLine::crossSearch(Point2i pts,float &angle,int ID)
{
int i,j;
float *ptrMI=(float*) maskImage.data;
//search along edges
static const int X_OFFSET[8] = { 0, 1, 0, -1, 1, -1, -1, 1 };
static const int Y_OFFSET[8] = { 1, 0, -1, 0, 1, 1, -1, -1 };
std::vector<Point2i> edgeChain;
int xSeed=pts.x;
int ySeed=pts.y;
int x,y;
int count=0;
bool isEnd=false;
while(count!=10&&!isEnd)
{
for (size_t i=0; i!=8; ++i)
{
x = xSeed + X_OFFSET[i];
if ((0 <= x) && (x < cols))
{
y = ySeed + Y_OFFSET[i];
if ((0 <= y) && (y < rows))
{
cout<<ptrMI[y*cols+x]<<endl;
if (ptrMI[y*cols+x]<0&&ptrMI[y*cols+x]!=ID) return -1; //-1 for stop merging
if (ptrMI[y*cols+x]==1)
{
xSeed = x;
ySeed = y;
edgeChain.push_back(Point2i(xSeed,ySeed));
ptrMI[y*cols+x]=0;
break;
}
}
else
isEnd=true;
}
else
isEnd=true;
}
count++;
}
if (edgeChain.size()>=3)
{
float deltaX=edgeChain[0].x-edgeChain[edgeChain.size()-1].x;
float deltaY=edgeChain[0].y-edgeChain[edgeChain.size()-1].y;
angle=atan(deltaY/deltaX+0.00000101);
return 1; //1 for finding a edge chain
}
else
return 0; //0 for no edge chain
}
bool MetaLine::crossingCheck(Point2f pts,Point2f pte,int ID)
{
int i,j;
float *ptrMI=(float*) maskImage.data;
float deltaX=pts.x-pte.x;
float deltaY=pts.y-pte.y;
if (abs(deltaX)>abs(deltaY))
{
float k=deltaY/deltaX;
float b=pts.y-k*pts.x;
float angle=atan(k);
int xMin=int(min(pts.x,pte.x)+0.5);
int xMax=int(max(pts.x,pte.x)+0.5);
if (xMin<0) xMin=0;
if (xMin>=cols) xMin=cols-2;
if (xMax<0) xMax=0;
if (xMax>=cols) xMax=cols-1;
float y=k*xMin+b;
for (i=xMin+1;i<xMax;++i)
{
int xInt=i;
y+=k;
int yInt=int(y+0.5);
if (0<yInt&&yInt<rows_1)
{
int loc=yInt*cols+xInt;
int e0=(int)ptrMI[loc-cols];
int e1=(int)ptrMI[loc];
int e2=(int)ptrMI[loc+cols];
if ((e0<0&&e0!=ID)||(e1<0&&e1!=ID)||(e2<0&&e2!=ID)) return false; //find another line
if (e0==1||e1==1||e2==1)
{
float angleEdge=0;
int Rnt=crossSearch(Point2i(xInt,yInt), angleEdge,ID); // 1for finding a edge chain, 0 for non, -1 for another line segment
if (Rnt)
{
if ((abs(angle-angleEdge)>CV_PI/6.0)||(CV_PI-abs(angle-angleEdge)>CV_PI/6.0))
return false;
}
else if (Rnt<0)
return false;
}
}
else
break;
}
}
else
{
float k=deltaX/deltaY;
float b=pts.x-k*pts.y;
float angle=CV_PI/2.0-atan(k);
int yMin=int(min(pts.y,pte.y)+0.5);
int yMax=int(max(pts.y,pte.y)+0.5);
if (yMin<0) yMin=0;
if (yMin>=rows) yMin=rows-2;
if (yMax<0) yMax=0;
if (yMax>=rows) yMax=rows-1;
float x=k*yMin+b;
for (i=yMin+1;i<yMax;++i)
{
int yInt=i;
x+=k;
int xInt=int(x+0.5);
if (0<xInt&&xInt<cols_1)
{
int loc=yInt*cols+xInt;
int e0=(int)ptrMI[loc-1];
int e1=(int)ptrMI[loc];
int e2=(int)ptrMI[loc+1];
if ((e0<0&&e0!=ID)||(e1<0&&e1!=ID)||(e2<0&&e2!=ID)) return false; //find another line
if (e0==1||e1==1||e2==1)
{
float angleEdge=0;
int Rnt=crossSearch(Point2i(xInt,yInt), angleEdge,ID); // 1for finding a edge chain, 0 for non, -1 for another line segment
if (Rnt)
{
if ((abs(angle-angleEdge)>CV_PI/6.0)||(CV_PI-abs(angle-angleEdge)>CV_PI/6.0))
return false;
}
else if (Rnt<0)
return false;
}
}
else
break;
}
}
return true;
}
void MetaLine::extendHirozontal(line_t &metaLineCur,lines_list_t &metaLines,int *removal)
{
int i,j;
float *ptrMI=(float*) maskImage.data;
float *ptrGM=(float*) gradientMap.data;
int ID=metaLineCur.ID;
float k=metaLineCur.k;
float b=metaLineCur.b;
float xs=metaLineCur.points[0].x;
float xe=metaLineCur.points[metaLineCur.points.size()-1].x;
float ye=k*xe+b;
float xCur=xe;
float yCur=ye;
int xInt=int(xCur+0.5);
int yInt=int(yCur+0.5);
int index=(xe-xs)/abs(xe-xs);
cluster_t pointsFormer;
pointsFormer.pixels=&metaLineCur.points[0];
pointsFormer.size=metaLineCur.points.size();
int loc=0;
int gap=0;
int edge=0;
int edgeTotal=0;
float m0,m1,m2;
float g0,g1,g2;
bool extend=false;
while (1)
{
xInt+=index;
yCur+=index*k;
yInt=int(yCur+0.5);
bool chooseUp=false;
if (yInt+0.5>yCur)chooseUp=true;
if (0<xInt&&xInt<cols_1&&0<yInt&&yInt<rows_1)
{
loc=yInt*cols+xInt;
m0=ptrMI[loc];
m1=ptrMI[loc-cols];
m2=ptrMI[loc+cols];
size_list_t lineHyps;
if (m0<0&&m0!=-ID) { size_t &n=lineHyps.push_back(); n=-m0-1; }
if (m1<0&&m1!=-ID) { size_t &n=lineHyps.push_back(); n=-m1-1; }
if (m2<0&&m2!=-ID) { size_t &n=lineHyps.push_back(); n=-m2-1; }
if (lineHyps.size())
{
int Rnt=lineMerging(ID,metaLineCur,lineHyps,metaLines,thAngle);
if (Rnt!=-1)
{
float newPara[4];
if (leastSquareFitting(metaLineCur.points,newPara,sigma))
{
if (!newPara[0])
{
k=newPara[1];
b=newPara[2];
xInt=metaLineCur.points[metaLineCur.points.size()-1].x;
yCur=k*xInt+b;
removal[Rnt]=1;
extend=true;
}
else
{
metaLineCur.dir=newPara[0]; //0 for k<1, 1 for k >=1
metaLineCur.k=newPara[1];
metaLineCur.b=newPara[2];
metaLineCur.dev=newPara[3];
metaLineCur.ys=metaLineCur.points[0].y;
metaLineCur.xs=metaLineCur.k*metaLineCur.ys+metaLineCur.b;
metaLineCur.ye=metaLineCur.points[metaLineCur.points.size()-1].y;
metaLineCur.xe=metaLineCur.k*metaLineCur.ye+metaLineCur.b;
extendVertical(metaLineCur,metaLines,removal);
extend=true;
}
//
pointsFormer.size=metaLineCur.points.size();
for (j=0;j<metaLineCur.points.size();++j)
{
int loc=metaLineCur.points[j].y*cols+metaLineCur.points[j].x;
*(ptrMI+loc)=-float(ID);
}
}
else
{
metaLineCur.points.resize(pointsFormer.size);
break;
}
}
else
break;
}
else
{
if ((m0==1||m1==1||m2==1)&&(m0+m1+m2)==1)
{
if (m0==1&&m0>=m1&&m0>=m2)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=xInt; p.y=yInt;
ptrMI[loc]=-ID;
}
else if (m1==1&&m1>=m0&&m1>=m2)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=xInt; p.y=yInt-1;
ptrMI[loc-cols]=-ID;
}
else if (m2==1&&m2>=m0&&m2>=m1)
{
if (chooseUp) {gap++;continue;};
pixel_t &p=metaLineCur.points.push_back();
p.x=xInt; p.y=yInt+1;
ptrMI[loc+cols]=-ID;
}
edge++;
edgeTotal++;
}
else
gap++;
if ((double)gap/edge>=0.25||edge==0) break;
if (gap==2)
{
edge=0;
gap=0;
}
if (edgeTotal>=thMeaningfulLength)
{
float metaLineParas[4];
leastSquareFitting(metaLineCur.points,metaLineParas,sigma);
k=metaLineParas[1];
b=metaLineParas[2];
yCur=xInt*k+b;
edgeTotal=0;
gap=0;
extend=true;
pointsFormer.size=metaLineCur.points.size();
}
}
}
else
break;
}
if (extend)
{
float metaLineParas[4];
leastSquareFitting(metaLineCur.points,metaLineParas,sigma);
metaLineCur.dir=metaLineParas[0]; //0 for k<1, 1 for k >=1
metaLineCur.k=metaLineParas[1];
metaLineCur.b=metaLineParas[2];
metaLineCur.dev=metaLineParas[3];
if (metaLineCur.dir==0)
{
metaLineCur.xs=metaLineCur.points[0].x;
metaLineCur.ys=metaLineCur.k*metaLineCur.xs+metaLineCur.b;
metaLineCur.xe=metaLineCur.points[metaLineCur.points.size()-1].x;
metaLineCur.ye=metaLineCur.k*metaLineCur.xe+metaLineCur.b;
}
else
{
metaLineCur.ys=metaLineCur.points[0].y;
metaLineCur.xs=metaLineCur.k*metaLineCur.ys+metaLineCur.b;
metaLineCur.ye=metaLineCur.points[metaLineCur.points.size()-1].y;
metaLineCur.xe=metaLineCur.k*metaLineCur.ye+metaLineCur.b;
}
}
else
metaLineCur.points.resize(pointsFormer.size);
}
void MetaLine::extendVertical(line_t &metaLineCur,lines_list_t &metaLines,int *removal)
{
int i,j;
float *ptrMI=(float*) maskImage.data;
float *ptrGM=(float*) gradientMap.data;
int ID=metaLineCur.ID;
float k=metaLineCur.k;
float b=metaLineCur.b;
float ys=metaLineCur.points[0].y;
float ye=metaLineCur.points[metaLineCur.points.size()-1].y;
float xe=k*ye+b;
float xCur=xe;
float yCur=ye;
int xInt=int(xCur+0.5);
int yInt=int(yCur+0.5);
int index=(ye-ys)/abs(ye-ys);
cluster_t pointsFormer;
pointsFormer.pixels=&metaLineCur.points[0];
pointsFormer.size=metaLineCur.points.size();
int loc=0;
int gap=0;
int edge=0;
int edgeTotal=0;
float m0,m1,m2;
float g0,g1,g2;
bool extend=false;
while (1)
{
yInt+=index;
xCur+=index*k;
xInt=int(xCur+0.5);
bool chooseLeft=false;
if (xInt+0.5>xCur)chooseLeft=true;
if (0<xInt&&xInt<cols_1&&0<yInt&&yInt<rows_1)
{
loc=yInt*cols+xInt;
m0=ptrMI[loc];
m1=ptrMI[loc-1];
m2=ptrMI[loc+1];
size_list_t lineHyps;
if (m0<0&&m0!=-ID) { size_t &n=lineHyps.push_back(); n=-m0-1; }
if (m1<0&&m1!=-ID) { size_t &n=lineHyps.push_back(); n=-m1-1; }
if (m2<0&&m2!=-ID) { size_t &n=lineHyps.push_back(); n=-m2-1; }
if (lineHyps.size())
{
int Rnt=lineMerging(ID,metaLineCur,lineHyps,metaLines,thAngle);
if (Rnt!=-1)
{
float newPara[4];
if (leastSquareFitting(metaLineCur.points,newPara,sigma))
{
if (newPara[0])
{
k=newPara[1];
b=newPara[2];
yInt=metaLineCur.points[metaLineCur.points.size()-1].y;
xCur=k*yInt+b;
removal[Rnt]=1;
extend=true;
}
else
{
metaLineCur.dir=newPara[0]; //0 for k<1, 1 for k >=1
metaLineCur.k=newPara[1];
metaLineCur.b=newPara[2];
metaLineCur.dev=newPara[3];
metaLineCur.xs=metaLineCur.points[0].x;
metaLineCur.ys=metaLineCur.k*metaLineCur.xs+metaLineCur.b;
metaLineCur.xe=metaLineCur.points[metaLineCur.points.size()-1].x;
metaLineCur.ye=metaLineCur.k*metaLineCur.xe+metaLineCur.b;
extendHirozontal(metaLineCur,metaLines,removal);
}
//
pointsFormer.size=metaLineCur.points.size();
for (j=0;j<metaLineCur.points.size();++j)
{
int loc=metaLineCur.points[j].y*cols+metaLineCur.points[j].x;
*(ptrMI+loc)=-float(ID);
}
}
else
{
metaLineCur.points.resize(pointsFormer.size);
break;
}
}
else
break;
}
else
{
if ((m0==1||m1==1||m2==1)&&(m0+m1+m2)==1)
{
if (m0==1&&m0>=m1&&m0>=m2)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=xInt; p.y=yInt;
ptrMI[loc]=-ID;
}
else if (m1==1&&m1>=m0&&m1>=m2)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=xInt-1; p.y=yInt;
ptrMI[loc-1]=-ID;
}
else if (m2==1&&m2>=m0&&m2>=m1)
{
if (chooseLeft) {gap++;continue;};
pixel_t &p=metaLineCur.points.push_back();
p.x=xInt+1; p.y=yInt;
ptrMI[loc+1]=-ID;
}
edge++;
edgeTotal++;
}
else
gap++;
if ((double)gap/edge>=0.25||edge==0) break;
if (gap==2)
{
edge=0;
gap=0;
}
if (edgeTotal>=thMeaningfulLength)
{
float metaLineParas[4];
leastSquareFitting(metaLineCur.points,metaLineParas,sigma);
k=metaLineParas[1];
b=metaLineParas[2];
xCur=yInt*k+b;
edgeTotal=0;
gap=0;
extend=true;
pointsFormer.size=metaLineCur.points.size();
}
}
}
else
break;
}
//
if (extend)
{
float metaLineParas[4];
leastSquareFitting(metaLineCur.points,metaLineParas,sigma);
metaLineCur.dir=metaLineParas[0]; //0 for k<1, 1 for k >=1
metaLineCur.k=metaLineParas[1];
metaLineCur.b=metaLineParas[2];
metaLineCur.dev=metaLineParas[3];
if (metaLineCur.dir==0)
{
metaLineCur.xs=metaLineCur.points[0].x;
metaLineCur.ys=metaLineCur.k*metaLineCur.xs+metaLineCur.b;
metaLineCur.xe=metaLineCur.points[metaLineCur.points.size()-1].x;
metaLineCur.ye=metaLineCur.k*metaLineCur.xe+metaLineCur.b;
}
else
{
metaLineCur.ys=metaLineCur.points[0].y;
metaLineCur.xs=metaLineCur.k*metaLineCur.ys+metaLineCur.b;
metaLineCur.ye=metaLineCur.points[metaLineCur.points.size()-1].y;
metaLineCur.xe=metaLineCur.k*metaLineCur.ye+metaLineCur.b;
}
}
else
metaLineCur.points.resize(pointsFormer.size);
}
float MetaLine::probability(int N,int k,float p)
{
int i=0;
float v=pow(p,N);
float prob=v;
for (i=0;i<N-k;++i)
{
v=v*float(N-i)/float(1+i)*(1-p)/p;
prob+=v;
}
return prob;
}
void MetaLine::getInformations(cv::Mat &originalImage,float gausSigma, int gausHalfSize,float p)
{
int i,j,m,n;
int grayLevels=255;
int apertureSize=3;
float anglePer=CV_PI/8.0;
float gNoise=1.3333;//1.3333
thGradientLow=gNoise;
cols = originalImage.cols;
rows = originalImage.rows;
cols_1=cols-1;
rows_1=rows-1;
N4=pow(double(rows)*cols,2.0);
int imageDataLength = rows*originalImage.cols;
//meaningful Length
thMeaningfulLength=int(2.0*log((float)rows*cols)/log(8.0)+0.5);
thAngle=2*atan(2.0/float(thMeaningfulLength));
//get gray image
cv::Mat grayImage;
int aa=originalImage.channels();
if ( originalImage.channels() == 1 )
grayImage = originalImage;
else
cv::cvtColor(originalImage, grayImage, CV_BGR2GRAY);
//gaussian filter
if ( gausSigma > 0.0 && gausHalfSize > 0 )
{
int gausSize = gausHalfSize*2 + 1;
cv::GaussianBlur(grayImage, filteredImage, cv::Size(gausSize,gausSize), gausSigma);
}
//get gradient map and orientation map
gradientMap = Mat::zeros(filteredImage.rows,filteredImage.cols,CV_32FC1);
orientationMap = Mat::zeros(filteredImage.rows,filteredImage.cols,CV_32FC1);
orientationMapInt=Mat::zeros(filteredImage.rows,filteredImage.cols,CV_8U);
maskImage = Mat::zeros(filteredImage.rows,filteredImage.cols,CV_32FC1);
cv::Mat orientationIndex = Mat::zeros(filteredImage.rows,filteredImage.cols,CV_8U);
cv::Mat dx(filteredImage.rows, filteredImage.cols, CV_16S,Scalar(0));
cv::Mat dy(filteredImage.rows, filteredImage.cols, CV_16S,Scalar(0));
cv::Sobel(filteredImage, dx, CV_16S, 1, 0, apertureSize, 1, 0, cv::BORDER_REPLICATE);
cv::Sobel(filteredImage, dy, CV_16S, 0, 1, apertureSize, 1, 0, cv::BORDER_REPLICATE);
//temp
cv::Mat temp(filteredImage.rows, filteredImage.cols, CV_8U,Scalar(0));
char *ptr_temp=(char *)temp.data;
//calculate gradient and orientation
int totalNum=0;
int t=8;
std::vector<int> histogram(t*grayLevels,0);
for (i=0;i<rows;++i)
{
float *ptrG=gradientMap.ptr<float>(i);
float *ptrO=orientationMap.ptr<float>(i);
uchar *ptrOI=orientationMapInt.ptr<uchar>(i);
short *ptrX=dx.ptr<short>(i);
short *ptrY=dy.ptr<short>(i);
for (j=0;j<cols;++j)
{
float gx=ptrX[j];
float gy=ptrY[j];
//ptrG[j]=sqrt(gx*gx+gy*gy);
ptrG[j]=abs(gx)+abs(gy);
ptrO[j] = atan2(gx,-gy);
ptrOI[j] = int((ptrO[j]+CV_PI)/anglePer);
if (ptrOI[j]==16)ptrOI[j]=0;
if (ptrG[j]>thGradientLow)
{
histogram[int(ptrG[j]+0.5)]++;
totalNum++;
}
else
ptrG[j]=0.0;
}
}
//gradient statistic
N2=0;
for (i=0;i<histogram.size();++i)
{
if (histogram[i])
N2+=(float)histogram[i]*(histogram[i]-1);
}
float pMax=1.0/exp((log(N2)/thMeaningfulLength));
float pMin=1.0/exp((log(N2)/sqrt((float)cols*rows)));
greaterThan=std::vector<float>(t*grayLevels,0);
smallerThan=std::vector<float>(t*grayLevels,0);
int count=0;
for (i=t*grayLevels-1;i>=0;--i)
{
count+=histogram[i];
float probabilityGreater=float(count)/float(totalNum);
greaterThan[i]=probabilityGreater;
}
count=0;
/*
for (i=0;i<t*grayLevels;++i)
{
if (greaterThan[i]<pMin)
{
thGradientLow=i;
break;
}
}
if (thGradientLow<gNoise) thGradientLow=gNoise;
for (i=t*grayLevels-1;i>=0;--i)
{
if (greaterThan[i]>pMax)
{
thGradientHigh=i;
break;
}
}
*/
for (i=t*grayLevels-1;i>=0;--i)
{
if (greaterThan[i]>pMax)
{
thGradientHigh=i;
break;
}
}
for (i=t*grayLevels-1;i>=0;--i)
{
if (greaterThan[i]>pMin)
{
thGradientLow=i;
break;
}
}
if (thGradientLow<gNoise) thGradientLow=gNoise;
//convert probabilistic meaningful to visual meaningful
thGradientHigh=sqrt(thGradientHigh*visualMeaningfulGradient);
//canny
cv::Canny(filteredImage,cannyEdge,thGradientLow,thGradientHigh,apertureSize);
//
int num=0;
uchar *ptrCanny=cannyEdge.data;
float *ptrM=(float*)maskImage.data;
float *ptrG=(float*)gradientMap.data;
for (i=0;i<rows;++i)
{
for (j=0;j<cols;++j)
{
if (*ptrCanny++)
{
*ptrM++=1;
gradientPoints.push_back(Point(j,i));
gradientValue.push_back(ptrG[i*cols+j]);
num++;
}
else
{
*ptrM++;
}
}
}
}
bool MetaLine::next(int &xSeed,int &ySeed)
{
int x, y;
float *ptrM=(float *)maskImage.data;
uchar *ptrO=orientationMapInt.data;
int direction=ptrO[ySeed*cols+xSeed];
int direction0=direction-1;
if (direction0<0) direction0=15;
int direction1=direction;
int direction2=direction+1;
if (direction2==16) direction2=0;
/*
int index=direction/2;
int *X_OFFSET,*Y_OFFSET;
if (index==0||index==4)
{
int XTemp[8] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int YTemp[8] = { 0, 0, 1, -1, 1, -1, 1, -1 };
X_OFFSET=XTemp;
Y_OFFSET=YTemp;
}
if (index==2||index==6)
{
int XTemp[8] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int YTemp[8] = { 1, -1, 0, 0, -1, 1, -1, 1 };
X_OFFSET=XTemp;
Y_OFFSET=YTemp;
}
if (index==3||index==7)
{
int XTemp[8] = { 1, -1, 1, -1, 0, 0, 1, -1 };
int YTemp[8] = { 1, -1, -1, 1, 1, -1, 0, 0 };
X_OFFSET=XTemp;
Y_OFFSET=YTemp;
}
if (index==1||index==5)
{
int XTemp[8] = { 1, -1, 1, -1, 0, 0, 1, -1 };
int YTemp[8] = { -1, 1, 1, -1, 1, -1, 0, 0 };
X_OFFSET=XTemp;
Y_OFFSET=YTemp;
}
*/
static const int X_OFFSET[8] = { 0, 1, 0, -1, 1, -1, -1, 1 };
static const int Y_OFFSET[8] = { 1, 0, -1, 0, 1, 1, -1, -1 };
for (size_t i=0; i!=8; ++i)
{
x = xSeed + X_OFFSET[i];
if ((0 <= x) && (x < cols))
{
y = ySeed + Y_OFFSET[i];
if ((0 <= y) && (y < rows))
{
if (ptrM[y*cols+x])
{
int directionTemp=ptrO[y*cols+x];
if (directionTemp==direction0||directionTemp==direction1||directionTemp==direction2)
{
xSeed = x;
ySeed = y;
return true;
}
}
}
}
}
return false;
}
bool MetaLine::smartRouting(clusters_list_t &segments,float minDeviation,int minSize)
{
int i,j,m,n;
if (minSize<3) minSize=3;
cv::Mat maskImageOri=maskImage.clone();
float* ptrM=(float*)maskImage.data;
uchar *ptrO=orientationMapInt.data;
//get the sorted gradient points
int numGradientPoints=gradientPoints.size();
QuickSort<float,cv::Point>::SortDescent(&gradientValue[0], 0, numGradientPoints-1, &gradientPoints[0]);
//find strings
strings_list_t strings;
for (i=0;i<numGradientPoints;++i)
{
string_t &str = strings.push_back();
str.clear();
int count=0;
int x = gradientPoints[i].x;
int y = gradientPoints[i].y;
do
{
pixel_t &p = str.push_back();
p.x=x;
p.y=y;
ptrM[y*cols+x]=0;
}
while (next( x, y));
pixel_t temp;
for (m=0, n=str.size()-1; m<n; ++m, --n)
{
temp = str[m];
str[m] = str[n];
str[n] = temp;
}
// Find and add feature pixels to the begin of the string.
x = gradientPoints[i].x;
y = gradientPoints[i].y;
if (next( x, y))
{
do
{
pixel_t &p = str.push_back();
p.x=x;
p.y=y;
ptrM[y*cols+x]=0;
}
while (next( x, y));
}
if (str.size()<thMeaningfulLength)
strings.pop_back();
}
maskImage=maskImageOri;
//show
cv::Mat stringsImage(rows,cols,CV_8UC3,cv::Scalar(0,0,0));
CvFont font;
double hScale=1.0;
double vScale=1.0;
cvInitFont(&font,CV_FONT_HERSHEY_PLAIN, hScale,vScale,0,1);
std::vector<cv::Scalar> colors(7);
for (i=0;i<7;++i)
{
int R=int(double(rand())/RAND_MAX*255);
int G=int(double(rand())/RAND_MAX*255);
int B=int(double(rand())/RAND_MAX*255);
colors[i]=Scalar(R,G,B);
}
for (i=0;i<strings.size();++i)
{
int R=colors[(i%7)].val[0];
int G=colors[(i%7)].val[1];
int B=colors[(i%7)].val[2];
for (j=0;j<strings[i].size();++j)
{
int x=strings[i][j].x;
int y=strings[i][j].y;
*(stringsImage.data+3*(y*cols+x)+0)=R;
*(stringsImage.data+3*(y*cols+x)+1)=G;
*(stringsImage.data+3*(y*cols+x)+2)=B;
}
char text[100];
sprintf(text,"%d", i);
Point mid=Point(strings[i][strings[i].size()/2].x,strings[i][strings[i].size()/2].y);
cv::putText(stringsImage,text,mid,1,1,colors[i%7],1);
}
imwrite("C:\\12345stringsImage.bmp",stringsImage);
// imshow("",stringsImage);
// cv::waitKey(0);
//find segments
segments.clear();
for (i=0;i<strings.size();++i)
{
const string_t &str = strings[i];
subDivision(segments, str, 0, strings[i].size()-1, minDeviation, minSize);
}
//draw
// std::vector<cv::Scalar> colors(7);
// for (i=0;i<7;++i)
// {
// int R=int(double(rand())/RAND_MAX*255);
// int G=int(double(rand())/RAND_MAX*255);
// int B=int(double(rand())/RAND_MAX*255);
//
// colors[i]=Scalar(R,G,B);
// }
int times=1;
cv::Mat clustersImage(times*rows,times*cols,CV_8UC3,cv::Scalar(0,0,0));
for (i=0;i<segments.size();++i)
{
int R=colors[(i%7)].val[0];
int G=colors[(i%7)].val[1];
int B=colors[(i%7)].val[2];
for (j=0;j<segments[i].size;++j)
{
int x=times*segments[i].pixels[j].x;
int y=times*segments[i].pixels[j].y;
*(clustersImage.data+3*(y*times*cols+x)+0)=R;
*(clustersImage.data+3*(y*times*cols+x)+1)=G;
*(clustersImage.data+3*(y*times*cols+x)+2)=B;
}
char text[100];
sprintf(text,"%d", i);
Point mid=times*cv::Point(int(segments[i].pixels[segments[i].size/2].x),int(segments[i].pixels[segments[i].size/2].y));
//cv::putText(clustersImage,text,mid,1,1,colors[i%7],1);
}
imwrite("C:\\12345clustersImage.bmp",clustersImage);
// imshow(" ",clustersImage);
// cv::waitKey(0);
return 1;
}
void MetaLine::getMetaLine(clusters_list_t &segments,lines_list_t &metaLines,float sigma)
{
int i,j;
float* ptrMaskImage=(float*)maskImage.data;
//get meta lines
int numSegments=segments.size();
for (i=0;i<numSegments;i++)
{
float parameters[4];
leastSquareFitting(segments[i],parameters,sigma);
line_t &metaLineTemp=metaLines.push_back();
float numLines=-float(metaLines.size());
for (j=0;j<segments[i].size;++j)
{
pixel_t &p=metaLineTemp.points.push_back();
p.x=segments[i].pixels[j].x;
p.y=segments[i].pixels[j].y;
int loc = segments[i].pixels[j].y*cols +segments[i].pixels[j].x;
ptrMaskImage[loc]=numLines;
}
metaLineTemp.ID=-numLines;
metaLineTemp.dir=parameters[0]; //0 for k<1, 1 for k >=1
metaLineTemp.k=parameters[1];
metaLineTemp.b=parameters[2];
if (!parameters[0])
{
metaLineTemp.xs=metaLineTemp.points[0].x;
metaLineTemp.ys=metaLineTemp.k*metaLineTemp.xs+metaLineTemp.b;
metaLineTemp.xe=metaLineTemp.points[metaLineTemp.points.size()-1].x;
metaLineTemp.ye=metaLineTemp.k*metaLineTemp.xe+metaLineTemp.b;
}
else
{
metaLineTemp.ys=metaLineTemp.points[0].y;
metaLineTemp.xs=metaLineTemp.k*metaLineTemp.ys+metaLineTemp.b;
metaLineTemp.ye=metaLineTemp.points[metaLineTemp.points.size()-1].y;
metaLineTemp.xe=metaLineTemp.k*metaLineTemp.ye+metaLineTemp.b;
}
}
}
void MetaLine::MetaLineDetection(cv::Mat originalImage,float gausSigma, int gausHalfSize,std::vector<std::vector<float> > &lines)
{
int i,j;
getInformations(originalImage, gausSigma, gausHalfSize,p);
//smart routing
float minDeviation=2.0;
int minSize=thMeaningfulLength/2;
clusters_list_t segments;
smartRouting(segments,minDeviation,minSize);
//get initial meta lines
lines_list_t metaLines;
getMetaLine(segments,metaLines,sigma);
//meta line extending
int *removal=(int *)malloc(metaLines.size()*sizeof(int));
memset(removal,0,metaLines.size()*sizeof(int));
metaLineExtending(metaLines,removal);
//meta line merging
//metaLineMerging(metaLines,removal);
//line validity check
lineValidityCheck(metaLines,removal);
//get lines
std::vector<int> ID;
for (i=0;i<metaLines.size();++i)
{
if (!removal[i])
{
std::vector<float> lineTemp(5);
lineTemp[0]=metaLines[i].xs;
lineTemp[1]=metaLines[i].ys;
lineTemp[2]=metaLines[i].xe;
lineTemp[3]=metaLines[i].ye;
lineTemp[4]=metaLines[i].ID;
lines.push_back(lineTemp);
}
}
free(removal);
}
int MetaLine::lineMerging(int IDCur,line_t &metaLineCur,size_list_t &lineHyps,lines_list_t &metaLines,float thAngle)
{
int i,j;
int numCur=metaLineCur.points.size();
float angleCur=0.0;
if (metaLineCur.points[0].x==metaLineCur.points[numCur-1].x)
{
angleCur=CV_PI/2.0;
}
else
angleCur=atan(float(metaLineCur.points[0].y-metaLineCur.points[numCur-1].y)/float(metaLineCur.points[0].x-metaLineCur.points[numCur-1].x));
//meta line merge judge
std::vector<int> nums;
std::vector<float> angles;
for (i=0;i<lineHyps.size();++i)
{
int numTemp=metaLines[lineHyps[i]].points.size();
float angleTemp=0.0;
if (metaLines[lineHyps[i]].points[0].x==metaLines[lineHyps[i]].points[numTemp-1].x)
{
angleTemp=CV_PI/2.0;
}
else
angleTemp=atan(float(metaLines[lineHyps[i]].points[0].y-metaLines[lineHyps[i]].points[numTemp-1].y)/float(metaLines[lineHyps[i]].points[0].x-metaLines[lineHyps[i]].points[numTemp-1].x));
angles.push_back(angleTemp);
}
float angleMin=100;
int metaIDHyp=0;
for (i=0;i<lineHyps.size();++i)
{
float angleOffset=min((double)abs(angles[i]-angleCur),CV_PI-abs(angles[i]-angleCur));
if (angleOffset<angleMin)
{
angleMin=angleOffset;
metaIDHyp=lineHyps[i];
}
}
if (angleMin>thAngle)
return -1;
else
{
//merged the line
float thDis=4;
int numHyp=metaLines[metaIDHyp].points.size();
float k=abs(tan(angleCur));
if (k>1)
{
float dis_s=abs(metaLines[metaIDHyp].points[0].y-metaLineCur.points[numCur-1].y);
float dis_e=abs(metaLines[metaIDHyp].points[numHyp-1].y-metaLineCur.points[numCur-1].y);
if (dis_s<dis_e&&dis_s<thDis)
{
if ((metaLines[metaIDHyp].points[numHyp-1].y-metaLineCur.points[numCur-1].y)*(metaLineCur.points[0].y-metaLineCur.points[numCur-1].y)<0)
{
//merge
for (i=0;i<numHyp;++i)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=metaLines[metaIDHyp].points[i].x;
p.y=metaLines[metaIDHyp].points[i].y;
}
return metaIDHyp;
}
}
if (dis_e<dis_s&&dis_e<thDis)
{
if ((metaLines[metaIDHyp].points[0].y-metaLineCur.points[numCur-1].y)*(metaLineCur.points[0].y-metaLineCur.points[numCur-1].y)<0)
{
//merge
for (i=0;i<numHyp;++i)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=metaLines[metaIDHyp].points[numHyp-1-i].x;
p.y=metaLines[metaIDHyp].points[numHyp-1-i].y;
}
return metaIDHyp;
}
}
return -1;
}
else
{
float dis_s=abs(metaLines[metaIDHyp].points[0].x-metaLineCur.points[numCur-1].x);
float dis_e=abs(metaLines[metaIDHyp].points[numHyp-1].x-metaLineCur.points[numCur-1].x);
if (dis_s<dis_e&&dis_s<thDis)
{
if ((metaLines[metaIDHyp].points[numHyp-1].x-metaLineCur.points[numCur-1].x)*(metaLineCur.points[0].x-metaLineCur.points[numCur-1].x)<0)
{
//merge
for (i=0;i<numHyp;++i)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=metaLines[metaIDHyp].points[i].x;
p.y=metaLines[metaIDHyp].points[i].y;
}
return metaIDHyp;
}
}
if (dis_e<dis_s&&dis_e<thDis)
{
if ((metaLines[metaIDHyp].points[0].x-metaLineCur.points[numCur-1].x)*(metaLineCur.points[0].x-metaLineCur.points[numCur-1].x)<0)
{
//merge
for (i=0;i<numHyp;++i)
{
pixel_t &p=metaLineCur.points.push_back();
p.x=metaLines[metaIDHyp].points[numHyp-1-i].x;
p.y=metaLines[metaIDHyp].points[numHyp-1-i].y;
}
return metaIDHyp;
}
}
return -1;
}
}
}
int MetaLine::lineMerging2(int IDCur,line_t &metaLineCur,size_list_t &lineHyps,lines_list_t &metaLines,size_list_t &IDMerged)
{
int i,j;
float thDev=2.0;
float *ptrMI=(float*) maskImage.data;
float xs=metaLineCur.xs;
float ys=metaLineCur.ys;
float xe=metaLineCur.xe;
float ye=metaLineCur.ye;
float length=metaLineCur.points.size();
float xsCur,ysCur,xeCur,yeCur;
std::vector<int> removal(lineHyps.size(),0);
for (i=0;i<lineHyps.size();++i)
{
xsCur=metaLines[lineHyps[i]].xs;
ysCur=metaLines[lineHyps[i]].ys;
xeCur=metaLines[lineHyps[i]].xe;
yeCur=metaLines[lineHyps[i]].ye;
float deviation1 = float( abs( ((xsCur - xs) * (ys - ye)) + ((ysCur - ys) * (xe - xs)) ) );
deviation1/=length;
float deviation2 = float( abs( ((xeCur - xs) * (ys - ye)) + ((yeCur - ys) * (xe - xs)) ) );
deviation2/=length;
if (deviation1+deviation2>2*thDev) removal[i]=1;
}
std::vector<int> IDHypsNew;
std::vector<float> dis;
for (i=0;i<lineHyps.size();++i)
{
if (!removal[i])
{
xsCur=metaLines[lineHyps[i]].xs;
ysCur=metaLines[lineHyps[i]].ys;
xeCur=metaLines[lineHyps[i]].xe;
yeCur=metaLines[lineHyps[i]].ye;
float dis1=sqrt((xs-xsCur)*(xs-xsCur)+(ys-ysCur)*(ys-ysCur));
float dis2=sqrt((xs-xeCur)*(xs-xeCur)+(ys-yeCur)*(ys-yeCur));
float dis3=sqrt((xe-xsCur)*(xe-xsCur)+(ye-ysCur)*(ye-ysCur));
float dis4=sqrt((xe-xeCur)*(xe-xeCur)+(ye-yeCur)*(ye-yeCur));
float disMin=min(min(dis1,dis2),min(dis3,dis4));
IDHypsNew.push_back(lineHyps[i]);
dis.push_back(disMin);
}
}
//merging judge
if (IDHypsNew.size())
{
//sort according to dis
QuickSort<float,int>::SortAscent(&dis[0], 0, dis.size()-1, &IDHypsNew[0]);
for (i=0;i<IDHypsNew.size();++i)
{
//dis
xs=metaLineCur.xs;
ys=metaLineCur.ys;
xe=metaLineCur.xe;
ye=metaLineCur.ye;
length=metaLineCur.points.size();
xsCur=metaLines[IDHypsNew[i]].xs;
ysCur=metaLines[IDHypsNew[i]].ys;
xeCur=metaLines[IDHypsNew[i]].xe;
yeCur=metaLines[IDHypsNew[i]].ye;
float lengthCur=metaLines[IDHypsNew[i]].points.size();
float dis1=sqrt((xs-xsCur)*(xs-xsCur)+(ys-ysCur)*(ys-ysCur));
float dis2=sqrt((xs-xeCur)*(xs-xeCur)+(ys-yeCur)*(ys-yeCur));
float dis3=sqrt((xe-xsCur)*(xe-xsCur)+(ye-ysCur)*(ye-ysCur));
float dis4=sqrt((xe-xeCur)*(xe-xeCur)+(ye-yeCur)*(ye-yeCur));
float disMin=min(min(dis1,dis2),min(dis3,dis4));
Point2f pts,pte;
float lengthMerged=length+lengthCur+disMin;
float pMerge=(length+lengthCur)/(lengthMerged);
float NFA=length*lengthCur*pow(pMerge,int(disMin+0.5));
if (NFA>1)
{
std::vector<Point2f> mergedPoints;
if (disMin==dis1)
{
pts=Point2f(xs,ys);
pte=Point2f(xsCur,ysCur);
for (j=length-1;j>=0;--j) { mergedPoints.push_back(Point2f(metaLineCur.points[j].x,metaLineCur.points[j].y)) ; }
for (j=0;j<lengthCur;++j) { mergedPoints.push_back(Point2f(metaLines[IDHypsNew[i]].points[j].x,metaLines[IDHypsNew[i]].points[j].y)); }
}
else if (disMin==dis2)
{
pts=Point2f(xs,ys);
pte=Point2f(xeCur,yeCur);
for (j=length-1;j>=0;--j) { mergedPoints.push_back(Point2f(metaLineCur.points[j].x,metaLineCur.points[j].y)) ; }
for (j=lengthCur-1;j>=0;--j) { mergedPoints.push_back(Point2f(metaLines[IDHypsNew[i]].points[j].x,metaLines[IDHypsNew[i]].points[j].y)); }
}
else if (disMin==dis3)
{
pts=Point2f(xe,ye);
pte=Point2f(xsCur,ysCur);
for (j=0;j<length;++j) { mergedPoints.push_back(Point2f(metaLineCur.points[j].x,metaLineCur.points[j].y)) ; }
for (j=0;j<lengthCur;++j) { mergedPoints.push_back(Point2f(metaLines[IDHypsNew[i]].points[j].x,metaLines[IDHypsNew[i]].points[j].y)); }
}
else
{
pts=Point2f(xe,ye);
pte=Point2f(xeCur,yeCur);
for (j=0;j<length;++j) { mergedPoints.push_back(Point2f(metaLineCur.points[j].x,metaLineCur.points[j].y)) ; }
for (j=lengthCur-1;j>=0;--j) { mergedPoints.push_back(Point2f(metaLines[IDHypsNew[i]].points[j].x,metaLines[IDHypsNew[i]].points[j].y)); }
}
//line fitting
float newPara[4];
float metaLineParas[4];
if (leastSquareFitting(mergedPoints,metaLineParas,sigma))
{
if (crossingCheck( pts, pte, -IDCur-1))
{
metaLineCur.dir=metaLineParas[0]; //0 for k<1, 1 for k >=1
metaLineCur.k=metaLineParas[1];
metaLineCur.b=metaLineParas[2];
metaLineCur.dev=metaLineParas[3];
if (metaLineCur.dir==0)
{
metaLineCur.xs=mergedPoints[0].x;
metaLineCur.ys=metaLineCur.k*metaLineCur.xs+metaLineCur.b;
metaLineCur.xe=mergedPoints[mergedPoints.size()-1].x;
metaLineCur.ye=metaLineCur.k*metaLineCur.xe+metaLineCur.b;
}
else
{
metaLineCur.ys=mergedPoints[0].y;
metaLineCur.xs=metaLineCur.k*metaLineCur.ys+metaLineCur.b;
metaLineCur.ye=mergedPoints[mergedPoints.size()-1].y;
metaLineCur.xe=metaLineCur.k*metaLineCur.ye+metaLineCur.b;
}
size_t &temp=IDMerged.push_back();
temp=IDHypsNew[i];
metaLineCur.points.resize(mergedPoints.size());
for (j=0;j<mergedPoints.size();++j)
{
metaLineCur.points[j].x=mergedPoints[j].x;
metaLineCur.points[j].y=mergedPoints[j].y;
int loc=metaLineCur.points[j].y*cols+metaLineCur.points[j].x;
ptrMI[loc]=-IDCur-1;
}
}
}
}
}
}
if (IDHypsNew.size()) return 1;
else return -1;
}
void MetaLine::metaLineExtending(lines_list_t &metaLines,int *removal)
{
int i,j,m,n;
int num=metaLines.size();
//sort lines
std::vector<int> length;
std::vector<int> index;
for (i=0;i<metaLines.size();++i)
{
if (metaLines[i].points.size()>2*thMeaningfulLength)
{
index.push_back(i);
length.push_back(metaLines[i].points.size());
}
}
QuickSort<int,int>::SortDescent(&length[0], 0, length.size()-1, &index[0]);
for (i=0;i<length.size();++i)
{
int t=index[i];
if (!removal[t])
{
int dir=metaLines[t].dir;
if (!dir) //horizontal line
{
extendHirozontal(metaLines[t],metaLines,removal);
//the other direction extend
for (m=0,n=metaLines[t].points.size()-1;m<n;++m,--n)
{
pixel_t temp=metaLines[t].points[m];
metaLines[t].points[m]=metaLines[t].points[n];
metaLines[t].points[n]=temp;
}
if (!metaLines[t].dir)
extendHirozontal(metaLines[t],metaLines,removal);
else
extendVertical(metaLines[t],metaLines,removal);
}
else //vertical line
{
extendVertical(metaLines[t],metaLines,removal);
//the other direction extend
for (m=0,n=metaLines[t].points.size()-1;m<n;++m,--n)
{
pixel_t temp=metaLines[t].points[m];
metaLines[t].points[m]=metaLines[t].points[n];
metaLines[t].points[n]=temp;
}
if (!metaLines[t].dir)
extendHirozontal(metaLines[t],metaLines,removal);
else
extendVertical(metaLines[t],metaLines,removal);
}
float metaLineParas[4];
gradientWeightedLeastSquareFitting(metaLines[t].points,metaLineParas,0.5);
metaLines[t].dir=metaLineParas[0]; //0 for k<1, 1 for k >=1
metaLines[t].k=metaLineParas[1];
metaLines[t].b=metaLineParas[2];
metaLines[t].dev=metaLineParas[3];
if (metaLines[t].dir)
{
metaLines[t].ys=metaLines[t].points[0].y;
metaLines[t].xs=metaLines[t].k*metaLines[t].ys+metaLines[t].b;
metaLines[t].ye=metaLines[t].points[metaLines[t].points.size()-1].y;
metaLines[t].xe=metaLines[t].k*metaLines[t].ye+metaLines[t].b;
}
else
{
metaLines[t].xs=metaLines[t].points[0].x;
metaLines[t].ys=metaLines[t].k*metaLines[t].xs+metaLines[t].b;
metaLines[t].xe=metaLines[t].points[metaLines[t].points.size()-1].x;
metaLines[t].ye=metaLines[t].k*metaLines[t].xe+metaLines[t].b;
}
}
}
}
void MetaLine::metaLineMerging(lines_list_t &metaLines,int *removal)
{
int i,j,m,n;
//sort lines
std::vector<int> length;
std::vector<int> index;
for (i=0;i<metaLines.size();++i)
{
if (!removal[i]&&metaLines[i].points.size()>2*thMeaningfulLength)
{
index.push_back(i);
length.push_back(metaLines[i].points.size());
}
}
QuickSort<int,int>::SortDescent(&length[0], 0, length.size()-1, &index[0]);
//creat line bins
int numBins=16;
float stepBins=CV_PI/numBins;
std::vector<std::vector<int> > bins(numBins);
std::vector<int> lineBinIndex(length.size(),0);
std::vector<float> lineAngle(length.size(),0);
for (i=0;i<length.size();++i)
{
int lineID=index[i];
float deltaX=metaLines[lineID].xe-metaLines[lineID].xs;
float deltaY=metaLines[lineID].ye-metaLines[lineID].ys;
float angle=atan(deltaY/deltaX);
angle+=CV_PI/2.0;
int binID=angle/stepBins;
if (binID==numBins) binID=numBins-1;
bins[binID].push_back(i);
lineBinIndex[i]=binID;
lineAngle[i]=angle;
}
//line merging
for (i=0;i<length.size();++i)
{
int binID=lineBinIndex[i];
int lineID1=index[i];
float angle1=lineAngle[i];
if (!removal[lineID1])
{
if (metaLines[lineID1].ID==265)
{
int aa=0;
}
if (bins[binID].size())
{
size_list_t lineIDHyps;
for (j=0;j<bins[binID].size();++j)
{
int t=bins[binID][j];
int lineID2=index[t];
if (lineID2!=lineID1)
{
float angle2=lineAngle[t];
if (abs(angle1-angle2)<thAngle)
{
size_t &temp=lineIDHyps.push_back();
temp=lineID2;
}
}
}
//line merging
size_list_t lineIDMerged;
int Rnt=lineMerging2(lineID1,metaLines[lineID1],lineIDHyps,metaLines,lineIDMerged);
if (Rnt)
{
for (j=0;j<lineIDMerged.size();++j)
removal[lineIDMerged[j]]=1;
}
}
}
}
}
void MetaLine::subDivision(clusters_list_t &clusters, const string_t &string, const size_t first_index, const size_t last_index, const float min_deviation, const size_t min_size)
{
size_t clusters_count = clusters.size();
const pixel_t &first = string[first_index];
const pixel_t &last = string[last_index];
// Compute the length of the straight line segment defined by the endpoints of the cluster.
int x = first.x - last.x;
int y = first.y - last.y;
float length = sqrt( static_cast<float>( (x * x) + (y * y) ) );
// Find the pixels with maximum deviation from the line segment in order to subdivide the cluster.
size_t max_pixel_index = 0;
float deviation, max_deviation = -1.0;
for (size_t i=first_index, count=string.size(); i!=last_index; i=(i+1)%count)
{
const pixel_t ¤t = string[i];
deviation = static_cast<float>( abs( ((current.x - first.x) * (first.y - last.y)) + ((current.y - first.y) * (last.x - first.x)) ) );
if (deviation > max_deviation)
{
max_pixel_index = i;
max_deviation = deviation;
}
}
max_deviation /= length;
//
// // Compute the ratio between the length of the segment and the maximum deviation.
// float ratio = length / std::max( max_deviation, min_deviation );
// Test the number of pixels of the sub-clusters.
int half_min_size=min_size/2;
if ((max_deviation>=min_deviation) && ((max_pixel_index - first_index + 1) >= half_min_size) && ((last_index - max_pixel_index + 1) >= half_min_size))
{
subDivision( clusters, string, first_index, max_pixel_index, min_deviation, min_size );
subDivision( clusters, string, max_pixel_index, last_index, min_deviation, min_size );
// // Test the quality of the sub-clusters against the quality of the current cluster.
// if ((ratio1 > ratio) || (ratio2 > ratio))
// {
// return std::max( ratio1, ratio2 );
// }
}
else
{
// Remove the sub-clusters from the list of clusters.
clusters.resize( clusters_count );
// Keep current cluster
cluster_t &cluster = clusters.push_back();
cluster.pixels = &first;
cluster.size = (last_index - first_index) + 1;
}
}
void MetaLine::lineValidityCheck(lines_list_t &metaLines,int *removal)
{
int i,j;
// line Validity Check on Gradient orientation
int num=0;
for (i=0;i<metaLines.size();++i)
{
if (removal[i]||metaLines[i].points.size()<thMeaningfulLength)
{
removal[i]=1;
num++;
}
else
{
float orientProbability=lineValidityCheckGradientOrientation( metaLines[i]);
float gradientProbability=lineValidityCheckGradientLevel( metaLines[i]);
if (orientProbability*N4*gradientProbability*N2>1)
{
removal[i]=1;
num++;
}
}
}
}
float MetaLine::lineValidityCheckGradientLevel(line_t &metaLines)
{
int i,j;
float* ptrGM=(float*) gradientMap.data;
int thGptNum=thMeaningfulLength;
std::vector<float> gradient;
int numPoints=metaLines.points.size();
int step=numPoints/thGptNum;
if (step==0) step=1;
step=1;
for (j=0;j<numPoints;j+=step)
{
int loc=metaLines.points[j].y*cols+metaLines.points[j].x;
gradient.push_back(ptrGM[loc]);
}
//sort
QuickSort<float,int>::SortDescent(&gradient[0], 0, gradient.size()-1);
int index=int(gradient[gradient.size()-1]+0.5);
float probability=pow(greaterThan[index],numPoints);
return probability;
}
float MetaLine::lineValidityCheckGradientOrientation(line_t &metaLines)
{
int i,j;
float* ptr=(float*) orientationMap.data;
float angleOffset=CV_PI/8.0;
float deltaX=metaLines.xs-metaLines.xe;
float deltaY=metaLines.ys-metaLines.ye;
float angleLine = atan(deltaY/deltaX);
std::vector<int> alignIndex(metaLines.points.size(),0);
int count1=0;
int count2=0;
int count3=0;
for (j=0;j<metaLines.points.size();++j)
{
int loc=metaLines.points[j].y*cols+metaLines.points[j].x;
float anglePt=ptr[loc];
if (abs(anglePt-angleLine)<angleOffset)
count1++;
if ((CV_PI-abs(anglePt-angleLine))<angleOffset)
count2++;
count3++;
}
int count=max(count1,count2);
return probability(count3,count,p);
}
================================================
FILE: thirdparty/CannyLines/src/MetaLine.h
================================================
#ifndef _META_LINE_H_
#define _META_LINE_H_
#pragma once
#include <opencv2/opencv.hpp>
#include "types.h"
#include <vector>
using namespace cv;
using namespace std;
enum DIR{LEFT,RIGHT,UP,DOWN};
class MetaLine
{
public:
MetaLine(void);
~MetaLine(void);
void MetaLineDetection(cv::Mat originalImage,float gausSigma, int gausHalfSize,std::vector<std::vector<float> > &lines);
private:
void getInformations(cv::Mat &originalImage,float gausSigma, int gausHalfSize,float p);
bool smartRouting(clusters_list_t &segments,float minDeviation,int minSize);
void getMetaLine(clusters_list_t &segments,lines_list_t &metaLines,float thMSE);
void getMetaLine(strings_list_t &strings,lines_list_t &metaLines,float thMSE);
void metaLineExtending(lines_list_t &metaLines,int *removal);
void metaLineMerging(lines_list_t &metaLines,int *removal);
void lineValidityCheck(lines_list_t &metaLines,int *removal);
//
bool next(int &x_seed,int &y_seed);
void subDivision(clusters_list_t &clusters, const string_t &string, const size_t first_index, const size_t last_index, const float min_deviation, const size_t min_size);
void extendHirozontal(line_t &metaLineCur,lines_list_t &metaLines,int *removal);
void extendVertical(line_t &metaLineCur,lines_list_t &metaLines,int *removal);
int lineMerging(int IDCur,line_t &metaLineCur,size_list_t &IDHyps,lines_list_t &metaLines,float thAngle);
int lineMerging2(int IDCur,line_t &metaLineCur,size_list_t &IDHyps,lines_list_t &metaLines,size_list_t &IDMerged);
bool crossingCheck(Point2f pts,Point2f pte,int ID);
int crossSearch(Point2i pts,float &angle,int ID);
bool leastSquareFitting(string_t &string, float *parameters,float thMSE);
bool leastSquareFitting(cluster_t &cluster, float *parameters,float thMSE);
bool leastSquareFitting(std::vector<Point2f> &points, float *parameters,float thMSE);
bool gradientWeightedLeastSquareFitting(string_t &string,float *parameters,float thMSE);
float lineValidityCheckGradientLevel(line_t &metaLines);
float lineValidityCheckGradientOrientation(line_t &metaLines);
float probability(int N,int k,float p);
//
public:
float p;
float sigma;
float thAngle;
int thMeaningfulLength;
float visualMeaningfulGradient;
float thGradientLow;
float thGradientHigh;
cv::Mat cannyEdge;
private:
int rows,cols;
int rows_1,cols_1 ;
int thSearchSteps;
float N4;
float N2;
cv::Mat filteredImage;
cv::Mat gradientMap; //the gradient value
cv::Mat orientationMap; //index for the gradient orientation
cv::Mat orientationMapInt;//
cv::Mat searchingMap; //index for searching direction
cv::Mat maskImage; //index for the position of gradient points
std::vector<Point> gradientPoints;
std::vector<float> gradientValue;
std::vector<float> greaterThan;
std::vector<float> smallerThan;
};
#endif // _META_LINE_H_
================================================
FILE: thirdparty/CannyLines/src/QuickSort.h
================================================
/* --- --- ---
* Copyright (C) 2008--2010 Idiap Research Institute (.....@idiap.ch)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// QuickSort.h: interface for the CQuickSort class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(_QUICK_SORT_H_)
#define _QUICK_SORT_H_
#include "stdio.h"
template <class TD, class TI> /* class TD - the type of sorted data, class TI - the type of indices */
class QuickSort
{
public:
/* sort everything inbetween `low' <-> `high' */
static void Sort(TD *pData, long low, long high, bool bAscent=true, TI* pIdxes=NULL)
{
long i = low;
long j = high;
TD y = 0;
TI idx;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
if ( bAscent ) {
/* find member above ... */
while(pData[i] < z) i++;
/* find element below ... */
while(pData[j] > z) j--;
}
else {
/* find member below ... */
while(pData[i] > z) i++;
/* find element above ... */
while(pData[j] < z) j--;
}
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
if ( pIdxes ) {
idx = (pIdxes)[i];
(pIdxes)[i] = (pIdxes)[j];
(pIdxes)[j] = idx;
}
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
Sort(pData, low, j, bAscent, pIdxes);
if(i < high)
Sort(pData, i, high, bAscent, pIdxes);
};
/* sort everything inbetween `low' <-> `high' */
static void SortAscent(TD *pData, long low, long high)
{
long i = low;
long j = high;
TD y = 0;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
/* find member above ... */
while(pData[i] < z) i++;
/* find element below ... */
while(pData[j] > z) j--;
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
SortAscent(pData, low, j);
if(i < high)
SortAscent(pData, i, high);
};
/* sort everything inbetween `low' <-> `high' */
static void SortDescent(TD *pData, long low, long high)
{
long i = low;
long j = high;
TD y = 0;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
/* find member below ... */
while(pData[i] > z) i++;
/* find element above ... */
while(pData[j] < z) j--;
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
SortDescent(pData, low, j);
if(i < high)
SortDescent(pData, i, high);
};
/* sort everything inbetween `low' <-> `high' */
static void SortAscent(TD *pData, long low, long high, TI* pIdxes)
{
long i = low;
long j = high;
TD y = 0;
TI idx;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
/* find member above ... */
while(pData[i] < z) i++;
/* find element below ... */
while(pData[j] > z) j--;
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
idx = (pIdxes)[i];
(pIdxes)[i] = (pIdxes)[j];
(pIdxes)[j] = idx;
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
SortAscent(pData, low, j, pIdxes);
if(i < high)
SortAscent(pData, i, high, pIdxes);
};
/* sort everything inbetween `low' <-> `high' */
static void SortDescent(TD *pData, long low, long high, TI* pIdxes)
{
long i = low;
long j = high;
TD y = 0;
TI idx;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
/* find member below ... */
while(pData[i] > z) i++;
/* find element above ... */
while(pData[j] < z) j--;
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
idx = (pIdxes)[i];
(pIdxes)[i] = (pIdxes)[j];
(pIdxes)[j] = idx;
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
SortDescent(pData, low, j, pIdxes);
if(i < high)
SortDescent(pData, i, high, pIdxes);
};
/* sort everything inbetween `low' <-> `high' */
static void SortAscent(TD *pData, long low, long high, TI* pIdxes,TI* pID)
{
long i = low;
long j = high;
TD y = 0;
TI idx;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
/* find member above ... */
while(pData[i] < z) i++;
/* find element below ... */
while(pData[j] > z) j--;
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
idx = (pIdxes)[i];
(pIdxes)[i] = (pIdxes)[j];
(pIdxes)[j] = idx;
pID[(pIdxes)[i]]=i;
pID[(pIdxes)[j]]=j;
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
SortAscent(pData, low, j, pIdxes,pID);
if(i < high)
SortAscent(pData, i, high, pIdxes,pID);
};
/* sort everything inbetween `low' <-> `high' */
static void SortDescent(TD *pData, long low, long high, TI* pIdxes,TI* pID)
{
long i = low;
long j = high;
TD y = 0;
TI idx;
/* compare value */
TD z = pData[(low + high) / 2];
/* partition */
do {
/* find member below ... */
while(pData[i] > z) i++;
/* find element above ... */
while(pData[j] < z) j--;
if(i <= j) {
/* swap two elements */
y = pData[i];
pData[i] = pData[j];
pData[j] = y;
idx = (pIdxes)[i];
(pIdxes)[i] = (pIdxes)[j];
(pIdxes)[j] = idx;
pID[(pIdxes)[i]]=i;
pID[(pIdxes)[j]]=j;
i++;
j--;
}
} while(i <= j);
/* recurse */
if(low < j)
SortDescent(pData, low, j, pIdxes,pID);
if(i < high)
SortDescent(pData, i, high, pIdxes,pID);
};
};
#endif // !defined(_QUICK_SORT_H_)
================================================
FILE: thirdparty/CannyLines/src/buffer_2d.cpp
================================================
/*
* Copyright (C) 2008 Leandro A. F. Fernandes and Manuel M. Oliveira
*
* author : Fernandes, Leandro A. F.
* e-mail : laffernandes@gmail.com
* home page: http://www.inf.ufrgs.br/~laffernandes
*
*
* The complete description of the implemented techinique can be found at
*
* Leandro A. F. Fernandes, Manuel M. Oliveira
* Real-time line detection through an improved Hough transform voting scheme
* Pattern Recognition (PR), Elsevier, 41:1, 2008, 299-314.
* DOI: http://dx.doi.org/10.1016/j.patcog.2007.04.003
* Project Page: http://www.inf.ufrgs.br/~laffernandes/kht.html
*
* If you use this implementation, please reference the above paper.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
#include <cstdlib>
#include <memory.h>
#include "buffer_2d.h"
// Allocates 2D memory blocks.
void*
malloc_2d(const size_t size1, const size_t size2, const size_t data_size)
{
const size_t pointers_size = size1 * sizeof( void* );
const size_t items_size = size1 * size2 * data_size;
void *buffer = malloc( pointers_size + items_size );
void **pointers = static_cast<void**>( buffer );
char *items = &(static_cast<char*>( buffer ))[pointers_size];
for (size_t i=0, j=0, j_inc=size2*data_size; i!=size1; ++i, j+=j_inc)
{
pointers[i] = &items[j];
}
return buffer;
}
// Sets 2D buffers to a specified character.
void*
memset_2d(void *dest, const int c, const size_t size1, const size_t size2, const size_t data_size)
{
if (dest)
{
const size_t pointers_size = size1 * sizeof( void* );
const size_t items_size = size1 * size2 * data_size;
char *buffer = static_cast<char*>( dest );
memset( &buffer[pointers_size], c, items_size );
}
return dest;
}
// Reallocate 2D memory blocks.
void*
realloc_2d(void *memblock, const size_t size1, const size_t size2, const size_t data_size)
{
const size_t pointers_size = size1 * sizeof( void* );
const size_t items_size = size1 * size2 * data_size;
memblock = realloc( memblock, pointers_size + items_size );
void **pointers = static_cast<void**>( memblock );
char *items = &(static_cast<char*>( memblock ))[pointers_size];
for (size_t i=0, j=0, j_inc=size2*data_size; i!=size1; ++i, j+=j_inc)
{
pointers[i] = &items[j];
}
return memblock;
}
================================================
FILE: thirdparty/CannyLines/src/buffer_2d.h
================================================
/*
* Copyright (C) 2008 Leandro A. F. Fernandes and Manuel M. Oliveira
*
* author : Fernandes, Leandro A. F.
* e-mail : laffernandes@gmail.com
* home page: http://www.inf.ufrgs.br/~laffernandes
*
*
* The complete description of the implemented techinique can be found at
*
* Leandro A. F. Fernandes, Manuel M. Oliveira
* Real-time line detection through an improved Hough transform voting scheme
* Pattern Recognition (PR), Elsevier, 41:1, 2008, 299-314.
* DOI: http://dx.doi.org/10.1016/j.patcog.2007.04.003
* Project Page: http://www.inf.ufrgs.br/~laffernandes/kht.html
*
* If you use this implementation, please reference the above paper.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
#ifndef _BUFFER_2D_
#define _BUFFER_2D_
#include <cstdlib>
// Allocates 2D memory blocks.
void* malloc_2d(const size_t size1, const size_t size2, const size_t data_size);
// Sets 2D buffers to a specified character.
void* memset_2d(void *dest, const int c, const size_t size1, const size_t size2, const size_t data_size);
// Reallocate 2D memory blocks.
void* realloc_2d(void *memblock, const size_t size1, const size_t size2, const size_t data_size);
#endif // !_BUFFER_2D_
================================================
FILE: thirdparty/CannyLines/src/main.cpp
================================================
#include <stdio.h>
#include <fstream>
#include "cv.h"
#include "highgui.h"
#include "CannyLine.h"
using namespace cv;
using namespace std;
void main()
{
string fileCur;
cv::Mat img = imread( fileCur, 0 );
CannyLine detector;
std::vector<std::vector<float> > lines;
detector.cannyLine( img, lines );
// show
cv::Mat imgShow( img.rows, img.cols, CV_8UC3, cv::Scalar( 255, 255, 255 ) );
for ( int m=0; m<lines.size(); ++m )
{
cv::line( imgShow, cv::Point( lines[m][0], lines[m][1] ), cv::Point( lines[m][2], lines[m][3] ), cv::Scalar(0,0,0), 1, CV_AA );
}
imshow("",imgShow);
cv::waitKey(0);
}
================================================
FILE: thirdparty/CannyLines/src/types.h
================================================
/*
* Copyright (C) 2008 Leandro A. F. Fernandes and Manuel M. Oliveira
*
* author : Fernandes, Leandro A. F.
* e-mail : laffernandes@gmail.com
* home page: http://www.inf.ufrgs.br/~laffernandes
*
*
* The complete description of the implemented techinique can be found at
*
* Leandro A. F. Fernandes, Manuel M. Oliveira
* Real-time line detection through an improved Hough transform voting scheme
* Pattern Recognition (PR), Elsevier, 41:1, 2008, 299-314.
* DOI: http://dx.doi.org/10.1016/j.patcog.2007.04.003
* Project Page: http://www.inf.ufrgs.br/~laffernandes/kht.html
*
* If you use this implementation, please reference the above paper.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
#ifndef _TYPES_
#define _TYPES_
#include <cmath>
#include <cstdlib>
#include <memory.h>
#include "buffer_2d.h"
// A simple list implementation (use it only with aggregate types).
template<typename item_type, size_t capacity_inc>
class list
{
private:
// Specifies the size of allocated storage for the container.
size_t m_capacity;
// Specifies the list of items.
item_type *m_items;
// Counts the number of elements.
size_t m_size;
public:
// Erases the elements of the list.
inline
void clear()
{
m_size = 0;
}
// Tests if the list is empty.
inline
bool empty() const
{
return (m_size == 0);
}
// Returns a pointer to the list of items.
inline
item_type* items()
{
return m_items;
}
// Returns a pointer to the list of items.
inline
const item_type* items() const
{
return m_items;
}
// Class constructor.
list() :
m_capacity(0),
m_items(0),
m_size(0)
{
}
// Class destructor.
~list()
{
free( m_items );
};
// Deletes the element at the end of the list.
inline
void pop_back()
{
m_size--;
}
// Adds a new last element and returns a reference to it.
inline
item_type& push_back()
{
if (m_capacity == m_size)
{
m_items = (item_type*)realloc( m_items, (m_capacity += capacity_inc) * sizeof( item_type ) );
memset( &m_items[m_size], 0, capacity_inc * sizeof( item_type ) );
}
return m_items[m_size++];
}
// Specifies a new capacity for a list.
inline
void reserve(const size_t capacity)
{
if (m_capacity < capacity)
{
size_t first = m_capacity;
m_items = (item_type*)realloc( m_items, (m_capacity = capacity) * sizeof( item_type ) );
memset( &m_items[first], 0, (capacity - first) * sizeof( item_type ) );
}
if (m_size > capacity)
{
m_size = capacity;
}
}
// Specifies a new size for a list.
inline
void resize(const size_t size)
{
if (m_capacity < size)
{
size_t first = m_capacity;
m_items = (item_type*)realloc( m_items, (m_capacity = size) * sizeof( item_type ) );
memset( &m_items[first], 0, (size - first) * sizeof( item_type ) );
}
m_size = size;
}
// Returns the number of elements.
inline
size_t size() const
{
return m_size;
}
// Returns a reference to the list element at a specified position.
inline
item_type& operator [] (const size_t index)
{
return m_items[index];
}
// Returns a reference to the list element at a specified position.
inline
const item_type& operator [] (const size_t index) const
{
return m_items[index];
}
};
// A feature pixel.
struct pixel_t
{
float x;
float y;
};
// A cluster of approximately collinear feature pixels.
struct cluster_t
{
const pixel_t *pixels;
size_t size;
};
// Specifies a list of approximately collinear feature pixels.
typedef list<cluster_t,1000> clusters_list_t;
// Specifies a string of adjacent feature pixels.
typedef list<pixel_t,1000> string_t;
// Specifies a list of string of feature pixels.
typedef list<string_t,1000> strings_list_t;
typedef list<size_t,1000> size_list_t;
struct line_t
{
int ID;
string_t points;
float xs,ys;
float xe,ye;
int dir; //0 for k<1, 1 for k >=1
float k,b;
float dev;
};
// Specifies a list of line
typedef list<line_t,10000> lines_list_t;
#endif // !_TYPES_
================================================
FILE: thirdparty/LSD/COPYING
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
================================================
FILE: thirdparty/LSD/Makefile
================================================
# -----------------------------------------------------------------------------
#
# LSD - Line Segment Detector on digital images
#
# Copyright 2007-2010 rafael grompone von gioi (grompone@gmail.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------------
all: lsd lsd_call_example
lsd: lsd.c lsd.h lsd_cmd.c
cc -O3 -lm -o lsd lsd_cmd.c lsd.c
lsd_call_example: lsd.c lsd.h lsd_call_example.c
cc -lm -o lsd_call_example lsd_call_example.c lsd.c
strict: lsd.c lsd.h lsd_cmd.c
cc -fPIC -ansi -Wall -Wextra -Werror -lm -o lsd_strict lsd.c lsd_cmd.c
doc: lsd.c lsd.h doxygen.config
doxygen doxygen.config
clean:
rm -f lsd lsd_call_example lsd_strict
cleandoc:
rm -rf doc
# -----------------------------------------------------------------------------
================================================
FILE: thirdparty/LSD/README.md
================================================
LSD - Line Segment Detector
===========================
Version 1.5 - December 3, 2010
by Rafael Grompone von Gioi <grompone@gmail.com>
Introduction
------------
LSD is an implementation of the Line Segment Detector on digital
images described in the paper:
"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.
and in more details in the CMLA Technical Report:
"LSD: A Line Segment Detector, Technical Report",
by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel,
Gregory Randall, CMLA, ENS Cachan, 2010.
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:
http://www.ipol.im/pub/algo/gjmr_line_segment_detector
Files
-----
README.txt - This file.
COPYING - GNU AFFERO GENERAL PUBLIC LICENSE Version 3.
Makefile - Compilation instructions for 'make'.
lsd.c - LSD module ANSI C code.
lsd.h - LSD module ANSI C header.
lsd_cmd.c - LSD command line interface, ANSI C code.
lsd_call_example.c - Minimal example of calling LSD from a C language program.
chairs.pgm - Test image in PGM format.
chairs.lsd.txt - Expected result for 'chairs.pgm' image as an ASCII file.
chairs.lsd.eps - Expected result for 'chairs.pgm' image as an EPS file.
doc - Html code documentation.
doxygen.config - doxygen configuration file for documentation generation.
Compiling
---------
LSD is an ANSI C Language program and can be used as a module
to be called from a C language program or as an independent
command.
In the distribution is included a Makefile file with instructions
to build the command lines program 'lsd', as well as minimal
example program on how to call LSD from C code.
To build both programs, a C compiler (called with 'cc') must be
installed on your system, as well as the program 'make'.
LSD only uses the standard C library so it should compile
in any ANSI C Language environment. In particular, it should
compile in an Unix like system.
The compiling instruction is just
make
from the directory where the source codes and the Makefile are located.
To verify a correct compilation you can apply LSD to the test
image 'chairs.pgm' and compare the result to the provided ones.
An explicit example of how to compile a program using LSD as a module
is provided. The compilation line for 'lsd_call_example.c' is just
cc -lm -o lsd_call_example lsd_call_example.c lsd.c
Running LSD Command
-------------------
The simplest LSD command execution is just
lsd
or
./lsd
if the command is not in the path. That should print LSD version
and the command line interface, including the available options.
The only input image format handled by LSD is PGM, in its two
versions, ASCII and Binary. A useful execution would be:
lsd chairs.pgm chairs.result.txt
That should give the result as an ASCII file 'chairs.result.txt'
with the coordinates each line segment detected as a line in
the file like the following:
159.232890 134.369601 160.325338 105.613616 2.735466
which means that a line segment starting at point (159.232890,134.369601)
and ending at point (160.325338 105.613616) and of width 2.735466
was detected. The unit is the pixel and the origin of coordinates
is the center of pixel (0,0).
For easier visualization of the result, the LSD command can also
give the output in EPS or SVG file formats. For example,
lsd -P chairs.result.eps chairs.pgm chairs.result.txt
will, in addition to the ASCII output file, produce the EPS file
'chairs.result.eps'.
To see the full options, execute LSD command without parameters,
as in './lsd'.
Optional arguments should always appear before the needed arguments
input and output. For example, the following line is wrong:
lsd chairs.pgm -s 0.5 chairs.result.txt -> WRONG!!
and should be
lsd -s 0.5 chairs.pgm chairs.result.txt
If the name of an input file is just - (one dash), then that
file will be read from the standard input. Analogously, if the
name of an output file is just - (one dash), then that file
will be written to the standard output. For example,
lsd - -
will work as a filter, taking the input from standard input and
giving the output to standard output.
Code Documentation
------------------
There is a HTML documentation of the code on the directory 'doc'. The
entry point is the file 'doc/index.html' that should be opened with a
web browser. The documentation was automatically generated from the
source code files using the Doxygen documentation system, see
http://www.stack.nl/~dimitri/doxygen/.
Copyright and License
---------------------
Copyright 2007-2010 rafael grompone von gioi (grompone@gmail.com)
LSD is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
LSD is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Thanks
------
I would be grateful to receive any comment, especially about errors,
bugs, or strange results.
================================================
FILE: thirdparty/LSD/chairs.lsd.eps
================================================
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 512 512
%%Creator: LSD, Line Segment Detector
%%Title: (chairs.lsd.eps)
%%EndComments
newpath 159.232890 377.630399 moveto 160.325338 406.386384 lineto 1.500000 setlinewidth stroke
newpath 66.105373 436.412213 moveto 63.972852 463.940680 lineto 1.500000 setlinewidth stroke
newpath 68.757033 345.302576 moveto 63.229592 403.884869 lineto 1.500000 setlinewidth stroke
newpath 214.249352 288.880786 moveto 216.035182 327.663671 lineto 1.500000 setlinewidth stroke
newpath 146.507379 405.095649 moveto 144.805709 426.409387 lineto 1.500000 setlinewidth stroke
newpath 16.923435 91.703293 moveto 101.917593 79.163701 lineto 1.500000 setlinewidth stroke
newpath 185.613699 173.799808 moveto 184.450026 212.664673 lineto 1.500000 setlinewidth stroke
newpath 185.553747 95.117638 moveto 184.760563 102.794000 lineto 1.500000 setlinewidth stroke
newpath 104.420784 82.933415 moveto 14.001093 96.356269 lineto 1.500000 setlinewidth stroke
newpath 236.956356 61.906785 moveto 338.133131 46.428147 lineto 1.500000 setlinewidth stroke
newpath 440.312266 68.681418 moveto 461.485782 171.197215 lineto 1.500000 setlinewidth stroke
newpath 390.175127 68.752265 moveto 386.423926 82.501938 lineto 1.500000 setlinewidth stroke
newpath 254.349382 367.377162 moveto 309.534989 361.672777 lineto 1.500000 setlinewidth stroke
newpath 395.623625 357.611991 moveto 469.473514 349.807144 lineto 1.500000 setlinewidth stroke
newpath 82.100903 313.871348 moveto 82.505242 338.885018 lineto 1.500000 setlinewidth stroke
newpath 308.102489 364.883084 moveto 265.621383 368.836134 lineto 1.500000 setlinewidth stroke
newpath 318.193027 403.361748 moveto 377.018594 397.930169 lineto 1.500000 setlinewidth stroke
newpath 177.234686 340.115222 moveto 178.866472 400.138825 lineto 1.500000 setlinewidth stroke
newpath 83.483276 302.582551 moveto 83.002669 312.678681 lineto 1.500000 setlinewidth stroke
newpath 470.753079 352.524955 moveto 426.714048 357.429896 lineto 1.500000 setlinewidth stroke
newpath 347.054436 46.040231 moveto 390.859403 69.519765 lineto 1.500000 setlinewidth stroke
newpath 130.050173 88.785323 moveto 145.520607 96.582136 lineto 1.500000 setlinewidth stroke
newpath 359.127942 271.253044 moveto 363.431147 306.641769 lineto 1.500000 setlinewidth stroke
newpath 338.937027 50.196876 moveto 329.742966 53.614810 lineto 1.500000 setlinewidth stroke
newpath 55.447508 224.112945 moveto 90.891886 217.896771 lineto 1.500000 setlinewidth stroke
newpath 220.576199 73.846485 moveto 226.204808 64.213795 lineto 1.500000 setlinewidth stroke
newpath 459.356888 398.687832 moveto 509.492223 393.836399 lineto 1.500000 setlinewidth stroke
newpath 472.109699 35.342094 moveto 483.528037 22.997805 lineto 1.500000 setlinewidth stroke
newpath 28.400012 378.274511 moveto 0.578315 382.302547 lineto 1.500000 setlinewidth stroke
newpath 129.429473 406.943925 moveto 65.661795 408.853635 lineto 1.500000 setlinewidth stroke
newpath 65.393503 409.002684 moveto 62.249854 434.078699 lineto 1.500000 setlinewidth stroke
newpath 209.403932 404.204705 moveto 252.014573 400.465538 lineto 1.500000 setlinewidth stroke
newpath 254.544229 210.539515 moveto 349.452808 200.890307 lineto 1.500000 setlinewidth stroke
newpath 494.491690 20.821260 moveto 509.489418 18.307701 lineto 1.500000 setlinewidth stroke
newpath 418.147191 445.425796 moveto 463.270471 442.096800 lineto 1.500000 setlinewidth stroke
newpath 114.550553 84.813610 moveto 109.152211 81.770175 lineto 1.500000 setlinewidth stroke
newpath 363.760038 171.885065 moveto 368.999069 152.523278 lineto 1.500000 setlinewidth stroke
newpath 112.015348 78.588127 moveto 129.096273 86.944720 lineto 1.500000 setlinewidth stroke
newpath 450.611143 459.939084 moveto 489.517674 457.039207 lineto 1.500000 setlinewidth stroke
newpath 114.103020 455.036541 moveto 113.370535 467.639271 lineto 1.500000 setlinewidth stroke
newpath 166.443487 369.132111 moveto 177.706109 333.278739 lineto 1.500000 setlinewidth stroke
newpath 0.568442 379.782537 moveto 29.760859 374.961420 lineto 1.500000 setlinewidth stroke
newpath 0.822115 439.176661 moveto 33.431051 435.034186 lineto 1.500000 setlinewidth stroke
newpath 335.206776 52.203363 moveto 233.710408 66.732278 lineto 1.500000 setlinewidth stroke
newpath 506.939321 397.705002 moveto 430.625997 401.395607 lineto 1.500000 setlinewidth stroke
newpath 91.889757 406.545068 moveto 132.021450 403.062750 lineto 1.500000 setlinewidth stroke
newpath 490.624116 25.330339 moveto 481.689616 31.633947 lineto 1.500000 setlinewidth stroke
newpath 148.343515 467.931628 moveto 171.978709 464.613785 lineto 1.500000 setlinewidth stroke
newpath 167.308281 467.628627 moveto 167.161805 485.127401 lineto 1.500000 setlinewidth stroke
newpath 370.836320 64.750257 moveto 345.209318 52.225532 lineto 1.500000 setlinewidth stroke
newpath 391.906831 427.947381 moveto 432.009557 423.987798 lineto 1.500000 setlinewidth stroke
newpath 178.416428 333.174306 moveto 193.827134 289.929762 lineto 1.500000 setlinewidth stroke
newpath 133.271812 377.250054 moveto 162.050609 372.421696 lineto 1.500000 setlinewidth stroke
newpath 90.277768 284.200800 moveto 83.969749 301.679861 lineto 1.500000 setlinewidth stroke
newpath 184.930491 103.852722 moveto 185.794276 173.857488 lineto 1.500000 setlinewidth stroke
newpath 459.882600 167.961912 moveto 464.790514 177.409137 lineto 1.500000 setlinewidth stroke
newpath 121.173667 440.346765 moveto 136.308673 402.901333 lineto 1.500000 setlinewidth stroke
newpath 142.958322 100.873992 moveto 126.173037 90.489190 lineto 1.500000 setlinewidth stroke
newpath 373.211533 401.131622 moveto 328.114968 405.008304 lineto 1.500000 setlinewidth stroke
newpath 26.897965 492.627292 moveto 25.020860 511.439445 lineto 1.500000 setlinewidth stroke
newpath 428.479914 43.042322 moveto 438.882696 65.354530 lineto 1.500000 setlinewidth stroke
newpath 359.498486 462.415370 moveto 409.487962 459.720172 lineto 1.500000 setlinewidth stroke
newpath 200.759417 98.701775 moveto 191.059982 91.175324 lineto 1.500000 setlinewidth stroke
newpath 160.717716 434.737817 moveto 220.711892 432.105099 lineto 1.500000 setlinewidth stroke
newpath 224.660034 248.669855 moveto 223.280681 255.158097 lineto 1.500000 setlinewidth stroke
newpath 485.638645 460.647267 moveto 440.636706 461.823046 lineto 1.500000 setlinewidth stroke
newpath 78.123187 435.098969 moveto 119.520625 432.216279 lineto 1.500000 setlinewidth stroke
newpath 303.110387 264.990330 moveto 245.341121 271.258830 lineto 1.500000 setlinewidth stroke
newpath 44.214757 461.751230 moveto 38.283969 478.929883 lineto 1.500000 setlinewidth stroke
newpath 136.358108 345.985404 moveto 133.914970 364.904170 lineto 1.500000 setlinewidth stroke
newpath 290.612784 464.985153 moveto 325.781195 461.913101 lineto 1.500000 setlinewidth stroke
newpath 430.928389 73.610954 moveto 443.824367 88.428422 lineto 1.500000 setlinewidth stroke
newpath 250.702019 403.335905 moveto 230.666339 405.506570 lineto 1.500000 setlinewidth stroke
newpath 401.971668 322.776260 moveto 432.172868 320.692792 lineto 1.500000 setlinewidth stroke
newpath 284.417212 430.488894 moveto 322.134685 426.113665 lineto 1.500000 setlinewidth stroke
newpath 509.887214 22.546250 moveto 492.055317 26.318579 lineto 1.500000 setlinewidth stroke
newpath 35.522946 456.125588 moveto 40.682107 454.014564 lineto 1.500000 setlinewidth stroke
newpath 134.291376 399.817391 moveto 142.123736 379.734505 lineto 1.500000 setlinewidth stroke
newpath 383.492191 76.060838 moveto 375.382597 66.582396 lineto 1.500000 setlinewidth stroke
newpath 108.153220 365.300245 moveto 110.409196 348.845413 lineto 1.500000 setlinewidth stroke
newpath 434.003471 321.297586 moveto 433.045129 341.371187 lineto 1.500000 setlinewidth stroke
newpath 38.179708 290.715251 moveto 0.309891 294.225283 lineto 1.500000 setlinewidth stroke
newpath 426.878110 427.671871 moveto 386.805716 430.330850 lineto 1.500000 setlinewidth stroke
newpath 5.548653 290.405969 moveto 38.141785 287.838046 lineto 1.500000 setlinewidth stroke
newpath 228.231497 251.607507 moveto 230.003626 241.268495 lineto 1.500000 setlinewidth stroke
newpath 125.598417 90.330665 moveto 115.603827 89.038809 lineto 1.500000 setlinewidth stroke
newpath 0.618577 412.593471 moveto 24.644698 407.698868 lineto 1.500000 setlinewidth stroke
newpath 98.357075 71.679418 moveto 32.948807 81.444875 lineto 1.500000 setlinewidth stroke
newpath 400.760375 343.945157 moveto 401.833753 322.749515 lineto 1.500000 setlinewidth stroke
newpath 114.391901 436.067978 moveto 68.111960 436.897458 lineto 1.500000 setlinewidth stroke
newpath 131.537589 425.110571 moveto 129.878963 463.896551 lineto 1.500000 setlinewidth stroke
newpath 455.572123 489.617824 moveto 474.507270 487.643681 lineto 1.500000 setlinewidth stroke
newpath 319.431011 429.545754 moveto 284.362402 432.474131 lineto 1.500000 setlinewidth stroke
newpath 61.838651 377.730091 moveto 53.981571 375.012465 lineto 1.500000 setlinewidth stroke
newpath 106.794317 453.609591 moveto 115.847654 450.857427 lineto 1.500000 setlinewidth stroke
newpath 198.098624 478.654066 moveto 217.026545 476.394406 lineto 1.500000 setlinewidth stroke
newpath 274.419642 453.085261 moveto 254.365818 455.030329 lineto 1.500000 setlinewidth stroke
newpath 110.830519 347.323695 moveto 136.968982 344.880446 lineto 1.500000 setlinewidth stroke
newpath 156.904122 452.971452 moveto 194.558357 449.806331 lineto 1.500000 setlinewidth stroke
newpath 203.411749 392.793786 moveto 204.813000 380.035815 lineto 1.500000 setlinewidth stroke
newpath 277.089886 335.050031 moveto 275.815996 352.638833 lineto 1.500000 setlinewidth stroke
newpath 405.685811 462.708039 moveto 361.855954 464.707487 lineto 1.500000 setlinewidth stroke
newpath 86.904705 467.833598 moveto 103.180657 465.515839 lineto 1.500000 setlinewidth stroke
newpath 224.523552 271.186505 moveto 227.747717 252.346516 lineto 1.500000 setlinewidth stroke
newpath 453.820099 386.398501 moveto 454.326662 371.415627 lineto 1.500000 setlinewidth stroke
newpath 88.113984 383.638165 moveto 105.634220 382.823208 lineto 1.500000 setlinewidth stroke
newpath 225.624005 392.563789 moveto 211.857320 392.787623 lineto 1.500000 setlinewidth stroke
newpath 62.346586 404.899777 moveto 49.555360 400.810796 lineto 1.500000 setlinewidth stroke
newpath 460.641118 445.570022 moveto 408.119470 447.472307 lineto 1.500000 setlinewidth stroke
newpath 32.114157 81.255887 moveto 4.020168 87.197125 lineto 1.500000 setlinewidth stroke
newpath 350.302735 36.609514 moveto 256.669285 49.928845 lineto 1.500000 setlinewidth stroke
newpath 421.966069 483.511538 moveto 461.946711 481.807376 lineto 1.500000 setlinewidth stroke
newpath 129.453086 478.275785 moveto 149.464944 475.874606 lineto 1.500000 setlinewidth stroke
newpath 151.960634 280.982370 moveto 112.851686 284.888582 lineto 1.500000 setlinewidth stroke
newpath 129.400486 203.257632 moveto 109.353394 203.529021 lineto 1.500000 setlinewidth stroke
newpath 455.578760 370.633154 moveto 479.469681 369.144017 lineto 1.500000 setlinewidth stroke
newpath 46.205567 339.143549 moveto 64.055075 300.555218 lineto 1.500000 setlinewidth stroke
newpath 190.646608 453.308588 moveto 146.861333 454.692642 lineto 1.500000 setlinewidth stroke
newpath 204.454163 378.572164 moveto 227.005579 376.687350 lineto 1.500000 setlinewidth stroke
newpath 461.866721 484.786020 moveto 423.139823 485.731889 lineto 1.500000 setlinewidth stroke
newpath 453.212818 471.741539 moveto 494.476852 469.499876 lineto 1.500000 setlinewidth stroke
newpath 477.426352 319.954966 moveto 492.912716 256.323335 lineto 1.500000 setlinewidth stroke
newpath 325.794712 391.469623 moveto 326.718149 377.614546 lineto 1.500000 setlinewidth stroke
newpath 479.313251 386.457094 moveto 455.497646 387.716265 lineto 1.500000 setlinewidth stroke
newpath 227.407290 377.579614 moveto 226.462509 392.519869 lineto 1.500000 setlinewidth stroke
newpath 350.883550 375.097838 moveto 350.472920 390.086589 lineto 1.500000 setlinewidth stroke
newpath 18.257506 412.516374 moveto 0.560668 414.570856 lineto 1.500000 setlinewidth stroke
newpath 206.372770 47.223601 moveto 200.829459 71.421837 lineto 1.500000 setlinewidth stroke
newpath 335.694580 449.573404 moveto 369.606124 446.194873 lineto 1.500000 setlinewidth stroke
newpath 29.371380 438.834823 moveto 8.180792 440.744195 lineto 1.500000 setlinewidth stroke
newpath 45.217461 406.170714 moveto 56.739988 383.183907 lineto 1.500000 setlinewidth stroke
newpath 253.340273 452.967003 moveto 278.389335 449.579830 lineto 1.500000 setlinewidth stroke
newpath 431.848879 342.161551 moveto 401.733189 343.858942 lineto 1.500000 setlinewidth stroke
newpath 43.425276 181.143174 moveto 35.516449 213.543380 lineto 1.500000 setlinewidth stroke
newpath 108.044574 382.381890 moveto 105.311392 397.339280 lineto 1.500000 setlinewidth stroke
newpath 249.350404 336.109851 moveto 277.190608 333.527333 lineto 1.500000 setlinewidth stroke
newpath 328.075196 375.760737 moveto 350.730312 373.923873 lineto 1.500000 setlinewidth stroke
newpath 18.525858 511.573816 moveto 24.735488 499.053794 lineto 1.500000 setlinewidth stroke
newpath 246.244878 356.614163 moveto 248.802003 336.621469 lineto 1.500000 setlinewidth stroke
newpath 427.869552 234.532747 moveto 410.975793 227.971751 lineto 1.500000 setlinewidth stroke
newpath 398.134242 497.837133 moveto 429.433750 496.473438 lineto 1.500000 setlinewidth stroke
newpath 246.683107 56.928003 moveto 219.201307 64.494107 lineto 1.500000 setlinewidth stroke
newpath 176.089103 89.826466 moveto 169.333992 107.609423 lineto 1.500000 setlinewidth stroke
newpath 348.324771 295.823580 moveto 350.485679 306.403456 lineto 1.500000 setlinewidth stroke
newpath 452.900719 249.213735 moveto 394.006643 255.325359 lineto 1.500000 setlinewidth stroke
newpath 365.238056 249.006028 moveto 372.084940 203.906873 lineto 1.500000 setlinewidth stroke
newpath 39.495839 373.091246 moveto 46.797720 362.571360 lineto 1.500000 setlinewidth stroke
newpath 49.039987 437.651941 moveto 61.520660 408.722134 lineto 1.500000 setlinewidth stroke
newpath 121.888190 73.834984 moveto 114.379933 71.360035 lineto 1.500000 setlinewidth stroke
newpath 172.835900 108.781820 moveto 177.568496 94.098522 lineto 1.500000 setlinewidth stroke
newpath 509.618479 8.570647 moveto 475.552093 17.341835 lineto 1.500000 setlinewidth stroke
newpath 84.327486 397.872805 moveto 87.147464 384.188746 lineto 1.500000 setlinewidth stroke
newpath 169.405751 487.301562 moveto 201.911433 486.222771 lineto 1.500000 setlinewidth stroke
newpath 344.833624 305.215772 moveto 342.819955 287.659989 lineto 1.500000 setlinewidth stroke
newpath 442.766424 61.625929 moveto 450.516605 72.700855 lineto 1.500000 setlinewidth stroke
newpath 355.565684 196.353809 moveto 364.080400 172.519754 lineto 1.500000 setlinewidth stroke
newpath 351.934340 486.244031 moveto 389.410827 485.305310 lineto 1.500000 setlinewidth stroke
newpath 496.897016 471.641476 moveto 479.413083 473.085954 lineto 1.500000 setlinewidth stroke
newpath 0.633644 457.020121 moveto 34.411079 456.567512 lineto 1.500000 setlinewidth stroke
newpath 2.996378 184.109044 moveto 42.069625 179.162297 lineto 1.500000 setlinewidth stroke
newpath 169.371594 88.864141 moveto 156.496274 92.902703 lineto 1.500000 setlinewidth stroke
newpath 310.586433 245.220095 moveto 294.455011 238.677717 lineto 1.500000 setlinewidth stroke
newpath 349.301186 390.404290 moveto 326.741529 392.119755 lineto 1.500000 setlinewidth stroke
newpath 133.136094 363.997108 moveto 109.017347 366.188348 lineto 1.500000 setlinewidth stroke
newpath 254.109359 50.188348 moveto 222.751823 57.207974 lineto 1.500000 setlinewidth stroke
newpath 321.406759 320.364156 moveto 333.316419 281.433559 lineto 1.500000 setlinewidth stroke
newpath 284.366747 260.829888 moveto 256.873049 261.246134 lineto 1.500000 setlinewidth stroke
newpath 106.764309 194.292743 moveto 174.234571 185.319146 lineto 1.500000 setlinewidth stroke
newpath 339.395916 288.871768 moveto 342.719927 310.380776 lineto 1.500000 setlinewidth stroke
newpath 41.911574 451.954699 moveto 48.327150 437.716084 lineto 1.500000 setlinewidth stroke
newpath 283.365831 257.604286 moveto 282.075951 242.607716 lineto 1.500000 setlinewidth stroke
newpath 274.352037 353.582898 moveto 246.630292 355.762194 lineto 1.500000 setlinewidth stroke
newpath 362.659723 306.989077 moveto 366.774935 320.156274 lineto 1.500000 setlinewidth stroke
newpath 428.134504 499.101032 moveto 399.382780 500.310018 lineto 1.500000 setlinewidth stroke
newpath 189.109111 17.682152 moveto 178.306095 15.484706 lineto 1.500000 setlinewidth stroke
newpath 104.359670 397.336686 moveto 84.283501 398.404159 lineto 1.500000 setlinewidth stroke
newpath 505.126517 247.670462 moveto 505.894641 213.852732 lineto 1.500000 setlinewidth stroke
newpath 154.999632 93.814789 moveto 129.233747 80.271917 lineto 1.500000 setlinewidth stroke
newpath 363.171642 450.185499 moveto 315.642871 451.877109 lineto 1.500000 setlinewidth stroke
newpath 369.258623 160.451274 moveto 403.256407 156.168030 lineto 1.500000 setlinewidth stroke
newpath 453.182331 496.471301 moveto 486.924373 495.034438 lineto 1.500000 setlinewidth stroke
newpath 260.627491 368.941456 moveto 221.885083 370.393940 lineto 1.500000 setlinewidth stroke
newpath 371.707029 141.696856 moveto 388.261380 86.043747 lineto 1.500000 setlinewidth stroke
newpath 91.135701 220.378308 moveto 105.541817 191.333741 lineto 1.500000 setlinewidth stroke
newpath 330.678520 493.081171 moveto 351.929315 490.587945 lineto 1.500000 setlinewidth stroke
newpath 480.302377 370.114812 moveto 480.205104 385.130378 lineto 1.500000 setlinewidth stroke
newpath 14.421376 488.185990 moveto 0.559439 489.331938 lineto 1.500000 setlinewidth stroke
newpath 111.601542 175.545259 moveto 123.994127 146.749033 lineto 1.500000 setlinewidth stroke
newpath 294.514109 500.091709 moveto 320.707543 497.096960 lineto 1.500000 setlinewidth stroke
newpath 355.890985 40.873036 moveto 348.942537 37.191140 lineto 1.500000 setlinewidth stroke
newpath 353.104281 252.621493 moveto 356.705833 231.346363 lineto 1.500000 setlinewidth stroke
newpath 28.151838 274.968945 moveto 9.105274 271.693390 lineto 1.500000 setlinewidth stroke
newpath 229.410862 494.092763 moveto 244.415633 491.621735 lineto 1.500000 setlinewidth stroke
newpath 0.529073 229.266887 moveto 32.083426 225.739469 lineto 1.500000 setlinewidth stroke
newpath 31.876890 17.061774 moveto 5.878110 74.675141 lineto 1.500000 setlinewidth stroke
newpath 53.538549 375.706604 moveto 47.685556 372.085250 lineto 1.500000 setlinewidth stroke
newpath 194.205052 80.191093 moveto 199.506846 93.823724 lineto 1.500000 setlinewidth stroke
newpath 379.315714 172.742470 moveto 367.835549 166.948520 lineto 1.500000 setlinewidth stroke
newpath 476.264587 19.358183 moveto 448.383295 56.264460 lineto 1.500000 setlinewidth stroke
newpath 113.153085 281.713723 moveto 163.120503 277.570764 lineto 1.500000 setlinewidth stroke
newpath 350.648351 44.423420 moveto 333.126157 43.840231 lineto 1.500000 setlinewidth stroke
newpath 391.843385 491.144340 moveto 413.374216 488.193252 lineto 1.500000 setlinewidth stroke
newpath 186.933246 246.931189 moveto 196.824766 245.895315 lineto 1.500000 setlinewidth stroke
newpath 289.491922 487.200911 moveto 325.697471 485.161700 lineto 1.500000 setlinewidth stroke
newpath 35.637980 207.754140 moveto 0.366122 211.299482 lineto 1.500000 setlinewidth stroke
newpath 109.015978 494.979121 moveto 115.568756 478.852147 lineto 1.500000 setlinewidth stroke
newpath 310.756543 477.364754 moveto 353.256773 474.868666 lineto 1.500000 setlinewidth stroke
newpath 0.498982 266.632486 moveto 48.182540 260.578183 lineto 1.500000 setlinewidth stroke
newpath 293.317471 237.385609 moveto 318.137550 235.272398 lineto 1.500000 setlinewidth stroke
newpath 404.168898 156.086759 moveto 447.071086 150.338482 lineto 1.500000 setlinewidth stroke
newpath 48.198019 256.210030 moveto 33.804745 249.839271 lineto 1.500000 setlinewidth stroke
newpath 350.687175 493.390433 moveto 323.165693 495.625973 lineto 1.500000 setlinewidth stroke
newpath 425.678600 357.660754 moveto 373.165640 359.849876 lineto 1.500000 setlinewidth stroke
newpath 457.111719 58.518955 moveto 451.342462 74.937878 lineto 1.500000 setlinewidth stroke
newpath 104.793695 190.870832 moveto 111.581106 175.684948 lineto 1.500000 setlinewidth stroke
newpath 231.812366 243.451438 moveto 250.703798 240.657867 lineto 1.500000 setlinewidth stroke
newpath 380.808612 476.262835 moveto 424.492554 472.903760 lineto 1.500000 setlinewidth stroke
newpath 174.720731 76.019737 moveto 170.056191 87.892622 lineto 1.500000 setlinewidth stroke
newpath 217.866308 66.243596 moveto 212.290311 77.220906 lineto 1.500000 setlinewidth stroke
newpath 230.388600 244.866362 moveto 233.206521 228.671681 lineto 1.500000 setlinewidth stroke
newpath 369.077836 203.834460 moveto 366.186141 225.031024 lineto 1.500000 setlinewidth stroke
newpath 464.384146 178.965963 moveto 498.542915 175.531353 lineto 1.500000 setlinewidth stroke
newpath 365.660804 502.993653 moveto 396.895522 502.302755 lineto 1.500000 setlinewidth stroke
newpath 410.680304 226.870013 moveto 490.797513 217.919117 lineto 1.500000 setlinewidth stroke
newpath 54.298768 391.031389 moveto 60.940456 385.504055 lineto 1.500000 setlinewidth stroke
newpath 76.806900 321.360859 moveto 78.900908 311.276555 lineto 1.500000 setlinewidth stroke
newpath 100.729051 468.628310 moveto 84.267199 470.335535 lineto 1.500000 setlinewidth stroke
newpath 405.286079 55.793187 moveto 394.168044 62.269726 lineto 1.500000 setlinewidth stroke
newpath 498.938042 216.253391 moveto 500.497341 242.706208 lineto 1.500000 setlinewidth stroke
newpath 246.936403 465.747215 moveto 225.647021 467.848150 lineto 1.500000 setlinewidth stroke
newpath 106.834003 254.695592 moveto 143.111350 251.232030 lineto 1.500000 setlinewidth stroke
newpath 145.702630 153.582554 moveto 134.573226 150.628247 lineto 1.500000 setlinewidth stroke
newpath 176.051898 179.895368 moveto 162.689009 169.115904 lineto 1.500000 setlinewidth stroke
newpath 214.112891 250.069835 moveto 212.495319 257.755555 lineto 1.500000 setlinewidth stroke
newpath 279.230909 230.119728 moveto 279.126898 257.624062 lineto 1.500000 setlinewidth stroke
newpath 31.413079 460.544347 moveto 16.180654 489.170670 lineto 1.500000 setlinewidth stroke
newpath 195.775680 246.157109 moveto 203.160950 245.669484 lineto 1.500000 setlinewidth stroke
newpath 214.361376 466.240747 moveto 249.506845 462.674240 lineto 1.500000 setlinewidth stroke
newpath 343.205783 206.095424 moveto 249.377596 213.906187 lineto 1.500000 setlinewidth stroke
newpath 143.365348 245.965333 moveto 132.813805 239.774832 lineto 1.500000 setlinewidth stroke
newpath 191.006334 44.356556 moveto 181.919833 75.138234 lineto 1.500000 setlinewidth stroke
newpath 201.961217 254.896000 moveto 185.667701 248.761583 lineto 1.500000 setlinewidth stroke
newpath 354.051180 256.267671 moveto 348.952971 271.649427 lineto 1.500000 setlinewidth stroke
newpath 408.444666 28.826396 moveto 407.066795 55.200325 lineto 1.500000 setlinewidth stroke
newpath 173.116727 162.697408 moveto 156.794171 160.832424 lineto 1.500000 setlinewidth stroke
newpath 165.628222 165.116892 moveto 183.315601 172.145345 lineto 1.500000 setlinewidth stroke
newpath 331.936485 44.273503 moveto 248.061683 57.214626 lineto 1.500000 setlinewidth stroke
newpath 388.125273 487.630085 moveto 375.594290 488.303804 lineto 1.500000 setlinewidth stroke
newpath 225.653682 486.290527 moveto 261.912485 485.398241 lineto 1.500000 setlinewidth stroke
newpath 492.988107 213.389217 moveto 481.094611 191.805016 lineto 1.500000 setlinewidth stroke
newpath 261.918245 479.246897 moveto 282.081662 476.902240 lineto 1.500000 setlinewidth stroke
newpath 203.089889 75.113545 moveto 227.114248 1.479557 lineto 1.500000 setlinewidth stroke
newpath 371.597054 216.889364 moveto 395.730266 229.930197 lineto 1.500000 setlinewidth stroke
newpath 401.294654 246.295891 moveto 399.821100 233.822300 lineto 1.500000 setlinewidth stroke
newpath 413.190261 231.239538 moveto 424.764846 236.815800 lineto 1.500000 setlinewidth stroke
newpath 108.388710 70.790650 moveto 99.294816 72.042523 lineto 1.500000 setlinewidth stroke
newpath 180.002423 58.955067 moveto 178.664124 27.655395 lineto 1.500000 setlinewidth stroke
newpath 32.901339 225.637393 moveto 54.857931 223.166669 lineto 1.500000 setlinewidth stroke
newpath 59.207593 340.687768 moveto 48.530556 337.511655 lineto 1.500000 setlinewidth stroke
newpath 124.548783 146.458058 moveto 139.285399 115.624451 lineto 1.500000 setlinewidth stroke
newpath 218.883099 11.217194 moveto 210.314543 37.926414 lineto 1.500000 setlinewidth stroke
newpath 36.822152 501.901100 moveto 64.448679 499.884248 lineto 1.500000 setlinewidth stroke
newpath 170.495828 270.135234 moveto 168.905550 250.063158 lineto 1.500000 setlinewidth stroke
newpath 443.645673 118.447665 moveto 428.962451 105.430374 lineto 1.500000 setlinewidth stroke
newpath 384.232856 59.106642 moveto 355.897007 41.718770 lineto 1.500000 setlinewidth stroke
newpath 149.159805 242.090842 moveto 164.295102 246.640781 lineto 1.500000 setlinewidth stroke
newpath 453.651684 142.364910 moveto 447.218659 129.338010 lineto 1.500000 setlinewidth stroke
newpath 63.964265 275.172559 moveto 61.931657 257.618440 lineto 1.500000 setlinewidth stroke
newpath 318.206578 235.095247 moveto 335.628712 233.930520 lineto 1.500000 setlinewidth stroke
newpath 267.343844 234.062660 moveto 276.637094 238.164065 lineto 1.500000 setlinewidth stroke
newpath 349.428930 498.177005 moveto 373.317285 495.843143 lineto 1.500000 setlinewidth stroke
newpath 441.516447 50.765331 moveto 433.884283 39.605719 lineto 1.500000 setlinewidth stroke
newpath 418.151797 502.435252 moveto 448.164219 501.676700 lineto 1.500000 setlinewidth stroke
newpath 463.127329 510.624434 moveto 440.621989 510.729376 lineto 1.500000 setlinewidth stroke
newpath 146.897513 479.205967 moveto 128.149236 480.481288 lineto 1.500000 setlinewidth stroke
newpath 118.941685 218.385850 moveto 143.325568 232.272826 lineto 1.500000 setlinewidth stroke
newpath 170.651802 2.552705 moveto 174.912861 77.806878 lineto 1.500000 setlinewidth stroke
newpath 140.671704 378.782745 moveto 84.362063 381.054305 lineto 1.500000 setlinewidth stroke
newpath 211.079091 484.980193 moveto 203.344104 488.158267 lineto 1.500000 setlinewidth stroke
newpath 209.392900 435.803317 moveto 163.142120 437.023790 lineto 1.500000 setlinewidth stroke
newpath 404.585196 2.459216 moveto 407.559390 28.655378 lineto 1.500000 setlinewidth stroke
newpath 62.368900 313.966723 moveto 64.628628 332.594232 lineto 1.500000 setlinewidth stroke
newpath 215.721371 77.420057 moveto 209.498834 87.699958 lineto 1.500000 setlinewidth stroke
newpath 410.644966 491.822301 moveto 378.153907 493.272595 lineto 1.500000 setlinewidth stroke
newpath 177.860484 278.822269 moveto 160.648302 275.019527 lineto 1.500000 setlinewidth stroke
newpath 190.420268 216.455630 moveto 254.452186 211.037122 lineto 1.500000 setlinewidth stroke
newpath 498.168996 16.524297 moveto 480.372643 21.768642 lineto 1.500000 setlinewidth stroke
newpath 266.930447 493.816611 moveto 298.170971 492.362967 lineto 1.500000 setlinewidth stroke
newpath 316.213806 351.760965 moveto 308.228518 363.942857 lineto 1.500000 setlinewidth stroke
newpath 12.817908 230.823020 moveto 40.005127 242.783970 lineto 1.500000 setlinewidth stroke
newpath 70.728690 490.169328 moveto 78.857900 471.153936 lineto 1.500000 setlinewidth stroke
newpath 97.442107 282.753687 moveto 100.924050 267.409212 lineto 1.500000 setlinewidth stroke
newpath 165.880858 483.435710 moveto 153.291019 481.528866 lineto 1.500000 setlinewidth stroke
newpath 63.205654 456.388068 moveto 49.193511 457.282822 lineto 1.500000 setlinewidth stroke
newpath 101.788326 267.290402 moveto 104.806543 255.233024 lineto 1.500000 setlinewidth stroke
newpath 315.637928 503.099476 moveto 344.400633 502.315791 lineto 1.500000 setlinewidth stroke
newpath 228.141109 405.670018 moveto 181.857650 407.037971 lineto 1.500000 setlinewidth stroke
newpath 291.477010 256.406827 moveto 290.666502 246.271718 lineto 1.500000 setlinewidth stroke
newpath 324.369299 487.544946 moveto 311.843805 488.436963 lineto 1.500000 setlinewidth stroke
newpath 485.630433 497.833440 moveto 455.618242 498.615714 lineto 1.500000 setlinewidth stroke
newpath 509.605902 280.612321 moveto 489.582630 278.315173 lineto 1.500000 setlinewidth stroke
newpath 177.374015 246.772856 moveto 188.566004 249.673280 lineto 1.500000 setlinewidth stroke
newpath 258.110982 429.580967 moveto 284.350636 430.101991 lineto 1.500000 setlinewidth stroke
newpath 325.652519 404.818225 moveto 303.098778 405.476237 lineto 1.500000 setlinewidth stroke
newpath 193.533012 58.870650 moveto 193.719718 76.381987 lineto 1.500000 setlinewidth stroke
newpath 436.025527 37.643935 moveto 436.918346 18.758858 lineto 1.500000 setlinewidth stroke
newpath 446.878057 504.291244 moveto 419.370360 504.493294 lineto 1.500000 setlinewidth stroke
newpath 245.190088 214.459073 moveto 268.851598 232.077911 lineto 1.500000 setlinewidth stroke
newpath 299.319077 402.058972 moveto 316.876687 402.566669 lineto 1.500000 setlinewidth stroke
newpath 369.046130 152.142723 moveto 372.053369 142.297663 lineto 1.500000 setlinewidth stroke
newpath 40.206787 248.000159 moveto 8.216876 239.767976 lineto 1.500000 setlinewidth stroke
newpath 132.355040 238.055417 moveto 117.756181 229.504693 lineto 1.500000 setlinewidth stroke
newpath 156.484047 164.078631 moveto 146.832148 156.154624 lineto 1.500000 setlinewidth stroke
newpath 157.316073 146.123449 moveto 174.606623 160.131970 lineto 1.500000 setlinewidth stroke
newpath 375.842982 253.017123 moveto 365.852756 250.478659 lineto 1.500000 setlinewidth stroke
newpath 396.604513 218.873415 moveto 396.450694 245.129837 lineto 1.500000 setlinewidth stroke
newpath 0.642291 486.567259 moveto 16.984944 485.097506 lineto 1.500000 setlinewidth stroke
newpath 64.372230 406.062504 moveto 90.642325 405.829659 lineto 1.500000 setlinewidth stroke
newpath 133.684762 401.087445 moveto 121.445276 430.466729 lineto 1.500000 setlinewidth stroke
newpath 395.400452 61.633352 moveto 383.353525 59.839930 lineto 1.500000 setlinewidth stroke
newpath 425.540448 397.294422 moveto 458.137088 398.564852 lineto 1.500000 setlinewidth stroke
newpath 41.899709 246.310493 moveto 55.815547 251.640875 lineto 1.500000 setlinewidth stroke
newpath 356.056772 231.336262 moveto 353.932967 207.664659 lineto 1.500000 setlinewidth stroke
newpath 504.293748 248.853002 moveto 501.685848 258.485359 lineto 1.500000 setlinewidth stroke
newpath 313.114186 448.499626 moveto 338.110365 448.808672 lineto 1.500000 setlinewidth stroke
newpath 143.382025 233.091529 moveto 157.477006 241.245170 lineto 1.500000 setlinewidth stroke
newpath 418.588857 19.149730 moveto 419.464219 13.688928 lineto 1.500000 setlinewidth stroke
newpath 478.861252 190.380571 moveto 420.265876 171.159207 lineto 1.500000 setlinewidth stroke
newpath 179.328823 403.391228 moveto 196.915613 404.451105 lineto 1.500000 setlinewidth stroke
newpath 291.552933 239.575830 moveto 306.783146 246.574879 lineto 1.500000 setlinewidth stroke
newpath 350.689819 477.683997 moveto 313.096307 479.545546 lineto 1.500000 setlinewidth stroke
newpath 220.852517 260.097877 moveto 222.797642 276.414026 lineto 1.500000 setlinewidth stroke
newpath 252.721943 236.866690 moveto 243.676709 229.451969 lineto 1.500000 setlinewidth stroke
newpath 496.897039 503.081761 moveto 468.153644 504.468655 lineto 1.500000 setlinewidth stroke
newpath 0.603673 493.558426 moveto 21.925325 492.122000 lineto 1.500000 setlinewidth stroke
newpath 160.488509 97.275855 moveto 173.026956 92.374203 lineto 1.500000 setlinewidth stroke
newpath 191.736754 256.336666 moveto 186.962945 273.552777 lineto 1.500000 setlinewidth stroke
newpath 394.375509 505.221858 moveto 366.876270 505.366497 lineto 1.500000 setlinewidth stroke
newpath 474.352938 492.203506 moveto 468.104026 492.285986 lineto 1.500000 setlinewidth stroke
newpath 497.324137 244.417470 moveto 464.542267 236.895978 lineto 1.500000 setlinewidth stroke
newpath 63.136909 448.678260 moveto 49.437102 447.849021 lineto 1.500000 setlinewidth stroke
newpath 170.673457 81.707842 moveto 144.255466 85.553946 lineto 1.500000 setlinewidth stroke
newpath 171.890684 201.236979 moveto 130.596007 201.819426 lineto 1.500000 setlinewidth stroke
newpath 244.343039 494.721458 moveto 226.755361 496.114422 lineto 1.500000 setlinewidth stroke
newpath 404.251084 443.959473 moveto 416.874383 445.131643 lineto 1.500000 setlinewidth stroke
newpath 194.221054 300.103838 moveto 211.960221 299.020659 lineto 1.500000 setlinewidth stroke
newpath 45.699621 364.161597 moveto 53.413071 344.742905 lineto 1.500000 setlinewidth stroke
newpath 73.381698 277.590069 moveto 70.998202 260.074216 lineto 1.500000 setlinewidth stroke
newpath 249.212802 226.752358 moveto 266.704842 234.270878 lineto 1.500000 setlinewidth stroke
newpath 492.479027 255.292628 moveto 468.004187 244.140131 lineto 1.500000 setlinewidth stroke
newpath 199.805568 71.339596 moveto 194.148442 2.540845 lineto 1.500000 setlinewidth stroke
newpath 216.883346 367.185936 moveto 256.882690 367.023953 lineto 1.500000 setlinewidth stroke
newpath 287.456984 228.870222 moveto 287.260252 256.377755 lineto 1.500000 setlinewidth stroke
newpath 421.914200 171.207441 moveto 380.582602 172.704230 lineto 1.500000 setlinewidth stroke
newpath 509.588612 15.222684 moveto 499.253867 16.860770 lineto 1.500000 setlinewidth stroke
newpath 183.988456 88.470159 moveto 190.104550 63.746253 lineto 1.500000 setlinewidth stroke
newpath 270.632849 500.721677 moveto 243.137606 501.083351 lineto 1.500000 setlinewidth stroke
newpath 475.514310 422.411456 moveto 490.609137 424.023538 lineto 1.500000 setlinewidth stroke
newpath 104.477450 225.955857 moveto 90.637697 222.573052 lineto 1.500000 setlinewidth stroke
newpath 179.041478 275.028866 moveto 176.679817 252.514355 lineto 1.500000 setlinewidth stroke
newpath 187.496702 2.514230 moveto 190.240894 17.916152 lineto 1.500000 setlinewidth stroke
newpath 210.029141 257.598507 moveto 209.622752 247.564340 lineto 1.500000 setlinewidth stroke
newpath 69.345239 250.121841 moveto 67.742726 265.217118 lineto 1.500000 setlinewidth stroke
newpath 459.318666 243.342481 moveto 389.308745 250.748706 lineto 1.500000 setlinewidth stroke
newpath 1.712044 94.377018 moveto 37.547416 16.780986 lineto 1.500000 setlinewidth stroke
newpath 108.734153 216.138878 moveto 105.447311 225.059530 lineto 1.500000 setlinewidth stroke
newpath 469.396151 501.812971 moveto 499.446799 500.361751 lineto 1.500000 setlinewidth stroke
newpath 8.200544 499.411057 moveto 24.479558 497.116939 lineto 1.500000 setlinewidth stroke
newpath 212.970213 275.433397 moveto 222.465228 280.199035 lineto 1.500000 setlinewidth stroke
newpath 335.670448 233.415209 moveto 345.637479 232.841970 lineto 1.500000 setlinewidth stroke
newpath 340.712938 305.919910 moveto 329.402188 303.734299 lineto 1.500000 setlinewidth stroke
newpath 417.957444 103.380125 moveto 403.763303 72.333179 lineto 1.500000 setlinewidth stroke
newpath 369.375516 498.881239 moveto 350.650317 500.430910 lineto 1.500000 setlinewidth stroke
newpath 464.433130 237.270453 moveto 428.173643 239.624309 lineto 1.500000 setlinewidth stroke
newpath 177.717277 17.603796 moveto 177.339108 2.581848 lineto 1.500000 setlinewidth stroke
newpath 259.385357 487.817950 moveto 246.854365 488.490580 lineto 1.500000 setlinewidth stroke
newpath 245.656558 267.906795 moveto 279.403275 264.127475 lineto 1.500000 setlinewidth stroke
newpath 426.048239 13.751602 moveto 427.810557 37.648189 lineto 1.500000 setlinewidth stroke
newpath 148.284290 87.591424 moveto 169.336971 84.834587 lineto 1.500000 setlinewidth stroke
newpath 182.192929 205.231808 moveto 171.942808 202.381179 lineto 1.500000 setlinewidth stroke
newpath 344.385814 247.787676 moveto 311.780612 249.955101 lineto 1.500000 setlinewidth stroke
newpath 359.787326 212.969616 moveto 362.871845 198.090792 lineto 1.500000 setlinewidth stroke
newpath 146.883274 266.644933 moveto 124.369671 266.561402 lineto 1.500000 setlinewidth stroke
newpath 388.951881 85.992311 moveto 391.187592 76.217771 lineto 1.500000 setlinewidth stroke
newpath 190.893366 27.611989 moveto 191.742724 45.131413 lineto 1.500000 setlinewidth stroke
newpath 422.874357 239.495164 moveto 412.523768 243.614176 lineto 1.500000 setlinewidth stroke
newpath 364.357656 427.034490 moveto 390.628196 427.273106 lineto 1.500000 setlinewidth stroke
newpath 494.364547 426.534157 moveto 478.102594 425.466160 lineto 1.500000 setlinewidth stroke
newpath 78.430220 227.594400 moveto 81.308799 256.306445 lineto 1.500000 setlinewidth stroke
newpath 85.008580 273.805163 moveto 83.632294 261.319083 lineto 1.500000 setlinewidth stroke
newpath 203.306343 279.487717 moveto 198.022776 277.984239 lineto 1.500000 setlinewidth stroke
newpath 281.907316 504.213553 moveto 296.890121 502.783415 lineto 1.500000 setlinewidth stroke
newpath 312.922246 263.088601 moveto 333.972673 272.294927 lineto 1.500000 setlinewidth stroke
newpath 370.090047 201.539851 moveto 376.551673 173.512277 lineto 1.500000 setlinewidth stroke
newpath 499.133034 174.689873 moveto 509.634463 173.181982 lineto 1.500000 setlinewidth stroke
newpath 55.642851 274.044041 moveto 29.358734 273.609981 lineto 1.500000 setlinewidth stroke
newpath 69.185803 306.593924 moveto 80.727335 308.080467 lineto 1.500000 setlinewidth stroke
newpath 204.774440 2.381307 moveto 197.255167 28.625785 lineto 1.500000 setlinewidth stroke
newpath 427.713383 106.260662 moveto 418.073618 102.766763 lineto 1.500000 setlinewidth stroke
newpath 438.077344 458.183529 moveto 449.457802 459.154564 lineto 1.500000 setlinewidth stroke
newpath 123.302102 266.590413 moveto 102.845546 269.062683 lineto 1.500000 setlinewidth stroke
newpath 167.238904 270.513137 moveto 150.411581 267.613546 lineto 1.500000 setlinewidth stroke
newpath 258.169773 262.491199 moveto 245.800027 258.351949 lineto 1.500000 setlinewidth stroke
newpath 456.945869 54.161963 moveto 471.021505 36.927921 lineto 1.500000 setlinewidth stroke
newpath 56.844474 350.328411 moveto 65.643100 350.513207 lineto 1.500000 setlinewidth stroke
newpath 159.436757 275.829162 moveto 109.383243 280.218991 lineto 1.500000 setlinewidth stroke
newpath 425.637193 248.994426 moveto 454.343206 246.063591 lineto 1.500000 setlinewidth stroke
newpath 385.668650 430.584809 moveto 365.591813 429.475775 lineto 1.500000 setlinewidth stroke
newpath 417.230416 40.283794 moveto 416.084912 24.813280 lineto 1.500000 setlinewidth stroke
newpath 490.527963 423.385469 moveto 504.366390 424.053391 lineto 1.500000 setlinewidth stroke
newpath 493.134436 180.123594 moveto 495.794452 197.972324 lineto 1.500000 setlinewidth stroke
newpath 211.898992 307.313993 moveto 191.848205 307.826297 lineto 1.500000 setlinewidth stroke
newpath 246.622792 258.989598 moveto 229.284125 257.317084 lineto 1.500000 setlinewidth stroke
newpath 347.599592 202.079236 moveto 354.590617 195.348971 lineto 1.500000 setlinewidth stroke
newpath 53.123525 438.921151 moveto 63.153233 439.241756 lineto 1.500000 setlinewidth stroke
newpath 61.499662 312.051653 moveto 69.343177 306.916951 lineto 1.500000 setlinewidth stroke
newpath 416.875000 511.375000 moveto 394.375000 511.375000 lineto 1.500000 setlinewidth stroke
newpath 19.426941 495.008433 moveto 3.096670 495.756783 lineto 1.500000 setlinewidth stroke
newpath 29.855908 471.615577 moveto 34.857954 461.616600 lineto 1.500000 setlinewidth stroke
newpath 171.453769 112.863025 moveto 164.820107 101.123483 lineto 1.500000 setlinewidth stroke
newpath 496.943482 303.458804 moveto 484.323284 304.495323 lineto 1.500000 setlinewidth stroke
newpath 54.722254 289.737220 moveto 44.645206 287.600610 lineto 1.500000 setlinewidth stroke
newpath 79.051400 256.409225 moveto 76.002901 227.585032 lineto 1.500000 setlinewidth stroke
newpath 437.492592 17.685435 moveto 437.982716 2.539496 lineto 1.500000 setlinewidth stroke
newpath 172.804972 251.277442 moveto 174.791335 270.212455 lineto 1.500000 setlinewidth stroke
newpath 242.030241 268.996670 moveto 231.073519 282.976527 lineto 1.500000 setlinewidth stroke
newpath 110.625719 76.349323 moveto 100.598579 76.068551 lineto 1.500000 setlinewidth stroke
newpath 116.890199 510.629510 moveto 96.870711 511.232627 lineto 1.500000 setlinewidth stroke
newpath 369.318245 356.419819 moveto 394.389408 356.978960 lineto 1.500000 setlinewidth stroke
newpath 79.610425 280.025869 moveto 74.334818 279.105269 lineto 1.500000 setlinewidth stroke
newpath 80.616631 377.905970 moveto 105.631670 378.651083 lineto 1.500000 setlinewidth stroke
newpath 104.639413 253.956704 moveto 109.658834 237.712705 lineto 1.500000 setlinewidth stroke
newpath 199.320274 267.724377 moveto 207.618770 272.294267 lineto 1.500000 setlinewidth stroke
newpath 58.622719 250.163723 moveto 59.848591 273.979306 lineto 1.500000 setlinewidth stroke
newpath 232.751653 269.327457 moveto 226.342556 281.745344 lineto 1.500000 setlinewidth stroke
newpath 432.407320 17.689379 moveto 431.052533 2.586648 lineto 1.500000 setlinewidth stroke
newpath 295.627701 495.189309 moveto 271.867110 496.187113 lineto 1.500000 setlinewidth stroke
newpath 323.690080 321.531958 moveto 315.739168 350.156712 lineto 1.500000 setlinewidth stroke
newpath 217.916823 247.651761 moveto 219.517891 260.106631 lineto 1.500000 setlinewidth stroke
newpath 253.437435 396.474529 moveto 261.950504 369.750854 lineto 1.500000 setlinewidth stroke
newpath 461.859077 33.774766 moveto 438.112621 37.547077 lineto 1.500000 setlinewidth stroke
newpath 166.063226 240.129765 moveto 166.232038 268.886112 lineto 1.500000 setlinewidth stroke
newpath 426.966803 2.578917 moveto 427.314256 12.695774 lineto 1.500000 setlinewidth stroke
newpath 385.671197 85.067623 moveto 376.698994 77.843598 lineto 1.500000 setlinewidth stroke
newpath 416.949825 476.532897 moveto 383.096147 478.332098 lineto 1.500000 setlinewidth stroke
newpath 506.875205 510.655385 moveto 489.374850 510.650397 lineto 1.500000 setlinewidth stroke
newpath 138.167688 114.555552 moveto 146.521022 98.688644 lineto 1.500000 setlinewidth stroke
newpath 167.039436 278.203663 moveto 152.673456 282.285985 lineto 1.500000 setlinewidth stroke
newpath 177.826016 252.220027 moveto 188.285695 255.920824 lineto 1.500000 setlinewidth stroke
newpath 249.606370 264.813188 moveto 235.482304 268.296377 lineto 1.500000 setlinewidth stroke
newpath 175.035574 90.418188 moveto 180.493365 78.121372 lineto 1.500000 setlinewidth stroke
newpath 197.982750 404.062905 moveto 208.299929 402.681087 lineto 1.500000 setlinewidth stroke
newpath 255.627550 224.563598 moveto 243.122130 224.506796 lineto 1.500000 setlinewidth stroke
newpath 17.596374 21.109543 moveto 0.035885 56.079167 lineto 1.500000 setlinewidth stroke
newpath 214.270946 324.683654 moveto 203.054972 327.327976 lineto 1.500000 setlinewidth stroke
newpath 243.129840 499.039200 moveto 269.393866 498.265074 lineto 1.500000 setlinewidth stroke
newpath 6.640064 231.073849 moveto 1.717464 255.346556 lineto 1.500000 setlinewidth stroke
newpath 119.473090 428.917258 moveto 128.760061 407.360080 lineto 1.500000 setlinewidth stroke
newpath 135.706954 237.363529 moveto 148.159036 241.266410 lineto 1.500000 setlinewidth stroke
newpath 195.619813 267.290286 moveto 193.503648 275.225972 lineto 1.500000 setlinewidth stroke
newpath 29.452973 511.045966 moveto 48.174606 509.460907 lineto 1.500000 setlinewidth stroke
newpath 74.458131 312.613017 moveto 76.450668 326.436165 lineto 1.500000 setlinewidth stroke
newpath 106.904335 455.791276 moveto 73.109775 457.279212 lineto 1.500000 setlinewidth stroke
newpath 283.126253 432.496986 moveto 260.616176 432.276698 lineto 1.500000 setlinewidth stroke
newpath 391.342230 75.805526 moveto 394.950323 64.510196 lineto 1.500000 setlinewidth stroke
newpath 394.391355 510.449842 moveto 416.897240 509.316741 lineto 1.500000 setlinewidth stroke
newpath -0.248520 68.453830 moveto 23.809101 18.557532 lineto 1.500000 setlinewidth stroke
newpath 378.759178 175.016859 moveto 373.248742 206.396730 lineto 1.500000 setlinewidth stroke
newpath 412.871578 23.902590 moveto 410.541294 2.498027 lineto 1.500000 setlinewidth stroke
newpath 201.474836 489.948532 moveto 191.797914 511.892242 lineto 1.500000 setlinewidth stroke
newpath 204.483029 226.357420 moveto 206.990027 241.763111 lineto 1.500000 setlinewidth stroke
newpath 345.693276 230.136857 moveto 345.856182 246.372680 lineto 1.500000 setlinewidth stroke
newpath 465.697913 246.239095 moveto 483.973291 256.043844 lineto 1.500000 setlinewidth stroke
newpath 46.921997 342.649468 moveto 28.075583 378.849272 lineto 1.500000 setlinewidth stroke
newpath 179.521575 76.381511 moveto 180.246940 60.052678 lineto 1.500000 setlinewidth stroke
newpath 330.738863 276.186912 moveto 320.098128 269.745330 lineto 1.500000 setlinewidth stroke
newpath 509.383651 484.798993 moveto 490.613698 484.300909 lineto 1.500000 setlinewidth stroke
newpath 42.331436 374.741147 moveto 26.273530 407.938699 lineto 1.500000 setlinewidth stroke
newpath 77.786746 326.414167 moveto 78.803047 335.191227 lineto 1.500000 setlinewidth stroke
newpath -1.017931 19.178092 moveto 55.054891 6.377623 lineto 1.500000 setlinewidth stroke
newpath 204.870715 248.780768 moveto 207.065469 260.326410 lineto 1.500000 setlinewidth stroke
newpath 363.247960 317.708129 moveto 323.910270 321.336402 lineto 1.500000 setlinewidth stroke
newpath 415.214637 5.119290 moveto 414.970917 22.633293 lineto 1.500000 setlinewidth stroke
newpath 150.624834 469.117989 moveto 131.874843 469.105198 lineto 1.500000 setlinewidth stroke
newpath 196.891135 489.434572 moveto 164.379678 488.674805 lineto 1.500000 setlinewidth stroke
newpath 216.948461 235.113935 moveto 218.633148 246.298459 lineto 1.500000 setlinewidth stroke
newpath 43.139919 494.147224 moveto 70.694170 492.637133 lineto 1.500000 setlinewidth stroke
newpath 54.500439 7.100052 moveto 92.007923 4.717886 lineto 1.500000 setlinewidth stroke
newpath 439.390016 508.576744 moveto 464.383794 508.182417 lineto 1.500000 setlinewidth stroke
newpath 125.659163 504.607463 moveto 143.179351 503.790296 lineto 1.500000 setlinewidth stroke
newpath 225.621919 452.237882 moveto 253.126032 452.336091 lineto 1.500000 setlinewidth stroke
newpath 197.996882 285.486545 moveto 182.309119 279.927392 lineto 1.500000 setlinewidth stroke
newpath 143.149516 235.659072 moveto 130.578648 235.228600 lineto 1.500000 setlinewidth stroke
newpath 232.400961 221.504400 moveto 227.547257 241.232861 lineto 1.500000 setlinewidth stroke
newpath 34.444759 253.263073 moveto 0.553211 256.968362 lineto 1.500000 setlinewidth stroke
newpath 49.311032 362.865584 moveto 64.251858 366.838138 lineto 1.500000 setlinewidth stroke
newpath 190.617635 274.169499 moveto 192.433523 266.507367 lineto 1.500000 setlinewidth stroke
newpath 88.443410 255.204414 moveto 85.877427 225.103482 lineto 1.500000 setlinewidth stroke
newpath 78.121460 502.687185 moveto 101.874659 502.751273 lineto 1.500000 setlinewidth stroke
newpath 131.764034 145.314975 moveto 151.935545 143.203364 lineto 1.500000 setlinewidth stroke
newpath 218.102409 468.054805 moveto 205.571327 467.396158 lineto 1.500000 setlinewidth stroke
newpath 240.986370 32.387699 moveto 229.944108 15.572120 lineto 1.500000 setlinewidth stroke
newpath 314.310736 346.358564 moveto 320.918982 320.519873 lineto 1.500000 setlinewidth stroke
newpath 20.697483 87.858630 moveto 5.245725 92.652511 lineto 1.500000 setlinewidth stroke
newpath 278.052957 463.177725 moveto 289.435435 464.661328 lineto 1.500000 setlinewidth stroke
newpath 17.287331 482.828621 moveto 28.670788 459.777239 lineto 1.500000 setlinewidth stroke
newpath 358.692989 230.119042 moveto 358.876824 247.643339 lineto 1.500000 setlinewidth stroke
newpath 376.749297 257.783779 moveto 369.718519 266.647483 lineto 1.500000 setlinewidth stroke
newpath 490.615544 481.975720 moveto 509.380571 482.271100 lineto 1.500000 setlinewidth stroke
newpath 71.932595 455.019037 moveto 105.722813 453.317922 lineto 1.500000 setlinewidth stroke
newpath 226.745906 216.350284 moveto 222.457824 238.747264 lineto 1.500000 setlinewidth stroke
newpath 316.819659 511.009531 moveto 329.594580 509.075085 lineto 1.500000 setlinewidth stroke
newpath 410.987995 59.840873 moveto 414.125776 50.045168 lineto 1.500000 setlinewidth stroke
newpath 66.893967 495.566878 moveto 44.381789 496.533158 lineto 1.500000 setlinewidth stroke
newpath 106.850590 378.548894 moveto 131.897388 376.674102 lineto 1.500000 setlinewidth stroke
newpath 433.926168 2.597891 moveto 434.519060 20.120126 lineto 1.500000 setlinewidth stroke
newpath 26.870479 459.306568 moveto 0.610265 459.031443 lineto 1.500000 setlinewidth stroke
newpath 81.974765 340.078169 moveto 80.545919 375.172673 lineto 1.500000 setlinewidth stroke
newpath 344.446768 207.615931 moveto 347.129112 228.842889 lineto 1.500000 setlinewidth stroke
newpath 351.491639 239.995757 moveto 350.387079 253.955083 lineto 1.500000 setlinewidth stroke
newpath 437.184643 66.759676 moveto 430.949735 71.778426 lineto 1.500000 setlinewidth stroke
newpath 88.162071 225.121680 moveto 91.523977 262.656440 lineto 1.500000 setlinewidth stroke
newpath 249.364557 455.401768 moveto 228.097670 454.599335 lineto 1.500000 setlinewidth stroke
newpath 81.457615 255.073485 moveto 79.596517 270.152341 lineto 1.500000 setlinewidth stroke
newpath 464.377050 491.567023 moveto 439.366557 491.833965 lineto 1.500000 setlinewidth stroke
newpath 68.015436 266.166912 moveto 69.902107 276.506902 lineto 1.500000 setlinewidth stroke
newpath 99.401555 76.554838 moveto 21.748923 88.021176 lineto 1.500000 setlinewidth stroke
newpath 81.882830 498.359348 moveto 108.143172 498.079363 lineto 1.500000 setlinewidth stroke
newpath 349.403585 510.554241 moveto 370.725512 509.134340 lineto 1.500000 setlinewidth stroke
newpath 24.922470 405.371612 moveto 39.412226 373.204840 lineto 1.500000 setlinewidth stroke
newpath 113.923185 227.827352 moveto 107.590600 252.806416 lineto 1.500000 setlinewidth stroke
newpath 203.108476 480.587563 moveto 178.095742 479.694048 lineto 1.500000 setlinewidth stroke
newpath 314.397133 466.140291 moveto 279.386521 466.903514 lineto 1.500000 setlinewidth stroke
newpath 33.049730 431.898817 moveto 44.421636 406.395795 lineto 1.500000 setlinewidth stroke
newpath 200.495338 32.583806 moveto 210.298553 1.727036 lineto 1.500000 setlinewidth stroke
newpath 476.599453 254.773100 moveto 467.109278 251.861410 lineto 1.500000 setlinewidth stroke
newpath 61.890042 510.368064 moveto 81.967861 509.125567 lineto 1.500000 setlinewidth stroke
newpath 100.483780 4.841632 moveto 128.094948 2.298696 lineto 1.500000 setlinewidth stroke
newpath 191.725361 290.391818 moveto 178.598829 283.030123 lineto 1.500000 setlinewidth stroke
newpath 478.390870 34.072970 moveto 463.460196 54.124591 lineto 1.500000 setlinewidth stroke
newpath 98.128854 509.015354 moveto 116.899024 508.500003 lineto 1.500000 setlinewidth stroke
newpath 135.599710 465.151390 moveto 136.489318 423.866689 lineto 1.500000 setlinewidth stroke
newpath 15.642237 504.080810 moveto 0.642758 505.337033 lineto 1.500000 setlinewidth stroke
newpath 438.063859 489.027180 moveto 454.391825 489.739149 lineto 1.500000 setlinewidth stroke
newpath 251.512312 44.145725 moveto 243.435976 33.325925 lineto 1.500000 setlinewidth stroke
newpath 354.359373 313.690213 moveto 325.603602 316.121960 lineto 1.500000 setlinewidth stroke
newpath 146.851175 381.523870 moveto 156.991555 383.146689 lineto 1.500000 setlinewidth stroke
newpath 215.181070 242.669939 moveto 212.901126 220.147663 lineto 1.500000 setlinewidth stroke
newpath 49.145863 403.108711 moveto 33.819750 435.454190 lineto 1.500000 setlinewidth stroke
newpath 73.802769 293.921216 moveto 54.884582 289.669587 lineto 1.500000 setlinewidth stroke
newpath 92.880535 5.458703 moveto 99.469806 4.715108 lineto 1.500000 setlinewidth stroke
newpath 195.843903 116.607355 moveto 186.975019 103.805708 lineto 1.500000 setlinewidth stroke
newpath 208.110989 90.312295 moveto 206.999992 97.643941 lineto 1.500000 setlinewidth stroke
newpath 215.081436 218.782224 moveto 217.060373 233.850655 lineto 1.500000 setlinewidth stroke
newpath 238.645445 34.571847 moveto 250.890490 46.092825 lineto 1.500000 setlinewidth stroke
newpath 125.886292 82.012629 moveto 111.998036 76.086651 lineto 1.500000 setlinewidth stroke
newpath 156.250987 112.337115 moveto 182.408485 129.302462 lineto 1.500000 setlinewidth stroke
newpath 213.358454 266.435357 moveto 217.228499 251.466393 lineto 1.500000 setlinewidth stroke
newpath 335.633936 268.853391 moveto 320.617411 262.643351 lineto 1.500000 setlinewidth stroke
newpath 509.646196 205.110532 moveto 508.246265 178.868531 lineto 1.500000 setlinewidth stroke
newpath 379.609699 392.678014 moveto 386.689884 361.333186 lineto 1.500000 setlinewidth stroke
newpath 130.616060 466.579965 moveto 149.384874 467.398631 lineto 1.500000 setlinewidth stroke
newpath 75.669187 225.700454 moveto 31.889371 229.062155 lineto 1.500000 setlinewidth stroke
newpath 104.375755 500.436659 moveto 81.875887 500.491169 lineto 1.500000 setlinewidth stroke
newpath 126.788004 151.921693 moveto 108.220995 191.420125 lineto 1.500000 setlinewidth stroke
newpath 504.795826 178.857204 moveto 505.958888 206.360881 lineto 1.500000 setlinewidth stroke
newpath 389.483639 361.403329 moveto 380.301301 396.616546 lineto 1.500000 setlinewidth stroke
newpath 478.151673 473.385197 moveto 456.883997 474.131423 lineto 1.500000 setlinewidth stroke
newpath 204.169062 243.897846 moveto 202.647020 230.178026 lineto 1.500000 setlinewidth stroke
newpath 374.379554 488.758236 moveto 355.609353 488.026235 lineto 1.500000 setlinewidth stroke
newpath 487.734453 266.892262 moveto 477.353966 254.716651 lineto 1.500000 setlinewidth stroke
newpath 355.514487 198.885336 moveto 357.622289 221.422017 lineto 1.500000 setlinewidth stroke
newpath 197.200289 275.495352 moveto 198.723651 269.015743 lineto 1.500000 setlinewidth stroke
newpath 244.348775 478.315737 moveto 264.362011 478.586179 lineto 1.500000 setlinewidth stroke
newpath 218.280509 233.920370 moveto 223.377914 216.448789 lineto 1.500000 setlinewidth stroke
newpath 445.615410 38.816738 moveto 459.403344 36.547196 lineto 1.500000 setlinewidth stroke
newpath 230.665479 406.386424 moveto 224.741854 427.375758 lineto 1.500000 setlinewidth stroke
newpath 222.111645 427.693729 moveto 227.954631 407.575519 lineto 1.500000 setlinewidth stroke
newpath 376.870531 490.213768 moveto 390.648540 490.907460 lineto 1.500000 setlinewidth stroke
newpath 385.960425 259.057761 moveto 378.125984 266.376054 lineto 1.500000 setlinewidth stroke
newpath 21.845994 490.112309 moveto 29.477701 472.669935 lineto 1.500000 setlinewidth stroke
newpath 406.917985 246.767564 moveto 453.161029 241.704039 lineto 1.500000 setlinewidth stroke
newpath 29.751528 371.550149 moveto 44.848539 339.095276 lineto 1.500000 setlinewidth stroke
newpath 116.053806 484.076668 moveto 107.955800 501.295425 lineto 1.500000 setlinewidth stroke
newpath 175.273688 460.129827 moveto 175.411296 470.145111 lineto 1.500000 setlinewidth stroke
newpath 344.329038 231.490412 moveto 342.311559 208.836122 lineto 1.500000 setlinewidth stroke
newpath 243.136021 488.549219 moveto 226.904595 488.000139 lineto 1.500000 setlinewidth stroke
newpath 271.875366 480.780737 moveto 244.374606 480.763776 lineto 1.500000 setlinewidth stroke
newpath 218.119733 493.781661 moveto 231.896399 493.004193 lineto 1.500000 setlinewidth stroke
newpath 429.437199 327.531663 moveto 405.621630 328.812330 lineto 1.500000 setlinewidth stroke
newpath 145.427530 498.802800 moveto 150.304233 485.464749 lineto 1.500000 setlinewidth stroke
newpath 175.597522 476.742610 moveto 196.915285 478.336058 lineto 1.500000 setlinewidth stroke
newpath 339.001021 282.017786 moveto 348.645421 287.628984 lineto 1.500000 setlinewidth stroke
newpath 141.771478 118.744745 moveto 149.412366 112.672015 lineto 1.500000 setlinewidth stroke
newpath 193.014210 505.082497 moveto 198.832256 489.916786 lineto 1.500000 setlinewidth stroke
newpath 280.703476 506.688648 moveto 269.323882 505.734924 lineto 1.500000 setlinewidth stroke
newpath 405.622508 116.275995 moveto 381.856103 116.874098 lineto 1.500000 setlinewidth stroke
newpath 494.459293 309.146687 moveto 483.078379 308.166094 lineto 1.500000 setlinewidth stroke
newpath 254.506291 53.486858 moveto 335.588474 41.135226 lineto 1.500000 setlinewidth stroke
newpath 44.356550 291.454709 moveto 65.899047 296.441030 lineto 1.500000 setlinewidth stroke
newpath 271.882878 340.353172 moveto 260.603166 340.742641 lineto 1.500000 setlinewidth stroke
newpath 499.506555 262.536219 moveto 505.128391 270.866565 lineto 1.500000 setlinewidth stroke
newpath 346.922747 58.105622 moveto 333.184158 59.470479 lineto 1.500000 setlinewidth stroke
newpath 221.533595 61.674267 moveto 234.196227 57.127158 lineto 1.500000 setlinewidth stroke
newpath 464.546398 437.658489 moveto 470.657479 406.381346 lineto 1.500000 setlinewidth stroke
newpath 63.079694 299.008414 moveto 44.745998 292.782507 lineto 1.500000 setlinewidth stroke
newpath 72.985402 437.613582 moveto 71.859897 451.373765 lineto 1.500000 setlinewidth stroke
newpath 150.526733 450.172224 moveto 152.323880 406.342152 lineto 1.500000 setlinewidth stroke
newpath 183.135132 140.330825 moveto 154.393250 141.745728 lineto 1.500000 setlinewidth stroke
newpath 472.121948 410.096897 moveto 473.120947 418.875461 lineto 1.500000 setlinewidth stroke
newpath 55.649919 379.917821 moveto 42.095993 378.287613 lineto 1.500000 setlinewidth stroke
newpath 150.568268 154.690730 moveto 163.179633 153.043199 lineto 1.500000 setlinewidth stroke
newpath 182.522431 134.146577 moveto 155.343194 116.161829 lineto 1.500000 setlinewidth stroke
newpath 207.751870 462.649496 moveto 208.450701 437.634099 lineto 1.500000 setlinewidth stroke
newpath 268.793362 491.283017 moveto 270.173864 482.553655 lineto 1.500000 setlinewidth stroke
newpath 475.649150 374.394329 moveto 456.881606 375.267065 lineto 1.500000 setlinewidth stroke
newpath 131.971927 101.223144 moveto 120.255824 93.745002 lineto 1.500000 setlinewidth stroke
newpath 412.722670 114.162661 moveto 393.960486 87.921372 lineto 1.500000 setlinewidth stroke
newpath 111.804929 278.066318 moveto 136.833635 275.897615 lineto 1.500000 setlinewidth stroke
newpath 425.522384 466.355541 moveto 428.855941 448.776569 lineto 1.500000 setlinewidth stroke
newpath 18.253278 199.921141 moveto 8.099398 201.166207 lineto 1.500000 setlinewidth stroke
newpath 216.799712 327.622556 moveto 216.872540 362.625005 lineto 1.500000 setlinewidth stroke
newpath 403.973322 93.705008 moveto 415.556680 111.419674 lineto 1.500000 setlinewidth stroke
newpath 149.382313 272.697045 moveto 110.650752 276.628691 lineto 1.500000 setlinewidth stroke
newpath 96.167759 246.590412 moveto 103.188670 228.900270 lineto 1.500000 setlinewidth stroke
newpath 117.482784 475.345485 moveto 119.273006 460.261247 lineto 1.500000 setlinewidth stroke
newpath 322.862184 420.054314 moveto 326.563824 406.291307 lineto 1.500000 setlinewidth stroke
newpath 180.250278 475.185940 moveto 181.561488 456.353172 lineto 1.500000 setlinewidth stroke
newpath 493.153764 15.288138 moveto 509.555077 12.396339 lineto 1.500000 setlinewidth stroke
newpath 441.870766 213.800501 moveto 414.317683 215.366578 lineto 1.500000 setlinewidth stroke
newpath 224.801459 468.873266 moveto 224.862454 483.873018 lineto 1.500000 setlinewidth stroke
newpath 277.507984 446.602379 moveto 282.056461 433.940184 lineto 1.500000 setlinewidth stroke
newpath 492.744526 443.805967 moveto 495.459041 428.844889 lineto 1.500000 setlinewidth stroke
newpath 30.611571 228.762231 moveto 16.907058 230.394208 lineto 1.500000 setlinewidth stroke
newpath 73.839870 392.641688 moveto 74.598802 360.130224 lineto 1.500000 setlinewidth stroke
newpath 145.513832 427.618603 moveto 144.286818 448.941855 lineto 1.500000 setlinewidth stroke
newpath 216.981275 491.533296 moveto 218.310259 480.146622 lineto 1.500000 setlinewidth stroke
newpath 31.953778 198.553249 moveto 19.437840 199.615449 lineto 1.500000 setlinewidth stroke
newpath 151.772195 487.587775 moveto 147.191146 500.239473 lineto 1.500000 setlinewidth stroke
newpath 329.144267 406.304761 moveto 325.343730 418.789377 lineto 1.500000 setlinewidth stroke
newpath 500.253667 462.558605 moveto 503.579794 443.956318 lineto 1.500000 setlinewidth stroke
newpath 76.140426 453.112282 moveto 80.109393 438.732685 lineto 1.500000 setlinewidth stroke
newpath 224.247919 498.839290 moveto 220.718025 511.401140 lineto 1.500000 setlinewidth stroke
newpath 31.900434 282.897521 moveto 18.153512 284.180500 lineto 1.500000 setlinewidth stroke
newpath 69.442058 431.385005 moveto 72.625028 410.050408 lineto 1.500000 setlinewidth stroke
newpath 119.084192 483.856904 moveto 117.994595 501.366885 lineto 1.500000 setlinewidth stroke
newpath 348.145999 384.354160 moveto 333.120077 385.012661 lineto 1.500000 setlinewidth stroke
newpath 110.548286 288.724165 moveto 99.589891 294.297521 lineto 1.500000 setlinewidth stroke
newpath 429.400356 334.232299 moveto 408.080312 335.745290 lineto 1.500000 setlinewidth stroke
newpath 478.115372 379.939294 moveto 456.793071 381.044802 lineto 1.500000 setlinewidth stroke
newpath 480.739645 320.152003 moveto 474.487585 346.695938 lineto 1.500000 setlinewidth stroke
newpath 4.409934 205.359695 moveto 13.152302 204.058425 lineto 1.500000 setlinewidth stroke
newpath 211.894676 317.872645 moveto 195.549228 319.171308 lineto 1.500000 setlinewidth stroke
newpath 271.891380 346.830998 moveto 255.617477 347.415560 lineto 1.500000 setlinewidth stroke
newpath 366.247951 321.328361 moveto 368.495420 351.347267 lineto 1.500000 setlinewidth stroke
newpath 469.429091 210.790721 moveto 445.633060 212.724200 lineto 1.500000 setlinewidth stroke
newpath 1.602069 455.745289 moveto 8.281317 445.224237 lineto 1.500000 setlinewidth stroke
newpath 70.390036 403.796528 moveto 74.146531 392.548697 lineto 1.500000 setlinewidth stroke
newpath 231.366519 450.124667 moveto 231.347967 408.875237 lineto 1.500000 setlinewidth stroke
newpath 369.374379 75.636368 moveto 363.922446 66.414551 lineto 1.500000 setlinewidth stroke
newpath 224.393459 386.657740 moveto 210.620555 387.556908 lineto 1.500000 setlinewidth stroke
newpath 473.285143 343.906707 moveto 477.951555 320.338151 lineto 1.500000 setlinewidth stroke
newpath 141.890153 275.335377 moveto 166.850691 273.537504 lineto 1.500000 setlinewidth stroke
newpath 468.666007 256.601586 moveto 461.254722 252.683764 lineto 1.500000 setlinewidth stroke
newpath 130.698192 357.106773 moveto 115.599192 358.616970 lineto 1.500000 setlinewidth stroke
newpath 158.961018 407.531670 moveto 159.661838 432.582005 lineto 1.500000 setlinewidth stroke
newpath 210.276462 93.417118 moveto 206.683129 105.961993 lineto 1.500000 setlinewidth stroke
newpath 438.125000 200.125000 moveto 413.125000 200.125000 lineto 1.500000 setlinewidth stroke
newpath 69.444049 448.879316 moveto 70.071524 438.840405 lineto 1.500000 setlinewidth stroke
newpath 166.982640 431.381664 moveto 167.228130 381.370598 lineto 1.500000 setlinewidth stroke
newpath 228.649420 483.894814 moveto 229.171751 470.070093 lineto 1.500000 setlinewidth stroke
newpath 30.380280 508.928487 moveto 31.448456 488.852305 lineto 1.500000 setlinewidth stroke
newpath 291.405380 483.881230 moveto 291.206201 468.867290 lineto 1.500000 setlinewidth stroke
newpath 191.879497 237.686352 moveto 176.777388 238.793396 lineto 1.500000 setlinewidth stroke
newpath 172.429308 500.133780 moveto 172.587984 490.116494 lineto 1.500000 setlinewidth stroke
newpath 235.485522 56.741082 moveto 254.357357 53.763188 lineto 1.500000 setlinewidth stroke
newpath 256.728403 397.630408 moveto 257.741534 425.093032 lineto 1.500000 setlinewidth stroke
newpath 219.877532 363.871212 moveto 219.500630 313.874053 lineto 1.500000 setlinewidth stroke
newpath 187.291479 398.857146 moveto 186.836193 356.362023 lineto 1.500000 setlinewidth stroke
newpath 318.692874 446.363495 moveto 318.414422 432.619136 lineto 1.500000 setlinewidth stroke
newpath 36.287081 487.585950 moveto 35.366815 501.440878 lineto 1.500000 setlinewidth stroke
newpath 83.375141 375.147631 moveto 87.331590 331.416308 lineto 1.500000 setlinewidth stroke
newpath 225.628900 335.125458 moveto 228.591872 309.886319 lineto 1.500000 setlinewidth stroke
newpath 371.816999 79.883789 moveto 357.947644 155.092293 lineto 1.500000 setlinewidth stroke
newpath 84.565941 496.384410 moveto 85.739608 472.569046 lineto 1.500000 setlinewidth stroke
newpath 221.893187 321.374730 moveto 222.486208 361.365937 lineto 1.500000 setlinewidth stroke
newpath 197.246527 135.130336 moveto 196.151458 211.382561 lineto 1.500000 setlinewidth stroke
newpath 213.443352 437.736186 moveto 211.761799 461.455592 lineto 1.500000 setlinewidth stroke
newpath 466.262593 402.550003 moveto 463.341674 426.401534 lineto 1.500000 setlinewidth stroke
newpath 91.488082 365.187817 moveto 94.319894 326.280011 lineto 1.500000 setlinewidth stroke
newpath 180.632441 302.951873 moveto 171.330952 338.733574 lineto 1.500000 setlinewidth stroke
newpath 428.115051 198.304606 moveto 438.133806 198.129855 lineto 1.500000 setlinewidth stroke
newpath 74.592940 359.972918 moveto 76.268617 348.601447 lineto 1.500000 setlinewidth stroke
newpath 297.104687 368.861848 moveto 298.749664 397.589231 lineto 1.500000 setlinewidth stroke
newpath 388.539228 97.051116 moveto 401.924025 113.596555 lineto 1.500000 setlinewidth stroke
newpath 421.931288 362.618408 moveto 425.592386 393.878820 lineto 1.500000 setlinewidth stroke
newpath 88.700756 345.175742 moveto 86.167239 373.922788 lineto 1.500000 setlinewidth stroke
newpath 319.314049 302.610726 moveto 313.161486 328.883544 lineto 1.500000 setlinewidth stroke
newpath 500.187726 440.186209 moveto 499.057349 455.195218 lineto 1.500000 setlinewidth stroke
newpath 121.931328 502.626255 moveto 122.377393 482.608341 lineto 1.500000 setlinewidth stroke
newpath 226.015459 360.172507 moveto 227.832104 345.241450 lineto 1.500000 setlinewidth stroke
newpath 355.084869 180.600103 moveto 343.128783 198.464135 lineto 1.500000 setlinewidth stroke
newpath 491.616231 428.831149 moveto 489.075489 443.824245 lineto 1.500000 setlinewidth stroke
newpath 45.413561 491.371927 moveto 45.777149 466.359042 lineto 1.500000 setlinewidth stroke
newpath 282.972269 460.127962 moveto 282.632966 442.634544 lineto 1.500000 setlinewidth stroke
newpath 51.643669 311.288828 moveto 40.868229 340.215604 lineto 1.500000 setlinewidth stroke
newpath 361.048778 405.073265 moveto 363.340887 423.848644 lineto 1.500000 setlinewidth stroke
newpath 156.884664 121.360658 moveto 179.310046 136.471396 lineto 1.500000 setlinewidth stroke
newpath 103.055209 496.364045 moveto 105.413178 481.341751 lineto 1.500000 setlinewidth stroke
newpath 191.516858 210.165117 moveto 195.115637 130.158315 lineto 1.500000 setlinewidth stroke
newpath 210.285291 205.334735 moveto 217.227063 175.206117 lineto 1.500000 setlinewidth stroke
newpath 289.073204 277.053896 moveto 297.001444 272.864277 lineto 1.500000 setlinewidth stroke
newpath 336.839650 61.329619 moveto 327.757983 68.403834 lineto 1.500000 setlinewidth stroke
newpath 217.725166 173.800165 moveto 211.681623 105.142022 lineto 1.500000 setlinewidth stroke
newpath 255.742512 284.629705 moveto 283.351677 280.330810 lineto 1.500000 setlinewidth stroke
newpath 202.842126 445.131229 moveto 203.227281 462.622748 lineto 1.500000 setlinewidth stroke
newpath 214.505890 100.104104 moveto 219.300547 130.136886 lineto 1.500000 setlinewidth stroke
newpath 371.267082 351.415418 moveto 369.187544 320.137463 lineto 1.500000 setlinewidth stroke
newpath 13.186861 305.412524 moveto 30.940785 301.592731 lineto 1.500000 setlinewidth stroke
newpath 122.468853 128.654213 moveto 110.240335 164.995564 lineto 1.500000 setlinewidth stroke
newpath 230.562913 308.632413 moveto 227.767312 294.942778 lineto 1.500000 setlinewidth stroke
newpath 262.990764 402.623423 moveto 263.269915 378.862017 lineto 1.500000 setlinewidth stroke
newpath 96.075888 360.204639 moveto 98.506669 346.442413 lineto 1.500000 setlinewidth stroke
newpath 186.393053 462.591443 moveto 185.514828 475.204365 lineto 1.500000 setlinewidth stroke
newpath 93.348249 325.127291 moveto 93.340701 317.624783 lineto 1.500000 setlinewidth stroke
newpath 156.104923 433.737614 moveto 155.247196 446.349305 lineto 1.500000 setlinewidth stroke
newpath 232.253199 362.654436 moveto 233.324489 348.890527 lineto 1.500000 setlinewidth stroke
newpath 77.634320 411.179996 moveto 75.928257 426.408973 lineto 1.500000 setlinewidth stroke
newpath 119.478633 297.189033 moveto 150.700022 293.214295 lineto 1.500000 setlinewidth stroke
newpath 381.161055 362.479363 moveto 378.857980 373.769534 lineto 1.500000 setlinewidth stroke
newpath 377.491610 335.051017 moveto 374.499120 310.110108 lineto 1.500000 setlinewidth stroke
newpath 476.442492 288.801419 moveto 474.098735 302.578000 lineto 1.500000 setlinewidth stroke
showpage
%%EOF
================================================
FILE: thirdparty/LSD/chairs.lsd.txt
================================================
159.232890 134.369601 160.325338 105.613616 2.735466
66.105373 75.587787 63.972852 48.059320 4.028428
68.757033 166.697424 63.229592 108.115131 5.142462
214.249352 223.119214 216.035182 184.336329 4.550998
146.507379 106.904351 144.805709 85.590613 4.785176
16.923435 420.296707 101.917593 432.836299 3.506918
185.613699 338.200192 184.450026 299.335327 5.745963
185.553747 416.882362 184.760563 409.206000 3.588424
104.420784 429.066585 14.001093 415.643731 7.071789
236.956356 450.093215 338.133131 465.571853 3.854458
440.312266 443.318582 461.485782 340.802785 6.986705
390.175127 443.247735 386.423926 429.498062 3.617778
254.349382 144.622838 309.534989 150.327223 3.688258
395.623625 154.388009 469.473514 162.192856 4.011921
82.100903 198.128652 82.505242 173.114982 5.403412
308.102489 147.116916 265.621383 143.163866 3.733869
318.193027 108.638252 377.018594 114.069831 3.714611
177.234686 171.884778 178.866472 111.861175 3.952433
83.483276 209.417449 83.002669 199.321319 2.913228
470.753079 159.475045 426.714048 154.570104 4.692542
347.054436 465.959769 390.859403 442.480235 5.156050
130.050173 423.214677 145.520607 415.417864 3.929099
359.127942 240.746956 363.431147 205.358231 5.148095
338.937027 461.803124 329.742966 458.385190 3.514971
55.447508 287.887055 90.891886 294.103229 7.515963
220.576199 438.153515 226.204808 447.786205 3.686397
459.356888 113.312168 509.492223 118.163601 4.013585
472.109699 476.657906 483.528037 489.002195 3.808180
28.400012 133.725489 0.578315 129.697453 4.590190
129.429473 105.056075 65.661795 103.146365 3.875215
65.393503 102.997316 62.249854 77.921301 3.717255
209.403932 107.795295 252.014573 111.534462 3.758426
254.544229 301.460485 349.452808 311.109693 4.995106
494.491690 491.178740 509.489418 493.692299 3.292066
418.147191 66.574204 463.270471 69.903200 4.148676
114.550553 427.186390 109.152211 430.229825 3.544391
363.760038 340.114935 368.999069 359.476722 4.727075
112.015348 433.411873 129.096273 425.055280 3.441002
450.611143 52.060916 489.517674 54.960793 3.460896
114.103020 56.963459 113.370535 44.360729 2.711269
166.443487 142.867889 177.706109 178.721261 4.601673
0.568442 132.217463 29.760859 137.038580 4.129691
0.822115 72.823339 33.431051 76.965814 4.152311
335.206776 459.796637 233.710408 445.267722 8.472018
506.939321 114.294998 430.625997 110.604393 4.250133
91.889757 105.454932 132.021450 108.937250 4.054862
490.624116 486.669661 481.689616 480.366053 9.010730
148.343515 44.068372 171.978709 47.386215 4.061125
167.308281 44.371373 167.161805 26.872599 2.594079
370.836320 447.249743 345.209318 459.774468 10.107451
391.906831 84.052619 432.009557 88.012202 3.501932
178.416428 178.825694 193.827134 222.070238 7.471541
133.271812 134.749946 162.050609 139.578304 4.095573
90.277768 227.799200 83.969749 210.320139 3.200202
184.930491 408.147278 185.794276 338.142512 6.619664
459.882600 344.038088 464.790514 334.590863 6.165761
121.173667 71.653235 136.308673 109.098667 4.191508
142.958322 411.126008 126.173037 421.510810 4.405030
373.211533 110.868378 328.114968 106.991696 3.843281
26.897965 19.372708 25.020860 0.560555 2.859979
428.479914 468.957678 438.882696 446.645470 5.588076
359.498486 49.584630 409.487962 52.279828 4.619415
200.759417 413.298225 191.059982 420.824676 5.482846
160.717716 77.262183 220.711892 79.894901 4.404005
224.660034 263.330145 223.280681 256.841903 2.705283
485.638645 51.352733 440.636706 50.176954 3.781369
78.123187 76.901031 119.520625 79.783721 3.945927
303.110387 247.009670 245.341121 240.741170 5.991382
44.214757 50.248770 38.283969 33.070117 4.487182
136.358108 166.014596 133.914970 147.095830 5.077874
290.612784 47.014847 325.781195 50.086899 3.578281
430.928389 438.389046 443.824367 423.571578 5.499863
250.702019 108.664095 230.666339 106.493430 3.831827
401.971668 189.223740 432.172868 191.307208 7.352799
284.417212 81.511106 322.134685 85.886335 3.670388
509.887214 489.453750 492.055317 485.681421 8.560541
35.522946 55.874412 40.682107 57.985436 3.319072
134.291376 112.182609 142.123736 132.265495 4.658270
383.492191 435.939162 375.382597 445.417604 4.474677
108.153220 146.699755 110.409196 163.154587 4.174711
434.003471 190.702414 433.045129 170.628813 4.162996
38.179708 221.284749 0.309891 217.774717 5.968258
426.878110 84.328129 386.805716 81.669150 3.824533
5.548653 221.594031 38.141785 224.161954 2.363897
228.231497 260.392493 230.003626 270.731505 6.371339
125.598417 421.669335 115.603827 422.961191 6.679145
0.618577 99.406529 24.644698 104.301132 4.627060
98.357075 440.320582 32.948807 430.555125 5.035560
400.760375 168.054843 401.833753 189.250485 4.377409
114.391901 75.932022 68.111960 75.102542 2.656401
131.537589 86.889429 129.878963 48.103449 2.978368
455.572123 22.382176 474.507270 24.356319 2.616143
319.431011 82.454246 284.362402 79.525869 2.704474
61.838651 134.269909 53.981571 136.987535 4.292530
106.794317 58.390409 115.847654 61.142573 4.678575
198.098624 33.345934 217.026545 35.605594 4.520218
274.419642 58.914739 254.365818 56.969671 3.054274
110.830519 164.676305 136.968982 167.119554 5.711412
156.904122 59.028548 194.558357 62.193669 3.725997
203.411749 119.206214 204.813000 131.964185 3.303882
277.089886 176.949969 275.815996 159.361167 5.619011
405.685811 49.291961 361.855954 47.292513 3.746104
86.904705 44.166402 103.180657 46.484161 2.651258
224.523552 240.813495 227.747717 259.653484 4.150995
453.820099 125.601499 454.326662 140.584373 3.663383
88.113984 128.361835 105.634220 129.176792 2.845787
225.624005 119.436211 211.857320 119.212377 3.790147
62.346586 107.100223 49.555360 111.189204 9.095736
460.641118 66.429978 408.119470 64.527693 3.775131
32.114157 430.744113 4.020168 424.802875 4.585097
350.302735 475.390486 256.669285 462.071155 4.758341
421.966069 28.488462 461.946711 30.192624 3.562382
129.453086 33.724215 149.464944 36.125394 2.680877
151.960634 231.017630 112.851686 227.111418 5.973570
129.400486 308.742368 109.353394 308.470979 6.503234
455.578760 141.366846 479.469681 142.855983 4.368216
46.205567 172.856451 64.055075 211.444782 8.026495
190.646608 58.691412 146.861333 57.307358 2.617230
204.454163 133.427836 227.005579 135.312650 4.253856
461.866721 27.213980 423.139823 26.268111 2.590818
453.212818 40.258461 494.476852 42.500124 3.337642
477.426352 192.045034 492.912716 255.676665 5.578110
325.794712 120.530377 326.718149 134.385454 3.991082
479.313251 125.542906 455.497646 124.283735 4.663039
227.407290 134.420386 226.462509 119.480131 3.283906
350.883550 136.902162 350.472920 121.913411 2.875615
18.257506 99.483626 0.560668 97.429144 2.860092
206.372770 464.776399 200.829459 440.578163 4.417480
335.694580 62.426596 369.606124 65.805127 3.860078
29.371380 73.165177 8.180792 71.255805 3.622693
45.217461 105.829286 56.739988 128.816093 6.155979
253.340273 59.032997 278.389335 62.420170 3.447383
431.848879 169.838449 401.733189 168.141058 6.732485
43.425276 330.856826 35.516449 298.456620 5.211139
108.044574 129.618110 105.311392 114.660720 3.807439
249.350404 175.890149 277.190608 178.472667 6.941395
328.075196 136.239263 350.730312 138.076127 4.141806
18.525858 0.426184 24.735488 12.946206 2.109492
246.244878 155.385837 248.802003 175.378531 4.613629
427.869552 277.467253 410.975793 284.028249 2.850720
398.134242 14.162867 429.433750 15.526562 3.311167
246.683107 455.071997 219.201307 447.505893 3.161658
176.089103 422.173534 169.333992 404.390577 3.061713
348.324771 216.176420 350.485679 205.596544 4.023717
452.900719 262.786265 394.006643 256.674641 6.345640
365.238056 262.993972 372.084940 308.093127 4.568109
39.495839 138.908754 46.797720 149.428640 6.245781
49.039987 74.348059 61.520660 103.277866 6.030799
121.888190 438.165016 114.379933 440.639965 3.574687
172.835900 403.218180 177.568496 417.901478 3.608527
509.618479 503.429353 475.552093 494.658165 5.117568
84.327486 114.127195 87.147464 127.811254 3.710026
169.405751 24.698438 201.911433 25.777229 3.410785
344.833624 206.784228 342.819955 224.340011 3.013360
442.766424 450.374071 450.516605 439.299145 2.764964
355.565684 315.646191 364.080400 339.480246 7.400663
351.934340 25.755969 389.410827 26.694690 3.313029
496.897016 40.358524 479.413083 38.914046 3.211959
0.633644 54.979879 34.411079 55.432488 3.732915
2.996378 327.890956 42.069625 332.837703 5.242619
169.371594 423.135859 156.496274 419.097297 5.004187
310.586433 266.779905 294.455011 273.322283 3.005284
349.301186 121.595710 326.741529 119.880245 4.416939
133.136094 148.002892 109.017347 145.811652 6.225144
254.109359 461.811652 222.751823 454.792026 4.042093
321.406759 191.635844 333.316419 230.566441 6.102425
284.366747 251.170112 256.873049 250.753866 5.188652
106.764309 317.707257 174.234571 326.680854 6.268572
339.395916 223.128232 342.719927 201.619224 3.795886
41.911574 60.045301 48.327150 74.283916 3.819817
283.365831 254.395714 282.075951 269.392284 3.133518
274.352037 158.417102 246.630292 156.237806 6.230776
362.659
gitextract_wpkbhclo/
├── .gitmodules
├── README.md
├── assets/
│ └── run.sh
└── thirdparty/
├── CannyLines/
│ ├── CMakeLists.txt
│ └── src/
│ ├── CannyLine.cpp
│ ├── CannyLine.h
│ ├── MetaLine.cpp
│ ├── MetaLine.h
│ ├── QuickSort.h
│ ├── buffer_2d.cpp
│ ├── buffer_2d.h
│ ├── main.cpp
│ └── types.h
├── LSD/
│ ├── COPYING
│ ├── Makefile
│ ├── README.md
│ ├── chairs.lsd.eps
│ ├── chairs.lsd.txt
│ ├── chairs.pgm
│ ├── doc/
│ │ ├── annotated.html
│ │ ├── doxygen.css
│ │ ├── files.html
│ │ ├── formula.repository
│ │ ├── functions.html
│ │ ├── functions_vars.html
│ │ ├── globals.html
│ │ ├── globals_defs.html
│ │ ├── globals_func.html
│ │ ├── globals_type.html
│ │ ├── graph_legend.dot
│ │ ├── graph_legend.html
│ │ ├── index.html
│ │ ├── lsd_8c-source.html
│ │ ├── lsd_8c.html
│ │ ├── lsd_8h-source.html
│ │ ├── lsd_8h.html
│ │ ├── structcoorlist.html
│ │ ├── structimage__char__s.html
│ │ ├── structimage__double__s.html
│ │ ├── structimage__int__s.html
│ │ ├── structntuple__list__s.html
│ │ ├── structpoint.html
│ │ ├── structrect.html
│ │ └── structrect__iter.html
│ ├── doxygen.config
│ ├── lsd.c
│ ├── lsd.h
│ ├── lsd_call_example.c
│ └── lsd_cmd.c
├── LSWMS/
│ ├── CMakeLists.txt
│ ├── LSWMS.cpp
│ ├── LSWMS.h
│ └── main.cpp
└── MCMLSD/
├── MCMLSD/
│ ├── Readme.txt
│ ├── code/
│ │ ├── ElderZuckerEdgeDetector/
│ │ │ ├── code/
│ │ │ │ ├── checkInParam.m
│ │ │ │ ├── checkOutParam.m
│ │ │ │ ├── check_save_requirements.m
│ │ │ │ ├── convolve_2.m
│ │ │ │ ├── d2gauss.m
│ │ │ │ ├── derivative2nd.m
│ │ │ │ ├── elderEdge.m
│ │ │ │ ├── elderEdge.m~
│ │ │ │ ├── find_edges.c
│ │ │ │ ├── find_edges.mexa64
│ │ │ │ ├── find_edges.mexmaci64
│ │ │ │ ├── find_edges.mexw64
│ │ │ │ ├── g1scale.m
│ │ │ │ ├── g1steer.m
│ │ │ │ ├── g2scale.m
│ │ │ │ ├── g2steer.m
│ │ │ │ ├── gauss.m
│ │ │ │ ├── gradient.m
│ │ │ │ ├── main_edge.m
│ │ │ │ ├── mat2hough_scale.m
│ │ │ │ ├── plot_edgelmap.m
│ │ │ │ ├── round2frac.m
│ │ │ │ ├── run_elderEdge.m
│ │ │ │ ├── scalespace.m
│ │ │ │ └── setvalues.m
│ │ │ └── filters/
│ │ │ ├── g1x05.ascii
│ │ │ ├── g1x1.ascii
│ │ │ ├── g1y05.ascii
│ │ │ ├── g1y1.ascii
│ │ │ ├── g2x05.ascii
│ │ │ ├── g2x1.ascii
│ │ │ ├── g2y05.ascii
│ │ │ ├── g2y1.ascii
│ │ │ ├── gx05.ascii
│ │ │ ├── gx1.ascii
│ │ │ ├── gy05.ascii
│ │ │ └── gy1.ascii
│ │ ├── computeKernel.m
│ │ ├── determine_hough_lines_kernel_vote_remove.m
│ │ ├── get_all_segments_assoc_edgeremoval.m
│ │ ├── get_line_segment_DP_edgeremoval.m
│ │ ├── hough_find_peaks_vote_removal.m
│ │ ├── kernelInitialization.m
│ │ ├── lineSegmentation_HighRes.m
│ │ ├── mexfiles/
│ │ │ ├── hmmParameters.m
│ │ │ ├── hmmParameters.mexa64
│ │ │ ├── hmmParameters.mexmaci64
│ │ │ ├── hmmParameters.prj
│ │ │ ├── mexRemoveVotes_v3_scale.c
│ │ │ ├── mexRemoveVotes_v3_scale.mexa64
│ │ │ ├── mexRemoveVotes_v3_scale.mexmaci64
│ │ │ ├── mexVoteEdges_v3_scale.c
│ │ │ ├── mexVoteEdges_v3_scale.mexa64
│ │ │ ├── mexVoteEdges_v3_scale.mexmaci64
│ │ │ ├── returnLines.m
│ │ │ ├── returnLines.mexa64
│ │ │ ├── returnLines.mexmaci64
│ │ │ ├── returnLines.prj
│ │ │ ├── sampleLine.m
│ │ │ ├── sampleLine.mexa64
│ │ │ ├── sampleLine.mexmaci64
│ │ │ └── sampleLine.prj
│ │ ├── parameters/
│ │ │ └── likelihood_model.mat
│ │ ├── precompute_kernels_sparse_res2.m
│ │ ├── project_point_to_line_segment_vec.m
│ │ ├── run_lineSegmentAlgorithm.m
│ │ ├── trace_Back.m
│ │ └── utils/
│ │ ├── getDebug.m
│ │ ├── getImg.m
│ │ ├── getLegend.m
│ │ ├── setDebug.m
│ │ ├── setImg.m
│ │ └── setLegend.m
│ └── demo_start_v2.m
└── __MACOSX/
├── ._MCMLSD
└── MCMLSD/
├── ._.DS_Store
├── ._Imgs
├── ._Readme.txt
├── ._code
├── ._demo_start_v2.m
├── Imgs/
│ └── ._.DS_Store
└── code/
├── ._.DS_Store
├── ._ElderZuckerEdgeDetector
├── ._computeKernel.m
├── ._determine_hough_lines_kernel_vote_remove.m
├── ._get_all_segments_assoc_edgeremoval.m
├── ._get_line_segment_DP_edgeremoval.m
├── ._hough_find_peaks_vote_removal.m
├── ._kernelInitialization.m
├── ._lineSegmentation_HighRes.m
├── ._mexfiles
├── ._parameters
├── ._precompute_kernels_sparse_res2.m
├── ._project_point_to_line_segment_vec.m
├── ._run_lineSegmentAlgorithm.m
├── ._trace_Back.m
├── ._utils
├── ElderZuckerEdgeDetector/
│ ├── ._code
│ ├── ._filters
│ ├── ._images
│ ├── code/
│ │ ├── ._checkInParam.m
│ │ ├── ._checkOutParam.m
│ │ ├── ._check_save_requirements.m
│ │ ├── ._convolve_2.m
│ │ ├── ._d2gauss.m
│ │ ├── ._derivative2nd.m
│ │ ├── ._elderEdge.m
│ │ ├── ._elderEdge.m~
│ │ ├── ._find_edges.c
│ │ ├── ._find_edges.mexa64
│ │ ├── ._find_edges.mexmaci64
│ │ ├── ._find_edges.mexw64
│ │ ├── ._g1scale.m
│ │ ├── ._g1steer.m
│ │ ├── ._g2scale.m
│ │ ├── ._g2steer.m
│ │ ├── ._gauss.m
│ │ ├── ._gradient.m
│ │ ├── ._main_edge.m
│ │ ├── ._mat2hough_scale.m
│ │ ├── ._plot_edgelmap.m
│ │ ├── ._round2frac.m
│ │ ├── ._run_elderEdge.m
│ │ ├── ._scalespace.m
│ │ └── ._setvalues.m
│ ├── filters/
│ │ ├── ._g1x05.ascii
│ │ ├── ._g1x1.ascii
│ │ ├── ._g1y05.ascii
│ │ ├── ._g1y1.ascii
│ │ ├── ._g2x05.ascii
│ │ ├── ._g2x1.ascii
│ │ ├── ._g2y05.ascii
│ │ ├── ._g2y1.ascii
│ │ ├── ._gx05.ascii
│ │ ├── ._gx1.ascii
│ │ ├── ._gy05.ascii
│ │ ├── ._gy1.ascii
│ │ └── ._resource.frk
│ └── images/
│ └── ._peppers
├── mexfiles/
│ ├── ._.DS_Store
│ ├── ._hmmParameters.m
│ ├── ._hmmParameters.mexa64
│ ├── ._hmmParameters.mexmaci64
│ ├── ._hmmParameters.prj
│ ├── ._mexRemoveVotes_v3_scale.c
│ ├── ._mexRemoveVotes_v3_scale.mexa64
│ ├── ._mexRemoveVotes_v3_scale.mexmaci64
│ ├── ._mexVoteEdges_v3_scale.c
│ ├── ._mexVoteEdges_v3_scale.mexa64
│ ├── ._mexVoteEdges_v3_scale.mexmaci64
│ ├── ._returnLines.m
│ ├── ._returnLines.mexa64
│ ├── ._returnLines.mexmaci64
│ ├── ._returnLines.prj
│ ├── ._sampleLine.m
│ ├── ._sampleLine.mexa64
│ ├── ._sampleLine.mexmaci64
│ └── ._sampleLine.prj
├── parameters/
│ ├── ._.DS_Store
│ └── ._likelihood_model.mat
└── utils/
├── ._getDebug.m
├── ._getImg.m
├── ._getLegend.m
├── ._setDebug.m
├── ._setImg.m
└── ._setLegend.m
SYMBOL INDEX (135 symbols across 15 files)
FILE: thirdparty/CannyLines/src/CannyLine.h
function class (line 9) | class CannyLine
FILE: thirdparty/CannyLines/src/MetaLine.h
type DIR (line 12) | enum DIR{LEFT,RIGHT,UP,DOWN}
function class (line 14) | class MetaLine
FILE: thirdparty/CannyLines/src/QuickSort.h
function SortAscent (line 94) | static void SortAscent(TD *pData, long low, long high)
function SortDescent (line 131) | static void SortDescent(TD *pData, long low, long high)
function SortAscent (line 168) | static void SortAscent(TD *pData, long low, long high, TI* pIdxes)
function SortDescent (line 210) | static void SortDescent(TD *pData, long low, long high, TI* pIdxes)
function SortAscent (line 252) | static void SortAscent(TD *pData, long low, long high, TI* pIdxes,TI* pID)
function SortDescent (line 297) | static void SortDescent(TD *pData, long low, long high, TI* pIdxes,TI* pID)
FILE: thirdparty/CannyLines/src/main.cpp
function main (line 11) | void main()
FILE: thirdparty/CannyLines/src/types.h
function item_type (line 74) | inline
function item_type (line 81) | inline
function pop_back (line 102) | inline
function item_type (line 109) | inline
function reserve (line 121) | inline
function resize (line 138) | inline
function item_type (line 158) | inline
function item_type (line 165) | inline
type pixel_t (line 173) | struct pixel_t
type cluster_t (line 180) | struct cluster_t
type list (line 187) | typedef list<cluster_t,1000> clusters_list_t;
type list (line 190) | typedef list<pixel_t,1000> string_t;
type list (line 193) | typedef list<string_t,1000> strings_list_t;
type list (line 195) | typedef list<size_t,1000> size_list_t;
type line_t (line 197) | struct line_t
type list (line 208) | typedef list<line_t,10000> lines_list_t;
FILE: thirdparty/LSD/lsd.c
type coorlist (line 114) | struct coorlist
type point (line 123) | struct point {int x,y;}
function error (line 133) | static void error(char * msg)
function double_equal (line 155) | static int double_equal(double a, double b)
function dist (line 181) | static double dist(double x1, double y1, double x2, double y2)
function free_ntuple_list (line 194) | void free_ntuple_list(ntuple_list in)
function ntuple_list (line 206) | ntuple_list new_ntuple_list(unsigned int dim)
function enlarge_ntuple_list (line 232) | static void enlarge_ntuple_list(ntuple_list n_tuple)
function add_5tuple (line 250) | static void add_5tuple( ntuple_list out, double v1, double v2,
function free_image_char (line 280) | void free_image_char(image_char i)
function image_char (line 291) | image_char new_image_char(unsigned int xsize, unsigned int ysize)
function image_char (line 316) | image_char new_image_char_ini( unsigned int xsize, unsigned int ysize,
function free_image_int (line 336) | void free_image_int(image_int i)
function image_int (line 347) | image_int new_image_int(unsigned int xsize, unsigned int ysize)
function image_int (line 371) | image_int new_image_int_ini( unsigned int xsize, unsigned int ysize,
function free_image_double (line 387) | void free_image_double(image_double i)
function image_double (line 398) | image_double new_image_double(unsigned int xsize, unsigned int ysize)
function image_double (line 422) | image_double new_image_double_ini( unsigned int xsize, unsigned int ysize,
function gaussian_kernel (line 448) | static void gaussian_kernel(ntuple_list kernel, double sigma, double mean)
function image_double (line 511) | static image_double gaussian_sampler( image_double in, double scale,
function image_double (line 652) | static image_double ll_angle( image_double in, double threshold,
function isaligned (line 781) | static int isaligned( int x, int y, image_double angles, double theta,
function angle_diff (line 819) | static double angle_diff(double a, double b)
function angle_diff_signed (line 831) | static double angle_diff_signed(double a, double b)
function log_gamma_lanczos (line 868) | static double log_gamma_lanczos(double x)
function log_gamma_windschitl (line 902) | static double log_gamma_windschitl(double x)
function nfa (line 962) | static double nfa(int n, int k, double p, double logNT)
type rect (line 1057) | struct rect
function rect_copy (line 1071) | static void rect_copy(struct rect * in, struct rect * out)
type rect_iter (line 1147) | typedef struct
function inter_low (line 1165) | static double inter_low(double x, double x1, double y1, double x2, doubl...
function inter_hi (line 1187) | static double inter_hi(double x, double x1, double y1, double x2, double...
function ri_del (line 1202) | static void ri_del(rect_iter * iter)
function ri_end (line 1213) | static int ri_end(rect_iter * i)
function ri_inc (line 1229) | static void ri_inc(rect_iter * i)
function rect_iter (line 1299) | static rect_iter * ri_ini(struct rect * r)
function rect_nfa (line 1370) | static double rect_nfa(struct rect * rec, image_double angles, double lo...
function get_theta (line 1456) | static double get_theta( struct point * reg, int reg_size, double x, dou...
function region2rect (line 1499) | static void region2rect( struct point * reg, int reg_size,
function region_grow (line 1592) | static void region_grow( int x, int y, image_double angles, struct point...
function rect_improve (line 1644) | static double rect_improve( struct rect * rec, image_double angles,
function reduce_region_radius (line 1757) | static int reduce_region_radius( struct point * reg, int * reg_size,
function refine (line 1835) | static int refine( struct point * reg, int * reg_size, image_double modg...
function ntuple_list (line 1913) | ntuple_list LineSegmentDetection( image_double image, double scale,
function ntuple_list (line 2053) | ntuple_list lsd_scale(image_double image, double scale)
function ntuple_list (line 2077) | ntuple_list lsd(image_double image)
FILE: thirdparty/LSD/lsd.h
type ntuple_list_s (line 55) | struct ntuple_list_s
type image_char_s (line 80) | struct image_char_s
type image_int_s (line 100) | struct image_int_s
type image_double_s (line 120) | struct image_double_s
FILE: thirdparty/LSD/lsd_call_example.c
function main (line 4) | int main(void)
FILE: thirdparty/LSD/lsd_cmd.c
function error (line 81) | static void error(char * msg)
type argument (line 99) | struct argument
type arguments (line 121) | struct arguments
function free_arguments (line 137) | static void free_arguments(struct arguments * arg)
function is_id_char (line 146) | static int is_id_char(int c)
function process_new_argument (line 204) | static void process_new_argument(char * id, char * value,struct argument...
function process_argument_description (line 323) | static void process_argument_description( char * desc, struct arguments ...
function print_version (line 407) | static void print_version(struct arguments * arg, FILE * f)
function evaluate_arguments (line 415) | static void evaluate_arguments(int argc, char ** argv, struct arguments ...
function use (line 551) | static void use(struct arguments * arg)
type arguments (line 656) | struct arguments
type arguments (line 658) | struct arguments
type arguments (line 662) | struct arguments
type arguments (line 662) | struct arguments
function is_assigned (line 678) | static int is_assigned(struct arguments * arg, char * name)
type arguments (line 691) | struct arguments
function get_int (line 712) | static int get_int(struct arguments * arg, char * name)
function get_double (line 731) | static double get_double(struct arguments * arg, char * name)
function skip_whites_and_comments (line 755) | static void skip_whites_and_comments(FILE * f)
function get_num (line 773) | static unsigned int get_num(FILE * f)
function image_double (line 793) | static image_double read_pgm_image_double(char * name)
function write_pgm_image_int (line 840) | static void write_pgm_image_int(image_int image, char * name)
function write_eps (line 903) | static void write_eps( ntuple_list segs, char * filename,
function write_svg (line 946) | static void write_svg( ntuple_list segs, char * filename,
function main (line 987) | int main(int argc, char ** argv)
FILE: thirdparty/LSWMS/LSWMS.cpp
function setTo14Quads (line 18) | static void setTo14Quads(DIR_POINT &dp)
FILE: thirdparty/LSWMS/LSWMS.h
type std (line 14) | typedef std::vector<cv::Point> LSEG;
type _DIR_POINT (line 15) | struct _DIR_POINT
function class (line 35) | class LSWMS
FILE: thirdparty/LSWMS/main.cpp
type timeval (line 41) | struct timeval
function help (line 45) | void help()
function processPPHT (line 78) | void processPPHT(cv::Mat &img, std::vector<LSEG> &lSegs)
function drawPPHT (line 107) | void drawPPHT(cv::Mat &dst, std::vector<LSEG> &lSegs, cv::Scalar color)
function main (line 115) | int main(int argc, char** argv)
FILE: thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/find_edges.c
function find_edges (line 95) | int
function round_int (line 380) | int round_int(double rd)
function g2_path (line 399) | int g2_path(double theta,int bx,int by,double *g1mag,double *g1dir,doubl...
function compare_dir (line 685) | int compare_dir(double g1mag1,double g1dir1,int g1scale1,double g1mag2,d...
function sign (line 715) | int sign(double r)
function mexFunction (line 726) | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh...
FILE: thirdparty/MCMLSD/MCMLSD/code/mexfiles/mexRemoveVotes_v3_scale.c
type matPoint (line 43) | typedef struct
type houghPoint (line 49) | typedef struct
function round_f (line 63) | int round_f (double val)
function round2frac (line 67) | double round2frac(double val, double res)
function matPoint (line 73) | matPoint hough2mat(double r, double th, double rres, double thres)
function houghPoint (line 80) | houghPoint mat2hough(int m, int n, double rres, double thres)
function houghRemoveVotes (line 87) | void houghRemoveVotes(matPoint center, mxArray * k, mxArray * k_f, mxArr...
function loopThroughRemove (line 156) | void loopThroughRemove()
function mexFunction (line 202) | void mexFunction ( int nlhs, mxArray *plhs[], int nrhs, const mxArray *p...
FILE: thirdparty/MCMLSD/MCMLSD/code/mexfiles/mexVoteEdges_v3_scale.c
type matPoint (line 42) | typedef struct
type houghPoint (line 48) | typedef struct
function round_f (line 61) | int round_f (double val)
function round2frac (line 65) | double round2frac(double val, double res)
function matPoint (line 71) | matPoint hough2mat(double r, double th, double rres, double thres)
function houghPoint (line 78) | houghPoint mat2hough(int m, int n, double rres, double thres)
function houghVoteMap (line 85) | void houghVoteMap(matPoint center, mxArray * k, mxArray * k_f, mxArray *...
function loopThrough (line 156) | void loopThrough()
function mexFunction (line 206) | void mexFunction ( int nlhs, mxArray *plhs[], int nrhs, const mxArray *p...
Condensed preview — 220 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,479K chars).
[
{
"path": ".gitmodules",
"chars": 1282,
"preview": "[submodule \"thirdparty/DeepLSD\"]\n\tpath = thirdparty/DeepLSD\n\turl = https://github.com/cvg/DeepLSD.git\n[submodule \"thirdp"
},
{
"path": "README.md",
"chars": 4483,
"preview": "<p align=\"center\">\n <h1 align=\"center\"><br><ins>Line Segment Detection</ins><br>A collection of line segment detection "
},
{
"path": "assets/run.sh",
"chars": 1599,
"preview": "## [DELETE SUBMODULES]\n# git rm --cached SOLD2\n# git rm --cached DeepLSD\n# git rm --cached TP-LSD\n# git rm --cached Unif"
},
{
"path": "thirdparty/CannyLines/CMakeLists.txt",
"chars": 590,
"preview": "# set project's name\nPROJECT( CannyLine )\n\n#############################################################################"
},
{
"path": "thirdparty/CannyLines/src/CannyLine.cpp",
"chars": 326,
"preview": "#include \"CannyLine.h\"\n#include \"MetaLine.h\"\n\nCannyLine::CannyLine(void)\n{\n}\n\nCannyLine::~CannyLine(void)\n{\n}\n\nvoid Cann"
},
{
"path": "thirdparty/CannyLines/src/CannyLine.h",
"chars": 292,
"preview": "#ifndef _CANNY_LINE_H_\n#define _CANNY_LINE_H_\n#pragma once\n\n#include \"cv.h\"\n#include \"highgui.h\"\n#include \"cxcore.h\"\n\ncl"
},
{
"path": "thirdparty/CannyLines/src/MetaLine.cpp",
"chars": 48847,
"preview": "#include \"MetaLine.h\"\n#include \"QuickSort.h\"\n\n#define INF 10000000000\n\nMetaLine::MetaLine(void)\n{\n\tvisualMeaningfulGradi"
},
{
"path": "thirdparty/CannyLines/src/MetaLine.h",
"chars": 2819,
"preview": "#ifndef _META_LINE_H_\n#define _META_LINE_H_\n#pragma once\n\n#include <opencv2/opencv.hpp>\n#include \"types.h\"\n#include <vec"
},
{
"path": "thirdparty/CannyLines/src/QuickSort.h",
"chars": 7163,
"preview": "/* --- --- ---\n * Copyright (C) 2008--2010 Idiap Research Institute (.....@idiap.ch)\n * All rights reserved.\n * \n * Redi"
},
{
"path": "thirdparty/CannyLines/src/buffer_2d.cpp",
"chars": 2859,
"preview": "/*\n * Copyright (C) 2008 Leandro A. F. Fernandes and Manuel M. Oliveira\n *\n * author : Fernandes, Leandro A. F.\n * e-m"
},
{
"path": "thirdparty/CannyLines/src/buffer_2d.h",
"chars": 1816,
"preview": "/*\n * Copyright (C) 2008 Leandro A. F. Fernandes and Manuel M. Oliveira\n *\n * author : Fernandes, Leandro A. F.\n * e-m"
},
{
"path": "thirdparty/CannyLines/src/main.cpp",
"chars": 610,
"preview": "#include <stdio.h>\n#include <fstream>\n#include \"cv.h\"\n#include \"highgui.h\"\n#include \"CannyLine.h\"\n\nusing namespace cv;\nu"
},
{
"path": "thirdparty/CannyLines/src/types.h",
"chars": 4582,
"preview": "/*\n * Copyright (C) 2008 Leandro A. F. Fernandes and Manuel M. Oliveira\n *\n * author : Fernandes, Leandro A. F.\n * e-m"
},
{
"path": "thirdparty/LSD/COPYING",
"chars": 34520,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "thirdparty/LSD/Makefile",
"chars": 1441,
"preview": "# -----------------------------------------------------------------------------\n#\n# LSD - Line Segment Detector on digit"
},
{
"path": "thirdparty/LSD/README.md",
"chars": 6110,
"preview": "LSD - Line Segment Detector\r\r\n===========================\r\r\n\r\r\nVersion 1.5 - December 3, 2010\r\r\n\r\r\nby Rafael Grompone vo"
},
{
"path": "thirdparty/LSD/chairs.lsd.eps",
"chars": 69095,
"preview": "%!PS-Adobe-3.0 EPSF-3.0\n%%BoundingBox: 0 0 512 512\n%%Creator: LSD, Line Segment Detector\n%%Title: (chairs.lsd.eps)\n%%End"
},
{
"path": "thirdparty/LSD/chairs.lsd.txt",
"chars": 38734,
"preview": "159.232890 134.369601 160.325338 105.613616 2.735466 \n66.105373 75.587787 63.972852 48.059320 4.028428 \n68.757033 166.69"
},
{
"path": "thirdparty/LSD/chairs.pgm",
"chars": 1064975,
"preview": "P2\n512 512\n255\n 45 45 42 41 42 41 40 40 50 56 67 105 160 88 39 34 \n 34 34 34 67 75 69 72 74 63 45 "
},
{
"path": "thirdparty/LSD/doc/annotated.html",
"chars": 2161,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/doxygen.css",
"chars": 4828,
"preview": "H1 {\n\ttext-align: center;\n\tfont-family: Arial, Helvetica, sans-serif;\n}\nH2 {\n\tfont-family: Geneva, Arial, Helvetica, san"
},
{
"path": "thirdparty/LSD/doc/files.html",
"chars": 1284,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/formula.repository",
"chars": 1023,
"preview": "\\form#0:\\[ G(x,y) = \\frac{1}{2\\pi\\sigma^2} e^{-\\frac{x^2+y^2}{2\\sigma^2}} \\]\n\\form#1:\\[ G(x,y) = G(x) * G(y) \\]\n\\form#2:"
},
{
"path": "thirdparty/LSD/doc/functions.html",
"chars": 3464,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/functions_vars.html",
"chars": 3367,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/globals.html",
"chars": 6951,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/globals_defs.html",
"chars": 1848,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/globals_func.html",
"chars": 5563,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/globals_type.html",
"chars": 1384,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/graph_legend.dot",
"chars": 2181,
"preview": "digraph G\n{\n edge [fontname=\"Helvetica\",fontsize=10,labelfontname=\"Helvetica\",labelfontsize=10];\n node [fontname=\"Helv"
},
{
"path": "thirdparty/LSD/doc/graph_legend.html",
"chars": 4774,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/index.html",
"chars": 2695,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/lsd_8c-source.html",
"chars": 185360,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/lsd_8c.html",
"chars": 272396,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/lsd_8h-source.html",
"chars": 23926,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/lsd_8h.html",
"chars": 78335,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structcoorlist.html",
"chars": 4243,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structimage__char__s.html",
"chars": 5263,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structimage__double__s.html",
"chars": 6273,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structimage__int__s.html",
"chars": 4599,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structntuple__list__s.html",
"chars": 6728,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structpoint.html",
"chars": 3734,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structrect.html",
"chars": 15262,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doc/structrect__iter.html",
"chars": 10201,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html><head><meta http-equiv=\"Content-Type\" content=\"tex"
},
{
"path": "thirdparty/LSD/doxygen.config",
"chars": 43587,
"preview": "# Doxyfile 1.3.4\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
},
{
"path": "thirdparty/LSD/lsd.c",
"chars": 72552,
"preview": "/*----------------------------------------------------------------------------\n\n LSD - Line Segment Detector on digital"
},
{
"path": "thirdparty/LSD/lsd.h",
"chars": 9694,
"preview": "/*----------------------------------------------------------------------------\n\n LSD - Line Segment Detector on digital"
},
{
"path": "thirdparty/LSD/lsd_call_example.c",
"chars": 768,
"preview": "#include <stdio.h>\n#include \"lsd.h\"\n\nint main(void)\n{\n image_double image;\n ntuple_list out;\n unsigned int x,y,i,j;\n "
},
{
"path": "thirdparty/LSD/lsd_cmd.c",
"chars": 36837,
"preview": "/*----------------------------------------------------------------------------\n\n LSD - Line Segment Detector on digital"
},
{
"path": "thirdparty/LSWMS/CMakeLists.txt",
"chars": 443,
"preview": "##############################\nPROJECT( lineSegment )\n##############################\ncmake_minimum_required (VERSION 2.6"
},
{
"path": "thirdparty/LSWMS/LSWMS.cpp",
"chars": 31360,
"preview": "#include \"LSWMS.h\"\n\n#ifdef linux\n\t#include <stdio.h>\n#endif\n\n#include <iostream>\n#include <stdlib.h>\n\n#define ABS(a)\t "
},
{
"path": "thirdparty/LSWMS/LSWMS.h",
"chars": 2226,
"preview": "#ifndef __LSWMS_H__\n#define __LSWMS_H__\n\nenum {RET_OK, RET_ERROR};\n\n#include \"opencv2/core/core.hpp\"\n#include \"opencv2/h"
},
{
"path": "thirdparty/LSWMS/main.cpp",
"chars": 9733,
"preview": "/*\n * Project: lineSegments (LSWMS Line Segment using Weighted Mean-Shift)\n *\n * File: main.cpp\n *\n * Contents: Cre"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/Readme.txt",
"chars": 2888,
"preview": "many function in the line segmentation algorithm were mex file, if you are using\nwindows or linux system, please recompi"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/checkInParam.m",
"chars": 1062,
"preview": "function [out] = checkInput(img1,g1_mag1,g1_dir1,g1_sc1,g2_mag1,g2_sc1,g2_all1,noise1,...\n ED"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/checkOutParam.m",
"chars": 921,
"preview": "function [out] = checkOutParam(edge_map1,blur_map1,dark_map1,light_map1,...\n xzero1_map1,yzero1_map1,xzero2_map1,yze"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/check_save_requirements.m",
"chars": 2554,
"preview": "function[sfilenames] = check_save_requirements(save_flags,outputdir,etype);\n\n name1 = ['edge',etype];\n sfile"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/convolve_2.m",
"chars": 1624,
"preview": "\n%##############################################################\n%\n% [cimg] = convolve_2(mimg,filt,bc)\n% \n% Convolution "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/d2gauss.m",
"chars": 927,
"preview": "%################################################################\n%\n% d2gauss.m returns a 2-d Gaussian filter with kerna"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/derivative2nd.m",
"chars": 2275,
"preview": "%############################################################\n% \n% derivative2nd(g1dir,maxscale,noise,gauss_a,conv_type,"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/elderEdge.m",
"chars": 787,
"preview": "function [edgeStruct] = elderEdge()\n%Run local scale control edge detector on image (Elder & Zucker, 1998)\n\nnoise = 1; %"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/elderEdge.m~",
"chars": 2237,
"preview": "function elderEdge()\n%Run local scale control edge detector on image (Elder & Zucker, 1998)\nnoise = 1; %estimated SD of "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/find_edges.c",
"chars": 27637,
"preview": "\n/************************************************************************************************\n* \n* Routine Name: l"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/g1scale.m",
"chars": 2442,
"preview": "%###########################################################################\n%\n% g1scale(g1mag1,g1dir1,g1mag2,g1dir2,g1s"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/g1steer.m",
"chars": 750,
"preview": "\n%######################################################################\n% \n% g1steer - Computes magnitude and direction"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/g2scale.m",
"chars": 1953,
"preview": "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n% g2scale - Augments multi-scale Gaus"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/g2steer.m",
"chars": 1142,
"preview": "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n% g2steer - Computes the second Gaussia"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/gauss.m",
"chars": 126,
"preview": "% gauss.m: Calculates Gaussian pdf values.\n\nfunction[y] = gauss(x,std)\n\ny = exp(-x.^2/(2*std^2)) / (std*sqrt(2*pi));\n\nre"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/gradient.m",
"chars": 2002,
"preview": "%############################################################\n%\n% gradient(maxscale,noise,gauss_a,conv_type,filtpath)\n% "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/main_edge.m",
"chars": 2826,
"preview": "%############################################################\n%\n% main_edge.m: Main function called from edge GUI inter"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/mat2hough_scale.m",
"chars": 819,
"preview": "function [ r, th] = mat2hough_scale(m, n, r_max, r_res, th_res)\n% MAT2HOUGH converts matrix coordinates to Hough map val"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/plot_edgelmap.m",
"chars": 1249,
"preview": "\n% Function to plot gradient direction vectors at both pixel\n% and subpixel locations:\n\nfunction[] = plot_edgelmap(img"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/round2frac.m",
"chars": 461,
"preview": "%% round2frac() Rounds the input data to the nearest fraction\n%\n% Description: \n%\n% Takes 'data' a matrix of flo"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/run_elderEdge.m",
"chars": 204,
"preview": "clc\nclear\nclose all\nfor i = 1:9\n clear mex\n edgeStruct = elderEdge();\n \n figure;\n imshow(edgeStruct.edge_map)"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/scalespace.m",
"chars": 1086,
"preview": "%################################################################\n%\n% r = scalescape(mimg,maxscale,conv_type)\n%\n% Create"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/code/setvalues.m",
"chars": 613,
"preview": "%##########################################################################\n%\n% [stdd,sizz] = setvalues(scale)\n%\n% Set v"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g1x05.ascii",
"chars": 22,
"preview": "0.750938 0 -0.750938 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g1x1.ascii",
"chars": 88,
"preview": "0.000535321 0.0132955 0.107982 0.241971 -0 -0.241971 -0.107982 -0.0132955 -0.000535321 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g1y05.ascii",
"chars": 24,
"preview": "0.750938 \n0 \n-0.750938 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g1y1.ascii",
"chars": 96,
"preview": "0.000535321 \n0.0132955 \n0.107982 \n0.241971 \n-0 \n-0.241971 \n-0.107982 \n-0.0132955 \n-0.000535321 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g2x05.ascii",
"chars": 46,
"preview": "0.0594001 1.02157 -2.16194 1.02157 0.0594001 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g2x1.ascii",
"chars": 74,
"preview": "0.00200744 0.0354546 0.161972 0 -0.39894 0 0.161972 0.0354546 0.00200744 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g2y05.ascii",
"chars": 50,
"preview": "0.0594002 \n1.02157 \n-2.16194 \n1.02157 \n0.0594002 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/g2y1.ascii",
"chars": 82,
"preview": "0.00200744 \n0.0354546 \n0.161972 \n0 \n-0.39894 \n0 \n0.161972 \n0.0354546 \n0.00200744 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/gx05.ascii",
"chars": 28,
"preview": "0.157727 0.684552 0.157727 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/gx1.ascii",
"chars": 68,
"preview": "0.00443185 0.053991 0.241971 0.398942 0.241971 0.053991 0.00443185 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/gy05.ascii",
"chars": 29,
"preview": "0.157726 \n0.68455 \n0.157726 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/ElderZuckerEdgeDetector/filters/gy1.ascii",
"chars": 74,
"preview": "0.00443185 \n0.053991 \n0.241971 \n0.398942 \n0.241971 \n0.053991 \n0.00443185 \n"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/computeKernel.m",
"chars": 943,
"preview": "function [kern,ind]=computeKernel(e,r_max,SIGMA_X, SIGMA_TH, r_res, th_res)\n%computing the kernel for the probabilistic "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/determine_hough_lines_kernel_vote_remove.m",
"chars": 937,
"preview": "function [ lines, edgeStruct ] = determine_hough_lines_kernel_vote_remove( im, pp, kernels, kernels_flip, num, kernel_pa"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/get_all_segments_assoc_edgeremoval.m",
"chars": 682,
"preview": "function [ begin_points, end_points,ls_likelihoods] = get_all_segments_assoc_edgeremoval( line_data, edgeStruct, pp, LIK"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/get_line_segment_DP_edgeremoval.m",
"chars": 5682,
"preview": "function [final_labels, begin_points, end_points, begin_point, end_point, posterior, lslength, logratioposterior, ls_pr"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/hough_find_peaks_vote_removal.m",
"chars": 4260,
"preview": "%% Function P = hough_find_peaks_with_near_peak_supression(map, num_lines, NHOOD)\n% Input\n% "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/kernelInitialization.m",
"chars": 392,
"preview": "function [kernels, kernels_flip, kernel_params] =kernelInitialization(img)\n[m,n,~]=size(img);\nscale_factor = sqrt(m^2+n^"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/lineSegmentation_HighRes.m",
"chars": 1011,
"preview": "function [lines, fullLines] =lineSegmentation_HighRes(img,kernels, kernels_flip, kernel_params)\n%use 640x480 image as a "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/hmmParameters.m",
"chars": 5530,
"preview": "function [alpha_t, obslik,T,DP_table, aux_table, z]=hmmParameters(exist_edge_on,exist_edge_off,ang_dev_on,...\n ang_de"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/hmmParameters.prj",
"chars": 44733,
"preview": "<deployment-project plugin=\"plugin.coder\" plugin-version=\"R2015b\">\n <configuration build-checksum=\"4179426945\" file=\"/U"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/mexRemoveVotes_v3_scale.c",
"chars": 7316,
"preview": "/*\n * Function: mexRemoveVote_v2\n *\n * Input: Kernel value matrices (regular and flipped), and dimensional\n * "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/mexVoteEdges_v3_scale.c",
"chars": 7276,
"preview": "/*\n * Function: mexVoteEdges_v2\n *\n * Input: Kernel value matrices (regular and flipped), and dimensional\n * "
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/returnLines.m",
"chars": 1821,
"preview": "function [begin_points,end_points,lslength,startpositions,endpositions]=returnLines(points_proj,final_labels)\ncount = 0;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/returnLines.prj",
"chars": 37295,
"preview": "<deployment-project plugin=\"plugin.coder\" plugin-version=\"R2015b\">\n <configuration build-checksum=\"980166774\" file=\"/Us"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/sampleLine.m",
"chars": 2390,
"preview": "function L = sampleLine(rho,theta,m,n,pp)\n%Returns locations of line samples together with the locations\n%of the associa"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/mexfiles/sampleLine.prj",
"chars": 40986,
"preview": "<deployment-project plugin=\"plugin.coder\" plugin-version=\"R2015b\">\n <configuration build-checksum=\"2341851798\" file=\"/U"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/precompute_kernels_sparse_res2.m",
"chars": 1284,
"preview": "function [ kernels, kernels_flip, kernel_params] = precompute_kernels_sparse_res2(r_max, SIGMA_X, SIGMA_TH, r_res, th_re"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/project_point_to_line_segment_vec.m",
"chars": 671,
"preview": "function [q, d] = project_point_to_line_segment_vec(A,B,p)\n % returns q the closest point to p on the line segment from"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/run_lineSegmentAlgorithm.m",
"chars": 827,
"preview": "function [out, P] = run_lineSegmentAlgorithm(kernels, kernels_flip, kernel_params, sig_bound, r_res, th_res, img,scale_f"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/trace_Back.m",
"chars": 2533,
"preview": "function [ lsjoint, lslogz, final_labels, on_nodes, likelihoods ] = trace_Back(DP_table, aux_table, z, node_idx, obsLike"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/utils/getDebug.m",
"chars": 45,
"preview": "function r = getDebug\nglobal debug\nr = debug;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/utils/getImg.m",
"chars": 47,
"preview": "function r = getImg\nglobal origImg\nr = origImg;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/utils/getLegend.m",
"chars": 54,
"preview": "function r = getLegend\nglobal legendStr\nr = legendStr;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/utils/setDebug.m",
"chars": 48,
"preview": "function setDebug(val)\nglobal debug\ndebug = val;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/utils/setImg.m",
"chars": 50,
"preview": "function setImg(img)\nglobal origImg\norigImg = img;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/code/utils/setLegend.m",
"chars": 57,
"preview": "function setLegend(val)\nglobal legendStr\nlegendStr = val;"
},
{
"path": "thirdparty/MCMLSD/MCMLSD/demo_start_v2.m",
"chars": 1053,
"preview": "clear\nclc\nclose all\n\naddpath(genpath('code/'));\naddpath('Imgs/');\nimg = imread(['Imgs', filesep, 'P1040823hr.jpg']);\nimg"
}
]
// ... and 106 more files (download for full content)
About this extraction
This page contains the full source code of the Vincentqyw/LineSegmentsDetection GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 220 files (2.3 MB), approximately 603.9k tokens, and a symbol index with 135 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.