├── Itspoint.m
├── Novel Coplanar Line-points Invariants for Robust Line Matching Across Views.pdf
├── README.md
├── TestLMDll
├── Debug
│ ├── LineMatcher.dll
│ ├── TestLMDll.exe
│ ├── TestLMDll.ilk
│ ├── TestLMDll.pdb
│ ├── TestLMDll.suo
│ ├── opencv_calib3d220.dll
│ └── opencv_calib3d220d.dll
├── README
├── Release
│ ├── LineMatcher.dll
│ ├── TestLMDll.exe
│ ├── TestLMDll.pdb
│ ├── TestLMDll.suo
│ ├── opencv_calib3d220.dll
│ ├── opencv_core220.dll
│ ├── opencv_features2d220.dll
│ ├── opencv_flann220.dll
│ ├── opencv_highgui220.dll
│ ├── opencv_imgproc220.dll
│ ├── test.exe
│ └── test.pdb
├── TestLMDll.sdf
├── TestLMDll.sln
├── TestLMDll.suo
└── TestLMDll
│ ├── Debug
│ ├── CL.read.1.tlog
│ ├── CL.write.1.tlog
│ ├── TestLMDll.exe.embed.manifest
│ ├── TestLMDll.exe.embed.manifest.res
│ ├── TestLMDll.exe.intermediate.manifest
│ ├── TestLMDll.lastbuildstate
│ ├── TestLMDll_manifest.rc
│ ├── cl.command.1.tlog
│ ├── link-cvtres.read.1.tlog
│ ├── link-cvtres.write.1.tlog
│ ├── link.2928-cvtres.read.1.tlog
│ ├── link.2928-cvtres.write.1.tlog
│ ├── link.2928.read.1.tlog
│ ├── link.2928.write.1.tlog
│ ├── link.command.1.tlog
│ ├── link.read.1.tlog
│ ├── link.write.1.tlog
│ ├── lsd.obj
│ ├── main.obj
│ ├── mt.command.1.tlog
│ ├── mt.read.1.tlog
│ ├── mt.write.1.tlog
│ ├── rc.command.1.tlog
│ ├── rc.read.1.tlog
│ ├── rc.write.1.tlog
│ ├── vc100.idb
│ └── vc100.pdb
│ ├── LineMatcher.h
│ ├── LineMatcher.lib
│ ├── Release
│ ├── CL.read.1.tlog
│ ├── CL.write.1.tlog
│ ├── TestLMDll.Build.CppClean.log
│ ├── TestLMDll.exe.intermediate.manifest
│ ├── TestLMDll.lastbuildstate
│ ├── TestLMDll.log
│ ├── TestLMDll.vcxprojResolveAssemblyReference.cache
│ ├── TestLMDll.write.1.tlog
│ ├── cl.command.1.tlog
│ ├── link.command.1.tlog
│ ├── link.read.1.tlog
│ ├── link.write.1.tlog
│ ├── lsd.obj
│ ├── main.obj
│ ├── mt.command.1.tlog
│ ├── mt.read.1.tlog
│ ├── mt.read.2.tlog
│ ├── mt.write.1.tlog
│ └── vc100.pdb
│ ├── TestLMDll.vcxproj
│ ├── TestLMDll.vcxproj.filters
│ ├── TestLMDll.vcxproj.user
│ ├── lsd.c
│ ├── lsd.h
│ └── main.cpp
├── addpointsnearby.m
├── charanums5.m
├── crossproduct.m
├── distline.p
├── getHpoints1L.m
├── getgoodpair.m
├── getpoints.m
├── imgs
├── 1_A.jpg
└── 1_B.jpg
├── intspoints.m
├── linegradient.m
├── linematch.m
├── paras.m
├── projline.m
├── pts&lines
├── 1ABpoint.txt
├── 1Aline.txt
└── 1Bline.txt
└── sameside.m
/Itspoint.m:
--------------------------------------------------------------------------------
1 |
2 | function [X, Y]=Itspoint(line1,line2)
3 |
4 | k1=line1.k;
5 | k2=line2.k;
6 | b1=line1.b;
7 | b2=line2.b;
8 | X=NaN;
9 | Y=NaN;
10 | if k1==k2
11 | %do nothing
12 | elseif k1~=Inf && k2~=Inf
13 | if abs(atan((k2 - k1)/(1+ k1*k2)))> 3.14/8
14 | X=(b2-b1)/(k1-k2);
15 | Y=k1*X+b1;
16 | end
17 |
18 | elseif k1==Inf
19 | if k2>2.4142 || k2<- 2.4142
20 | else
21 | X=line1.point1(1);
22 | Y=k2*X+b2;
23 | end
24 | elseif k2==Inf
25 | if k1>2.4142 || k1<- 2.4142
26 | else
27 | X=line2.point1(1);
28 | Y=k1*X+b1;
29 | end
30 | end
31 |
32 | end
33 |
34 |
--------------------------------------------------------------------------------
/Novel Coplanar Line-points Invariants for Robust Line Matching Across Views.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/Novel Coplanar Line-points Invariants for Robust Line Matching Across Views.pdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This package includes the source codes for "Novel Coplanar Line-points Invariants for Robust Line Matching Across Views".
2 |
3 | To run the program, please:
4 |
5 | 1.Run 'TestLMDll' with Microsoft Visual Studio 2010 to get lines detected by LSD and points matched by SIFT.
6 |
7 | 2.Put the images into directory 'img' , and put the files of matched points and detected lines into directory 'pts&lines'.
8 |
9 | 3.Run linematch (linematch.m) in MATLAB.
10 |
11 | Some of the paths need to be changed.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TestLMDll/Debug/LineMatcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/LineMatcher.dll
--------------------------------------------------------------------------------
/TestLMDll/Debug/TestLMDll.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/TestLMDll.exe
--------------------------------------------------------------------------------
/TestLMDll/Debug/TestLMDll.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/TestLMDll.ilk
--------------------------------------------------------------------------------
/TestLMDll/Debug/TestLMDll.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/TestLMDll.pdb
--------------------------------------------------------------------------------
/TestLMDll/Debug/TestLMDll.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/TestLMDll.suo
--------------------------------------------------------------------------------
/TestLMDll/Debug/opencv_calib3d220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/opencv_calib3d220.dll
--------------------------------------------------------------------------------
/TestLMDll/Debug/opencv_calib3d220d.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Debug/opencv_calib3d220d.dll
--------------------------------------------------------------------------------
/TestLMDll/README:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/README
--------------------------------------------------------------------------------
/TestLMDll/Release/LineMatcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/LineMatcher.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/TestLMDll.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/TestLMDll.exe
--------------------------------------------------------------------------------
/TestLMDll/Release/TestLMDll.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/TestLMDll.pdb
--------------------------------------------------------------------------------
/TestLMDll/Release/TestLMDll.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/TestLMDll.suo
--------------------------------------------------------------------------------
/TestLMDll/Release/opencv_calib3d220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/opencv_calib3d220.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/opencv_core220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/opencv_core220.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/opencv_features2d220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/opencv_features2d220.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/opencv_flann220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/opencv_flann220.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/opencv_highgui220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/opencv_highgui220.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/opencv_imgproc220.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/opencv_imgproc220.dll
--------------------------------------------------------------------------------
/TestLMDll/Release/test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/test.exe
--------------------------------------------------------------------------------
/TestLMDll/Release/test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/Release/test.pdb
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll.sdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll.sdf
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLMDll", "TestLMDll\TestLMDll.vcxproj", "{B8379F69-9E49-48CB-9501-97682399E646}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {B8379F69-9E49-48CB-9501-97682399E646}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {B8379F69-9E49-48CB-9501-97682399E646}.Debug|Win32.Build.0 = Debug|Win32
14 | {B8379F69-9E49-48CB-9501-97682399E646}.Release|Win32.ActiveCfg = Release|Win32
15 | {B8379F69-9E49-48CB-9501-97682399E646}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll.suo
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/CL.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/CL.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/CL.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/CL.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/TestLMDll.exe.embed.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/TestLMDll.exe.embed.manifest.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/TestLMDll.exe.embed.manifest.res
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/TestLMDll.exe.intermediate.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/TestLMDll.lastbuildstate:
--------------------------------------------------------------------------------
1 | #v4.0:v100
2 | Debug|Win32|C:\Users\qianqian\Desktop\TestLMDll\TestLMDll\|
3 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/TestLMDll_manifest.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/TestLMDll_manifest.rc
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/cl.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/cl.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link-cvtres.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link-cvtres.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link-cvtres.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link-cvtres.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.2928-cvtres.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.2928-cvtres.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.2928-cvtres.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.2928-cvtres.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.2928.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.2928.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.2928.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.2928.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/link.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/link.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/lsd.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/lsd.obj
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/main.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/main.obj
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/mt.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/mt.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/mt.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/mt.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/mt.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/mt.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/rc.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/rc.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/rc.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/rc.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/rc.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/rc.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/vc100.idb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/vc100.idb
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Debug/vc100.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Debug/vc100.pdb
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/LineMatcher.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/LineMatcher.h
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/LineMatcher.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/LineMatcher.lib
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/CL.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/CL.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/CL.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/CL.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/TestLMDll.Build.CppClean.log:
--------------------------------------------------------------------------------
1 | E:\图像处理\linematch\LP\TestLMDll\Release\TestLMDll.exe
2 | E:\图像处理\linematch\LP\TestLMDll\TestLMDll\Release\cl.command.1.tlog
3 | E:\图像处理\linematch\LP\TestLMDll\TestLMDll\Release\CL.read.1.tlog
4 | E:\图像处理\linematch\LP\TestLMDll\TestLMDll\Release\CL.write.1.tlog
5 | E:\图像处理\linematch\LP\TestLMDll\TestLMDll\Release\link.command.1.tlog
6 | E:\图像处理\linematch\LP\TestLMDll\TestLMDll\Release\link.read.1.tlog
7 | E:\图像处理\LINEMATCH\LP\TESTLMDLL\TESTLMDLL\RELEASE\LSD.OBJ
8 | E:\图像处理\LINEMATCH\LP\TESTLMDLL\TESTLMDLL\RELEASE\MAIN.OBJ
9 | E:\图像处理\linematch\LP\TestLMDll\TestLMDll\Release\TestLMDll.write.1.tlog
10 | E:\图像处理\LINEMATCH\LP\TESTLMDLL\TESTLMDLL\RELEASE\VC100.PDB
11 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/TestLMDll.exe.intermediate.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/TestLMDll.lastbuildstate:
--------------------------------------------------------------------------------
1 | #v4.0:v100
2 | Release|Win32|E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\|
3 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/TestLMDll.log:
--------------------------------------------------------------------------------
1 | 生成启动时间为 2016/7/7 11:05:29。
2 | 1>项目“E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\TestLMDll\TestLMDll.vcxproj”在节点 2 上(build 个目标)。
3 | 1>InitializeBuildStatus:
4 | 正在创建“Release\TestLMDll.unsuccessfulbuild”,因为已指定“AlwaysCreate”。
5 | ClCompile:
6 | D:\vs2010\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TC /analyze- /errorReport:prompt lsd.c
7 | lsd.c
8 | D:\vs2010\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt main.cpp
9 | main.cpp
10 | 1>D:\Program Files\openCV2.2\include\opencv2/flann/logger.h(66): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
11 | D:\vs2010\VC\include\stdio.h(234) : 参见“fopen”的声明
12 | 1>main.cpp(107): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
13 | 1>main.cpp(108): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
14 | 1>main.cpp(116): warning C4244: “+=”: 从“double”转换到“float”,可能丢失数据
15 | 1>main.cpp(118): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
16 | 1>main.cpp(128): warning C4244: “+=”: 从“double”转换到“float”,可能丢失数据
17 | 1>main.cpp(130): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
18 | 1>main.cpp(164): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
19 | 1>main.cpp(165): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
20 | 1>main.cpp(166): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
21 | 1>main.cpp(167): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
22 | 1>main.cpp(168): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
23 | 1>main.cpp(169): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
24 | 1>main.cpp(317): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
25 | D:\vs2010\VC\include\stdio.h(371) : 参见“sprintf”的声明
26 | 1>main.cpp(335): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
27 | D:\vs2010\VC\include\stdio.h(371) : 参见“sprintf”的声明
28 | 1>main.cpp(355): warning C4018: “<”: 有符号/无符号不匹配
29 | Link:
30 | D:\vs2010\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\Release\TestLMDll.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"D:\Program Files\openCV2.2\lib" /LIBPATH:"D:\Program Files\openCV2.2\bin" opencv_core220.lib opencv_highgui220.lib opencv_calib3d220.lib opencv_features2d220.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\TestLMDll.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\Release\TestLMDll.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\Release\TestLMDll.lib" /MACHINE:X86 Release\lsd.obj
31 | Release\main.obj
32 | 正在生成代码
33 | 已完成代码的生成
34 | TestLMDll.vcxproj -> E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\Release\TestLMDll.exe
35 | Manifest:
36 | C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\Release\TestLMDll.exe;#1" /manifest Release\TestLMDll.exe.intermediate.manifest
37 | FinalizeBuildStatus:
38 | 正在删除文件“Release\TestLMDll.unsuccessfulbuild”。
39 | 正在对“Release\TestLMDll.lastbuildstate”执行 Touch 任务。
40 | 1>已完成生成项目“E:\图像处理\linematch\code\linematch\newcode - 副本\TestLMDll\TestLMDll\TestLMDll.vcxproj”(build 个目标)的操作。
41 |
42 | 生成成功。
43 |
44 | 已用时间 00:00:03.46
45 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/TestLMDll.vcxprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/TestLMDll.vcxprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/TestLMDll.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/TestLMDll.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/cl.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/cl.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/link.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/link.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/link.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/link.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/link.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/link.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/lsd.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/lsd.obj
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/main.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/main.obj
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/mt.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/mt.command.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/mt.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/mt.read.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/mt.read.2.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/mt.read.2.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/mt.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/mt.write.1.tlog
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/Release/vc100.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/Release/vc100.pdb
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/TestLMDll.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {B8379F69-9E49-48CB-9501-97682399E646}
15 | Win32Proj
16 | TestLMDll
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 | D:\Program Files\openCV2.2\include\opencv;D:\Program Files\openCV2.2\include;D:\Program Files\openCV2.2\include\opencv2;$(IncludePath)
43 | D:\Program Files\openCV2.2\lib;$(LibraryPath)
44 |
45 |
46 | false
47 | D:\Program Files\openCV2.2\include\opencv;D:\Program Files\openCV2.2\include;D:\Program Files\openCV2.2\include\opencv2;$(IncludePath)
48 | D:\Program Files\openCV2.2\lib;$(LibraryPath)
49 |
50 |
51 |
52 |
53 |
54 | Level3
55 | Disabled
56 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
57 |
58 |
59 | Console
60 | true
61 | opencv_core220d.lib;opencv_highgui220d.lib;opencv_calib3d220d.lib;opencv_features2d220d.lib;%(AdditionalDependencies)
62 | D:\Program Files\openCV2.2\lib;D:\Program Files\openCV2.2\bin;%(AdditionalLibraryDirectories)
63 |
64 |
65 | true
66 |
67 |
68 |
69 |
70 | Level3
71 |
72 |
73 | MaxSpeed
74 | true
75 | true
76 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
77 |
78 |
79 | Console
80 | true
81 | true
82 | true
83 | opencv_core220.lib;opencv_highgui220.lib;opencv_calib3d220.lib;opencv_features2d220.lib;%(AdditionalDependencies)
84 | D:\Program Files\openCV2.2\lib;D:\Program Files\openCV2.2\bin;%(AdditionalLibraryDirectories)
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/TestLMDll.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 |
26 |
27 | Header Files
28 |
29 |
30 | Header Files
31 |
32 |
33 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/TestLMDll.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | L503_A.jpg L503_B.jpg
5 |
6 |
7 | ..\Debug
8 | WindowsLocalDebugger
9 |
10 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/lsd.c:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 |
3 | LSD - Line Segment Detector on digital images
4 |
5 | Copyright 2007,2008,2009,2010 rafael grompone von gioi (grompone@gmail.com)
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU Affero General Public License as
9 | published by the Free Software Foundation, either version 3 of the
10 | License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU Affero General Public License for more details.
16 |
17 | You should have received a copy of the GNU Affero General Public License
18 | along with this program. If not, see .
19 |
20 | ----------------------------------------------------------------------------*/
21 |
22 | /*----------------------------------------------------------------------------
23 |
24 | This is an implementation of the Line Segment Detector described in the paper:
25 |
26 | "LSD: A Fast Line Segment Detector with a False Detection Control"
27 | by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel,
28 | and Gregory Randall, IEEE Transactions on Pattern Analysis and
29 | Machine Intelligence, vol. 32, no. 4, pp. 722-732, April, 2010.
30 |
31 | and in more details in the CMLA Technical Report:
32 |
33 | "LSD: A Line Segment Detector, Technical Report",
34 | by Rafael Grompone von Gioi, Jeremie Jakubowicz, Jean-Michel Morel,
35 | Gregory Randall, CMLA, ENS Cachan, 2010.
36 |
37 | HISTORY:
38 | version 1.3 - feb 2010: Multiple bug correction and improved code.
39 | version 1.2 - dic 2009: First full Ansi C Language version.
40 | version 1.1 - sep 2009: Systematic subsampling to scale 0.8
41 | and correction to partially handle "angle problem".
42 | version 1.0 - jan 2009: First complete Megawave2 and Ansi C Language version.
43 |
44 | ----------------------------------------------------------------------------*/
45 |
46 | #include
47 | #include
48 | #include
49 | #include
50 | //#include
51 | //#include
52 | #include "lsd.h"
53 | //using namespace std;
54 |
55 | #ifndef M_LN10
56 | #define M_LN10 2.30258509299404568402
57 | #endif /* !M_LN10 */
58 |
59 | #ifndef M_PI
60 | #define M_PI 3.14159265358979323846
61 | #endif /* !M_PI */
62 |
63 | #ifndef FALSE
64 | #define FALSE 0
65 | #endif /* !FALSE */
66 |
67 | #ifndef TRUE
68 | #define TRUE 1
69 | #endif /* !TRUE */
70 |
71 | #define NOTDEF -1024.0
72 | #define M_3_2_PI 4.71238898038
73 | #define M_2__PI 6.28318530718
74 | #define NOTUSED 0
75 | #define USED 1
76 |
77 | /*----------------------------------------------------------------------------*/
78 | struct coorlist
79 | {
80 | int x,y;
81 | struct coorlist * next;
82 | };
83 |
84 | /*----------------------------------------------------------------------------*/
85 | struct point {int x,y;};
86 |
87 |
88 | /*----------------------------------------------------------------------------*/
89 | /*------------------------- Miscellaneous functions --------------------------*/
90 | /*----------------------------------------------------------------------------*/
91 |
92 | /*----------------------------------------------------------------------------*/
93 | /*
94 | Fatal error, print a message to standard-error output and exit.
95 | */
96 | static void error(char * msg)
97 | {
98 | fprintf(stderr,"LSD Error: %s\n",msg);
99 | exit(EXIT_FAILURE);
100 | }
101 |
102 | /*----------------------------------------------------------------------------*/
103 | /*
104 | Compare doubles by relative error.
105 |
106 | The resulting rounding error after floating point computations
107 | depend on the specific operations done. The same number computed by
108 | different algorithms could present different rounding errors. For a
109 | useful comparison, an estimation of the relative rounding error
110 | should be considered and compared to a factor times EPS. The factor
111 | should be related to the cumulated rounding error in the chain of
112 | computation. Here, as a simplification, a fixed factor is used.
113 | */
114 | #define RELATIVE_ERROR_FACTOR 100.0
115 | static int double_equal(double a, double b)
116 | {
117 | double abs_diff,aa,bb,abs_max;
118 |
119 | if( a == b ) return TRUE;
120 |
121 | abs_diff = fabs(a-b);
122 | aa = fabs(a);
123 | bb = fabs(b);
124 | abs_max = aa > bb ? aa : bb;
125 |
126 | /* DBL_MIN is the smallest normalized number, thus, the smallest
127 | number whose relative error is bounded by DBL_EPSILON. For
128 | smaller numbers, the same quantization steps as for DBL_MIN
129 | are used. Then, for smaller numbers, a meaningful "relative"
130 | error should be computed by dividing the difference by DBL_MIN. */
131 | if( abs_max < DBL_MIN ) abs_max = DBL_MIN;
132 |
133 | /* equal if relative error <= factor x eps */
134 | return (abs_diff / abs_max) <= (RELATIVE_ERROR_FACTOR * DBL_EPSILON);
135 | }
136 |
137 | /*----------------------------------------------------------------------------*/
138 | /*
139 | Computes Euclidean distance between point (x1,y1) and point (x2,y2).
140 | */
141 | static double dist(double x1, double y1, double x2, double y2)
142 | {
143 | return sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) );
144 | }
145 |
146 |
147 | /*----------------------------------------------------------------------------*/
148 | /*----------------------- 'list of n-tuple' data type ------------------------*/
149 | /*----------------------------------------------------------------------------*/
150 |
151 | /*----------------------------------------------------------------------------*/
152 | /*
153 | Free memory used in n-tuple 'in'.
154 | */
155 | void free_ntuple_list(ntuple_list in)
156 | {
157 | if( in == NULL || in->values == NULL )
158 | error("free_ntuple_list: invalid n-tuple input.");
159 | free( (void *) in->values );
160 | free( (void *) in );
161 | }
162 |
163 | /*----------------------------------------------------------------------------*/
164 | /*
165 | Create an n-tuple list and allocate memory for one element.
166 | The parameter 'dim' is the dimension (n) of the n-tuple.
167 | */
168 | ntuple_list new_ntuple_list(unsigned int dim)
169 | {
170 | ntuple_list n_tuple;
171 |
172 | if( dim <= 0 ) error("new_ntuple_list: 'dim' must be positive.");
173 |
174 | n_tuple = (ntuple_list) malloc( sizeof(struct ntuple_list_s) );
175 | if( n_tuple == NULL ) error("not enough memory.");
176 | n_tuple->size = 0;
177 | n_tuple->max_size = 1;
178 | n_tuple->dim = dim;
179 | n_tuple->values = (double *) malloc( dim*n_tuple->max_size * sizeof(double) );
180 | if( n_tuple->values == NULL ) error("not enough memory.");
181 | return n_tuple;
182 | }
183 |
184 | /*----------------------------------------------------------------------------*/
185 | /*
186 | Enlarge the allocated memory of an n-tuple list.
187 | */
188 | static void enlarge_ntuple_list(ntuple_list n_tuple)
189 | {
190 | if( n_tuple == NULL || n_tuple->values == NULL || n_tuple->max_size <= 0 )
191 | error("enlarge_ntuple_list: invalid n-tuple.");
192 | n_tuple->max_size *= 2;
193 | n_tuple->values =
194 | (double *) realloc( (void *) n_tuple->values,
195 | n_tuple->dim * n_tuple->max_size * sizeof(double) );
196 | if( n_tuple->values == NULL ) error("not enough memory.");
197 | }
198 |
199 | /*----------------------------------------------------------------------------*/
200 | /*
201 | Add a 5-tuple to an n-tuple list.
202 | */
203 | static void add_5tuple( ntuple_list out, double v1, double v2,
204 | double v3, double v4, double v5 )
205 | {
206 | if( out == NULL ) error("add_5tuple: invalid n-tuple input.");
207 | if( out->dim != 5 ) error("add_5tuple: the n-tuple must be a 5-tuple.");
208 | if( out->size == out->max_size ) enlarge_ntuple_list(out);
209 | if( out->values == NULL ) error("add_5tuple: invalid n-tuple input.");
210 | out->values[ out->size * out->dim + 0 ] = v1;
211 | out->values[ out->size * out->dim + 1 ] = v2;
212 | out->values[ out->size * out->dim + 2 ] = v3;
213 | out->values[ out->size * out->dim + 3 ] = v4;
214 | out->values[ out->size * out->dim + 4 ] = v5;
215 | out->size++;
216 | }
217 |
218 |
219 | /*----------------------------------------------------------------------------*/
220 | /*----------------------------- Image Data Types -----------------------------*/
221 | /*----------------------------------------------------------------------------*/
222 |
223 | /*----------------------------------------------------------------------------*/
224 | /*
225 | Free memory used in image_char 'i'.
226 | */
227 | void free_image_char(image_char i)
228 | {
229 | if( i == NULL || i->data == NULL )
230 | error("free_image_char: invalid input image.");
231 | free( (void *) i->data );
232 | free( (void *) i );
233 | }
234 |
235 | /*----------------------------------------------------------------------------*/
236 | /*
237 | Create a new image_char of size 'xsize' times 'ysize'.
238 | */
239 | image_char new_image_char(unsigned int xsize, unsigned int ysize)
240 | {
241 | image_char image;
242 |
243 | if( xsize == 0 || ysize == 0 ) error("new_image_char: invalid image size.");
244 |
245 | image = (image_char) malloc( sizeof(struct image_char_s) );
246 | if( image == NULL ) error("not enough memory.");
247 | image->data = (unsigned char *) calloc( xsize*ysize, sizeof(unsigned char) );
248 | if( image->data == NULL ) error("not enough memory.");
249 |
250 | image->xsize = xsize;
251 | image->ysize = ysize;
252 |
253 | return image;
254 | }
255 |
256 | /*----------------------------------------------------------------------------*/
257 | /*
258 | Create a new image_char of size 'xsize' times 'ysize',
259 | initialized to the value 'fill_value'.
260 | */
261 | image_char new_image_char_ini( unsigned int xsize, unsigned int ysize,
262 | unsigned char fill_value )
263 | {
264 | image_char image = new_image_char(xsize,ysize);
265 | unsigned int N = xsize*ysize;
266 | unsigned int i;
267 |
268 | if( image == NULL || image->data == NULL )
269 | error("new_image_char_ini: invalid image.");
270 |
271 | for(i=0; idata[i] = fill_value;
272 |
273 | return image;
274 | }
275 |
276 | /*----------------------------------------------------------------------------*/
277 | /*
278 | Free memory used in image_int 'i'.
279 | */
280 | void free_image_int(image_int i)
281 | {
282 | if( i == NULL || i->data == NULL )
283 | error("free_image_int: invalid input image.");
284 | free( (void *) i->data );
285 | free( (void *) i );
286 | }
287 |
288 | /*----------------------------------------------------------------------------*/
289 | /*
290 | Create a new image_int of size 'xsize' times 'ysize'.
291 | */
292 | image_int new_image_int(unsigned int xsize, unsigned int ysize)
293 | {
294 | image_int image;
295 |
296 | if( xsize == 0 || ysize == 0 ) error("new_image_int: invalid image size.");
297 |
298 | image = (image_int) malloc( sizeof(struct image_int_s) );
299 | if( image == NULL ) error("not enough memory.");
300 | image->data = (int *) calloc( xsize*ysize, sizeof(int) );
301 | if( image->data == NULL ) error("not enough memory.");
302 |
303 | image->xsize = xsize;
304 | image->ysize = ysize;
305 |
306 | return image;
307 | }
308 |
309 | /*----------------------------------------------------------------------------*/
310 | /*
311 | Create a new image_int of size 'xsize' times 'ysize',
312 | initialized to the value 'fill_value'.
313 | */
314 | image_int new_image_int_ini( unsigned int xsize, unsigned int ysize,
315 | int fill_value )
316 | {
317 | image_int image = new_image_int(xsize,ysize);
318 | unsigned int N = xsize*ysize;
319 | unsigned int i;
320 |
321 | for(i=0; idata[i] = fill_value;
322 |
323 | return image;
324 | }
325 |
326 | /*----------------------------------------------------------------------------*/
327 | /*
328 | Free memory used in image_double 'i'.
329 | */
330 | void free_image_double(image_double i)
331 | {
332 | if( i == NULL || i->data == NULL )
333 | error("free_image_double: invalid input image.");
334 | free( (void *) i->data );
335 | free( (void *) i );
336 | }
337 |
338 | /*----------------------------------------------------------------------------*/
339 | /*
340 | Create a new image_double of size 'xsize' times 'ysize'.
341 | */
342 | image_double new_image_double(unsigned int xsize, unsigned int ysize)
343 | {
344 | image_double image;
345 |
346 | if( xsize == 0 || ysize == 0 ) error("new_image_double: invalid image size.");
347 |
348 | image = (image_double) malloc( sizeof(struct image_double_s) );
349 | if( image == NULL ) error("not enough memory.");
350 | image->data = (double *) calloc( xsize * ysize, sizeof(double) );
351 | if( image->data == NULL ) error("not enough memory.");
352 |
353 | image->xsize = xsize;
354 | image->ysize = ysize;
355 |
356 | return image;
357 | }
358 |
359 | /*----------------------------------------------------------------------------*/
360 | /*
361 | Create a new image_double of size 'xsize' times 'ysize',
362 | initialized to the value 'fill_value'.
363 | */
364 | image_double new_image_double_ini( unsigned int xsize, unsigned int ysize,
365 | double fill_value )
366 | {
367 | image_double image = new_image_double(xsize,ysize);
368 | unsigned int N = xsize*ysize;
369 | unsigned int i;
370 |
371 | for(i=0; idata[i] = fill_value;
372 |
373 | return image;
374 | }
375 |
376 |
377 | /*----------------------------------------------------------------------------*/
378 | /*----------------------------- Gaussian filter ------------------------------*/
379 | /*----------------------------------------------------------------------------*/
380 |
381 | /*----------------------------------------------------------------------------*/
382 | /*
383 | Compute a Gaussian kernel of length 'kernel->dim',
384 | standard deviation 'sigma', and centered at value 'mean'.
385 | For example, if mean=0.5, the Gaussian will be centered
386 | in the middle point between values 'kernel->values[0]'
387 | and 'kernel->values[1]'.
388 | */
389 | static void gaussian_kernel(ntuple_list kernel, double sigma, double mean)
390 | {
391 | double sum = 0.0;
392 | double val;
393 | unsigned int i;
394 |
395 | if( kernel == NULL || kernel->values == NULL )
396 | error("gaussian_kernel: invalid n-tuple 'kernel'.");
397 | if( sigma <= 0.0 ) error("gaussian_kernel: 'sigma' must be positive.");
398 |
399 | /* compute gaussian kernel */
400 | if( kernel->max_size < 1 ) enlarge_ntuple_list(kernel);
401 | kernel->size = 1;
402 | for(i=0;idim;i++)
403 | {
404 | val = ( (double) i - mean ) / sigma;
405 | kernel->values[i] = exp( -0.5 * val * val );
406 | sum += kernel->values[i];
407 | }
408 |
409 | /* normalization */
410 | if( sum >= 0.0 ) for(i=0;idim;i++) kernel->values[i] /= sum;
411 | }
412 |
413 | /*----------------------------------------------------------------------------*/
414 | /*
415 | Subsample image 'in' with Gaussian filtering, to a scale 'scale'
416 | (for example, 0.8 will give a result at 80% of the original size),
417 | using a standard deviation sigma given by:
418 |
419 | sigma = sigma_scale / scale, if scale < 1.0
420 | sigma = sigma_scale, if scale >= 1.0
421 | */
422 | static image_double gaussian_sampler( image_double in, double scale,
423 | double sigma_scale )
424 | {
425 | image_double aux,out;
426 | ntuple_list kernel;
427 | unsigned int N,M,h,n,x,y,i;
428 | int xc,yc,j,double_x_size,double_y_size;
429 | double sigma,xx,yy,sum,prec;
430 |
431 | if( in == NULL || in->data == NULL || in->xsize <= 0 || in->ysize <= 0 )
432 | error("gaussian_sampler: invalid image.");
433 | if( scale <= 0.0 ) error("gaussian_sampler: 'scale' must be positive.");
434 | if( sigma_scale <= 0.0 )
435 | error("gaussian_sampler: 'sigma_scale' must be positive.");
436 |
437 | /* get memory for images */
438 | N = (unsigned int) floor( in->xsize * scale );
439 | M = (unsigned int) floor( in->ysize * scale );
440 | aux = new_image_double(N,in->ysize);
441 | out = new_image_double(N,M);
442 |
443 | /* sigma, kernel size and memory for the kernel */
444 | sigma = scale < 1.0 ? sigma_scale / scale : sigma_scale;
445 | /*
446 | The size of the kernel is selected to guarantee that the
447 | the first discarded term is at least 10^prec times smaller
448 | than the central value. For that, h should be larger than x, with
449 | e^(-x^2/2sigma^2) = 1/10^prec.
450 | Then,
451 | x = sigma * sqrt( 2 * prec * ln(10) ).
452 | */
453 | prec = 3.0;
454 | h = (unsigned int) ceil( sigma * sqrt( 2.0 * prec * log(10.0) ) );
455 | n = 1+2*h; /* kernel size */
456 | kernel = new_ntuple_list(n);
457 |
458 | /* auxiliary double image size variables */
459 | double_x_size = (int) (2 * in->xsize);
460 | double_y_size = (int) (2 * in->ysize);
461 |
462 | /* First subsampling: x axis */
463 | for(x=0;xxsize;x++)
464 | {
465 | /*
466 | x is the coordinate in the new image.
467 | xx is the corresponding x-value in the original size image.
468 | xc is the integer value, the pixel coordinate of xx.
469 | */
470 | xx = (double) x / scale;
471 | /* coordinate (0.0,0.0) is in the center of pixel (0,0),
472 | so the pixel with xc=0 get the values of xx from -0.5 to 0.5 */
473 | xc = (int) floor( xx + 0.5 );
474 | gaussian_kernel( kernel, sigma, (double) h + xx - (double) xc );
475 | /* the kernel must be computed for each x because the fine
476 | offset xx-xc is different in each case */
477 |
478 | for(y=0;yysize;y++)
479 | {
480 | sum = 0.0;
481 | for(i=0;idim;i++)
482 | {
483 | j = xc - h + i;
484 |
485 | /* symmetry boundary condition */
486 | while( j < 0 ) j += double_x_size;
487 | while( j >= double_x_size ) j -= double_x_size;
488 | if( j >= (int) in->xsize ) j = double_x_size-1-j;
489 |
490 | sum += in->data[ j + y * in->xsize ] * kernel->values[i];
491 | }
492 | aux->data[ x + y * aux->xsize ] = sum;
493 | }
494 | }
495 |
496 | /* Second subsampling: y axis */
497 | for(y=0;yysize;y++)
498 | {
499 | /*
500 | y is the coordinate in the new image.
501 | yy is the corresponding x-value in the original size image.
502 | yc is the integer value, the pixel coordinate of xx.
503 | */
504 | yy = (double) y / scale;
505 | /* coordinate (0.0,0.0) is in the center of pixel (0,0),
506 | so the pixel with yc=0 get the values of yy from -0.5 to 0.5 */
507 | yc = (int) floor( yy + 0.5 );
508 | gaussian_kernel( kernel, sigma, (double) h + yy - (double) yc );
509 | /* the kernel must be computed for each y because the fine
510 | offset yy-yc is different in each case */
511 |
512 | for(x=0;xxsize;x++)
513 | {
514 | sum = 0.0;
515 | for(i=0;idim;i++)
516 | {
517 | j = yc - h + i;
518 |
519 | /* symmetry boundary condition */
520 | while( j < 0 ) j += double_y_size;
521 | while( j >= double_y_size ) j -= double_y_size;
522 | if( j >= (int) in->ysize ) j = double_y_size-1-j;
523 |
524 | sum += aux->data[ x + j * aux->xsize ] * kernel->values[i];
525 | }
526 | out->data[ x + y * out->xsize ] = sum;
527 | }
528 | }
529 |
530 | /* free memory */
531 | free_ntuple_list(kernel);
532 | free_image_double(aux);
533 |
534 | return out;
535 | }
536 |
537 |
538 | /*----------------------------------------------------------------------------*/
539 | /*------------------------------ Gradient Angle ------------------------------*/
540 | /*----------------------------------------------------------------------------*/
541 |
542 | /*----------------------------------------------------------------------------*/
543 | /*
544 | Computes the direction of the level line of 'in' at each point.
545 | It returns:
546 |
547 | - an image_double with the angle at each pixel, or NOTDEF if not defined.
548 | - the image_double 'modgrad' (a pointer is passed as argument)
549 | with the gradient magnitude at each point.
550 | - a list of pixels 'list_p' roughly ordered by gradient magnitude.
551 | (the order is made by classing points into bins by gradient magnitude.
552 | the parameters 'n_bins' and 'max_grad' specify the number of
553 | bins and the gradient modulus at the highest bin.)
554 | - a pointer 'mem_p' to the memory used by 'list_p' to be able to
555 | free the memory.
556 | */
557 | static image_double ll_angle( image_double in, double threshold,
558 | struct coorlist ** list_p, void ** mem_p,
559 | image_double * modgrad, unsigned int n_bins,
560 | double max_grad )
561 | {
562 | image_double g;
563 | unsigned int n,p,x,y,adr,i;
564 | double com1,com2,gx,gy,norm,norm2;
565 | /* the rest of the variables are used for pseudo-ordering
566 | the gradient magnitude values */
567 | int list_count = 0;
568 | struct coorlist * list;
569 | struct coorlist ** range_l_s; /* array of pointers to start of bin list */
570 | struct coorlist ** range_l_e; /* array of pointers to end of bin list */
571 | struct coorlist * start;
572 | struct coorlist * end;
573 |
574 | /* check parameters */
575 | if( in == NULL || in->data == NULL || in->xsize <= 0 || in->ysize <= 0 )
576 | error("ll_angle: invalid image.");
577 | if( threshold < 0.0 ) error("ll_angle: 'threshold' must be positive.");
578 | if( list_p == NULL ) error("ll_angle: NULL pointer 'list_p'.");
579 | if( mem_p == NULL ) error("ll_angle: NULL pointer 'mem_p'.");
580 | if( modgrad == NULL ) error("ll_angle: NULL pointer 'modgrad'.");
581 | if( n_bins <= 0 ) error("ll_angle: 'n_bins' must be positive.");
582 | if( max_grad <= 0.0 ) error("ll_angle: 'max_grad' must be positive.");
583 |
584 | n = in->ysize;
585 | p = in->xsize;
586 |
587 | /* allocate output image */
588 | g = new_image_double(in->xsize,in->ysize);
589 |
590 | /* get memory for the image of gradient modulus */
591 | *modgrad = new_image_double(in->xsize,in->ysize);
592 |
593 | /* get memory for "ordered" coordinate list */
594 | list = (struct coorlist *) calloc(n*p,sizeof(struct coorlist));
595 | *mem_p = (void *) list;
596 | range_l_s = (struct coorlist **) calloc(n_bins,sizeof(struct coorlist *));
597 | range_l_e = (struct coorlist **) calloc(n_bins,sizeof(struct coorlist *));
598 | if( list == NULL || range_l_s == NULL || range_l_e == NULL )
599 | error("not enough memory.");
600 | for(i=0;idata[(n-1)*p+x] = NOTDEF;
604 | for(y=0;ydata[p*y+p-1] = NOTDEF;
605 |
606 | /*** remaining part ***/
607 | for(x=0;xdata[adr+p+1] - in->data[adr];
624 | com2 = in->data[adr+1] - in->data[adr+p];
625 | gx = com1+com2;
626 | gy = com1-com2;
627 | norm2 = gx*gx+gy*gy;
628 | norm = sqrt( norm2 / 4.0 );
629 |
630 | (*modgrad)->data[adr] = norm;
631 |
632 | if( norm <= threshold ) /* norm too small, gradient no defined */
633 | g->data[adr] = NOTDEF;
634 | else
635 | {
636 | /* angle computation */
637 | g->data[adr] = atan2(gx,-gy);
638 |
639 | /* store the point in the right bin according to its norm */
640 | i = (unsigned int) (norm * (double) n_bins / max_grad);
641 | if( i >= n_bins ) i = n_bins-1;
642 | if( range_l_e[i] == NULL )
643 | range_l_s[i] = range_l_e[i] = list+list_count++;
644 | else
645 | {
646 | range_l_e[i]->next = list+list_count;
647 | range_l_e[i] = list+list_count++;
648 | }
649 | range_l_e[i]->x = (int) x;
650 | range_l_e[i]->y = (int) y;
651 | range_l_e[i]->next = NULL;
652 | }
653 | }
654 |
655 | /* Make the list of points "ordered" by norm value.
656 | It starts by the larger bin, so the list starts by the
657 | pixels with higher gradient value.
658 | */
659 | for(i=n_bins-1; i>0 && range_l_s[i]==NULL; i--);
660 | start = range_l_s[i];
661 | end = range_l_e[i];
662 | if( start != NULL )
663 | for(i--;i>0; i--)
664 | if( range_l_s[i] != NULL )
665 | {
666 | end->next = range_l_s[i];
667 | end = range_l_e[i];
668 | }
669 | *list_p = start;
670 |
671 | /* free memory */
672 | free( (void *) range_l_s );
673 | free( (void *) range_l_e );
674 |
675 | return g;
676 | }
677 |
678 | /*----------------------------------------------------------------------------*/
679 | /*
680 | Is point (x,y) aligned to angle theta, up to precision 'prec'?
681 | */
682 | static int isaligned( int x, int y, image_double angles, double theta,
683 | double prec )
684 | {
685 | double a;
686 |
687 | /* check parameters */
688 | if( angles == NULL || angles->data == NULL )
689 | error("isaligned: invalid image 'angles'.");
690 | if( x < 0 || y < 0 || x >= (int) angles->xsize || y >= (int) angles->ysize )
691 | error("isaligned: (x,y) out of the image.");
692 | if( prec < 0.0 ) error("isaligned: 'prec' must be positive.");
693 |
694 | a = angles->data[ x + y * angles->xsize ];
695 |
696 | if( a == NOTDEF ) return FALSE; /* there is no risk of double comparison
697 | problem here because we are only
698 | interested in the exact NOTDEF value */
699 |
700 | /* it is assumed that 'theta' and 'a' are in the range [-pi,pi] */
701 | theta -= a;
702 | if( theta < 0.0 ) theta = -theta;
703 | if( theta > M_3_2_PI )
704 | {
705 | theta -= M_2__PI;
706 | if( theta < 0.0 ) theta = -theta;
707 | }
708 |
709 | return theta < prec;
710 | }
711 |
712 | /*----------------------------------------------------------------------------*/
713 | /*
714 | Absolute value angle difference.
715 | */
716 | static double angle_diff(double a, double b)
717 | {
718 | a -= b;
719 | while( a <= -M_PI ) a += M_2__PI;
720 | while( a > M_PI ) a -= M_2__PI;
721 | if( a < 0.0 ) a = -a;
722 | return a;
723 | }
724 |
725 | /*----------------------------------------------------------------------------*/
726 | /*
727 | Signed angle difference.
728 | */
729 | static double angle_diff_signed(double a, double b)
730 | {
731 | a -= b;
732 | while( a <= -M_PI ) a += M_2__PI;
733 | while( a > M_PI ) a -= M_2__PI;
734 | return a;
735 | }
736 |
737 |
738 | /*----------------------------------------------------------------------------*/
739 | /*----------------------------- NFA computation ------------------------------*/
740 | /*----------------------------------------------------------------------------*/
741 |
742 | /*----------------------------------------------------------------------------*/
743 | /*
744 | Calculates the natural logarithm of the absolute value of
745 | the gamma function of x using the Lanczos approximation,
746 | see http://www.rskey.org/gamma.htm
747 |
748 | The formula used is
749 | \Gamma(x) = \frac{ \sum_{n=0}^{N} q_n x^n }{ \Pi_{n=0}^{N} (x+n) }
750 | (x+5.5)^(x+0.5) e^{-(x+5.5)}
751 | so
752 | \log\Gamma(x) = \log( \sum_{n=0}^{N} q_n x^n ) + (x+0.5) \log(x+5.5)
753 | - (x+5.5) - \sum_{n=0}^{N} \log(x+n)
754 | and
755 | q0 = 75122.6331530
756 | q1 = 80916.6278952
757 | q2 = 36308.2951477
758 | q3 = 8687.24529705
759 | q4 = 1168.92649479
760 | q5 = 83.8676043424
761 | q6 = 2.50662827511
762 | */
763 | static double log_gamma_lanczos(double x)
764 | {
765 | static double q[7] = { 75122.6331530, 80916.6278952, 36308.2951477,
766 | 8687.24529705, 1168.92649479, 83.8676043424,
767 | 2.50662827511 };
768 | double a = (x+0.5) * log(x+5.5) - (x+5.5);
769 | double b = 0.0;
770 | int n;
771 |
772 | for(n=0;n<7;n++)
773 | {
774 | a -= log( x + (double) n );
775 | b += q[n] * pow( x, (double) n );
776 | }
777 | return a + log(b);
778 | }
779 |
780 | /*----------------------------------------------------------------------------*/
781 | /*
782 | Calculates the natural logarithm of the absolute value of
783 | the gamma function of x using Robert H. Windschitl method,
784 | see http://www.rskey.org/gamma.htm
785 |
786 | The formula used is
787 | \Gamma(x) = \sqrt(\frac{2\pi}{x}) ( \frac{x}{e}
788 | \sqrt{ x\sinh(1/x) + \frac{1}{810x^6} } )^x
789 | so
790 | \log\Gamma(x) = 0.5\log(2\pi) + (x-0.5)\log(x) - x
791 | + 0.5x\log( x\sinh(1/x) + \frac{1}{810x^6} ).
792 |
793 | This formula is a good approximation when x > 15.
794 | */
795 | static double log_gamma_windschitl(double x)
796 | {
797 | return 0.918938533204673 + (x-0.5)*log(x) - x
798 | + 0.5*x*log( x*sinh(1/x) + 1/(810.0*pow(x,6.0)) );
799 | }
800 |
801 | /*----------------------------------------------------------------------------*/
802 | /*
803 | Calculates the natural logarithm of the absolute value of
804 | the gamma function of x. When x>15 use log_gamma_windschitl(),
805 | otherwise use log_gamma_lanczos().
806 | */
807 | #define log_gamma(x) ((x)>15.0?log_gamma_windschitl(x):log_gamma_lanczos(x))
808 |
809 | /*----------------------------------------------------------------------------*/
810 | /*
811 | Computes -log10(NFA)
812 |
813 | NFA stands for Number of False Alarms:
814 |
815 | NFA = NT.b(n,k,p)
816 |
817 | NT - number of tests
818 | b(,,) - tail of binomial distribution with parameters n,k and p
819 |
820 | The value -log10(NFA) is equivalent but more intuitive than NFA:
821 | -1 corresponds to 10 mean false alarms
822 | 0 corresponds to 1 mean false alarm
823 | 1 corresponds to 0.1 mean false alarms
824 | 2 corresponds to 0.01 mean false alarms
825 | ...
826 |
827 | Used this way, the bigger the value, better the detection,
828 | and a logarithmic scale is used.
829 |
830 | Parameters:
831 | n,k,p - binomial parameters.
832 | logNT - logarithm of Number of Tests
833 | */
834 | #define TABSIZE 100000
835 | static double nfa(int n, int k, double p, double logNT)
836 | {
837 | static double inv[TABSIZE]; /* table to keep computed inverse values */
838 | double tolerance = 0.1; /* an error of 10% in the result is accepted */
839 | double log1term,term,bin_term,mult_term,bin_tail,err,p_term;
840 | int i;
841 |
842 | if( n<0 || k<0 || k>n || p<=0.0 || p>=1.0 )
843 | error("nfa: wrong n, k or p values.");
844 |
845 | if( n==0 || k==0 ) return -logNT;
846 | if( n==k ) return -logNT - (double) n * log10(p);
847 |
848 | p_term = p / (1.0-p);
849 |
850 | /* compute the first term of the series */
851 | /*
852 | binomial_tail(n,k,p) = sum_{i=k}^n bincoef(n,i) * p^i * (1-p)^{n-i}
853 | where bincoef(n,i) are the binomial coefficients.
854 | But
855 | bincoef(n,k) = gamma(n+1) / ( gamma(k+1) * gamma(n-k+1) ).
856 | We use this to compute the first term. Actually the log of it.
857 | */
858 | log1term = log_gamma( (double) n + 1.0 ) - log_gamma( (double) k + 1.0 )
859 | - log_gamma( (double) (n-k) + 1.0 )
860 | + (double) k * log(p) + (double) (n-k) * log(1.0-p);
861 | term = exp(log1term);
862 |
863 | /* in some cases no more computations are needed */
864 | if( double_equal(term,0.0) ) /* the first term is almost zero */
865 | {
866 | if( (double) k > (double) n * p ) /* at begin or end of the tail? */
867 | return -log1term / M_LN10 - logNT; /* end: use just the first term */
868 | else
869 | return -logNT; /* begin: the tail is roughly 1 */
870 | }
871 |
872 | /* compute more terms if needed */
873 | bin_tail = term;
874 | for(i=k+1;i<=n;i++)
875 | {
876 | /*
877 | As
878 | term_i = bincoef(n,i) * p^i * (1-p)^(n-i)
879 | and
880 | bincoef(n,i)/bincoef(n,i-1) = n-1+1 / i,
881 | then,
882 | term_i / term_i-1 = (n-i+1)/i * p/(1-p)
883 | and
884 | term_i = term_i-1 * (n-i+1)/i * p/(1-p).
885 | 1/i is stored in a table as they are computed,
886 | because divisions are expensive.
887 | p/(1-p) is computed only once and stored in 'p_term'.
888 | */
889 | bin_term = (double) (n-i+1) * ( ii.
899 | Then, the error on the binomial tail when truncated at
900 | the i term can be bounded by a geometric series of form
901 | term_i * sum mult_term_i^j. */
902 | err = term * ( ( 1.0 - pow( mult_term, (double) (n-i+1) ) ) /
903 | (1.0-mult_term) - 1.0 );
904 |
905 | /* One wants an error at most of tolerance*final_result, or:
906 | tolerance * abs(-log10(bin_tail)-logNT).
907 | Now, the error that can be accepted on bin_tail is
908 | given by tolerance*final_result divided by the derivative
909 | of -log10(x) when x=bin_tail. that is:
910 | tolerance * abs(-log10(bin_tail)-logNT) / (1/bin_tail)
911 | Finally, we truncate the tail if the error is less than:
912 | tolerance * abs(-log10(bin_tail)-logNT) * bin_tail */
913 | if( err < tolerance * fabs(-log10(bin_tail)-logNT) * bin_tail ) break;
914 | }
915 | }
916 | return -log10(bin_tail) - logNT;
917 | }
918 |
919 |
920 | /*----------------------------------------------------------------------------*/
921 | /*--------------------------- Rectangle structure ----------------------------*/
922 | /*----------------------------------------------------------------------------*/
923 |
924 | /*----------------------------------------------------------------------------*/
925 | struct rect /* line segment with width */
926 | {
927 | double x1,y1,x2,y2; /* first and second point of the line segment */
928 | double width; /* rectangle width */
929 | double x,y; /* center of the rectangle */
930 | double theta; /* angle */
931 | double dx,dy; /* vector with the line segment angle */
932 | double prec; /* tolerance angle */
933 | double p; /* probability of a point with angle within 'prec' */
934 | };
935 |
936 | /*----------------------------------------------------------------------------*/
937 | /*
938 | Copy one rectangle structure to another.
939 | */
940 | static void rect_copy(struct rect * in, struct rect * out)
941 | {
942 | if( in == NULL || out == NULL ) error("rect_copy: invalid 'in' or 'out'.");
943 | out->x1 = in->x1;
944 | out->y1 = in->y1;
945 | out->x2 = in->x2;
946 | out->y2 = in->y2;
947 | out->width = in->width;
948 | out->x = in->x;
949 | out->y = in->y;
950 | out->theta = in->theta;
951 | out->dx = in->dx;
952 | out->dy = in->dy;
953 | out->prec = in->prec;
954 | out->p = in->p;
955 | }
956 |
957 | /*----------------------------------------------------------------------------*/
958 | /*
959 | Rectangle points iterator.
960 | */
961 | typedef struct
962 | {
963 | double vx[4];
964 | double vy[4];
965 | double ys,ye;
966 | int x,y;
967 | } rect_iter;
968 |
969 | /*----------------------------------------------------------------------------*/
970 | /*
971 | Rectangle points iterator auxiliary function.
972 | */
973 | static double inter_low(double x, double x1, double y1, double x2, double y2)
974 | {
975 | if( x1 > x2 || x < x1 || x > x2 )
976 | {
977 | fprintf(stderr,"inter_low: x %g x1 %g x2 %g.\n",x,x1,x2);
978 | error("impossible situation.");
979 | }
980 | if( double_equal(x1,x2) && y1y2 ) return y2;
982 | return y1 + (x-x1) * (y2-y1) / (x2-x1);
983 | }
984 |
985 | /*----------------------------------------------------------------------------*/
986 | /*
987 | Rectangle points iterator auxiliary function.
988 | */
989 | static double inter_hi(double x, double x1, double y1, double x2, double y2)
990 | {
991 | if( x1 > x2 || x < x1 || x > x2 )
992 | {
993 | fprintf(stderr,"inter_hi: x %g x1 %g x2 %g.\n",x,x1,x2);
994 | error("impossible situation.");
995 | }
996 | if( double_equal(x1,x2) && y1y2 ) return y1;
998 | return y1 + (x-x1) * (y2-y1) / (x2-x1);
999 | }
1000 |
1001 | /*----------------------------------------------------------------------------*/
1002 | /*
1003 | Free memory used by a rectangle iterator.
1004 | */
1005 | static void ri_del(rect_iter * iter)
1006 | {
1007 | if( iter == NULL ) error("ri_del: NULL iterator.");
1008 | free( (void *) iter );
1009 | }
1010 |
1011 | /*----------------------------------------------------------------------------*/
1012 | /*
1013 | Check if the iterator finished the full iteration.
1014 | */
1015 | static int ri_end(rect_iter * i)
1016 | {
1017 | if( i == NULL ) error("ri_end: NULL iterator.");
1018 | return (double)(i->x) > i->vx[2];
1019 | }
1020 |
1021 | /*----------------------------------------------------------------------------*/
1022 | /*
1023 | Increment a rectangle iterator.
1024 | */
1025 | static void ri_inc(rect_iter * i)
1026 | {
1027 | if( i == NULL ) error("ri_inc: NULL iterator.");
1028 |
1029 | if( (double) (i->x) <= i->vx[2] ) i->y++;
1030 |
1031 | while( (double) (i->y) > i->ye && (double) (i->x) <= i->vx[2] )
1032 | {
1033 | /* new x */
1034 | i->x++;
1035 |
1036 | if( (double) (i->x) > i->vx[2] ) return; /* end of iteration */
1037 |
1038 | /* update lower y limit for the line */
1039 | if( (double) i->x < i->vx[3] )
1040 | i->ys = inter_low((double)i->x,i->vx[0],i->vy[0],i->vx[3],i->vy[3]);
1041 | else i->ys = inter_low((double)i->x,i->vx[3],i->vy[3],i->vx[2],i->vy[2]);
1042 |
1043 | /* update upper y limit for the line */
1044 | if( (double)i->x < i->vx[1] )
1045 | i->ye = inter_hi((double)i->x,i->vx[0],i->vy[0],i->vx[1],i->vy[1]);
1046 | else i->ye = inter_hi((double)i->x,i->vx[1],i->vy[1],i->vx[2],i->vy[2]);
1047 |
1048 | /* new y */
1049 | i->y = (int) ceil(i->ys);
1050 | }
1051 | }
1052 |
1053 | /*----------------------------------------------------------------------------*/
1054 | /*
1055 | Create and initialize a rectangle iterator.
1056 | */
1057 | static rect_iter * ri_ini(struct rect * r)
1058 | {
1059 | double vx[4],vy[4];
1060 | int n,offset;
1061 | rect_iter * i;
1062 |
1063 | if( r == NULL ) error("ri_ini: invalid rectangle.");
1064 |
1065 | i = (rect_iter *) malloc(sizeof(rect_iter));
1066 | if( i == NULL ) error("ri_ini: Not enough memory.");
1067 |
1068 | vx[0] = r->x1 - r->dy * r->width / 2.0;
1069 | vy[0] = r->y1 + r->dx * r->width / 2.0;
1070 | vx[1] = r->x2 - r->dy * r->width / 2.0;
1071 | vy[1] = r->y2 + r->dx * r->width / 2.0;
1072 | vx[2] = r->x2 + r->dy * r->width / 2.0;
1073 | vy[2] = r->y2 - r->dx * r->width / 2.0;
1074 | vx[3] = r->x1 + r->dy * r->width / 2.0;
1075 | vy[3] = r->y1 - r->dx * r->width / 2.0;
1076 |
1077 | if( r->x1 < r->x2 && r->y1 <= r->y2 ) offset = 0;
1078 | else if( r->x1 >= r->x2 && r->y1 < r->y2 ) offset = 1;
1079 | else if( r->x1 > r->x2 && r->y1 >= r->y2 ) offset = 2;
1080 | else offset = 3;
1081 |
1082 | for(n=0; n<4; n++)
1083 | {
1084 | i->vx[n] = vx[(offset+n)%4];
1085 | i->vy[n] = vy[(offset+n)%4];
1086 | }
1087 |
1088 | /* starting point */
1089 | i->x = (int) ceil(i->vx[0]) - 1;
1090 | i->y = (int) ceil(i->vy[0]);
1091 | i->ys = i->ye = -DBL_MAX;
1092 |
1093 | /* advance to the first point */
1094 | ri_inc(i);
1095 |
1096 | return i;
1097 | }
1098 |
1099 | /*----------------------------------------------------------------------------*/
1100 | /*
1101 | Compute a rectangle's NFA value.
1102 | */
1103 | static double rect_nfa(struct rect * rec, image_double angles, double logNT)
1104 | {
1105 | rect_iter * i;
1106 | int pts = 0;
1107 | int alg = 0;
1108 |
1109 | if( rec == NULL ) error("rect_nfa: invalid rectangle.");
1110 | if( angles == NULL ) error("rect_nfa: invalid 'angles'.");
1111 |
1112 | for(i=ri_ini(rec); !ri_end(i); ri_inc(i))
1113 | if( i->x >= 0 && i->y >= 0 &&
1114 | i->x < (int) angles->xsize && i->y < (int) angles->ysize )
1115 | {
1116 | ++pts;
1117 | if( isaligned(i->x, i->y, angles, rec->theta, rec->prec) ) ++alg;
1118 | }
1119 | ri_del(i);
1120 |
1121 | return nfa(pts,alg,rec->p,logNT);
1122 | }
1123 |
1124 |
1125 | /*----------------------------------------------------------------------------*/
1126 | /*---------------------------------- Regions ---------------------------------*/
1127 | /*----------------------------------------------------------------------------*/
1128 |
1129 | /*----------------------------------------------------------------------------*/
1130 | /*
1131 | Compute a region's angle.
1132 | */
1133 | static double get_theta( struct point * reg, int reg_size, double x, double y,
1134 | image_double modgrad, double reg_angle, double prec )
1135 | {
1136 | double lambda1,lambda2,tmp,theta,weight,sum;
1137 | double Ixx = 0.0;
1138 | double Iyy = 0.0;
1139 | double Ixy = 0.0;
1140 | int i;
1141 |
1142 | /* check parameters */
1143 | if( reg == NULL ) error("get_theta: invalid region.");
1144 | if( reg_size <= 1 ) error("get_theta: region size <= 1.");
1145 | if( modgrad == NULL || modgrad->data == NULL )
1146 | error("get_theta: invalid 'modgrad'.");
1147 | if( prec < 0.0 ) error("get_theta: 'prec' must be positive.");
1148 |
1149 | /*----------- theta ---------------------------------------------------*/
1150 | /*
1151 | Region inertia matrix A:
1152 | Ixx Ixy
1153 | Ixy Iyy
1154 | where
1155 | Ixx = \sum_i y_i^2
1156 | Iyy = \sum_i x_i^2
1157 | Ixy = -\sum_i x_i y_i
1158 |
1159 | lambda1 and lambda2 are the eigenvalues, with lambda1 >= lambda2.
1160 | They are found by solving the characteristic polynomial
1161 | det(\lambda I - A) = 0.
1162 |
1163 | To get the line segment direction we want to get the eigenvector of
1164 | the smaller eigenvalue. We have to solve a,b in:
1165 | a.Ixx + b.Ixy = a.lambda2
1166 | a.Ixy + b.Iyy = b.lambda2
1167 | We want the angle theta = atan(b/a). I can be computed with
1168 | any of the two equations:
1169 | theta = atan( (lambda2-Ixx) / Ixy )
1170 | or
1171 | theta = atan( Ixy / (lambda2-Iyy) )
1172 |
1173 | When |Ixx| > |Iyy| we use the first, otherwise the second
1174 | (just to get better numeric precision).
1175 | */
1176 | sum = 0.0;
1177 | for(i=0; idata[ reg[i].x + reg[i].y * modgrad->xsize ];
1180 | Ixx += ( (double) reg[i].y - y ) * ( (double) reg[i].y - y ) * weight;
1181 | Iyy += ( (double) reg[i].x - x ) * ( (double) reg[i].x - x ) * weight;
1182 | Ixy -= ( (double) reg[i].x - x ) * ( (double) reg[i].y - y ) * weight;
1183 | sum += weight;
1184 | }
1185 | if( sum <= 0.0 ) error("get_theta: weights sum less or equal to zero.");
1186 | Ixx /= sum;
1187 | Iyy /= sum;
1188 | Ixy /= sum;
1189 | lambda1 = ( Ixx + Iyy + sqrt( (Ixx-Iyy)*(Ixx-Iyy) + 4.0*Ixy*Ixy ) ) / 2.0;
1190 | lambda2 = ( Ixx + Iyy - sqrt( (Ixx-Iyy)*(Ixx-Iyy) + 4.0*Ixy*Ixy ) ) / 2.0;
1191 | if( fabs(lambda1) < fabs(lambda2) )
1192 | {
1193 | fprintf(stderr,"Ixx %g Iyy %g Ixy %g lamb1 %g lamb2 %g - lamb1 < lamb2\n",
1194 | Ixx,Iyy,Ixy,lambda1,lambda2);
1195 | tmp = lambda1;
1196 | lambda1 = lambda2;
1197 | lambda2 = tmp;
1198 | }
1199 |
1200 | if( fabs(Ixx) > fabs(Iyy) )
1201 | theta = atan2( lambda2-Ixx, Ixy );
1202 | else
1203 | theta = atan2( Ixy, lambda2-Iyy );
1204 |
1205 | /* The previous procedure don't cares about orientation,
1206 | so it could be wrong by 180 degrees. Here is corrected if necessary. */
1207 | if( angle_diff(theta,reg_angle) > prec ) theta += M_PI;
1208 |
1209 | return theta;
1210 | }
1211 |
1212 | /*----------------------------------------------------------------------------*/
1213 | /*
1214 | Computes a rectangle that covers a region of points.
1215 | */
1216 | static void region2rect( struct point * reg, int reg_size,
1217 | image_double modgrad, double reg_angle,
1218 | double prec, double p, struct rect * rec )
1219 | {
1220 | double x,y,dx,dy,l,w,theta,weight,sum,l_min,l_max,w_min,w_max;
1221 | int i;
1222 |
1223 | /* check parameters */
1224 | if( reg == NULL ) error("region2rect: invalid region.");
1225 | if( reg_size <= 1 ) error("region2rect: region size <= 1.");
1226 | if( modgrad == NULL || modgrad->data == NULL )
1227 | error("region2rect: invalid image 'modgrad'.");
1228 | if( rec == NULL ) error("region2rect: invalid 'rec'.");
1229 |
1230 | /* center */
1231 | x = y = sum = 0.0;
1232 | for(i=0; idata[ reg[i].x + reg[i].y * modgrad->xsize ];
1235 | x += (double) reg[i].x * weight;
1236 | y += (double) reg[i].y * weight;
1237 | sum += weight;
1238 | }
1239 | if( sum <= 0.0 ) error("region2rect: weights sum equal to zero.");
1240 | x /= sum;
1241 | y /= sum;
1242 |
1243 | /* theta */
1244 | theta = get_theta(reg,reg_size,x,y,modgrad,reg_angle,prec);
1245 |
1246 | /* length and width */
1247 | dx = cos(theta);
1248 | dy = sin(theta);
1249 | l_min = l_max = w_min = w_max = 0.0;
1250 | for(i=0; i l_max ) l_max = l;
1256 | if( l < l_min ) l_min = l;
1257 | if( w > w_max ) w_max = w;
1258 | if( w < w_min ) w_min = w;
1259 | }
1260 |
1261 | /* store values */
1262 | rec->x1 = x + l_min * dx;
1263 | rec->y1 = y + l_min * dy;
1264 | rec->x2 = x + l_max * dx;
1265 | rec->y2 = y + l_max * dy;
1266 | rec->width = w_max - w_min;
1267 | rec->x = x;
1268 | rec->y = y;
1269 | rec->theta = theta;
1270 | rec->dx = dx;
1271 | rec->dy = dy;
1272 | rec->prec = prec;
1273 | rec->p = p;
1274 |
1275 | if( rec->width < 1.0 ) rec->width = 1.0;
1276 | }
1277 |
1278 | /*----------------------------------------------------------------------------*/
1279 | /*
1280 | Found a region of points that share the same angle, up to a tolerance 'prec',
1281 | starting at point (x,y).
1282 | */
1283 | static void region_grow( int x, int y, image_double angles, struct point * reg,
1284 | int * reg_size, double * reg_angle, image_char used,
1285 | double prec )
1286 | {
1287 | double sumdx,sumdy;
1288 | int xx,yy,i;
1289 |
1290 | /* check parameters */
1291 | if( x < 0 || y < 0 || x >= (int) angles->xsize || y >= (int) angles->ysize )
1292 | error("region_grow: (x,y) out of the image.");
1293 | if( angles == NULL || angles->data == NULL )
1294 | error("region_grow: invalid image 'angles'.");
1295 | if( reg == NULL ) error("region_grow: invalid 'reg'.");
1296 | if( reg_size == NULL ) error("region_grow: invalid pointer 'reg_size'.");
1297 | if( reg_angle == NULL ) error("region_grow: invalid pointer 'reg_angle'.");
1298 | if( used == NULL || used->data == NULL )
1299 | error("region_grow: invalid image 'used'.");
1300 |
1301 | /* first point of the region */
1302 | *reg_size = 1;
1303 | reg[0].x = x;
1304 | reg[0].y = y;
1305 | *reg_angle = angles->data[x+y*angles->xsize];
1306 | sumdx = cos(*reg_angle);
1307 | sumdy = sin(*reg_angle);
1308 | used->data[x+y*used->xsize] = USED;
1309 |
1310 | /* try neighbors as new region points */
1311 | for(i=0; i<*reg_size; i++)
1312 | for(xx=reg[i].x-1; xx<=reg[i].x+1; xx++)
1313 | for(yy=reg[i].y-1; yy<=reg[i].y+1; yy++)
1314 | if( xx>=0 && yy>=0 && xx<(int)used->xsize && yy<(int)used->ysize &&
1315 | used->data[xx+yy*used->xsize] != USED &&
1316 | isaligned(xx,yy,angles,*reg_angle,prec) )
1317 | {
1318 | /* add point */
1319 | used->data[xx+yy*used->xsize] = USED;
1320 | reg[*reg_size].x = xx;
1321 | reg[*reg_size].y = yy;
1322 | ++(*reg_size);
1323 |
1324 | /* update region's angle */
1325 | sumdx += cos( angles->data[xx+yy*angles->xsize] );
1326 | sumdy += sin( angles->data[xx+yy*angles->xsize] );
1327 | *reg_angle = atan2(sumdy,sumdx);
1328 | }
1329 | }
1330 |
1331 | /*----------------------------------------------------------------------------*/
1332 | /*
1333 | Try some rectangles variations to improve NFA value.
1334 | Only if the rectangle is not meaningful (i.e., log_nfa <= eps).
1335 | */
1336 | static double rect_improve( struct rect * rec, image_double angles,
1337 | double logNT, double eps )
1338 | {
1339 | struct rect r;
1340 | double log_nfa,log_nfa_new;
1341 | double delta = 0.5;
1342 | double delta_2 = delta / 2.0;
1343 | int n;
1344 |
1345 | log_nfa = rect_nfa(rec,angles,logNT);
1346 |
1347 | if( log_nfa > eps ) return log_nfa;
1348 |
1349 | /* try finer precisions */
1350 | rect_copy(rec,&r);
1351 | for(n=0; n<5; n++)
1352 | {
1353 | r.p /= 2.0;
1354 | r.prec = r.p * M_PI;
1355 | log_nfa_new = rect_nfa(&r,angles,logNT);
1356 | if( log_nfa_new > log_nfa )
1357 | {
1358 | log_nfa = log_nfa_new;
1359 | rect_copy(&r,rec);
1360 | }
1361 | }
1362 |
1363 | if( log_nfa > eps ) return log_nfa;
1364 |
1365 | /* try to reduce width */
1366 | rect_copy(rec,&r);
1367 | for(n=0; n<5; n++)
1368 | {
1369 | if( (r.width - delta) >= 0.5 )
1370 | {
1371 | r.width -= delta;
1372 | log_nfa_new = rect_nfa(&r,angles,logNT);
1373 | if( log_nfa_new > log_nfa )
1374 | {
1375 | rect_copy(&r,rec);
1376 | log_nfa = log_nfa_new;
1377 | }
1378 | }
1379 | }
1380 |
1381 | if( log_nfa > eps ) return log_nfa;
1382 |
1383 | /* try to reduce one side of the rectangle */
1384 | rect_copy(rec,&r);
1385 | for(n=0; n<5; n++)
1386 | {
1387 | if( (r.width - delta) >= 0.5 )
1388 | {
1389 | r.x1 += -r.dy * delta_2;
1390 | r.y1 += r.dx * delta_2;
1391 | r.x2 += -r.dy * delta_2;
1392 | r.y2 += r.dx * delta_2;
1393 | r.width -= delta;
1394 | log_nfa_new = rect_nfa(&r,angles,logNT);
1395 | if( log_nfa_new > log_nfa )
1396 | {
1397 | rect_copy(&r,rec);
1398 | log_nfa = log_nfa_new;
1399 | }
1400 | }
1401 | }
1402 |
1403 | if( log_nfa > eps ) return log_nfa;
1404 |
1405 | /* try to reduce the other side of the rectangle */
1406 | rect_copy(rec,&r);
1407 | for(n=0; n<5; n++)
1408 | {
1409 | if( (r.width - delta) >= 0.5 )
1410 | {
1411 | r.x1 -= -r.dy * delta_2;
1412 | r.y1 -= r.dx * delta_2;
1413 | r.x2 -= -r.dy * delta_2;
1414 | r.y2 -= r.dx * delta_2;
1415 | r.width -= delta;
1416 | log_nfa_new = rect_nfa(&r,angles,logNT);
1417 | if( log_nfa_new > log_nfa )
1418 | {
1419 | rect_copy(&r,rec);
1420 | log_nfa = log_nfa_new;
1421 | }
1422 | }
1423 | }
1424 |
1425 | if( log_nfa > eps ) return log_nfa;
1426 |
1427 | /* try even finer precisions */
1428 | rect_copy(rec,&r);
1429 | for(n=0; n<5; n++)
1430 | {
1431 | r.p /= 2.0;
1432 | r.prec = r.p * M_PI;
1433 | log_nfa_new = rect_nfa(&r,angles,logNT);
1434 | if( log_nfa_new > log_nfa )
1435 | {
1436 | log_nfa = log_nfa_new;
1437 | rect_copy(&r,rec);
1438 | }
1439 | }
1440 |
1441 | return log_nfa;
1442 | }
1443 |
1444 | /*----------------------------------------------------------------------------*/
1445 | /*
1446 | Reduce the region size, by elimination the points far from the
1447 | starting point, until that leads to rectangle with the right
1448 | density of region points or to discard the region if too small.
1449 | */
1450 | static int reduce_region_radius( struct point * reg, int * reg_size,
1451 | image_double modgrad, double reg_angle,
1452 | double prec, double p, struct rect * rec,
1453 | image_char used, image_double angles,
1454 | double density_th, double logNT, double eps )
1455 | {
1456 | double density,rad1,rad2,rad,xc,yc,log_nfa;
1457 | int i;
1458 |
1459 | /* check parameters */
1460 | if( reg == NULL ) error("refine: invalid pointer 'reg'.");
1461 | if( reg_size == NULL ) error("refine: invalid pointer 'reg_size'.");
1462 | if( prec < 0.0 ) error("refine: 'prec' must be positive.");
1463 | if( rec == NULL ) error("refine: invalid pointer 'rec'.");
1464 | if( used == NULL || used->data == NULL )
1465 | error("refine: invalid image 'used'.");
1466 | if( angles == NULL || angles->data == NULL )
1467 | error("refine: invalid image 'angles'.");
1468 |
1469 | /* compute region points density */
1470 | density = (double) *reg_size /
1471 | ( dist(rec->x1,rec->y1,rec->x2,rec->y2) * rec->width );
1472 |
1473 | if( density >= density_th ) return TRUE;
1474 |
1475 | /* compute region radius */
1476 | xc = (double) reg[0].x;
1477 | yc = (double) reg[0].y;
1478 | rad1 = dist( xc, yc, rec->x1, rec->y1 );
1479 | rad2 = dist( xc, yc, rec->x2, rec->y2 );
1480 | rad = rad1 > rad2 ? rad1 : rad2;
1481 |
1482 | while( density < density_th )
1483 | {
1484 | rad *= 0.75;
1485 |
1486 | /* remove points from the region and update 'used' map */
1487 | for(i=0; i<*reg_size; i++)
1488 | if( dist( xc, yc, (double) reg[i].x, (double) reg[i].y ) > rad )
1489 | {
1490 | /* point not kept, mark it as NOTUSED */
1491 | used->data[ reg[i].x + reg[i].y * used->xsize ] = NOTUSED;
1492 | /* remove point from the region */
1493 | reg[i].x = reg[*reg_size-1].x; /* if i==*reg_size-1 copy itself */
1494 | reg[i].y = reg[*reg_size-1].y;
1495 | --(*reg_size);
1496 | --i; /* to avoid skipping one point */
1497 | }
1498 |
1499 | /* reject if the region is too small.
1500 | 2 is the minimal region size for 'region2rect' to work. */
1501 | if( *reg_size < 2 ) return FALSE;
1502 |
1503 | /* re-compute rectangle */
1504 | region2rect(reg,*reg_size,modgrad,reg_angle,prec,p,rec);
1505 |
1506 | /* try to improve the rectangle and compute NFA */
1507 | log_nfa = rect_improve(rec,angles,logNT,eps);
1508 |
1509 | /* re-compute region points density */
1510 | density = (double) *reg_size /
1511 | ( dist(rec->x1,rec->y1,rec->x2,rec->y2) * rec->width );
1512 | }
1513 |
1514 | /* if the final rectangle is meaningful accept, otherwise reject */
1515 | if( log_nfa > eps ) return TRUE;
1516 | else return FALSE;
1517 | }
1518 |
1519 | /*----------------------------------------------------------------------------*/
1520 | /*
1521 | Refine a rectangle. For that, an estimation of the angle tolerance is
1522 | performed by the standard deviation of the angle at points near the
1523 | region's starting point. Then, a new region is grown starting from the
1524 | same point, but using the estimated angle tolerance.
1525 | If this fails to produce a rectangle with the right density of
1526 | region points, 'reduce_region_radius' is called to try to
1527 | satisfy this condition.
1528 | */
1529 | static int refine( struct point * reg, int * reg_size, image_double modgrad,
1530 | double reg_angle, double prec, double p, struct rect * rec,
1531 | image_char used, image_double angles, double density_th,
1532 | double logNT, double eps )
1533 | {
1534 | double angle,ang_d,mean_angle,tau,density,xc,yc,ang_c,sum,s_sum,log_nfa;
1535 | int i,n;
1536 |
1537 | /* check parameters */
1538 | if( reg == NULL ) error("refine: invalid pointer 'reg'.");
1539 | if( reg_size == NULL ) error("refine: invalid pointer 'reg_size'.");
1540 | if( prec < 0.0 ) error("refine: 'prec' must be positive.");
1541 | if( rec == NULL ) error("refine: invalid pointer 'rec'.");
1542 | if( used == NULL || used->data == NULL )
1543 | error("refine: invalid image 'used'.");
1544 | if( angles == NULL || angles->data == NULL )
1545 | error("refine: invalid image 'angles'.");
1546 |
1547 | /* compute region points density */
1548 | density = (double) *reg_size /
1549 | ( dist(rec->x1,rec->y1,rec->x2,rec->y2) * rec->width );
1550 |
1551 | if( density >= density_th ) return TRUE;
1552 |
1553 | /*------ First try: reduce angle tolerance ------*/
1554 |
1555 | /* compute the new mean angle and tolerance */
1556 | xc = (double) reg[0].x;
1557 | yc = (double) reg[0].y;
1558 | ang_c = angles->data[ reg[0].x + reg[0].y * angles->xsize ];
1559 | sum = s_sum = 0.0;
1560 | n = 0;
1561 | for(i=0; i<*reg_size; i++)
1562 | {
1563 | used->data[ reg[i].x + reg[i].y * used->xsize ] = NOTUSED;
1564 | if( dist( xc, yc, (double) reg[i].x, (double) reg[i].y ) < rec->width )
1565 | {
1566 | angle = angles->data[ reg[i].x + reg[i].y * angles->xsize ];
1567 | ang_d = angle_diff_signed(angle,ang_c);
1568 | sum += ang_d;
1569 | s_sum += ang_d * ang_d;
1570 | ++n;
1571 | }
1572 | }
1573 | mean_angle = sum / (double) n;
1574 | tau = 2.0 * sqrt( (s_sum - 2.0 * mean_angle * sum) / (double) n
1575 | + mean_angle*mean_angle ); /* 2 * standard deviation */
1576 |
1577 | /* find a new region from the same starting point and new angle tolerance */
1578 | region_grow(reg[0].x,reg[0].y,angles,reg,reg_size,®_angle,used,tau);
1579 |
1580 | /* if the region is too small, reject */
1581 | if( *reg_size < 2 ) return FALSE;
1582 |
1583 | /* re-compute rectangle */
1584 | region2rect(reg,*reg_size,modgrad,reg_angle,prec,p,rec);
1585 |
1586 | /* try to improve the rectangle and compute NFA */
1587 | log_nfa = rect_improve(rec,angles,logNT,eps);
1588 |
1589 | /* re-compute region points density */
1590 | density = (double) *reg_size /
1591 | ( dist(rec->x1,rec->y1,rec->x2,rec->y2) * rec->width );
1592 |
1593 | /*------ Second try: reduce region radius ------*/
1594 | if( density < density_th )
1595 | return reduce_region_radius( reg, reg_size, modgrad, reg_angle, prec, p,
1596 | rec, used, angles, density_th, logNT, eps );
1597 |
1598 | /* if the final rectangle is meaningful accept, otherwise reject */
1599 | if( log_nfa > eps ) return TRUE;
1600 | else return FALSE;
1601 | }
1602 |
1603 |
1604 | /*----------------------------------------------------------------------------*/
1605 | /*-------------------------- Line Segment Detector ---------------------------*/
1606 | /*----------------------------------------------------------------------------*/
1607 |
1608 | /*----------------------------------------------------------------------------*/
1609 | /*
1610 | LSD full interface
1611 | */
1612 | ntuple_list LineSegmentDetection( image_double image, double scale,
1613 | double sigma_scale, double quant,
1614 | double ang_th, double eps, double density_th,
1615 | int n_bins, double max_grad,
1616 | image_int * region )
1617 | {
1618 | ntuple_list out = new_ntuple_list(5);
1619 | image_double scaled_image,angles,modgrad;
1620 | image_char used;
1621 | struct coorlist * list_p;
1622 | void * mem_p;
1623 | struct rect rec;
1624 | struct point * reg;
1625 | int reg_size,min_reg_size,i;
1626 | unsigned int xsize,ysize;
1627 | double rho,reg_angle,prec,p,log_nfa,logNT;
1628 | int ls_count = 0; /* line segments are numbered 1,2,3,... */
1629 |
1630 |
1631 | /* check parameters */
1632 | if( image==NULL || image->data==NULL || image->xsize<=0 || image->ysize<=0 )
1633 | error("invalid image input.");
1634 | if( scale <= 0.0 ) error("'scale' value must be positive.");
1635 | if( sigma_scale <= 0.0 ) error("'sigma_scale' value must be positive.");
1636 | if( quant < 0.0 ) error("'quant' value must be positive.");
1637 | if( ang_th <= 0.0 || ang_th >= 180.0 )
1638 | error("'ang_th' value must be in the range (0,180).");
1639 | if( density_th < 0.0 || density_th > 1.0 )
1640 | error("'density_th' value must be in the range [0,1].");
1641 | if( n_bins <= 0 ) error("'n_bins' value must be positive.");
1642 | if( max_grad <= 0.0 ) error("'max_grad' value must be positive.");
1643 |
1644 |
1645 | /* angle tolerance */
1646 | prec = M_PI * ang_th / 180.0;
1647 | p = ang_th / 180.0;
1648 | rho = quant / sin(prec); /* gradient magnitude threshold */
1649 |
1650 |
1651 | /* scale image (if necessary) and compute angle at each pixel */
1652 | if( scale != 1.0 )
1653 | {
1654 | scaled_image = gaussian_sampler( image, scale, sigma_scale );
1655 | angles = ll_angle( scaled_image, rho, &list_p, &mem_p,
1656 | &modgrad, (unsigned int) n_bins, max_grad );
1657 | free_image_double(scaled_image);
1658 | }
1659 | else
1660 | angles = ll_angle( image, rho, &list_p, &mem_p, &modgrad,
1661 | (unsigned int) n_bins, max_grad );
1662 | xsize = angles->xsize;
1663 | ysize = angles->ysize;
1664 | logNT = 5.0 * ( log10( (double) xsize ) + log10( (double) ysize ) ) / 2.0;
1665 | min_reg_size = (int) (-logNT/log10(p)); /* minimal number of points in region
1666 | that can give a meaningful event */
1667 |
1668 |
1669 | /* initialize some structures */
1670 | if( region != NULL ) /* image to output pixel region number, if asked */
1671 | *region = new_image_int_ini(angles->xsize,angles->ysize,0);
1672 | used = new_image_char_ini(xsize,ysize,NOTUSED);
1673 | reg = (struct point *) calloc(xsize * ysize, sizeof(struct point));
1674 | if( reg == NULL ) error("not enough memory!");
1675 |
1676 |
1677 | /* search for line segments */
1678 | for(;list_p; list_p = list_p->next )
1679 | if( used->data[ list_p->x + list_p->y * used->xsize ] == NOTUSED &&
1680 | angles->data[ list_p->x + list_p->y * angles->xsize ] != NOTDEF )
1681 | /* there is no risk of double comparison problem here
1682 | because we are only interested in the exact NOTDEF value */
1683 | {
1684 | /* find the region of connected point and ~equal angle */
1685 | region_grow( list_p->x, list_p->y, angles, reg, ®_size,
1686 | ®_angle, used, prec );
1687 |
1688 | /* reject small regions */
1689 | if( reg_size < min_reg_size ) continue;
1690 |
1691 | /* construct rectangular approximation for the region */
1692 | region2rect(reg,reg_size,modgrad,reg_angle,prec,p,&rec);
1693 |
1694 | /* Check if the rectangle exceeds the minimal density of
1695 | region points. If not, try to improve the region.
1696 | The rectangle will be rejected if the final one does
1697 | not fulfill the minimal density condition.
1698 | This is an addition to the original LSD algorithm published in
1699 | "LSD: A Fast Line Segment Detector with a False Detection Control"
1700 | by R. Grompone von Gioi, J. Jakubowicz, J.M. Morel, and G. Randall.
1701 | The original algorithm is obtained with density_th = 0.0.
1702 | */
1703 | if( !refine( reg, ®_size, modgrad, reg_angle, prec, p,
1704 | &rec, used, angles, density_th, logNT, eps ) ) continue;
1705 |
1706 | /* compute NFA value */
1707 | log_nfa = rect_improve(&rec,angles,logNT,eps);
1708 | if( log_nfa <= eps ) continue;
1709 |
1710 | /* A New Line Segment was found! */
1711 | ++ls_count; /* increase line segment counter */
1712 |
1713 | /*
1714 | The gradient was computed with a 2x2 mask, its value corresponds to
1715 | points with an offset of (0.5,0.5), that should be added to output.
1716 | The coordinates origin is at the center of pixel (0,0).
1717 | */
1718 | rec.x1 += 0.5; rec.y1 += 0.5;
1719 | rec.x2 += 0.5; rec.y2 += 0.5;
1720 |
1721 | /* scale the result values if a subsampling was performed */
1722 | if( scale != 1.0 )
1723 | {
1724 | rec.x1 /= scale; rec.y1 /= scale;
1725 | rec.x2 /= scale; rec.y2 /= scale;
1726 | rec.width /= scale;
1727 | }
1728 |
1729 | /* add line segment found to output */
1730 | add_5tuple(out, rec.x1, rec.y1, rec.x2, rec.y2, rec.width);
1731 |
1732 | /* add region number to 'region' image if needed */
1733 | if( region != NULL )
1734 | for(i=0; idata[reg[i].x+reg[i].y*(*region)->xsize] = ls_count;
1736 | }
1737 |
1738 |
1739 | /* free memory */
1740 | free_image_double(angles);
1741 | free_image_double(modgrad);
1742 | free_image_char(used);
1743 | free( (void *) reg );
1744 | free( (void *) mem_p );
1745 |
1746 | return out;
1747 | }
1748 |
1749 | /*----------------------------------------------------------------------------*/
1750 | /*
1751 | LSD Simple Interface
1752 | */
1753 | ntuple_list lsd(image_double image)
1754 | {
1755 | /* LSD parameters */
1756 | // double scale = 0.8; /* Scale the image by Gaussian filter to 'scale'. */
1757 | // double sigma_scale = 0.6; /* Sigma for Gaussian filter is computed as
1758 | // sigma = sigma_scale/scale. */
1759 | // double quant = 2.0; /* Bound to the quantization error on the
1760 | // gradient norm. */
1761 | // double ang_th = 22.5; /* Gradient angle tolerance in degrees. */
1762 | // double eps = 0.0; /* Detection threshold, -log10(NFA). */
1763 | // double density_th = 0.7; /* Minimal density of region points in rectangle. */
1764 | // int n_bins = 1024; /* Number of bins in pseudo-ordering of gradient
1765 | // modulus. */
1766 | //double max_grad = 255.0; /* Gradient modulus in the highest bin. The
1767 | // default value corresponds to the highest
1768 | // gradient modulus on images with gray
1769 | // levels in [0,255].
1770 | // */
1771 |
1772 | double scale = 0.8; /* Scale the image by Gaussian filter to 'scale'. */
1773 | double sigma_scale = 0.6; /* Sigma for Gaussian filter is computed as
1774 | sigma = sigma_scale/scale. */
1775 | double quant = 2.0; /* Bound to the quantization error on the
1776 | gradient norm. */
1777 | double ang_th = 22.5; /* Gradient angle tolerance in degrees. */
1778 | double eps = 0.0; /* Detection threshold, -log10(NFA). */
1779 | double density_th = 0.7; /* Minimal density of region points in rectangle. */
1780 | int n_bins = 1024; /* Number of bins in pseudo-ordering of gradient
1781 | modulus. */
1782 | double max_grad = 255.0; /* Gradient modulus in the highest bin. The
1783 | default value corresponds to the highest
1784 | gradient modulus on images with gray
1785 | levels in [0,255]. */
1786 |
1787 | return LineSegmentDetection( image, scale, sigma_scale, quant, ang_th, eps,
1788 | density_th, n_bins, max_grad, NULL );
1789 | }
1790 | /*----------------------------------------------------------------------------*/
1791 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/lsd.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 |
3 | LSD - Line Segment Detector on digital images
4 |
5 | Copyright 2007,2008,2009,2010 rafael grompone von gioi (grompone@gmail.com)
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU Affero General Public License as
9 | published by the Free Software Foundation, either version 3 of the
10 | License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU Affero General Public License for more details.
16 |
17 | You should have received a copy of the GNU Affero General Public License
18 | along with this program. If not, see .
19 |
20 | ----------------------------------------------------------------------------*/
21 | #ifndef LSD_HEADER
22 | #define LSD_HEADER
23 |
24 |
25 | /*----------------------------------------------------------------------------*/
26 | /*----------------------- 'list of n-tuple' data type ------------------------*/
27 | /*----------------------------------------------------------------------------*/
28 |
29 | /*
30 | The i component, of the n-tuple number j, of an n-tuple list 'ntl'
31 | is accessed with:
32 |
33 | ntl->values[ i + j * ntl->dim ]
34 |
35 | The dimension of the n-tuple (n) is:
36 |
37 | ntl->dim
38 |
39 | The number of number of n-tuples in the list is:
40 |
41 | ntl->size
42 |
43 | The maximum number of n-tuples that can be stored in the
44 | list with the allocated memory at a given time is given by:
45 |
46 | ntl->max_size
47 | */
48 | typedef struct ntuple_list_s
49 | {
50 | unsigned int size;
51 | unsigned int max_size;
52 | unsigned int dim;
53 | double * values;
54 | } * ntuple_list;
55 |
56 | void free_ntuple_list(ntuple_list in);
57 | ntuple_list new_ntuple_list(unsigned int dim);
58 |
59 |
60 | /*----------------------------------------------------------------------------*/
61 | /*----------------------------- Image Data Types -----------------------------*/
62 | /*----------------------------------------------------------------------------*/
63 | /*
64 | The pixel value at (x,y) is accessed by:
65 |
66 | image->data[ x + y * image->xsize ]
67 |
68 | with x and y integer.
69 | */
70 |
71 | /*----------------------------------------------------------------------------*/
72 | /*
73 | char image data type
74 | */
75 | typedef struct image_char_s
76 | {
77 | unsigned char * data;
78 | unsigned int xsize,ysize;
79 | } * image_char;
80 |
81 | void free_image_char(image_char i);
82 | image_char new_image_char(unsigned int xsize, unsigned int ysize);
83 | image_char new_image_char_ini( unsigned int xsize, unsigned int ysize,
84 | unsigned char fill_value );
85 |
86 | /*----------------------------------------------------------------------------*/
87 | /*
88 | int image data type
89 | */
90 | typedef struct image_int_s
91 | {
92 | int * data;
93 | unsigned int xsize,ysize;
94 | } * image_int;
95 |
96 | void free_image_int(image_int i);
97 | image_int new_image_int(unsigned int xsize, unsigned int ysize);
98 | image_int new_image_int_ini( unsigned int xsize, unsigned int ysize,
99 | int fill_value );
100 |
101 | /*----------------------------------------------------------------------------*/
102 | /*
103 | double image data type
104 | */
105 | typedef struct image_double_s
106 | {
107 | double * data;
108 | unsigned int xsize,ysize;
109 | } * image_double;
110 |
111 | void free_image_double(image_double i);
112 | image_double new_image_double(unsigned int xsize, unsigned int ysize);
113 | image_double new_image_double_ini( unsigned int xsize, unsigned int ysize,
114 | double fill_value );
115 |
116 |
117 | /*----------------------------------------------------------------------------*/
118 | /*-------------------------- Line Segment Detector ---------------------------*/
119 | /*----------------------------------------------------------------------------*/
120 |
121 | /*----------------------------------------------------------------------------*/
122 | /* LSD Full Interface */
123 | /*----------------------------------------------------------------------------*/
124 | /*
125 | Input:
126 |
127 | image: Input image
128 |
129 | scale: When different than 1.0, LSD will scale the image by
130 | Gaussian filtering.
131 | Example: is scale=0.8, the input image will be subsampled
132 | to 80% of its size, and then the line segment detector
133 | will be applied.
134 | Suggested value: 0.8
135 |
136 | sigma_scale: When scale!=1.0, the sigma of the Gaussian filter is:
137 | sigma = sigma_scale / scale, if scale < 1.0
138 | sigma = sigma_scale, if scale >= 1.0
139 | Suggested value: 0.6
140 |
141 | quant: Bound to the quantization error on the gradient norm.
142 | Example: if gray level is quantized to integer steps,
143 | the gradient (computed by finite differences) error
144 | due to quantization will be bounded by 2.0, as the
145 | worst case is when the error are 1 and -1, that
146 | gives an error of 2.0.
147 | Suggested value: 2.0
148 |
149 | ang_th: Gradient angle tolerance in the region growing
150 | algorithm, in degrees.
151 | Suggested value: 22.5
152 |
153 | eps: Detection threshold, -log10(NFA).
154 | The bigger, the more strict the detector is,
155 | and will result in less detections.
156 | (Note that the 'minus sign' makes that this
157 | behavior is opposite to the one of NFA.)
158 | The value -log10(NFA) is equivalent but more
159 | intuitive than NFA:
160 | -1.0 corresponds to 10 mean false alarms
161 | 0.0 corresponds to 1 mean false alarm
162 | 1.0 corresponds to 0.1 mean false alarms
163 | 2.0 corresponds to 0.01 mean false alarms
164 | Suggested value: 0.0
165 |
166 | density_th: Minimal proportion of region points in a rectangle.
167 | Suggested value: 0.7
168 |
169 | n_bins: Number of bins used in the pseudo-ordering of gradient
170 | modulus.
171 | Suggested value: 1024
172 |
173 | max_grad: Gradient modulus in the highest bin. For example,
174 | for images with integer gray levels in [0,255],
175 | the maximum possible gradient value is 255.0.
176 | Suggested value: 255.0
177 |
178 | region: Optional output: an int image where the pixels used
179 | in some line support region are marked. Unused pixels
180 | have the value '0' while the used ones have the
181 | number of the line segment, numbered 1,2,3,... If desired,
182 | a non NULL pointer to an image_int should be used.
183 | The resulting image has the size of the image used
184 | for the processing, that is, the size of the input
185 | image scaled by the given factor 'scale'.
186 | Suggested value: NULL
187 |
188 | Return value: A 5-tuple list, where each 5-tuple corresponds to a
189 | detected line segment. The five values are:
190 | x1,y1,x2,y2,width
191 | for a line segment from (x1,y1) to (x2,y2) and
192 | a width 'width'.
193 | */
194 | ntuple_list LineSegmentDetection( image_double image, double scale,
195 | double sigma_scale, double quant,
196 | double ang_th, double eps, double density_th,
197 | int n_bins, double max_grad,
198 | image_int * region );
199 |
200 | /*----------------------------------------------------------------------------*/
201 | /* LSD Simple Interface */
202 | /*----------------------------------------------------------------------------*/
203 | /*
204 | input: an image
205 | output: a 5-tuple list of detected line segments.
206 | */
207 | ntuple_list lsd(image_double image);
208 |
209 |
210 | #endif /* !LSD_HEADER */
211 | /*----------------------------------------------------------------------------*/
212 |
--------------------------------------------------------------------------------
/TestLMDll/TestLMDll/main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/TestLMDll/TestLMDll/main.cpp
--------------------------------------------------------------------------------
/addpointsnearby.m:
--------------------------------------------------------------------------------
1 |
2 | function [canlines] = addpointsnearby(lines,pointlist,sublinds,charap)
3 |
4 | canlines=lines(sublinds);
5 | len=length(sublinds);
6 | for i=1:len
7 |
8 | [canlines(i).intsect1, canlines(i).intsect2] = get2imps(sublinds(i),lines,pointlist);
9 |
10 | [canlines(i).pleft, canlines(i).pright]=addcharapsrect(lines(sublinds(i)),charap);
11 | end
12 |
13 | end
14 |
15 |
16 | function [p1,p2]=get2imps(lind,lines,pointlist)
17 |
18 | subline=lines(lind);
19 | lnum=length(subline);
20 | p1=zeros(lnum,2);
21 | p2=zeros(lnum,2);
22 | [pinds]=getpoints(lind,pointlist);
23 | n=length(pinds);
24 |
25 |
26 | points=zeros(n,2);
27 | dist1=zeros(1,n);
28 | dist2=zeros(1,n);
29 | for j=1:n
30 | p=pointlist(pinds(j)).point;
31 | points(j,:)=p;
32 | dist1(j)=norm(p-subline.point1);
33 | dist2(j)=norm(p-subline.point2);
34 | end
35 |
36 | [d1,id1]=min(dist1);
37 | [d2,id2]=min(dist2);
38 | if isempty(d1)
39 | d1=Inf;
40 | end
41 | if isempty(d2)
42 | d2=Inf;
43 | end
44 | linelen=norm(subline.point1-subline.point2)/10;
45 | if d1>linelen &&d2<=linelen
46 | p1 = subline.point1;
47 | p2=points(id2,:);
48 | elseif d2>linelen && d1<=linelen
49 | p2 = subline.point2;
50 | p1=points(id1,:);
51 | elseif d1<=linelen &&d2<=linelen
52 | p1=points(id1,:);
53 | p2=points(id2,:);
54 | else
55 | p1 = subline.point1;
56 | p2 = subline.point2;
57 | end
58 | mid=(subline.point1+subline.point2)/2;
59 | endp= mid + subline.gradient;
60 | cp=crossproduct(p1,endp,mid);
61 | if cp<0
62 | t=p1;
63 | p1=p2;
64 | p2=t;
65 | end
66 | end
67 |
68 | function [pleft, pright] = addcharapsrect(line,charap)
69 | d2line=2;
70 | d2midline=0.5;
71 | pleft=[];
72 | pright=[];
73 | mid=(line.point1+line.point2)/2;
74 | pg=mid+line.gradient;
75 | linelen= norm(line.point1-line.point2);
76 | midline=line;
77 | if line.k ~=0
78 | midline.k = -1/line.k;
79 | if line.k == Inf
80 | midline.b=line.point1(1);
81 | else
82 | midline.b=(line.k * mid(2) + mid(1))/line.k;
83 | end
84 | else
85 | midline.k=Inf;
86 | midline.b=Inf;
87 | end
88 | pointnum=size(charap,1);
89 | for i=1:pointnum
90 | p=charap(i,:);
91 | if disp2line(p,line) < d2line * linelen && disp2line(p,midline) < d2midline * linelen
92 | if sameside(line,p,pg)
93 | pright=[ pright; [p i] ];
94 | else
95 | pleft=[ pleft; [p i] ];
96 | end
97 | end
98 | end
99 | end
100 |
101 | function dis=disp2line(point,line)
102 | k=line.k;
103 | b=line.b;
104 | if k~=Inf
105 | dis=abs(k*point(1)-point(2)+b)/sqrt(k*k+1);
106 | else
107 | dis = abs(point(1)-line.point1(1));
108 | end
109 | end
110 |
--------------------------------------------------------------------------------
/charanums5.m:
--------------------------------------------------------------------------------
1 |
2 | function CN=charanums5(a,b,c,d,e,f,g,h,i,j)
3 | CN=((a*d - b*c - a*j + b*i + c*j - d*i)*(a*f - b*e - a*h + b*g + e*h - f*g)*(c*h - d*g - c*j + d*i + g*j - h*i))/...
4 | ((a*d - b*c - a*h + b*g + c*h - d*g)*(a*h - b*g - a*j + b*i + g*j - h*i)*(c*f - d*e - c*j + d*i + e*j - f*i));
5 | end
6 |
7 | % function CN=charanums5(p5)
8 | % p5=[p5,[1;1;1;1;1]];
9 | % cn51=1-det(p5([1,3,5],:))*det(p5([2,4,5],:))/det(p5([1,4,5],:))/det(p5([2,3,5],:));
10 | % cn52=det(p5([2,3,4],:))*det(p5([1,4,5],:))/det(p5([1,3,4],:))/det(p5([2,4,5],:))-1;
11 | % CN=cn51/cn52;
12 | % end
13 | %
--------------------------------------------------------------------------------
/crossproduct.m:
--------------------------------------------------------------------------------
1 |
2 | function cp=crossproduct(p1,p2,o)
3 | % if~(exist('o','var'))
4 | % o=[0 0];
5 | % end
6 | cp=(p1(1)-o(1))*(p2(2)-o(2))-(p2(1)-o(1))*(p1(2)-o(2));
7 |
8 | end
--------------------------------------------------------------------------------
/distline.p:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/distline.p
--------------------------------------------------------------------------------
/getHpoints1L.m:
--------------------------------------------------------------------------------
1 |
2 | function [p1,p2] = getHpoints1L(line1,line2,side)
3 | minnum=10;
4 | p1=[];p2=[];
5 | if side == 1
6 | [C,ind1,ind2]=intersect( line1.pleft(:,3), line2.pleft(:,3));
7 | n=length(C);
8 | if n>=minnum
9 | p1= [line1.pleft(ind1,1:2)]; %line1.intsect1;line1.intsect2;
10 | p2= [line2.pleft(ind2,1:2)];%line2.intsect1;line2.intsect2;
11 | end
12 |
13 | elseif side == 2
14 | [C,ind1,ind2]=intersect( line1.pright(:,3), line2.pright(:,3));
15 | n=length(C);
16 | if n>=minnum
17 | p1= [line1.pright(ind1,1:2)];%line1.intsect1;line1.intsect2;
18 | p2= [line2.pright(ind2,1:2)];%line2.intsect1;line2.intsect2;
19 | end
20 | end
21 |
22 |
23 | end
--------------------------------------------------------------------------------
/getgoodpair.m:
--------------------------------------------------------------------------------
1 |
2 | function [ind1,ind2] = getgoodpair(plines1,lines2,dist)
3 |
4 | len1=length(plines1);
5 | len2=length(lines2);
6 | ind1=[];
7 | ind2=[];
8 | for i=1:len1
9 | for j=1:len2
10 | if isclose(plines1(i),lines2(j),dist)
11 | ind1 = [ind1 plines1(i).ind];
12 | ind2 = [ind2 j];
13 | end
14 | end
15 | end
16 |
17 |
18 | end
19 |
20 | function [isc] = isclose(line1,line2,dist)
21 |
22 |
23 | if disp2line(line1.point1,line2)> dist || disp2line(line1.point2,line2)> dist || ...
24 | disp2line(line2.point1,line1)> dist || disp2line(line2.point2,line1)> dist || ...
25 | (norm((line1.point1 + line1.point2)/2 - (line2.point1 + line2.point2)/2 )> ...
26 | ((norm(line1.point1 - line1.point2)+norm(line2.point1 - line2.point2))/2))
27 | isc=false;
28 | return;
29 | else
30 | isc = true;
31 | return;
32 | end
33 |
34 | end
35 | function dis=disp2line(point,line)
36 | k=line.k;
37 | b=line.b;
38 | if k~=Inf
39 | dis=abs(k*point(1)-point(2)+b)/sqrt(k*k+1);
40 | else
41 | dis = abs(point(1)-line.point1(1));
42 | end
43 | end
--------------------------------------------------------------------------------
/getpoints.m:
--------------------------------------------------------------------------------
1 |
2 | function [inds]=getpoints(linenum,pointlist,except)
3 |
4 | if~(exist('except','var'))
5 | except=0;
6 | end
7 |
8 | inds=[];
9 | len=length(pointlist);
10 | for i=1:len
11 | if( (~isempty(find(pointlist(i).lines==linenum)))&& ...
12 | (isempty(find(pointlist(i).lines==except))))
13 | inds=[inds i];
14 |
15 | end
16 | end
17 |
18 | end
--------------------------------------------------------------------------------
/imgs/1_A.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/imgs/1_A.jpg
--------------------------------------------------------------------------------
/imgs/1_B.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlut-dimt/LineMatching/e05eb15c06303d724b9334f96ab2c6deb723deb2/imgs/1_B.jpg
--------------------------------------------------------------------------------
/intspoints.m:
--------------------------------------------------------------------------------
1 |
2 | function pointlist=intspoints(lines,imsize)
3 | len=length(lines);
4 | k=1;
5 | pointlist(k).point=[0 0];
6 | pointlist(k).lines=[0 0];
7 | for i = 1:len
8 | for j =i+1:len
9 | [a,b]=Itspoint(lines(i),lines(j));
10 |
11 | if (a>0) && (a0) && (b-1 && k1<1
13 | for ii=min(p1(1),p2(1)):max(p1(1),p2(1))
14 | jj = round(k1 * ii+b1);
15 | [dx,dy]=pointgrad(I, ii, jj);
16 | ldx=ldx+dx;
17 | ldy=ldy+dy;
18 | end
19 | else
20 | for jj=min(p1(2),p2(2)):max(p1(2),p2(2))
21 | if k1~=Inf
22 | ii = round((jj-b1)/k1);
23 | else
24 | ii = p1(1);
25 | end
26 | [dx,dy]=pointgrad(I, ii, jj);
27 | ldx=ldx+dx;
28 | ldy=ldy+dy;
29 | end
30 | end
31 |
32 | lines(i).gradient=[ldx,ldy]./max(abs(ldx),abs(ldy))*15;%,atan(ldy/ldx)
33 | end
34 |
35 | end
36 | function [dx,dy] = pointgrad(I, i, j)
37 |
38 | i=floor(i);
39 | j=floor(j);
40 | s=size(I);
41 | if j<2||j>=s(1)||i<2||i>=s(2)
42 | dx=0;
43 | dy=0;
44 | else
45 | dx = [I(j,i+1) - I(j,i-1)]/2;
46 | dy = [I(j+1,i) - I(j-1,i)]/2;
47 | end
48 | end
49 |
50 |
--------------------------------------------------------------------------------
/linematch.m:
--------------------------------------------------------------------------------
1 |
2 | function linematch
3 | clc;
4 | clear;
5 | close all;
6 |
7 | img1='.\imgs\1_A.jpg';
8 | img2='.\imgs\1_B.jpg';
9 | pmfile=strcat('.\pts&lines\1ABpoint.txt');
10 | ltxt1='.\pts&lines\1Aline.txt';
11 | ltxt2='.\pts&lines\1Bline.txt';
12 |
13 |
14 | disp(' Reading files and preparing...');
15 | [lines1, pointlist1]=paras(img1,ltxt1);
16 | [lines2, pointlist2]=paras(img2,ltxt2);
17 |
18 | P = load(pmfile);
19 | len1=length(lines1);
20 | len2=length(lines2);
21 | sublinds1=1:length(lines1);
22 | sublinds2=1:length(lines2);
23 |
24 | lines1=addpointsnearby(lines1,pointlist1,sublinds1,P(:,1:2));
25 | lines2=addpointsnearby(lines2,pointlist2,sublinds2,P(:,3:4));
26 |
27 | simL=zeros(len1,len2);
28 | simR=zeros(len1,len2);
29 |
30 | disp(' Calculating similarities between line neighborhoods...');
31 | for i=1:len1
32 | t=lines1(i);
33 | for j=1:len2
34 | [simL(i,j),simR(i,j)]=distline(t,lines2(j));
35 | end
36 | end
37 |
38 | k=[];
39 | for i=1:len1
40 | for j=1:len2
41 | if simL(i,j)>0.95&&( simL(i,j)==max(simL(i,:)) && simL (i,j) == max(simL(:,j)) )
42 | k=[k;[i,j]];
43 | break;
44 | end
45 | end
46 | end
47 | simside1=ones(1,size(k,1));
48 |
49 | for i=1:len1
50 | for j=1:len2
51 | if simR(i,j)>0.95&&( simR(i,j)==max(simR(i,:)) && simR (i,j) == max(simR(:,j)) )
52 | k=[k;[i,j]];
53 | break;
54 | end
55 | end
56 | end
57 | simeside1=[ simside1 2*ones(1,size(k,1))];
58 |
59 | len=size(k,1);
60 | votecan=zeros(len2,len1);
61 |
62 | disp(' Matching lines ...');
63 | for i=1:len
64 |
65 | [p1,p2]=getHpoints1L(lines1(k(i,1)),lines2(k(i,2)),simeside1(i));
66 |
67 | if ~isempty(p1)
68 | [F1,~,~] = estimateGeometricTransform(p1,p2,'projective');
69 | plines = projline(F1.T,lines1);
70 | [ind11,ind12]=getgoodpair(plines,lines2,3);
71 |
72 | plines = projline(inv(F1.T),lines2);
73 | [ind22,ind21]=getgoodpair(plines,lines1,3);
74 |
75 | if isempty(ind11)||isempty(ind22)
76 | continue;
77 | end
78 |
79 | [indfinal]=intersect([ind11;ind12]',[ind21;ind22]','rows');
80 |
81 | if ~isempty(indfinal)
82 | indfinal=indfinal';
83 | ind1=indfinal(1,:);
84 | ind2=indfinal(2,:);
85 | else
86 | ind1=[];ind2=[];
87 | end
88 |
89 | if simeside1(i)==1
90 | v=simL(k(i,1),k(i,2));
91 | elseif simeside1(i)==2
92 | v=simR(k(i,1),k(i,2));
93 | end
94 |
95 | votecan(ind2+(ind1-1)*len2)=votecan(ind2+(ind1-1)*len2)+v;
96 | end
97 | end
98 |
99 | [num,ind]=sort(votecan,'descend');
100 | num=num(1,:);
101 | ind=ind(1,:);
102 | votecan=votecan';
103 | [num2,ind2]=sort(votecan,'descend');
104 | num2=num2(1,:);
105 | ind2=ind2(1,:);
106 | k=[];
107 | for i=1:length(ind)
108 | if i==ind2(ind(i)) && (num(i) > 0.9 && num2(ind(i))> 0.9)
109 | k=[k,i];
110 | end
111 | end
112 | nummatch=length(k);
113 | draw(img1,lines1(k),1:nummatch,num2str(nummatch));
114 | draw(img2,lines2(ind(k)),1:nummatch,num2str(nummatch));
115 |
116 | end
117 |
118 |
119 |
120 | function draw(img,lines,orders,name)
121 |
122 | I=imread(img);
123 | len=length(orders);
124 |
125 | figure, imshow(I),hold on
126 | if exist('name','var')
127 | title(name);
128 | end
129 | for k = 1:len
130 | if orders(k)~=0
131 | xy = [lines(orders(k)).point1; lines(orders(k)).point2];
132 | plot(xy(:,1),xy(:,2),'LineWidth',2,'Color','red');
133 | text((xy(1,1)+xy(2,1))/2,(xy(1,2)+xy(2,2))/2,num2str(k));
134 | end
135 | end
136 | hold off;
137 |
138 | end
139 |
--------------------------------------------------------------------------------
/paras.m:
--------------------------------------------------------------------------------
1 |
2 | function [llines, pointlist]=paras(img,endpotxt)
3 |
4 | I=imread(img);
5 | imsize=size(I);
6 | if numel(imsize)>2
7 | I = rgb2gray(I);
8 | end
9 |
10 | points=load(endpotxt);
11 | for i=1:length(points)
12 | llines(i).point1=[points(i,1),points(i,2)];
13 | llines(i).point2=[points(i,3),points(i,4)];
14 |
15 | if (llines(i).point2(1)~=llines(i).point1(1))
16 | llines(i).k=(llines(i).point2(2)-llines(i).point1(2))/(llines(i).point2(1)-llines(i).point1(1));
17 | llines(i).b=llines(i).point1(2)-llines(i).k*llines(i).point1(1);
18 | else
19 | llines(i).k=Inf;
20 | llines(i).b=Inf;
21 | end
22 |
23 | end
24 | pointlist=intspoints(llines,imsize);
25 | llines=linegradient(I,llines);
26 |
27 | end
28 |
29 |
30 |
--------------------------------------------------------------------------------
/projline.m:
--------------------------------------------------------------------------------
1 |
2 | function [plines] = projline(H,lines)
3 |
4 | n=length(lines);
5 | j=1;
6 | for i=1:n
7 |
8 | plines(j).point1 = projpoint(H,lines(i).point1);
9 | plines(j).point2 = projpoint(H,lines(i).point2);
10 | if (plines(j).point2(1)~=plines(j).point1(1))
11 | plines(j).k=(plines(j).point2(2)-plines(j).point1(2))/(plines(j).point2(1)-plines(j).point1(1));
12 | plines(j).b=plines(j).point1(2)-plines(j).k*plines(j).point1(1);
13 | else
14 | plines(j).k=Inf;
15 | plines(j).b=Inf;
16 | end
17 | plines(j).ind=i;
18 | j=j+1;
19 | end
20 |
21 | end
22 |
23 | function [p]= projpoint(H,point)
24 |
25 | p=[point 1];
26 |
27 | p=p*H;
28 | p=p./p(3);
29 | p=p(1:2);
30 | end
--------------------------------------------------------------------------------
/pts&lines/1ABpoint.txt:
--------------------------------------------------------------------------------
1 | 357.272 19.4215 752.302 465.991
2 | 475.431 19.9165 432.857 108.109
3 | 383.436 22.4496 695.635 310.41
4 | 388.938 22.2615 633.547 254.386
5 | 384.058 47.9601 261.078 340.946
6 | 344.071 59.7557 381.118 109.885
7 | 374.139 60.5778 783.164 406.9
8 | 367.573 63.2305 360.309 136.521
9 | 341.806 76.0132 161.508 240.382
10 | 434.082 92.111 459.459 448.658
11 | 448.127 92.1349 298.059 398.97
12 | 402.094 118.235 775.03 279.375
13 | 418.005 118.057 739.394 364.402
14 | 425.638 117.895 80.1125 449.05
15 | 400.406 121.299 770.603 310.737
16 | 344.617 123.983 345.184 177.345
17 | 382.603 124.267 370.523 178.575
18 | 314.895 124.716 324.213 177.953
19 | 320.91 124.611 128.374 474.116
20 | 533.236 136.598 293.225 287.529
21 | 367.244 146.415 35.895 530.829
22 | 421.745 146.68 756.443 442.12
23 | 463.406 146.542 672.086 573.026
24 | 319.63 147.086 46.7926 438.761
25 | 304.702 147.473 35.3651 411.459
26 | 414.839 149.713 782.515 359.644
27 | 496.83 150.429 299.309 512.363
28 | 327.305 152.993 794.294 212.066
29 | 468.549 157.066 152.396 231.222
30 | 323.459 158.515 771.488 340.735
31 | 348.127 170.09 794.76 454.792
32 | 353.604 174.126 50.0574 439.027
33 | 402.952 177.806 686.964 403.36
34 | 376.322 179.121 339.327 238.732
35 | 265.908 184.48 762.668 221.409
36 | 358.153 189.946 464.757 517.092
37 | 393.309 193.919 89.724 355.537
38 | 240.668 201.886 288.44 383.149
39 | 148.656 202.917 511.794 386.163
40 | 408.483 204.539 402.004 415.524
41 | 130.668 204.977 198.908 231.755
42 | 133.602 205.967 201.638 233.369
43 | 528.939 206.733 639.491 575.85
44 | 362.677 208.068 356.557 235.437
45 | 394.083 211.016 522.828 549.022
46 | 100.601 213.416 179.36 238.377
47 | 47.7245 216.024 143.006 240.605
48 | 660.731 216.17 677.237 287.074
49 | 404.704 224.338 780.835 337.118
50 | 553.924 224.639 289.129 276.84
51 | 21.1282 226.853 112.925 372.463
52 | 781.654 227.317 641.37 249.04
53 | 237.439 227.822 448.933 459.306
54 | 226.438 229.438 787.552 195.843
55 | 287.345 229.345 777.597 472.719
56 | 674.958 230.238 670.001 331.313
57 | 217.573 231.568 744.567 310.397
58 | 706.01 232.463 740.226 369.932
59 | 217.908 234.222 743.593 288.618
60 | 122.053 237.388 357.387 105.858
61 | 453.036 241.02 383.276 530.144
62 | 528.317 241.479 469.083 288.264
63 | 455.567 243.06 419.572 226.774
64 | 365.343 243.702 565.565 507.87
65 | 358.232 244.533 425.294 318.266
66 | 637.758 244.349 770.063 536.995
67 | 266.505 245.06 503.678 230.948
68 | 208.142 245.523 249.044 528.81
69 | 287.049 250.585 306.133 264.688
70 | 457.836 251.886 33.2871 564.689
71 | 95.6933 261.321 13.1579 497.259
72 | 287.719 263.27 305.841 272.59
73 | 696.842 266.045 139.103 515.127
74 | 519.03 267.148 751.457 227.789
75 | 323.349 267.818 791.217 192
76 | 317.188 270.184 684.555 547.319
77 | 85.805 271.74 168.478 278.207
78 | 372.444 274.03 37.8156 469.059
79 | 554.586 275.439 736.435 340.934
80 | 726.362 281.449 602.686 286.059
81 | 698.495 282.392 446.369 528.399
82 | 655.258 283.913 555.099 286.957
83 | 290.143 288.936 499.734 288.121
84 | 508.743 292.363 456.494 323.419
85 | 707.111 293.571 61.7097 586.336
86 | 482.274 298.489 766.492 534.662
87 | 707.454 298.975 633.714 274.974
88 | 214.181 300.644 255.339 268.967
89 | 306.724 304.422 556.225 495.653
90 | 29.936 306.089 693.903 345.509
91 | 133.558 305.879 151.628 240.883
92 | 90.8192 307.706 398.804 205.338
93 | 324.163 307.408 783.265 338.977
94 | 235.345 309.406 316.808 523.784
95 | 108.752 310.527 229.354 264.952
96 | 352.345 313.407 349.656 306.506
97 | 653.55 313.765 737.946 421.853
98 | 505.967 319.912 457.211 177.343
99 | 248.317 324.253 779.059 288.032
100 | 89.8432 330.25 170.969 322.888
101 | 111.076 329.867 21.6273 291.17
102 | 737.519 332.582 191.604 563.202
103 | 89.7312 337.65 459.755 205.688
104 | 658.818 338.391 768.434 327.002
105 | 235.584 347.171 269.996 330.26
106 | 713.471 349.592 8.96313 557.999
107 | 679.739 349.818 22.7731 582.754
108 | 84.486 352.608 300.916 592.981
109 | 736.928 354.133 757.406 482.04
110 | 391.906 354.977 788.515 232.676
111 | 327.917 356.511 340.505 394.606
112 | 690.543 356.904 486.203 554.013
113 | 51.8693 360.376 63.2901 435.817
114 | 740.939 360.598 771.79 209.058
115 | 100.291 362.839 82.3296 495.043
116 | 131.355 365.269 199.215 341.587
117 | 15.1396 368.569 118.702 344.081
118 | 74.0338 368.594 621.447 550.725
119 | 653.879 369.565 172.523 302.673
120 | 105.479 373.088 79.8553 554.198
121 | 745.54 374.217 290.847 565.569
122 | 27.3072 374.261 407.816 518.306
123 | 59.0754 374.42 549.408 532.338
124 | 123.626 376.493 147.935 453.392
125 | 645.3 377.287 169.229 338.03
126 | 112.459 377.677 580.934 446.951
127 | 46.4426 379.726 649.204 372.209
128 | 59.2797 379.759 69.6206 566.129
129 | 392.106 384.113 377.424 531.015
130 | 354.912 391.071 105.525 465.458
131 | 352.341 396.493 417.274 272.339
132 | 673.143 398.085 366.672 557.319
133 | 754.389 398.065 629.447 585.079
134 | 65.7479 398.523 569.084 332.02
135 | 29.7867 400.705 114.268 239.297
136 | 67.9958 400.821 492.794 588.639
137 | 506.905 406.397 795.867 273.679
138 | 392.146 409.721 22.8692 445.703
139 | 33.7673 410.127 265.086 542.17
140 | 394.747 410.798 41.7222 512.374
141 | 514.544 414.712 599.358 428.191
142 | 531.896 415.864 665.989 329.822
143 | 496.926 419.928 445.155 409.106
144 | 473.846 420.333 430.592 318.976
145 | 18.2086 421.734 421.671 553.957
146 | 64.8885 422.736 308.818 525.27
147 | 555.707 422.945 699.216 240.879
148 | 447.047 426.697 549.665 497.488
149 | 119.339 426.778 226.446 565.946
150 | 711.199 428.995 736.144 568.177
151 | 273.586 431.012 794.573 257.132
152 | 113.776 437.097 686.053 490.417
153 | 355.526 436.935 86.4115 470.84
154 | 723.024 437.016 409.626 588.439
155 | 705.877 438.07 401.266 540.638
156 | 330.307 439.539 790.445 459.887
157 | 476.257 440.54 402.485 178.124
158 | 483.255 441.947 393.2 360.024
159 | 786.334 442.52 751.898 394.228
160 | 705.995 445.31 361.363 465.577
161 | 789.057 445.352 756.493 544.403
162 | 419.777 445.943 346.481 450.075
163 | 681.732 445.838 789.992 350.698
164 | 134.488 446.489 456.462 167.066
165 | 132.023 447.756 680.719 240.935
166 | 51.8051 452.76 277.586 522.979
167 | 301.041 455.84 102.475 233.051
168 | 375.231 456.733 163.013 376.874
169 | 365.023 462.802 775.019 257.215
170 | 659.97 464.002 79.006 445.686
171 | 125.935 465.566 542.423 572.079
172 | 559.342 469.088 491.588 350.063
173 | 460.275 470.323 446.177 193.367
174 | 688.302 474.345 99.8851 558.387
175 | 696.094 475.799 669.749 591.999
176 | 104.734 476.715 591.092 561.607
177 | 370.126 478.573 436.062 354.043
178 | 719.794 478.185 560.89 520.907
179 | 550.089 479.32 769.969 228.032
180 | 279.04 482.974 475.683 455.794
181 | 97.163 485.179 45.9591 399.431
182 | 76.3821 486.656 121.633 259.64
183 | 700.953 490.952 595.358 429.01
184 | 303.468 491.595 316.909 520.305
185 | 312.779 492.162 324.878 521.163
186 | 422.475 492.252 404.445 461.425
187 | 490.638 493.862 255.529 303.441
188 | 44.9763 495.909 42.884 428.532
189 | 516.082 496.338 288.222 303.823
190 | 373.354 501.501 25.5374 342.465
191 | 57.4039 503.966 734.444 458.38
192 | 298.182 507.466 490.432 231.125
193 | 32.8255 509.456 638.152 564.03
194 | 100.803 510.546 170.808 579.503
195 | 381.443 516.469 788.408 417.674
196 | 430.25 517.449 742.22 317.062
197 | 684.424 518.688 684.773 549.466
198 | 9.38383 519.095 18.6529 509.428
199 | 313.18 519.599 322.819 446.704
200 | 322.432 519.333 336.552 446.848
201 | 11.6804 521.045 18.8142 512.194
202 | 58.2045 522.642 356.513 549.22
203 | 443.502 523.504 796.226 233.633
204 | 63.5945 524.527 175.318 580.356
205 | 535.98 524.366 474.099 449.549
206 | 459.956 526.628 751.37 204.642
207 | 65.2361 526.795 119.452 560.369
208 | 47.4979 529.345 720.174 568.458
209 | 487.03 529.432 332.706 300.353
210 | 16.1141 529.916 356.104 490.874
211 | 306.174 530.539 258.19 244.477
212 | 345.204 535.837 794.428 416.364
213 | 97.447 536.797 480.364 500.233
214 | 318.062 537.888 349.921 454.949
215 | 58.8859 538.326 664.548 390.228
216 | 16.3857 543.176 248.779 513.797
217 | 750.17 545.605 307.569 573.887
218 | 65.232 546.492 596.273 364.145
219 | 106.757 549.777 73.6842 560.878
220 | 19.6024 550.573 111.902 341.518
221 | 225.058 551.672 453.747 380.139
222 | 26.0081 551.951 246.33 542.99
223 | 360.185 553.215 157.885 595.542
224 | 38.5258 554.159 26.8658 467.869
225 | 135.033 554.341 202.417 469.552
226 | 23.0745 559.472 749.356 407.305
227 | 196.885 560.871 504.052 292.881
228 | 132.624 562.571 622.25 264.272
229 | 356.381 562.638 53.7811 552.689
230 | 236.799 565.527 270.627 477.96
231 | 602.115 566.001 227.037 503.994
232 | 345.43 571.093 764.938 494.97
233 | 356.248 571.808 165.99 492.157
234 | 538.78 571.875 688.33 296.941
235 | 298.873 573.658 760.412 236.008
236 | 496.327 574.376 62.3766 451.787
237 | 399.864 575.458 305.009 548.157
238 | 539.045 576.8 766.648 363.862
239 | 650.262 579.412 433.823 373.355
240 | 342.981 582.424 788.887 312.347
241 | 120.942 582.898 682.83 397.39
242 | 267.888 582.952 292.101 366.87
243 | 343.901 585.053 333.931 309.507
244 | 508.432 593.278 284.514 535.925
245 | 282.427 594.904 775.31 290.808
246 | 487.982 74.9712 442.089 143.979
247 | 341.51 101.428 341.908 161.982
248 | 441.41 102.59 410.842 164.002
249 | 477.467 114.454 435.228 171.431
250 | 344.64 118.386 345.057 173.91
251 | 560.736 129.638 491.685 182.401
252 | 566.381 140.453 495.332 189.864
253 | 468.672 142.909 429.582 191.341
254 | 376.424 144.588 366.707 192.036
255 | 379.937 144.637 369.237 192.007
256 | 454.22 146.213 19.9548 563.128
257 | 403.138 147.088 384.583 193.794
258 | 224.783 150.176 541.322 369.428
259 | 459.616 150.532 309.685 499.824
260 | 194.065 150.923 540.984 365.519
261 | 354.27 157.61 351.298 201.337
262 | 420.225 161.566 395.815 203.408
263 | 450.947 162.226 617.579 558.232
264 | 353.808 165.102 380.325 532.722
265 | 417.474 165.436 394.213 206.064
266 | 370.562 171.097 361.948 210.981
267 | 465.536 172.303 426.951 213.439
268 | 492.861 172.314 102.416 429.296
269 | 280.52 176.42 300.784 213.745
270 | 451.277 178.382 416.941 215.222
271 | 399.77 179.227 788.508 392.31
272 | 380.077 188.687 434.293 553.761
273 | 395.997 188.868 379.413 222.255
274 | 364.844 192.612 752.064 351.977
275 | 218.906 195.796 259.187 226.484
276 | 284.878 196.644 303.864 227.342
277 | 661.093 196.994 559.457 228.177
278 | 493.872 197.745 426.221 379.101
279 | 642.088 199.34 774.932 250.908
280 | 524.968 199.892 466.982 229.941
281 | 159.964 202.349 241.753 470.157
282 | 213.945 205.05 431.855 291.261
283 | 220.188 204.912 436.879 475.105
284 | 433.79 205.006 405.411 233.199
285 | 156.082 205.627 525.289 511.679
286 | 354.182 206.151 420.103 323.137
287 | 460.406 208.782 423.467 235.804
288 | 471.351 209.678 430.666 236.734
289 | 460.522 215.262 423.379 240.474
290 | 454.591 217.313 792.456 534.538
291 | 532.307 220.876 472.558 429.927
292 | 284.112 227.864 303.513 248.387
293 | 217.26 228.596 742.874 306.523
294 | 754.761 229.552 443.809 111.28
295 | 759.469 231.108 625.973 252.397
296 | 681.984 231.473 50.8853 221.825
297 | 790.003 232.826 645.458 253.181
298 | 111.89 234.195 42.0078 336.971
299 | 793.477 235.594 648.557 254.069
300 | 495.313 237.491 446.834 255.398
301 | 531.567 239.021 471.313 225.6
302 | 620.174 239.697 498.2 292.833
303 | 657.604 239.236 556.922 256.902
304 | 492.84 241.931 444.995 258.494
305 | 654.661 241.827 554.535 258.334
306 | 630.969 242.593 538.562 228.03
307 | 644.176 242.839 547.793 259.515
308 | 213.839 245.43 255.152 260.111
309 | 463.714 245.756 427.409 351.311
310 | 99.8268 248.179 177.657 262.402
311 | 502.842 248.763 452.347 263.193
312 | 531.306 248.529 471.168 263.099
313 | 648.006 248.994 767.82 483.63
314 | 451.566 249.853 417.203 263.716
315 | 457.986 249.779 772.911 189.509
316 | 217.709 251.551 434.506 233.075
317 | 178.347 252.163 498.87 262.087
318 | 262.939 255.99 288.905 358.757
319 | 714.665 257.039 154.423 552.893
320 | 272.612 258.722 320.514 440.301
321 | 272.534 263.589 721.41 205.521
322 | 371.381 264.482 110.691 530.317
323 | 417.92 266.112 394.07 243.987
324 | 310.038 266.232 409.597 489.502
325 | 116.425 267.783 189.946 274.629
326 | 127.521 267.694 197.136 275.489
327 | 488.022 269.309 442.021 307.432
328 | 220.315 274.91 781.043 449.723
329 | 651.754 275.871 552.999 281.471
330 | 299.289 282.079 486.116 235.774
331 | 113.913 282.291 187.296 285.273
332 | 221.852 284.498 261.514 286.57
333 | 592.138 285.664 234.492 528.755
334 | 96.6635 285.91 181.106 282.714
335 | 658.661 286.453 557.517 288.984
336 | 486.945 286.845 439.463 288.928
337 | 280.067 288.583 301.801 289.465
338 | 215.961 288.939 256.6 289.904
339 | 601.618 288.834 523.394 228.22
340 | 114.244 289.616 187.582 290.352
341 | 134.192 289.48 201.971 289.784
342 | 647.672 289.62 550.206 291.201
343 | 640.186 292.06 495.44 287.406
344 | 272.897 295.222 262.585 294.534
345 | 704.618 296.326 95.1279 394.203
346 | 113.864 296.73 170.724 290.247
347 | 284.938 298.823 303.97 448.782
348 | 94.748 300.733 175.456 297.741
349 | 790.897 301.839 6.55702 384.533
350 | 446.177 302.57 354.691 484.612
351 | 108.163 307.863 142.452 508.324
352 | 59.1385 311.323 150.204 305.023
353 | 331.141 311.554 791.396 430.387
354 | 452.372 312.151 417.588 306.146
355 | 704.287 312.854 667.766 302.952
356 | 395.597 317.161 379.164 309.676
357 | 355.378 320.395 351.665 253.312
358 | 556.01 321.475 487.971 311.676
359 | 64.1024 323.07 175.554 277.737
360 | 68.8166 322.946 182.009 277.71
361 | 456.367 324.648 420.828 375.54
362 | 506.533 325.879 454.237 315.348
363 | 400.132 332.385 382.834 318.073
364 | 523.87 334.328 465.773 351.767
365 | 527.22 334.312 247.227 232.638
366 | 486.088 337.669 440.636 323.536
367 | 68.9239 337.893 156.469 323.218
368 | 222.235 339.093 296.372 504.885
369 | 232.86 339.069 268.396 323.94
370 | 268.641 338.886 259.205 353.615
371 | 134.601 339.525 202.572 324.679
372 | 452.458 339.427 417.626 324.961
373 | 73.1999 353.527 160.393 333.461
374 | 532.311 353.715 472.035 461.931
375 | 352.045 356.919 349.441 335.919
376 | 441.854 358.138 336.422 395.833
377 | 431.741 358.296 397.484 492.285
378 | 698.304 360.921 583.77 339.109
379 | 531.998 361.269 472.198 467.241
380 | 39.3612 365.52 138.198 341.624
381 | 13.0984 365.842 121.887 341.575
382 | 506.579 368.824 454.185 344.742
383 | 554.882 369.275 396.6 106.417
384 | 358.92 370.241 353.923 227.247
385 | 509.631 370.374 457.012 436.757
386 | 532.024 371.837 259.623 546.741
387 | 127.509 374.274 197.029 347.596
388 | 226.07 376.071 674.754 300.917
389 | 115.432 378.959 238.935 548.214
390 | 557.737 380.491 489.074 228.68
391 | 234.355 382.24 267.45 353.478
392 | 401.263 384.19 382.751 355.056
393 | 49.7003 384.469 617.029 548.835
394 | 404.884 384.991 385.458 355.332
395 | 204.775 386.868 249.696 357.736
396 | 392.507 396.755 377.33 481.955
397 | 701.944 400.761 456.643 185.599
398 | 398.615 400.923 380.383 366.584
399 | 546.637 401.355 370.739 362.644
400 | 706.318 402.01 197.99 562.267
401 | 355.745 403.133 352.666 491.255
402 | 421.536 402.755 335.729 366.331
403 | 543.745 403.761 769.708 376.449
404 | 349.533 404.484 346.992 249.461
405 | 303.578 404.98 316.866 461.668
406 | 395.331 405.768 378.773 369.937
407 | 460.505 405.216 423.135 367.136
408 | 653.534 405.714 274.618 319.137
409 | 90.2195 408.427 70.0308 558.155
410 | 352.547 409.07 349.527 372.829
411 | 528.924 409.557 469.464 373.798
412 | 303.406 411.649 316.453 372.975
413 | 796.657 413.306 650.736 374.937
414 | 71.6206 418.228 160.696 376.969
415 | 131.508 417.814 484.968 348.747
416 | 702.936 417.941 585.556 253.195
417 | 27.6838 419.748 650.715 338.417
418 | 300.112 419.47 313.221 288.717
419 | 490.887 420.033 443.335 378.986
420 | 243.529 422.6 276.247 472.909
421 | 518.594 423.825 462.739 321.269
422 | 388.928 429.085 373.521 241.245
423 | 236.014 429.724 445.991 386.748
424 | 401.716 429.693 383.253 415.979
425 | 218.235 431.234 258.305 386.346
426 | 532.471 431.014 737.873 564.25
427 | 333.066 433.92 769.367 526.272
428 | 479.345 434.38 762.849 431.52
429 | 58.6919 435.791 299.132 538.651
430 | 319.309 436.735 327.039 390.73
431 | 239.02 443.755 272.908 423.338
432 | 319.479 443.384 327.122 394.416
433 | 218.1 445.614 433.957 491.214
434 | 475.965 446.758 433.681 336.776
435 | 532.552 448.536 471.55 336.395
436 | 28.8211 459.844 31.5436 555.397
437 | 506.83 459.806 454.235 406.46
438 | 226.088 463.217 438.28 228.425
439 | 556.157 462.964 487.556 377.358
440 | 389.951 465.353 374.563 439.353
441 | 363.778 466.359 356.902 382.369
442 | 499.603 467.554 448.588 381.332
443 | 556.412 468.3 538.908 419.259
444 | 234.534 469.743 270.257 534.214
445 | 659.698 470.197 517.951 538.136
446 | 529.369 471.961 468.797 384.353
447 | 573.888 471.999 511.302 445.784
448 | 767.331 472.293 601.349 525.769
449 | 785.482 473.213 511.603 583.15
450 | 218.218 473.511 258.45 415.284
451 | 653.771 475.973 553.706 417.369
452 | 533.505 476.422 472.226 418.002
453 | 551.86 476.273 484.593 417.453
454 | 392.759 478.159 652.664 559.253
455 | 664.349 478.608 72.339 587.423
456 | 678.586 481.035 701.427 579.995
457 | 698.986 481.261 584.274 420.728
458 | 224.487 489.503 262.567 425.894
459 | 450.102 489.19 415.579 425.817
460 | 453.503 491.783 418.227 427.77
461 | 645.115 494.538 547.395 429.747
462 | 478.36 495.133 302.038 204.945
463 | 93.1212 496.448 8.75407 284.545
464 | 400.898 498.856 382.476 344.46
465 | 353.078 500.595 349.565 404.747
466 | 226.871 504.114 264.641 435.394
467 | 99.8769 504.975 118.306 553.106
468 | 496.598 512.056 249.654 292.225
469 | 507.37 512.169 454.128 441.75
470 | 619.464 514.993 241.883 474.81
471 | 350.472 516.868 347.861 444.503
472 | 529.398 517.234 469.257 445.349
473 | 269.215 518.768 272.959 450.663
474 | 602.509 521.389 238.264 469.98
475 | 330.497 521.842 791.157 270.464
476 | 489.647 524.021 438.3 427.947
477 | 551.544 530.265 484.185 454.416
478 | 405.311 531.021 385.29 454.179
479 | 7.45184 531.758 115.398 454.302
480 | 457.106 532.526 592.502 424.29
481 | 306.625 534.832 475.507 461.535
482 | 415.537 538.576 392.532 459.574
483 | 356.622 539.266 352.726 519.464
484 | 703.153 540.545 679.588 485.552
485 | 496.095 540.979 270.065 458.241
486 | 698.415 542.331 629.232 504.754
487 | 353.77 549.082 349.338 345.123
488 | 278.043 549.769 298.844 466.901
489 | 353.918 552.242 449.617 443.872
490 | 33.665 553.996 480.156 537.145
491 | 567.267 554.594 494.934 470.346
492 | 384.139 555.042 371.374 528.366
493 | 54.302 555.763 147.77 470.504
494 | 738.087 556.217 610.639 471.766
495 | 511.083 560.074 457.474 473.832
496 | 500.989 561.552 307.039 502.706
497 | 507.32 561.46 452.285 475.243
498 | 65.7665 561.967 155.406 474.266
499 | 282.641 562.151 302.149 475.441
500 | 516.383 563.429 445.229 381.266
501 | 522.389 563.486 463.962 381.968
502 | 526.718 563.481 467.988 476.602
503 | 129.292 565.512 525.242 539.601
504 | 571.301 565.276 497.84 477.538
505 | 219.167 566.052 259.044 478.087
506 | 629.123 569.287 537.227 352.62
507 | 112.789 572.169 375.983 268.55
508 | 691.78 574.457 579.618 484.531
509 | 118.512 577.192 189.292 485.879
510 | 264.529 579.008 288.701 246.332
511 | 223.392 581.538 437.394 276.386
512 | 518.906 581.856 461.912 519.949
513 | 539.107 583.674 766.989 468.693
514 | 483.979 584.744 438.32 491.177
515 | 360.236 588.889 354.383 372.31
516 | 123.858 589.661 155.354 477.453
517 | 726.847 594.068 617.005 473.823
518 | 401.989 595.167 382.982 498.316
519 | 361.107 19.1038 356.012 107.119
520 | 455.647 21.4806 419.774 108.653
521 | 487.394 41.1676 441.694 123.539
522 | 491.523 81.0052 444.537 149.062
523 | 491.725 98.1096 444.674 160.941
524 | 318.099 105.947 327.2 166.411
525 | 541.82 124.503 479.212 179.095
526 | 400.587 128.121 382.945 181.112
527 | 592.554 128.982 528.701 181.87
528 | 368.597 129.374 361.782 182.072
529 | 259.368 131.595 270.929 183.252
530 | 242.747 131.511 275.3 183.032
531 | 164.138 132.878 254.62 183.665
532 | 491.719 134.8 444.456 185.832
533 | 464.548 135.535 754.556 257.654
534 | 443.965 135.938 757.655 528.234
535 | 312.555 139.974 323.246 189.006
536 | 501.248 145.857 450.88 193.219
537 | 411.764 146.885 389.941 193.629
538 | 530.859 147.505 471.47 194.539
539 | 298.395 149.693 313.613 195.597
540 | 354.304 149.599 351.533 195.493
541 | 458.161 158.996 421.648 202.352
542 | 532.059 161.835 472.202 204.326
543 | 462.035 162.386 424.526 205.48
544 | 311.077 165.414 321.912 206.213
545 | 307.449 168.622 319.572 208.264
546 | 390.592 168.87 375.87 208.689
547 | 307.477 179.426 319.316 215.128
548 | 487.038 179.955 441.296 216.358
549 | 311.759 182.022 322.29 217.316
550 | 357.377 181.964 353.268 217.479
551 | 370.338 182.475 361.738 217.994
552 | 229.26 183.642 394.743 540.964
553 | 642.648 184.073 546.715 219.5
554 | 539.06 184.924 328.418 188.831
555 | 301.968 186.2 315.607 220.041
556 | 462.18 187.616 425.039 221.905
557 | 481.379 190.675 437.445 223.693
558 | 267.286 191.829 291.92 223.828
559 | 279.252 191.628 300.352 223.919
560 | 509.508 195.586 456.633 227.037
561 | 647.553 197.213 550.158 228.52
562 | 228.35 197.687 266.134 227.931
563 | 470.201 197.601 429.982 228.355
564 | 275.627 200.298 297.463 229.938
565 | 289.114 200.145 306.602 229.825
566 | 358.619 200.617 354.316 258.938
567 | 487.624 200.683 441.415 230.385
568 | 224.454 201.483 262.829 230.495
569 | 531.77 203.003 471.646 232.182
570 | 491.024 204.576 445.062 232.881
571 | 492.882 208.619 445.267 236.227
572 | 316.494 209.078 324.863 236.54
573 | 475.539 209.611 433.632 236.501
574 | 283.91 211.713 303.205 237.817
575 | 110.89 216.904 185.856 240.878
576 | 390.881 220.9 375.962 244.782
577 | 493.054 224.78 445.259 246.584
578 | 532.388 225.343 472.118 247.442
579 | 550.631 225.995 484.389 247.43
580 | 390.874 226.168 375.944 248.048
581 | 541.015 226.166 477.917 247.816
582 | 262.406 226.576 292.662 205.062
583 | 774.718 227.384 635.107 249.35
584 | 546.129 229.255 481.277 249.912
585 | 302.505 230.117 315.953 250.202
586 | 281.506 231.768 301.626 251.087
587 | 210.762 233.45 253.58 252.464
588 | 493.803 233.295 445.798 252.651
589 | 290.095 234.552 307.244 252.78
590 | 778.455 235.598 764.578 507.847
591 | 475.472 236.147 433.42 254.439
592 | 282.398 238.359 302.36 255.517
593 | 124.706 240.878 195.163 257.359
594 | 514.275 248.507 459.326 262.847
595 | 491.704 248.964 444.653 263.147
596 | 314.495 251.915 760.211 543.361
597 | 496.861 254.838 447.999 266.645
598 | 222.932 256.78 261.564 268.259
599 | 99.0689 262.985 177.822 272.528
600 | 129.376 263.196 748.028 306.549
601 | 222.874 264.209 261.831 273.173
602 | 319.854 263.918 327.67 273.114
603 | 407.667 265.429 387.225 274.404
604 | 85.0347 267.64 169.316 275.176
605 | 213.358 269.117 255.335 276.126
606 | 223.012 270.97 261.937 277.988
607 | 354.74 272.085 351.741 339.22
608 | 369.187 275.24 361.041 281.553
609 | 550.807 279.444 485.832 504.884
610 | 482.25 279.431 437.97 283.961
611 | 275.621 281.814 297.603 285.154
612 | 95.5298 282.385 174.555 280.479
613 | 101.044 282.399 179.592 280.251
614 | 527.794 285.424 468.679 257.82
615 | 499.546 286.048 449.784 288.243
616 | 129.989 286.901 198.853 288.784
617 | 208.639 288.505 252.515 289.65
618 | 224.347 288.652 262.59 289.764
619 | 630.722 288.63 538.706 290.356
620 | 108.942 289.654 183.92 290.126
621 | 505.77 289.553 453.977 290.875
622 | 562.615 292.882 492.48 293.035
623 | 491.666 293.564 444.766 293.365
624 | 513.389 293.27 459.358 293.274
625 | 396.766 295.409 380.018 294.519
626 | 224.025 295.849 295.365 294.292
627 | 88.7777 296.889 187.408 295.173
628 | 96.6891 297.092 177.316 285.346
629 | 488.49 297.596 443.005 450.074
630 | 89.2074 304.102 187.769 280.427
631 | 112.957 304.17 187.501 300.083
632 | 318.565 311.048 326.429 305.107
633 | 435.534 310.397 406.63 365.301
634 | 327.278 312.763 332.756 306.201
635 | 546.543 314.691 481.337 307.929
636 | 85.6212 315.114 766.252 529.449
637 | 556.042 315.122 487.642 305.887
638 | 354.971 316.2 351.74 308.789
639 | 479.284 317.207 435.835 279.255
640 | 369.062 317.619 361.08 366.693
641 | 654.092 318.502 554.115 310.619
642 | 63.0582 319.005 153.008 310.194
643 | 82.8475 318.977 166.896 310.188
644 | 481.218 323.793 437.098 313.836
645 | 240.272 325.623 273.466 314.748
646 | 551.356 326.113 484.797 315.686
647 | 81.6566 326.512 182.605 280.223
648 | 58.2357 327.031 149.672 315.334
649 | 63.1661 326.857 151.194 325.474
650 | 234.604 327.318 269.823 315.808
651 | 643.672 327.776 546.967 317.128
652 | 509.974 330.307 457.886 503.873
653 | 299.453 331.635 314.372 500.398
654 | 86.4534 333.93 169.231 315.584
655 | 506.071 333.943 454.025 320.897
656 | 479.911 338.033 436.277 384.004
657 | 497.918 338.116 448.979 323.39
658 | 401.296 340.985 382.795 296.258
659 | 87.5517 341.461 168.065 325.454
660 | 476.312 343.104 434.07 327.388
661 | 267.214 343.351 291.974 326.885
662 | 391.834 347.27 376.456 330.22
663 | 506.377 348.729 454.354 332.048
664 | 658.556 352.413 557.346 333.948
665 | 267.46 352.96 292.186 332.498
666 | 686.039 353.633 113.297 364.113
667 | 726.111 353.584 15.2528 551.967
668 | 304.457 354.657 316.965 334.997
669 | 656.493 357.402 555.933 337.094
670 | 267.408 358.548 291.952 337.384
671 | 456.448 360.363 420.295 338.889
672 | 506.868 361.136 454.453 339.424
673 | 551.563 362.193 484.828 340.029
674 | 273.098 366.841 295.682 342.952
675 | 352.067 373.251 349.05 286.832
676 | 288.612 374.558 307.045 348.109
677 | 461.348 374.813 423.336 408.896
678 | 119.767 378.91 191.764 350.739
679 | 506.362 378.855 453.612 351.413
680 | 728.867 381.827 604.509 353.727
681 | 213.306 382.777 254.822 353.581
682 | 238.914 382.532 305.668 323.912
683 | 268.788 382.313 292.736 353.509
684 | 461.172 382.535 424.007 444.471
685 | 686.099 383.749 595.88 272.994
686 | 235.167 386.381 269.634 237.282
687 | 493.974 386.434 445.885 356.335
688 | 277.603 397.449 298.517 363.753
689 | 304.795 398.359 317.207 364.538
690 | 326.447 398.316 332.009 364.156
691 | 493.789 402.465 270.302 488.435
692 | 555.95 409.454 488.468 403.474
693 | 13.3478 410.846 119.161 372.4
694 | 135.162 418.689 202.066 377.962
695 | 520.624 419.844 463.325 379.356
696 | 396.765 422.336 379.805 380.855
697 | 657.925 422.425 556.851 380.778
698 | 281.052 426.124 301.432 383.098
699 | 392.205 426.975 376.426 296.78
700 | 223.568 430.955 437.854 387.17
701 | 488.719 430.902 442.088 386.756
702 | 476.603 431.304 433.854 387.105
703 | 67.7924 433.558 156.828 387.26
704 | 392.18 438.783 376.462 334.384
705 | 656.065 445.285 555.053 397.163
706 | 671.042 452.383 564.634 400.574
707 | 529.012 454.654 469.456 403.824
708 | 692.975 454.482 757.317 372.512
709 | 226.322 455.939 263.841 403.265
710 | 131.201 459.074 199.514 405.276
711 | 216.98 462.677 257.342 407.887
712 | 232.912 462.75 268.099 408.034
713 | 702.01 462.387 252.338 542.561
714 | 52.7712 466.694 146.505 409.285
715 | 506.686 467.374 453.934 411.408
716 | 3.08335 472.936 113.488 414.279
717 | 224.46 474.344 262.541 416.101
718 | 702.514 475.204 586.591 416.781
719 | 556.802 476.029 487.865 416.975
720 | 304.782 478.515 317.219 419.918
721 | 103.159 482.77 180.335 421.464
722 | 718.97 482.523 597.933 421.674
723 | 460.915 483.996 422.955 456.847
724 | 656.384 485.603 555.436 423.953
725 | 306.977 486.614 318.518 424.133
726 | 61.1925 486.825 649.827 584.817
727 | 218.499 489.76 258.551 426.32
728 | 304.429 493.218 317.122 492.492
729 | 281.223 493.7 300.601 429.375
730 | 59.004 495.122 150.923 429.389
731 | 725.871 497.423 602.47 431.74
732 | 457.814 502.968 421.144 498.518
733 | 721.941 502.867 599.498 435.878
734 | 9.73729 504.788 114.598 436.569
735 | 27.0015 505.664 128.274 436.841
736 | 135.992 504.794 202.567 436.376
737 | 18.0968 505.794 122.982 436.66
738 | 59.2175 506.801 683.903 428.559
739 | 484.254 508.427 435.215 439.121
740 | 397.177 508.753 380.101 439.257
741 | 51.3178 510.663 145.427 440.208
742 | 109.107 513.941 652.238 326.536
743 | 300.694 514.082 314.381 442.98
744 | 349.228 515.434 415.537 446.619
745 | 713.436 516.22 593.881 444.314
746 | 86.3027 518.305 155.738 508.329
747 | 680.141 518.447 676.302 524.583
748 | 436.2 518.689 406.71 446.279
749 | 633.289 522.238 539.726 482.938
750 | 453.475 524.208 418.075 450.031
751 | 656.16 525.44 555.579 477.943
752 | 42.6308 528.216 139.497 452.097
753 | 393.063 527.942 376.39 392.131
754 | 660.286 529.262 557.966 453.046
755 | 37.4514 529.94 768.167 186.109
756 | 490.437 532.694 441.467 212.278
757 | 702.68 533.045 586.388 456.785
758 | 353.17 536.933 350.004 458.39
759 | 405.963 538.254 792.43 575.247
760 | 490.496 540.388 371.375 480.709
761 | 225.859 541.68 263.388 461.55
762 | 232.289 541.386 267.78 461.286
763 | 694.262 541.679 581.233 461.837
764 | 458.105 543.083 421.049 462.291
765 | 18.7482 546.3 122.549 464.361
766 | 282.017 547.545 301.75 465.609
767 | 575.702 547.844 501.229 466.295
768 | 738.509 549.037 48.0646 457.634
769 | 498.29 551.528 448.455 468.495
770 | 115.984 553.475 189.232 469.571
771 | 236.508 554.915 270.538 470.465
772 | 397.817 554.96 380.34 470.479
773 | 135.662 561.109 202.511 412.802
774 | 220.992 561.985 260.109 475.422
775 | 230.381 562.032 266.106 475.255
776 | 744.129 562.286 614.124 475.955
777 | 478.658 565.004 434.652 477.518
778 | 492.672 564.985 444.914 477.529
779 | 23.2231 565.934 11.2649 475.543
780 | 86.6686 566.646 293.492 571.58
781 | 273.763 566.632 295.852 478.495
782 | 518.525 571.072 461.918 481.674
783 | 522.231 572.917 464.562 483.198
784 | 78.8395 575.919 711.685 565.87
785 | 301.535 576.992 314.283 363.248
786 | 72.4878 577.715 681.366 389.247
787 | 109.908 581.111 184.432 487.929
788 | 437.362 583.814 406.927 490.384
789 | 276.74 589.956 298.007 494.417
790 | 81.3656 591.608 166.842 494.498
791 | 361.13 595.213 376.372 325.818
792 | 473.322 15.5397 432.018 104.145
793 | 344.931 24.8494 345.122 110.557
794 | 443.053 35.3092 411.73 117.506
795 | 382.03 49.1573 370.268 127.161
796 | 429.457 54.641 402.352 131.256
797 | 344.999 65.8381 199.549 364.297
798 | 436.63 92.6298 407.144 156.801
799 | 382.272 93.9166 370.37 157.93
800 | 429.954 99.6354 402.891 161.797
801 | 389.129 100.575 375.085 162.224
802 | 382.408 107.326 370.307 167.124
803 | 389.804 113.962 374.57 171.031
804 | 479.846 118.503 436.826 174.601
805 | 556.227 118.936 488.4 175.273
806 | 352.317 123.126 31.4231 333.137
807 | 467.6 123.318 428.407 177.846
808 | 517.047 124.358 461.385 178.561
809 | 389.852 128.456 374.328 181.083
810 | 339.653 129.907 341.449 182.115
811 | 461.398 131.048 424.337 182.988
812 | 265.717 131.77 259.607 182.857
813 | 337.112 139.422 339.761 188.554
814 | 489.247 143.441 442.995 191.777
815 | 341.222 143.837 342.437 191.489
816 | 526.461 145.146 468.206 192.668
817 | 202.248 145.761 247.865 192.526
818 | 233.35 151.351 269.291 196.879
819 | 425.552 156.492 399.703 200.051
820 | 395.152 160.902 379.047 203.39
821 | 537.168 161.337 475.482 204.262
822 | 316.833 168.817 325.787 208.097
823 | 429.288 169.33 401.921 208.606
824 | 237.816 171.15 207.818 178.064
825 | 547.662 172.098 482.503 211.324
826 | 311.658 172.815 547.633 461.611
827 | 537.753 172.674 475.743 211.471
828 | 336.234 174.38 688.128 449.835
829 | 364.812 173.945 358.296 211.993
830 | 435.194 175.714 406.126 213.737
831 | 395.191 176.963 379.166 213.89
832 | 475.874 179.738 433.619 216.353
833 | 656.113 180.477 555.083 216.512
834 | 283.1 181.992 302.876 217.374
835 | 364.832 182.069 358.532 216.513
836 | 218.428 183.441 258.989 217.675
837 | 647.89 186.28 550.091 220.928
838 | 475.894 188.314 433.699 221.99
839 | 369.013 191.589 361.433 223.964
840 | 504.902 191.906 453.605 224.406
841 | 213.422 192.548 255.383 224.453
842 | 267.199 199.86 292.239 229.494
843 | 275.357 199.956 262.495 318.846
844 | 482.625 205.347 438.404 233.431
845 | 518.972 204.647 463.025 233.279
846 | 536.558 205.175 475.089 233.509
847 | 297.684 208.554 312.779 235.76
848 | 266.731 212.412 291.467 237.978
849 | 308.117 211.966 319.925 237.739
850 | 435.492 220.547 406.472 243.452
851 | 129.253 222.252 198.272 244.111
852 | 326.194 222.065 331.577 243.797
853 | 513.5 222.435 459.273 245.085
854 | 6.96945 225.911 113.332 379.128
855 | 298.48 226.067 313.154 247.405
856 | 266.942 227.032 292.047 247.55
857 | 470.576 233.196 430.206 252.337
858 | 216.173 236.359 257.062 254.193
859 | 276.727 236.207 298.499 254.094
860 | 555.839 238.514 487.682 256.387
861 | 510.19 240.346 456.74 257.546
862 | 499.592 241.182 449.721 257.876
863 | 229.414 243.667 267.477 258.83
864 | 753.87 243.685 621.95 260.307
865 | 632.838 247.298 540.419 230.653
866 | 554.285 248.443 487.17 263.229
867 | 298.642 252.458 313.352 265.097
868 | 233.62 256.268 269.265 267.675
869 | 83.8174 262.491 166.779 272.235
870 | 325.216 265.843 331.331 274.195
871 | 95.3103 266.902 174.147 274.957
872 | 133.646 267.188 201.358 274.094
873 | 233.876 267.438 269.147 276.807
874 | 514.843 267.664 460.066 275.813
875 | 547.238 269.203 482.215 276.707
876 | 118.087 271.994 191.064 278.5
877 | 129.929 271.961 199.213 277.652
878 | 542.588 272.653 478.982 279.249
879 | 226.884 275.404 264.243 280.855
880 | 476.751 277.38 434.385 282.497
881 | 213.875 279.099 255.693 283.148
882 | 556.257 283.858 488.095 287.077
883 | 208.067 288.076 254.18 528.232
884 | 355.725 291.525 351.92 351.136
885 | 630.602 293.09 539.266 323.912
886 | 435.584 295.117 406.382 294.338
887 | 288.43 296.268 307.448 505.973
888 | 416.81 296.263 393.413 294.748
889 | 135.357 297.304 202.195 295.493
890 | 118.741 306.758 191.572 301.472
891 | 396.565 310.574 379.834 304.515
892 | 426.277 309.628 399.948 304.067
893 | 514.242 311.643 459.762 306.232
894 | 533.184 317.407 472.396 310.48
895 | 542.787 318.542 479.128 310.727
896 | 231.499 319.52 267.62 310.663
897 | 475.741 321.471 433.619 312.085
898 | 243.092 321.101 303.948 282.601
899 | 548.411 321.721 482.895 312.562
900 | 556.166 330.1 487.72 318.825
901 | 520.76 339.194 464.102 324.287
902 | 555.241 339.444 487.132 324.677
903 | 407.218 341.305 386.948 326.257
904 | 436.627 341.353 406.929 325.631
905 | 391.574 342.259 375.849 239.618
906 | 284.084 343.186 303.522 326.808
907 | 396.811 345.31 379.904 328.3
908 | 101.594 348.827 180.301 330.683
909 | 396.96 352.037 379.865 332.238
910 | 721.836 353.584 157.694 325.604
911 | 737.675 353.259 161.101 325.553
912 | 436.886 354.184 407.208 334.951
913 | 446.551 353.928 413.659 334.144
914 | 326.813 354.853 331.834 334.911
915 | 426.52 354.733 399.876 334.742
916 | 62.8422 361.248 153.089 338.761
917 | 70.8912 360.442 158.353 338.311
918 | 651.531 365.604 552.57 342.919
919 | 24.8557 369.935 127.679 344.379
920 | 360.188 372.558 355.366 316.756
921 | 527.799 374.606 468.887 348.372
922 | 672.823 374.792 690.302 363.32
923 | 44.5111 379.132 141.284 350.821
924 | 23.2209 379.558 126.552 351.33
925 | 397.313 380.05 379.98 351.339
926 | 262.909 383.416 255.937 413.082
927 | 299.638 383.36 313.906 354.127
928 | 462.184 383.139 424.032 414.082
929 | 346.874 384.274 346.538 507.386
930 | 22.9151 384.991 125.771 354.581
931 | 32.0095 385.431 131.25 355.196
932 | 437.407 385.403 407.301 355.6
933 | 446.617 386.038 413.691 356.136
934 | 538.688 391.319 476.21 359.673
935 | 225.219 393.516 263.29 361.164
936 | 337.613 397.636 339.435 364.06
937 | 346.783 397.586 346.899 513.809
938 | 15.0068 400.152 120.826 365.138
939 | 538.966 399.483 476.392 365.976
940 | 479.52 406.735 435.838 370.235
941 | 278.543 412.039 299.554 373.64
942 | 686.271 415.004 752.528 343.922
943 | 240.157 427.486 273.008 383.75
944 | 347.949 427.464 346.576 385.074
945 | 317.493 427.922 325.839 384.488
946 | 234.893 430.901 269.749 386.207
947 | 338.129 431.135 339.662 385.497
948 | 397.347 430.722 380.028 386.223
949 | 447.953 431.084 414.148 386.767
950 | 556.59 431.54 487.702 386.676
951 | 493.591 431.869 445.16 417.993
952 | 515.949 432.215 460.61 387.58
953 | 667.356 434.321 563.597 389.455
954 | 338.424 440.795 339.966 393.389
955 | 447.242 443.245 413.923 395.096
956 | 706.224 446.374 790.511 158.63
957 | 233.974 450.909 269.113 399.933
958 | 551.674 454.674 484.872 403.507
959 | 663.83 455.268 560.504 402.804
960 | 697.54 458.051 582.891 405.113
961 | 370.395 465.042 360.899 409.412
962 | 131.704 466.027 200.02 409.623
963 | 706.82 467.544 771.716 588.148
964 | 673.778 469.613 566.409 412.586
965 | 299.953 471.239 313.673 414.216
966 | 338.198 472.277 339.749 414.551
967 | 691.507 472.464 579.148 415.067
968 | 235.247 475.244 270.019 416.341
969 | 447.924 475.322 414.475 416.858
970 | 703.379 476.62 586.916 419.956
971 | 275.404 478.919 296.85 419.335
972 | 655.526 481.724 554.792 420.996
973 | 338.868 484.642 339.978 423.08
974 | 438.07 484.916 407.461 423.269
975 | 289.982 485.93 307.047 333.758
976 | 344.398 488.764 343.728 425.722
977 | 438.707 491.317 407.422 427.485
978 | 650.029 492.591 551.495 428.322
979 | 222.556 493.827 261.051 428.916
980 | 14.7041 495.084 118.775 429.306
981 | 512.517 498.111 458.284 432.415
982 | 19.6047 500.498 123.792 433.428
983 | 664.04 501.138 560.587 434.131
984 | 745.799 502.287 777.812 350.693
985 | 727.638 503.68 603.736 435.848
986 | 52.7633 505.84 144.1 436.876
987 | 299.858 505.763 313.85 437.267
988 | 357.748 508.336 352.87 439.421
989 | 499.651 507.794 449.117 438.9
990 | 688.911 509.171 577.607 439.03
991 | 717.184 510.446 596.621 440.324
992 | 318.688 514.824 326.745 443.765
993 | 328.617 515.188 333.335 443.603
994 | 551.654 522.692 484.737 449.186
995 | 50.005 529.805 144.176 453.103
996 | 61.0132 530.697 151.705 453.716
997 | 655.515 530.483 554.75 454.496
998 | 708.902 533.25 591.491 453.988
999 | 318.718 533.599 326.751 455.914
1000 | 8.75057 538.332 116.577 458.574
1001 | 281.666 542.377 301.632 462.058
1002 | 59.1114 544.202 150.627 462.882
1003 | 479.924 545.238 259.516 222.243
1004 | 11.6476 548.425 117.657 465.572
1005 | 21.8894 550.462 9.56711 465.385
1006 | 492.83 549.775 444.58 467.516
1007 | 105.424 551.87 109.814 363.285
1008 | 737.675 556.109 257.003 583.006
1009 | 268.779 566.856 292.651 478.702
1010 | 285.559 567.46 303.953 479.006
1011 | 428.726 567.712 400.92 480.509
1012 | 409.069 569.354 387.973 480.884
1013 | 437.747 568.84 407.238 480.01
1014 | 403.66 570.108 384.143 481.568
1015 | 660.112 573.764 557.539 483.844
1016 | 487.829 575.855 441.057 485.369
1017 | 318.152 577.723 326.299 485.801
1018 | 327.648 579.147 77.1776 267.567
1019 | 268.884 581.682 292.484 489.082
1020 | 285.631 581.457 303.804 488.27
1021 | 409.381 582.653 387.929 489.134
1022 | 419.284 582.98 394.715 489.125
1023 | 428.409 583.113 401.16 489.535
1024 | 441.867 586.12 409.748 491.289
1025 | 281.614 587.686 301.338 492.671
1026 | 458.132 588.409 421.168 492.682
1027 | 479.68 589.646 435.644 494.322
1028 | 716.841 589.544 150.255 437.691
1029 | 479.98 595.391 435.82 497.831
1030 | 456.951 15.6565 422.065 105.362
1031 | 443.277 22.9791 411.798 110.287
1032 | 473.554 42.4634 432.532 119.99
1033 | 429.264 47.1411 402.346 126.199
1034 | 443.466 46.6459 411.969 125.935
1035 | 375.274 49.3249 365.737 127.444
1036 | 388.961 48.8432 374.959 127.234
1037 | 443.457 61.1998 411.906 135.76
1038 | 371.022 86.8644 362.575 152.212
1039 | 429.463 92.5016 402.476 156.889
1040 | 443.663 92.0672 412.081 156.592
1041 | 389.253 93.5328 375.146 157.544
1042 | 357.371 106.828 353.436 166.93
1043 | 389.337 107.263 375.21 166.788
1044 | 375.731 107.934 365.948 167.256
1045 | 455.978 117.747 420.491 174.433
1046 | 334.015 122.859 337.279 177.089
1047 | 579.745 135.632 503.733 186.536
1048 | 416.808 140.746 393.845 189.708
1049 | 468.161 141.424 428.307 190.266
1050 | 633.843 141.536 540.568 189.576
1051 | 327.235 143.511 332.964 190.986
1052 | 180.722 146.892 233.007 192.981
1053 | 548.452 151.74 482.851 197.437
1054 | 547.539 162.894 482.459 204.726
1055 | 435.04 167 406.094 207.304
1056 | 267.589 169.162 292.577 208.778
1057 | 281.754 169.546 302.074 209.024
1058 | 532.213 181.108 471.969 216.928
1059 | 481.241 185.179 437.447 220.266
1060 | 511.459 185.679 457.839 220.158
1061 | 633.454 191.421 540.205 223.858
1062 | 467.327 195.187 424.645 257.469
1063 | 650.557 202.616 552.197 231.976
1064 | 546.912 205.262 482.083 233.68
1065 | 260.133 210.483 287.138 236.468
1066 | 491.222 210.519 443.944 237.845
1067 | 95.6632 214.883 174.792 238.916
1068 | 537.714 215.767 475.632 240.716
1069 | 273.105 217.875 295.581 242.139
1070 | 425.764 219.619 399.859 243.284
1071 | 50.6682 222.097 144.814 243.634
1072 | 211.7 230.045 254.179 250.076
1073 | 271.294 232.676 295.282 251.4
1074 | 550.305 233.036 483.974 252.791
1075 | 368.89 234.433 361.059 252.515
1076 | 296.915 241.551 312.213 258.143
1077 | 209.045 242.805 252.575 258.779
1078 | 457.213 245.986 421.095 261.163
1079 | 520.052 250.376 465.443 510.696
1080 | 498.262 251.167 448.871 264.504
1081 | 360.16 253.343 354.866 265.663
1082 | 514.442 255.423 459.789 267.78
1083 | 426.346 255.571 400.025 268.195
1084 | 268.041 257.197 292.384 268.201
1085 | 548.278 262.127 482.819 272.598
1086 | 536.623 262.381 474.769 272.703
1087 | 304.764 264.861 317.349 274.096
1088 | 268.123 269.48 292.466 276.919
1089 | 360.369 285.61 355.256 287.888
1090 | 369.197 285.029 361.216 287.326
1091 | 297.729 285.874 312.846 288.205
1092 | 555.022 295.167 487.333 294.531
1093 | 530.817 295.857 470.941 294.908
1094 | 537.42 296.528 475.323 294.924
1095 | 261.768 297.501 288.074 295.726
1096 | 548.545 297.738 482.825 296.389
1097 | 333.742 299.618 337.08 297.912
1098 | 478.343 300.758 435.193 298.542
1099 | 283.087 301.25 302.783 297.949
1100 | 219.121 302.475 259.295 299.256
1101 | 457.24 301.598 420.817 298.59
1102 | 407.214 307.822 387.034 303.493
1103 | 129.352 313.455 198.437 306.135
1104 | 283.023 313.102 302.543 306.345
1105 | 456.584 316.814 420.524 308.596
1106 | 304.339 319.245 316.963 310.469
1107 | 511.949 319.82 458.315 311.536
1108 | 223.273 320.743 262.555 311.325
1109 | 641.043 320.925 545.44 311.981
1110 | 228.588 325.527 265.695 314.656
1111 | 526.733 328.419 468.229 317.785
1112 | 299.178 340.689 313.551 325.321
1113 | 316.354 340.899 325.255 325.258
1114 | 426.611 341.314 400.117 326.124
1115 | 538.111 341.433 475.781 326.129
1116 | 446.691 342.276 413.82 326.725
1117 | 515.483 344.174 460.464 327.423
1118 | 233.659 345.416 268.937 328.137
1119 | 690.823 352.171 580.056 334.004
1120 | 538.085 353.563 475.672 334.453
1121 | 762.275 353.099 627.45 334.187
1122 | 284.146 356.755 303.431 337.262
1123 | 515.521 356.844 460.369 336.793
1124 | 716.67 359.811 596.795 338.692
1125 | 282.705 364.73 302.277 341.644
1126 | 711.757 366.147 593.95 342.88
1127 | 721.597 366.138 181.081 498.571
1128 | 52.2229 371.24 147.124 344.684
1129 | 337.044 384.29 339.077 355.391
1130 | 136.261 384.784 202.72 354.753
1131 | 316.77 384.892 325.366 355.531
1132 | 416.656 384.925 393.482 355.481
1133 | 522.133 385.338 464.993 356.182
1134 | 427.05 386.175 400.371 355.778
1135 | 556.273 386.556 487.872 356.413
1136 | 219.344 389.698 259.154 358.075
1137 | 515.708 389.032 460.349 358.937
1138 | 549.352 392.359 483.218 360.594
1139 | 374.452 392.97 365.116 417.409
1140 | 13.9773 393.648 751.822 431.671
1141 | 427.286 399 400.332 364.879
1142 | 219.235 400.796 259.313 365.353
1143 | 532.44 400.82 471.788 365.818
1144 | 515.927 401.894 460.609 367.289
1145 | 674.138 405.122 567.927 368.823
1146 | 129.954 406.483 485.692 534.574
1147 | 699.093 407.261 584.747 370.909
1148 | 488.91 408.321 442.544 371.231
1149 | 2.98084 412.063 3.30851 216.336
1150 | 702.327 416.43 235.281 548.487
1151 | 23.3055 416.799 126.582 376.313
1152 | 527.422 417.828 468.296 377.823
1153 | 457.778 423.975 421.215 381.925
1154 | 307.007 430.232 318.932 385.699
1155 | 76.9765 432.542 181.541 566.897
1156 | 270.72 433.098 293.948 388.096
1157 | 282.197 433.375 301.957 388.082
1158 | 707.514 432.77 589.925 388.198
1159 | 385.63 435.742 371.795 387.886
1160 | 427.441 438.755 400.288 393.065
1161 | 307.121 440.106 318.947 393.067
1162 | 327.832 441.261 332.781 393.622
1163 | 282.244 443.571 301.876 394.784
1164 | 549.165 445.136 483.03 396.488
1165 | 515.44 446.419 460.276 397.395
1166 | 675.508 448.974 568.722 399.106
1167 | 659.466 449.972 557.39 399.988
1168 | 457.291 450.68 420.679 399.622
1169 | 700.692 451.163 584.963 400.611
1170 | 458.084 467.887 421.442 411.691
1171 | 317.299 472.062 325.775 414.253
1172 | 327.478 473.559 332.475 416.364
1173 | 438.006 474.865 407.395 416.865
1174 | 407.53 475.967 387.143 416.97
1175 | 715.421 476.015 596.123 417.604
1176 | 387.275 477.589 373.096 535.79
1177 | 492.577 478.285 444.899 451.388
1178 | 516.228 478.312 460.792 418.846
1179 | 417.991 486.151 393.57 424.202
1180 | 235.471 488.353 270.163 425.482
1181 | 268.82 488.956 292.346 425.926
1182 | 550.844 490.958 484.096 427.297
1183 | 658.444 491.33 556.903 427.788
1184 | 135.183 495.024 699.083 385.514
1185 | 217.537 499.828 257.954 433.092
1186 | 641.925 502.644 545.809 435.224
1187 | 85.482 504.165 167.758 435.967
1188 | 210.283 503.463 251.922 435.24
1189 | 458.365 511.986 421.509 441.613
1190 | 361.837 513.451 356.171 442.038
1191 | 273.496 516.313 435.348 413.931
1192 | 387.195 518.472 373.089 446.912
1193 | 514.365 519.763 459.325 446.986
1194 | 699.886 522.474 585.394 449.596
1195 | 270.314 523.282 293.617 449.046
1196 | 307.825 525.639 319.17 451.362
1197 | 714.255 524.991 594.463 450.457
1198 | 328.304 533.926 332.916 456.057
1199 | 664.865 534.334 561.043 456.337
1200 | 234.934 535.687 268.878 306.71
1201 | 56.6772 537.268 154.958 556.177
1202 | 428.164 536.401 400.736 458.618
1203 | 290.212 541.519 307.115 461.524
1204 | 361.946 548.351 355.892 466.885
1205 | 561.798 551.466 491.436 468.574
1206 | 37.8431 553.246 136.756 469.085
1207 | 318.081 565.062 326.223 477.201
1208 | 327.945 566.918 433.476 316.536
1209 | 500.807 566.949 450.109 478.914
1210 | 220.491 568.426 293.138 358.178
1211 | 553.15 568.175 498.183 557.38
1212 | 493.953 570.647 445.416 481.409
1213 | 307.117 576.458 318.725 485.11
1214 | 220.713 579.692 259.992 487.477
1215 | 447.949 581.659 413.944 488.668
1216 | 493.875 583.965 445.49 490.562
1217 | 709.501 586.64 591.884 492.854
1218 | 305.909 587.85 317.94 493.446
1219 | 647.102 588.248 548.861 493.431
1220 | 435.702 54.5235 406.809 131.2
1221 | 435.522 98.9747 406.309 161.217
1222 | 382.489 100.397 370.557 162.02
1223 | 396.651 112.185 381.135 169.87
1224 | 422.723 112.105 397.613 169.741
1225 | 501.169 117.003 450.066 173.462
1226 | 619.527 134.544 531.697 186.076
1227 | 284.771 143.585 303.729 191.16
1228 | 228.082 144.549 266.947 191.243
1229 | 326.54 156.924 332.29 200.663
1230 | 345.584 157.216 345.696 200.74
1231 | 304.899 159.451 317.121 202.727
1232 | 384.84 161.637 371.961 203.709
1233 | 230.638 170.02 743.373 331.391
1234 | 469.182 181.776 429.182 217.576
1235 | 211.141 184.203 253.826 218.527
1236 | 641.964 187.483 546.253 222.149
1237 | 557.1 190.942 488.987 223.963
1238 | 524.973 192.98 466.98 225.239
1239 | 227.599 194.91 686.898 295.772
1240 | 204.875 196.494 249.594 227.256
1241 | 295.305 197.336 311.155 227.709
1242 | 360.299 197.225 355.124 227.916
1243 | 658.484 203.361 557.504 232.558
1244 | 302.943 204.047 316.367 232.426
1245 | 210.224 211.841 253.141 237.816
1246 | 458.544 215.354 421.969 240.055
1247 | 218.933 215.848 259.45 240.231
1248 | 478.197 222.025 435.021 245.233
1249 | 455.127 228.623 419.804 248.449
1250 | 478.632 230.403 581.461 588.273
1251 | 642.076 235.809 546.386 254.652
1252 | 669.42 235.523 563.848 254.377
1253 | 754.855 236.536 621.891 254.053
1254 | 712.855 243.765 594.108 260.028
1255 | 260.141 256.106 286.633 268.309
1256 | 490.886 255.657 443.843 268.085
1257 | 661.321 258.774 581.799 441.099
1258 | 478.37 265.735 435.212 304.647
1259 | 195.405 272.179 242.526 277.601
1260 | 656.786 280.238 555.935 284.841
1261 | 733.647 281.437 608.186 285.752
1262 | 233.019 282.371 268.718 285.357
1263 | 465.768 283.622 427.139 286.737
1264 | 457.404 290.526 421.251 291.358
1265 | 491.4 300.285 444.205 297.823
1266 | 384.681 305.49 372.021 301.137
1267 | 538.221 306.138 475.642 302.482
1268 | 320.45 307.733 327.958 302.032
1269 | 491.313 311.232 444.118 305.579
1270 | 734.16 313.49 608.736 307.468
1271 | 475.27 324.82 433.015 314.6
1272 | 241.341 343.303 274.216 326.6
1273 | 260.656 342.574 287.587 326.399
1274 | 549.094 350.8 483.292 333.806
1275 | 211.952 351.222 254.04 332.049
1276 | 269.252 355.12 293.293 335.297
1277 | 232.961 356.087 268.535 335.717
1278 | 128.913 364.089 197.925 340.958
1279 | 645.363 366.108 548.268 343.064
1280 | 81.1041 368.087 165.766 343.692
1281 | 297.475 371.736 312.333 346.08
1282 | 457.453 378.751 421.265 351.384
1283 | 665.143 381.001 561.309 353.497
1284 | 52.5916 382.797 146.086 353.81
1285 | 723.573 382.506 600.736 354.161
1286 | 260.787 386.809 287.639 356.226
1287 | 283.242 389.002 302.562 358.152
1288 | 479.309 389.969 435.524 358.467
1289 | 720.031 391.443 599.504 360.068
1290 | 705.43 391.852 590.411 360.229
1291 | 654.788 399.404 555.098 364.308
1292 | 269.819 399.838 293.496 365.206
1293 | 283.182 399.966 302.517 365.666
1294 | 233.288 401.143 268.783 366.035
1295 | 666.131 404.543 160.864 438.249
1296 | 212.698 405.684 254.618 368.768
1297 | 513.412 411.591 459.314 373.33
1298 | 297.977 416.044 312.736 376.318
1299 | 32.009 416.448 593.777 386.28
1300 | 499.795 429.427 449.743 386.321
1301 | 271.079 443.231 294.473 395.223
1302 | 537.701 444.007 476.694 425.11
1303 | 129.187 445.551 196.929 394.901
1304 | 306.054 452.751 317.878 401.53
1305 | 212.236 473.285 254.394 415.413
1306 | 242.401 474.302 274.58 415.574
1307 | 479.435 477.504 435.522 418.41
1308 | 684.712 476.811 617.148 428.047
1309 | 557.993 478.907 489.063 419.318
1310 | 492.41 488.669 444.533 425.775
1311 | 516.433 490.891 460.728 427.66
1312 | 686.581 495.691 575.753 431.395
1313 | 129.893 502.415 198.025 434.817
1314 | 657.795 518.299 556.223 446.127
1315 | 234.311 524.489 269.213 450.042
1316 | 479.966 527.385 435.873 451.901
1317 | 263.065 527.969 288.844 452.477
1318 | 516.085 529.402 460.568 453.256
1319 | 307.935 531.417 319.333 454.434
1320 | 480.248 537.499 436.214 459.007
1321 | 516.259 539.542 460.507 459.948
1322 | 658.4 539.911 556.621 460.505
1323 | 229.15 549.591 265.433 466.944
1324 | 464.961 554.382 425.858 470.743
1325 | 386.953 565.21 372.953 477.786
1326 | 402.009 581.62 382.952 488.685
1327 | 516.862 583.413 460.835 490.448
1328 | 397.18 592.376 379.793 496.19
1329 | 451.859 54.447 417.104 131.265
1330 | 472.911 96.1164 431.58 159.264
1331 | 579.013 120.334 504.131 174.927
1332 | 639.807 151.314 544.693 197.438
1333 | 652.106 151.211 553.214 197.191
1334 | 361.641 155.253 356.113 199.098
1335 | 371.606 162.09 363.015 204.024
1336 | 500.946 174.93 450.683 213.145
1337 | 372.455 176.663 363.442 213.536
1338 | 199.931 178.247 36.4552 329.942
1339 | 386.031 182.577 373.314 217.837
1340 | 495.458 191.683 447.048 224.549
1341 | 458.444 201.414 421.715 230.925
1342 | 52.5488 213.506 146.399 238.8
1343 | 15.8872 223.242 121.598 245.04
1344 | 27.7852 227.43 130.365 248.265
1345 | 524.08 235.886 466.43 254.61
1346 | 117.62 238.16 190.525 255.681
1347 | 472.128 241.803 431.421 258.762
1348 | 755.822 252.023 150.351 560.874
1349 | 120.002 263.49 192.112 273.582
1350 | 315.341 266.645 325.031 274.88
1351 | 456.251 273.685 420.426 279.19
1352 | 295.441 282.096 311.583 285.647
1353 | 724.397 287.944 602.157 289.304
1354 | 241.507 300.853 274.217 297.688
1355 | 724.059 300.166 601.696 298.867
1356 | 60.5356 314.685 584.063 279.996
1357 | 241.391 316.169 274.057 309.008
1358 | 467.963 343.152 428.223 326.581
1359 | 210.19 345.116 252.932 329.036
1360 | 242.315 344.72 275.116 328.442
1361 | 666.712 346.008 562.84 328.128
1362 | 499.599 350.666 449.57 331.523
1363 | 513.717 367.493 459.012 343.569
1364 | 116.983 373.435 190.097 347.201
1365 | 704.662 375.807 587.712 349.91
1366 | 692.389 377.356 580.16 350.448
1367 | 128.102 382.006 196.839 354.121
1368 | 210.145 388.854 253.24 357.621
1369 | 259.682 388.631 287.566 387.274
1370 | 630.608 388.63 490.05 439.846
1371 | 689.096 406.622 577.436 370.33
1372 | 79.0925 414.219 24.9399 577.345
1373 | 137.964 413.811 203.225 375.619
1374 | 216.126 418.605 256.961 377.945
1375 | 477.311 417.725 434.381 378.106
1376 | 631.513 417.236 538.973 377.564
1377 | 283.06 419.597 302.392 378.406
1378 | 129.897 422.972 198.47 381.359
1379 | 210.904 432.42 253.497 386.884
1380 | 514.761 456.999 459.591 404.503
1381 | 666.812 461.076 562.366 405.487
1382 | 631.241 463.006 538.468 407.573
1383 | 550.048 504.232 483.751 436.003
1384 | 631.576 507.525 538.17 438.507
1385 | 138.739 518.843 204.356 445.522
1386 | 15.9708 523.585 120.932 448.999
1387 | 743.712 547.138 612.967 465.569
1388 | 644.454 557.879 547.173 472.759
1389 | 211.432 568.032 254.136 478.274
1390 | 559.606 576.874 489.645 485.558
1391 | 717.516 578.579 597.413 486.072
1392 | 340.547 579.654 341.517 487.689
1393 | 351.171 118.852 349.136 174.846
1394 | 450.952 129.399 417.439 181.86
1395 | 483.121 131.739 438.74 183.991
1396 | 636.045 132.64 542.453 184.67
1397 | 329.556 133.924 334.214 185.054
1398 | 525.685 171.483 467.218 211.203
1399 | 557.691 208.627 489.401 235.954
1400 | 369.221 209.483 361.289 236.032
1401 | 527.919 212.326 468.069 299.786
1402 | 542.493 210.772 478.818 237.209
1403 | 3.24935 215.119 2.11017 331.479
1404 | 468.312 222.669 428.461 244.926
1405 | 233.266 238.256 268.94 255.439
1406 | 265.935 237.869 291.088 255.558
1407 | 468.323 256.132 428.394 268.483
1408 | 293.172 259.192 309.582 269.998
1409 | 222.027 263.504 261.613 272.467
1410 | 384.645 264.35 372.357 272.959
1411 | 468.061 267.107 428.347 275.136
1412 | 492.456 278.897 444.878 283.875
1413 | 208.6 302.288 252.038 299.007
1414 | 258.575 302.703 286.059 299.33
1415 | 468.257 300.705 428.399 298.419
1416 | 502.06 302.744 451.196 299.299
1417 | 493.448 323.93 445.592 314.131
1418 | 217.901 325.665 258.706 315.001
1419 | 295.149 346.439 310.814 328.375
1420 | 527.485 347.438 468.611 330.607
1421 | 488.568 352.335 442.557 334.077
1422 | 231.274 368.722 267.653 344.046
1423 | 631.411 368.885 539.372 345.004
1424 | 41.7663 375.431 140.087 348.395
1425 | 13.7415 388.888 119.952 357.357
1426 | 295.08 390.685 310.667 359.46
1427 | 468.576 389.468 428.566 357.472
1428 | 502.671 392.693 451.527 360.327
1429 | 229.244 412.552 265.653 373.743
1430 | 267.799 412.541 292.4 373.931
1431 | 492.738 413.071 444.514 374.759
1432 | 643.748 411.693 547.068 374.022
1433 | 468.027 434.6 428.132 388.979
1434 | 138.893 454.618 204.337 402.6
1435 | 274.644 456.471 296.763 403.879
1436 | 441.163 479.019 409.416 419.318
1437 | 468.166 480.51 428.291 420.475
1438 | 527.753 482.312 468.569 421.055
1439 | 235.448 498.918 270.262 432.546
1440 | 276.259 499.452 298.543 432.857
1441 | 220.601 505.966 259.979 437.305
1442 | 503.858 535.455 452.185 457.483
1443 | 560.607 540.823 490.448 461.473
1444 | 109.315 557.722 184.473 472.243
1445 | 78.2298 569.202 163.754 480.251
1446 | 296.089 570.292 311.211 481.116
1447 | 469.22 573.121 428.741 482.672
1448 | 631.395 580.959 538.045 488.855
1449 | 352.017 28.4547 350.091 113.694
1450 | 434.656 77.1045 405.38 146.776
1451 | 335.454 96.3924 338.648 159.354
1452 | 309.145 120.108 320.347 175.698
1453 | 149.648 122.37 213.149 176.218
1454 | 370.346 123.854 362.266 178.014
1455 | 410.597 134.764 389.5 185.354
1456 | 203.731 141.843 249.009 190.092
1457 | 560.782 150.058 491.824 197.17
1458 | 520.14 152.111 463.917 197.578
1459 | 477.406 153.699 434.832 198.518
1460 | 289.473 159.172 307.395 202.368
1461 | 358.164 170.326 353.678 209.716
1462 | 484.801 171.812 439.53 210.835
1463 | 223.772 174.376 262.648 212.219
1464 | 274.181 174.305 297.178 212.172
1465 | 428.864 213.225 402.071 238.303
1466 | 447.606 214.121 414.739 239.456
1467 | 352.331 217.224 349.538 241.389
1468 | 370.773 254.632 362.415 266.745
1469 | 351.422 261.211 349.094 271.147
1470 | 485.63 261.459 440.615 271.525
1471 | 663.689 267.313 561.833 276.559
1472 | 123.875 277.794 194.589 282.331
1473 | 521.689 278.48 464.721 283.234
1474 | 295.614 305.125 311.043 300.956
1475 | 353.92 305.133 350.99 300.995
1476 | 487.05 305.423 440.469 301.271
1477 | 226.292 308.242 263.927 302.983
1478 | 520.341 322.346 463.724 312.799
1479 | 226.4 351.624 263.95 332.504
1480 | 489.352 369.144 442.695 344.832
1481 | 313.01 389.52 322.981 358.313
1482 | 353.3 392.45 350.246 360.298
1483 | 277.428 394.603 298.706 361.829
1484 | 486.767 393.834 440.682 361.279
1485 | 545.013 395.14 480.264 362.276
1486 | 469.063 402.604 428.697 367.661
1487 | 672.157 425.187 565.717 382.666
1488 | 295.151 434.496 310.736 388.753
1489 | 276.272 438.703 297.821 391.527
1490 | 486.837 440.073 440.816 392.854
1491 | 543.135 439.682 478.798 392.326
1492 | 490.067 458.054 442.659 405.058
1493 | 296.035 479.237 311.273 419.487
1494 | 227.632 481.791 264.768 420.969
1495 | 484.853 483.576 439.335 422.436
1496 | 545.8 486.034 480.659 423.983
1497 | 294.148 496.261 310.049 430.38
1498 | 470.679 498.166 430.479 433.047
1499 | 521.658 502.171 463.88 435.334
1500 | 23.2759 505.745 125.931 436.278
1501 | 51.2949 520.884 145.141 447.209
1502 | 295.785 522.566 311.191 449.147
1503 | 208.927 522.529 251.583 448.864
1504 | 227.402 529.883 264.584 453.523
1505 | 278.188 529.79 298.874 453.51
1506 | 486.859 532.281 439.808 455.217
1507 | 467.944 535.761 428.116 458.166
1508 | 544.977 536.209 479.917 458.198
1509 | 213.109 545.143 255.271 464.173
1510 | 522.108 552.558 463.974 469.577
1511 | 127.161 557.155 196.493 471.436
1512 | 486.471 577.504 440.176 485.99
1513 | 521.944 597.437 328.142 205.443
1514 | 474.158 28.5783 432.978 113.918
1515 | 408.949 109.18 389.123 168.51
1516 | 449.785 111.843 415.454 170.498
1517 | 144.291 141.309 208.255 189.466
1518 | 542.188 155.192 478.993 200.131
1519 | 542.596 194.336 479.104 226.174
1520 | 122.813 216.852 194.055 240.747
1521 | 274.294 218.321 296.839 241.921
1522 | 667.516 221.611 563.489 245.02
1523 | 98.223 228.986 177.449 249.007
1524 | 456.777 239.055 420.065 255.763
1525 | 542.03 242.728 478.805 258.029
1526 | 403.098 261.487 213.366 188.838
1527 | 311.604 287.139 320.651 287.527
1528 | 542.54 294.898 478.917 291.387
1529 | 426.753 302.787 401.603 299.116
1530 | 706.341 304.659 589.888 301.986
1531 | 274.848 307.458 297.049 302.772
1532 | 403.185 312.984 384.021 305.954
1533 | 291.375 322.557 308.138 313.428
1534 | 543.485 334.852 479.451 321.626
1535 | 275.54 348.88 297.752 330.903
1536 | 352.032 349.997 350.387 420.452
1537 | 293.671 363.385 309.851 340.935
1538 | 123.404 391.07 196.21 355.365
1539 | 223.819 393.091 261.886 361.122
1540 | 403.359 397.457 384.163 364.102
1541 | 711.587 415.418 586.391 253.726
1542 | 227.725 437.846 264.872 391.174
1543 | 277.326 481.067 298.864 420.651
1544 | 28.6133 488.147 130.478 424.928
1545 | 436.026 532.568 405.726 455.429
1546 | 97.7778 577.432 179.466 483.909
1547 | 425.942 574.732 398.802 484.319
1548 | 436.758 51.6187 407.278 129.575
1549 | 381.368 99.1567 370.034 161.327
1550 | 249.645 182.743 280.21 217.431
1551 | 378.133 206.675 367.576 234.087
1552 | 622.421 219.979 533.309 243.531
1553 | 197.807 226.232 244.566 247.517
1554 | 510.692 231.255 457.656 251.165
1555 | 699.837 242.724 585.357 259.342
1556 | 765.808 242.652 630.295 258.946
1557 | 734.064 247.346 608.675 262.228
1558 | 621.496 266.246 532.446 274.765
1559 | 146.381 272.061 209.387 278.212
1560 | 249.425 270.237 280.01 277.393
1561 | 123.66 291.923 194.194 292.319
1562 | 146.21 313.53 209.26 306.792
1563 | 250.301 310.238 280.474 304.601
1564 | 622.034 312.505 531.977 306.657
1565 | 431.201 344.228 404.904 327.353
1566 | 200.986 357.16 247.601 336.505
1567 | 565.127 356.653 494.022 337.014
1568 | 146.946 359.556 209.855 337.609
1569 | 250.87 358.183 280.764 336.778
1570 | 543.054 376.727 479.042 349.834
1571 | 198.582 401.723 245.663 366.569
1572 | 145.008 402.118 208.561 366.452
1573 | 250.384 403.178 280.453 368.52
1574 | 567.074 402.655 494.931 367.095
1575 | 622.332 404.48 730.263 306.794
1576 | 318.096 433.783 325.822 388.117
1577 | 145.122 445.607 208.417 396.098
1578 | 198.981 443.994 246.175 395.087
1579 | 251.781 446.784 280.943 396.851
1580 | 624.05 449.834 533.574 399.433
1581 | 715.026 458.549 594.296 407.88
1582 | 323.143 477.435 328.817 417.493
1583 | 145.168 488.697 208.51 425.735
1584 | 199.237 487.698 245.799 424.477
1585 | 251.261 488.162 280.773 424.348
1586 | 567.561 495.849 494.861 431.135
1587 | 623.84 494.557 533.697 429.82
1588 | 317.657 521.359 325.754 447.448
1589 | 44.7454 541.809 157.91 560.386
1590 | 254.897 541.624 282.988 461.617
1591 | 572.466 166.528 275.973 506.038
1592 | 190.237 173.247 237.954 212.127
1593 | 222.716 199.579 261.908 228.806
1594 | 378.725 241.551 367.805 257.888
1595 | 378.025 289.197 367.154 290.604
1596 | 511.472 318.139 457.98 309.745
1597 | 377.236 334.043 366.613 319.942
1598 | 377.589 419.681 366.561 379.126
1599 | 679.456 418.753 571.775 378.595
1600 | 379.072 462.948 367.765 409.066
1601 | 119.1 469.215 560.456 516.865
1602 | 674.29 491.607 567.105 427.77
1603 | 379.573 505.39 367.989 437.748
1604 | 707.71 503.458 589.733 436.374
1605 | 76.3432 554.446 162.273 469.609
1606 |
--------------------------------------------------------------------------------
/pts&lines/1Aline.txt:
--------------------------------------------------------------------------------
1 | 399 313 398 273
2 | 237 584 238 561
3 | 659 183 656 148
4 | 133 488 133 465
5 | 238 542 237 520
6 | 399 379 399 321
7 | 553 545 554 518
8 | 287 406 287 384
9 | 399 269 397 229
10 | 133 450 133 423
11 | 269 124 134 127
12 | 494 226 494 205
13 | 551 266 551 246
14 | 554 332 551 291
15 | 236 427 216 428
16 | 236 361 237 339
17 | 421 203 422 224
18 | 509 205 510 226
19 | 236 318 236 295
20 | 519 495 519 475
21 | 517 315 517 294
22 | 532 246 532 266
23 | 133 536 133 511
24 | 285 340 265 340
25 | 398 178 398 156
26 | 398 226 398 188
27 | 517 182 517 161
28 | 264 254 264 276
29 | 400 509 399 416
30 | 630 113 555 115
31 | 216 471 216 494
32 | 133 419 132 380
33 | 133 597 133 558
34 | 519 405 518 384
35 | 302 514 304 538
36 | 131 148 131 206
37 | 453 246 453 266
38 | 496 405 495 385
39 | 353 228 352 269
40 | 216 539 236 539
41 | 452 195 453 223
42 | 287 542 287 520
43 | 497 587 497 566
44 | 495 383 474 384
45 | 214 252 215 274
46 | 265 471 265 491
47 | 447 64 447 44
48 | 132 250 299 249
49 | 423 382 423 403
50 | 632 194 554 196
51 | 551 220 551 200
52 | 635 332 554 333
53 | 496 473 475 472
54 | 532 199 633 198
55 | 496 566 475 567
56 | 661 480 662 555
57 | 301 250 300 289
58 | 353 317 353 358
59 | 554 290 644 290
60 | 266 428 267 450
61 | 352 204 352 225
62 | 475 359 495 359
63 | 494 270 495 249
64 | 554 514 553 474
65 | 519 544 520 524
66 | 134 380 300 380
67 | 299 333 128 334
68 | 300 464 135 464
69 | 132 294 349 293
70 | 633 424 555 424
71 | 133 337 300 337
72 | 133 510 301 512
73 | 554 591 554 570
74 | 642 211 640 238
75 | 135 424 300 424
76 | 133 207 298 205
77 | 354 151 301 152
78 | 283 246 131 247
79 | 313 125 270 124
80 | 636 160 636 198
81 | 133 148 165 149
82 | 199 203 134 204
83 | 216 427 216 448
84 | 299 290 133 291
85 | 265 317 285 317
86 | 496 522 475 522
87 | 496 494 496 473
88 | 216 447 236 448
89 | 454 407 454 448
90 | 554 382 635 382
91 | 661 556 662 586
92 | 305 148 355 147
93 | 331 445 331 424
94 | 554 245 634 244
95 | 216 360 236 361
96 | 265 297 264 318
97 | 135 467 300 468
98 | 554 427 634 428
99 | 135 559 301 560
100 | 204 149 299 147
101 | 284 420 223 420
102 | 286 319 286 298
103 | 636 240 554 241
104 | 176 149 201 149
105 | 556 570 638 571
106 | 215 297 215 320
107 | 215 383 216 406
108 | 422 247 422 268
109 | 453 292 453 313
110 | 553 449 553 429
111 | 556 519 636 520
112 | 650 287 554 287
113 | 633 470 555 470
114 | 302 382 301 419
115 | 430 267 429 246
116 | 636 384 637 421
117 | 133 376 132 355
118 | 276 557 225 556
119 | 401 540 399 513
120 | 475 404 495 405
121 | 208 420 134 420
122 | 452 491 451 471
123 | 553 378 552 338
124 | 225 508 135 507
125 | 217 565 216 589
126 | 304 562 302 598
127 | 511 523 511 545
128 | 297 202 220 203
129 | 287 491 287 470
130 | 302 338 301 376
131 | 555 473 635 473
132 | 300 377 134 377
133 | 469 247 505 246
134 | 285 446 286 426
135 | 496 449 496 429
136 | 461 424 530 425
137 | 553 139 633 137
138 | 636 473 638 514
139 | 353 383 355 581
140 | 453 332 453 358
141 | 475 493 496 493
142 | 555 336 638 336
143 | 222 556 135 555
144 | 299 508 225 508
145 | 286 520 266 519
146 | 301 207 300 244
147 | 303 426 301 463
148 | 459 380 529 381
149 | 266 520 266 541
150 | 551 118 510 119
151 | 558 183 564 161
152 | 455 360 454 401
153 | 554 424 554 403
154 | 216 518 216 541
155 | 607 133 628 133
156 | 215 339 215 366
157 | 531 512 510 511
158 | 300 153 301 181
159 | 452 156 452 178
160 | 506 465 460 465
161 | 460 468 531 470
162 | 633 516 555 515
163 | 465 144 485 144
164 | 458 336 531 336
165 | 634 567 556 566
166 | 235 253 215 254
167 | 529 332 509 332
168 | 510 142 531 142
169 | 507 246 530 246
170 | 528 198 508 198
171 | 656 241 659 215
172 | 732 486 689 482
173 | 636 203 636 234
174 | 326 110 342 126
175 | 459 291 530 291
176 | 502 421 460 421
177 | 459 561 531 565
178 | 603 135 581 135
179 | 634 378 555 378
180 | 266 492 286 491
181 | 508 201 528 201
182 | 528 242 458 244
183 | 24 563 0 571
184 | 335 128 321 114
185 | 351 315 303 315
186 | 396 156 368 156
187 | 456 545 455 588
188 | 474 251 473 273
189 | 506 377 460 377
190 | 531 561 510 561
191 | 237 404 237 384
192 | 265 340 265 360
193 | 440 148 420 148
194 | 530 287 509 288
195 | 236 383 216 385
196 | 285 231 285 208
197 | 451 225 400 225
198 | 506 510 460 509
199 | 531 467 510 467
200 | 235 186 235 166
201 | 302 470 302 506
202 | 477 586 497 588
203 | 0 367 61 367
204 | 370 152 396 152
205 | 458 202 505 202
206 | 21 517 0 522
207 | 87 367 130 366
208 | 249 544 250 523
209 | 352 157 352 180
210 | 475 523 475 543
211 | 460 513 531 515
212 | 627 124 606 124
213 | 352 539 304 539
214 | 235 166 214 166
215 | 354 179 356 153
216 | 524 388 524 409
217 | 474 384 474 406
218 | 502 288 459 288
219 | 631 132 645 152
220 | 321 205 321 226
221 | 475 567 475 588
222 | 475 449 495 448
223 | 455 518 455 541
224 | 507 271 507 250
225 | 520 206 519 229
226 | 266 564 266 584
227 | 284 165 263 165
228 | 474 295 474 316
229 | 530 377 509 377
230 | 350 183 324 184
231 | 551 405 531 405
232 | 504 340 504 366
233 | 463 185 464 145
234 | 481 55 481 75
235 | 505 332 458 332
236 | 264 208 264 230
237 | 329 181 329 160
238 | 452 359 400 359
239 | 529 176 529 196
240 | 532 153 534 174
241 | 570 276 571 253
242 | 416 565 416 586
243 | 432 181 395 181
244 | 483 199 456 199
245 | 730 493 697 546
246 | 263 165 264 185
247 | 496 428 475 429
248 | 22 547 0 553
249 | 286 274 286 253
250 | 397 186 371 187
251 | 473 207 473 228
252 | 659 251 638 243
253 | 236 232 235 210
254 | 455 470 455 491
255 | 475 18 343 21
256 | 657 314 657 294
257 | 340 103 316 103
258 | 351 271 303 271
259 | 367 167 366 195
260 | 661 446 661 474
261 | 349 227 301 227
262 | 522 229 523 208
263 | 351 359 303 359
264 | 451 314 400 315
265 | 527 410 527 388
266 | 570 597 569 575
267 | 636 248 636 276
268 | 26 542 4 541
269 | 201 432 207 455
270 | 209 451 203 432
271 | 452 404 401 404
272 | 507 560 459 559
273 | 483 76 483 56
274 | 474 427 474 450
275 | 236 274 236 253
276 | 551 359 530 359
277 | 293 170 292 190
278 | 321 184 301 184
279 | 352 491 304 490
280 | 584 133 604 133
281 | 522 432 523 459
282 | 393 292 393 313
283 | 501 569 502 591
284 | 459 463 458 426
285 | 569 252 566 274
286 | 214 209 215 230
287 | 494 361 494 340
288 | 351 403 304 403
289 | 36 382 0 382
290 | 461 121 440 121
291 | 130 364 104 363
292 | 452 449 401 449
293 | 459 377 458 355
294 | 459 420 457 384
295 | 20 502 0 509
296 | 489 98 489 31
297 | 527 181 509 190
298 | 523 295 524 316
299 | 295 344 292 365
300 | 514 113 495 99
301 | 455 448 455 469
302 | 567 576 566 598
303 | 494 339 474 340
304 | 660 369 660 400
305 | 9 535 50 535
306 | 204 476 206 498
307 | 352 447 304 447
308 | 394 504 394 529
309 | 453 493 403 493
310 | 396 271 373 271
311 | 473 338 474 361
312 | 553 451 533 451
313 | 509 193 527 185
314 | 207 234 205 213
315 | 454 588 403 588
316 | 1 548 20 543
317 | 523 342 521 363
318 | 692 486 724 488
319 | 62 362 0 364
320 | 57 598 100 581
321 | 332 584 304 583
322 | 553 547 533 547
323 | 10 228 10 208
324 | 188 272 176 255
325 | 294 239 296 213
326 | 453 543 431 543
327 | 459 543 458 523
328 | 294 368 297 344
329 | 132 332 132 295
330 | 200 394 208 413
331 | 524 569 525 590
332 | 295 523 293 544
333 | 357 375 356 349
334 | 560 321 561 295
335 | 342 23 342 100
336 | 559 295 558 320
337 | 659 332 660 355
338 | 247 300 247 324
339 | 461 269 461 249
340 | 635 293 635 314
341 | 646 377 649 410
342 | 295 389 293 410
343 | 101 586 68 598
344 | 391 314 368 314
345 | 400 130 380 130
346 | 654 596 654 574
347 | 23 503 55 502
348 | 705 523 724 495
349 | 113 284 89 284
350 | 357 536 357 511
351 | 50 499 24 499
352 | 130 269 78 269
353 | 358 462 357 441
354 | 717 592 695 585
355 | 437 116 416 116
356 | 644 358 645 338
357 | 461 231 463 204
358 | 468 542 462 519
359 | 90 309 125 309
360 | 26 360 109 355
361 | 69 420 91 419
362 | 249 327 250 300
363 | 682 229 660 232
364 | 646 293 646 326
365 | 113 277 89 277
366 | 519 278 525 253
367 | 638 519 636 545
368 | 89 280 114 280
369 | 89 272 114 272
370 | 177 261 191 280
371 | 391 441 371 442
372 | 331 512 305 512
373 | 646 335 647 358
374 | 364 254 363 281
375 | 113 291 89 291
376 | 368 102 345 103
377 | 751 231 751 266
378 | 65 310 86 310
379 | 88 321 55 321
380 | 57 324 89 324
381 | 199 196 197 173
382 | 398 574 376 574
383 | 716 259 716 238
384 | 89 302 114 302
385 | 463 594 463 569
386 | 637 573 636 598
387 | 359 170 360 200
388 | 90 336 55 336
389 | 114 298 88 298
390 | 89 287 114 287
391 | 634 446 635 466
392 | 88 294 114 294
393 | 647 253 645 285
394 | 102 217 36 218
395 | 114 306 88 306
396 | 76 343 55 343
397 | 77 588 58 595
398 | 737 280 737 315
399 | 648 421 647 443
400 | 648 464 648 486
401 | 658 469 658 449
402 | 365 472 363 495
403 | 464 48 463 21
404 | 476 51 475 28
405 | 634 339 634 375
406 |
--------------------------------------------------------------------------------
/pts&lines/1Bline.txt:
--------------------------------------------------------------------------------
1 | 558 226 556 195
2 | 200 437 200 351
3 | 760 205 700 206
4 | 381 351 381 325
5 | 201 497 200 440
6 | 484 214 485 191
7 | 381 306 381 279
8 | 381 439 381 378
9 | 316 441 315 473
10 | 309 541 309 561
11 | 35 464 14 464
12 | 315 262 314 289
13 | 381 275 380 221
14 | 697 317 696 294
15 | 698 392 697 371
16 | 229 179 203 180
17 | 446 221 446 201
18 | 486 350 485 323
19 | 486 380 485 354
20 | 487 261 540 260
21 | 315 323 315 348
22 | 313 320 273 320
23 | 203 382 314 382
24 | 264 320 198 320
25 | 486 442 486 415
26 | 203 411 314 412
27 | 315 413 315 439
28 | 202 195 238 195
29 | 314 409 203 408
30 | 349 197 316 198
31 | 559 422 559 500
32 | 201 293 314 293
33 | 546 319 488 320
34 | 542 257 488 258
35 | 232 231 211 231
36 | 263 473 299 474
37 | 314 234 314 259
38 | 547 288 488 289
39 | 539 226 486 227
40 | 202 234 313 233
41 | 289 290 201 291
42 | 316 383 315 408
43 | 202 323 313 322
44 | 316 475 315 500
45 | 535 183 504 183
46 | 472 229 540 229
47 | 487 292 548 291
48 | 269 501 209 499
49 | 291 194 311 194
50 | 540 444 488 443
51 | 488 415 541 416
52 | 203 473 260 473
53 | 250 379 201 379
54 | 316 353 315 378
55 | 350 310 350 335
56 | 489 481 543 482
57 | 293 260 200 261
58 | 200 264 313 263
59 | 316 504 315 530
60 | 254 438 203 437
61 | 312 349 201 349
62 | 255 231 234 231
63 | 296 379 263 379
64 | 538 171 488 172
65 | 202 352 313 352
66 | 559 499 559 524
67 | 281 530 203 529
68 | 240 195 268 194
69 | 322 178 280 178
70 | 498 188 539 188
71 | 203 502 254 503
72 | 203 440 314 441
73 | 312 290 291 290
74 | 359 200 359 228
75 | 296 471 263 471
76 | 313 438 264 438
77 | 556 257 558 238
78 | 777 423 777 394
79 | 200 347 200 324
80 | 698 418 697 396
81 | 350 249 350 275
82 | 541 479 488 478
83 | 489 447 543 447
84 | 468 258 436 259
85 | 487 323 543 322
86 | 540 413 488 413
87 | 541 356 542 380
88 | 700 244 749 244
89 | 699 269 736 269
90 | 541 510 489 509
91 | 203 531 278 533
92 | 488 504 485 483
93 | 488 512 541 513
94 | 697 291 697 269
95 | 260 471 203 470
96 | 435 106 355 108
97 | 287 533 314 533
98 | 433 539 433 561
99 | 540 382 488 382
100 | 126 476 10 513
101 | 422 262 470 261
102 | 447 192 483 190
103 | 266 178 230 179
104 | 489 384 514 384
105 | 700 294 738 294
106 | 736 241 699 241
107 | 315 294 314 319
108 | 423 382 469 383
109 | 606 428 587 457
110 | 274 503 314 504
111 | 311 231 256 231
112 | 423 292 454 292
113 | 736 393 700 392
114 | 736 266 699 267
115 | 452 410 424 410
116 | 746 368 700 367
117 | 298 501 269 501
118 | 606 424 578 422
119 | 697 265 697 244
120 | 699 492 697 471
121 | 540 351 488 351
122 | 488 353 541 353
123 | 698 209 758 208
124 | 421 232 441 231
125 | 484 174 458 175
126 | 82 455 42 466
127 | 424 442 469 444
128 | 701 395 738 395
129 | 419 216 399 218
130 | 450 350 424 350
131 | 699 344 736 344
132 | 127 461 108 469
133 | 348 308 316 308
134 | 423 352 470 353
135 | 699 370 736 370
136 | 200 198 200 233
137 | 108 470 10 499
138 | 681 507 681 474
139 | 451 440 424 440
140 | 423 322 454 322
141 | 698 468 697 445
142 | 453 504 425 503
143 | 759 209 758 230
144 | 106 342 151 342
145 | 424 475 469 477
146 | 669 562 616 561
147 | 700 420 738 421
148 | 736 292 700 292
149 | 28 443 0 449
150 | 451 319 423 320
151 | 736 317 700 317
152 | 171 342 198 342
153 | 420 195 395 196
154 | 542 417 542 443
155 | 699 445 736 446
156 | 736 418 700 418
157 | 382 536 382 494
158 | 424 412 470 413
159 | 76 430 143 431
160 | 141 353 95 352
161 | 416 247 383 247
162 | 542 232 542 258
163 | 151 468 129 466
164 | 698 543 696 519
165 | 450 380 423 380
166 | 700 470 738 471
167 | 125 444 103 450
168 | 680 274 679 296
169 | 736 342 700 342
170 | 416 338 383 338
171 | 441 161 443 115
172 | 422 176 394 176
173 | 289 205 289 226
174 | 87 537 68 543
175 | 699 572 697 541
176 | 452 414 452 439
177 | 737 494 700 493
178 | 347 248 316 248
179 | 541 294 542 316
180 | 601 553 679 555
181 | 542 447 542 478
182 | 701 319 738 319
183 | 74 228 54 227
184 | 200 317 200 295
185 | 758 470 739 464
186 | 347 278 316 278
187 | 418 277 383 277
188 | 680 348 658 347
189 | 736 443 700 443
190 | 124 435 46 454
191 | 737 519 700 518
192 | 701 521 738 522
193 | 779 520 777 494
194 | 422 407 421 385
195 | 542 386 543 413
196 | 1 555 32 543
197 | 115 452 137 449
198 | 626 551 673 540
199 | 349 460 318 460
200 | 737 468 700 468
201 | 150 439 125 437
202 | 756 201 699 202
203 | 700 496 736 496
204 | 6 429 48 429
205 | 32 433 73 434
206 | 451 384 452 404
207 | 423 438 423 415
208 | 737 544 700 543
209 | 178 491 45 542
210 | 357 233 358 259
211 | 422 501 425 480
212 | 701 546 738 547
213 | 46 538 150 498
214 | 423 194 421 215
215 | 578 424 603 426
216 | 28 434 0 440
217 | 181 500 156 510
218 | 343 109 343 161
219 | 347 368 318 368
220 | 417 524 384 523
221 | 676 271 676 248
222 | 0 525 35 538
223 | 29 548 0 559
224 | 416 399 384 399
225 | 451 266 451 288
226 | 422 472 424 450
227 | 423 533 423 508
228 | 50 483 121 462
229 | 558 345 558 365
230 | 116 234 93 234
231 | 126 435 146 434
232 | 417 429 384 429
233 | 51 555 73 555
234 | 66 328 91 328
235 | 416 369 384 368
236 | 781 195 780 216
237 | 155 340 125 339
238 | 582 251 559 251
239 | 155 497 177 488
240 | 49 429 74 430
241 | 30 489 49 484
242 | 349 427 318 427
243 | 417 493 385 493
244 | 660 553 626 552
245 | 27 539 6 530
246 | 197 276 166 276
247 | 53 426 0 426
248 | 178 241 136 242
249 | 64 437 33 437
250 | 620 252 619 278
251 | 171 326 148 326
252 | 58 431 33 431
253 | 86 431 60 431
254 | 642 250 620 251
255 | 170 316 149 316
256 | 72 445 91 440
257 | 243 209 241 229
258 | 339 490 318 490
259 | 170 311 149 311
260 | 610 285 610 308
261 | 48 471 73 464
262 | 149 319 170 319
263 | 542 325 540 348
264 | 357 350 356 371
265 | 143 519 168 520
266 | 359 535 358 556
267 | 80 494 126 479
268 | 354 497 352 475
269 | 627 335 601 336
270 | 358 471 358 496
271 |
--------------------------------------------------------------------------------
/sameside.m:
--------------------------------------------------------------------------------
1 |
2 | function ss=sameside(line,point1,point2)
3 |
4 | ss = false;
5 | if isnan(point2(1)) || isnan(point2(2))
6 | return;
7 | end
8 |
9 | if (line.k~=Inf)
10 | s1=line.k*point1(1)+line.b-point1(2);
11 | s2=line.k*point2(1)+line.b-point2(2);
12 | else
13 | s1=point1(1)-line.point1(1);
14 | s2=point2(1)-line.point1(1);
15 | end
16 |
17 | if s1*s2>0
18 | ss = true;
19 | end
20 |
21 | end
22 |
--------------------------------------------------------------------------------