Skip to content

Commit 66eb4be

Browse files
committed
restructured project and setup for package
1 parent b4c8648 commit 66eb4be

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

pclines/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .accumulator import accumulate, find_peaks, lines

pclines.py renamed to pclines/accumulator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def normalizers():
108108
return A
109109

110110

111-
def lines_parameters(peaks, bbox, d):
111+
def lines(peaks, bbox, d):
112112
"""
113113
Get homogeneous line parameters from location in the accumulator
114114
"""
@@ -140,10 +140,10 @@ def find_peaks(A, t):
140140
Retrieve locations with prominent local maxima in the accumulator
141141
"""
142142
prominence = dilation(A+1)/erosion(A+1)
143-
peaks = peak_local_max(A, threshold_abs=t, min_distance=1)
143+
peaks = peak_local_max(A, threshold_abs=t, min_distance=5)
144144
r,c = peaks[:,0], peaks[:,1]
145145
value = A[r,c]
146-
valid = prominence[r,c] > 1.3
146+
valid = prominence[r,c] > 1.5
147147
return peaks[valid], value[valid]
148148

149149

setup.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from setuptools import setup
2+
import os
3+
4+
current_folder = os.path.abspath(os.path.dirname(__file__))
5+
with open(os.path.join(current_folder, 'README.md'), encoding='utf-8') as f:
6+
long_description = f.read()
7+
8+
setup(
9+
name='pclines',
10+
version='0.0.1-dev',
11+
description='PCLines transform for python',
12+
long_description=long_description,
13+
long_description_content_type='text/markdown',
14+
url='https://github.com/RomanJuranek/pclines-python',
15+
author='Roman Juranek',
16+
author_email='[email protected]',
17+
license='BSD3',
18+
keywords='pclines, hough transform, line detection',
19+
packages=["pclines"],
20+
python_requires='>=3.6',
21+
project_urls={
22+
"Bug report": 'https://github.com/RomanJuranek/pclines-python/issues',
23+
24+
},
25+
)

0 commit comments

Comments
 (0)