merge lines after houghlinesp
Project description
Using method:
line discription: x1,y1,x2,y2
//
example1:
//
import cv2
lsd = cv2.createLineSegmentDetector(0)
dlines = lsd.detect(pic)
img0=pic.copy()
lines=[]
for dline in dlines[0]:
x0 = int(round(dline[0][0]))
y0 = int(round(dline[0][1]))
x1 = int(round(dline[0][2]))
y1 = int(round(dline[0][3]))
lines.append((x0,y0,x1,y1))
lines=mergeLine.merge_lines(lines,slope_tolerent=10,dis_tor=15)
//
example2:
import mergeLine
mergeLine.merge_lines(
[1,0,0,1],
[2,0,0,2],
[3,0,0,3],
)
//we get 2,0,0,2
//you can set ,scope_tolerent=,dis_tor 2 parameter in merge_lines.
// which are used to set how lines are similar. first is used set scope_similarity. second is used to set distance tolerent betwen line segments.
//contact: 15122306087@163.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mergeLines-2.1.4.tar.gz
(8.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mergeLines-2.1.4.tar.gz.
File metadata
- Download URL: mergeLines-2.1.4.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce53e88c63bff3e2a2efa76b6d769b64b8b99c9fdb546f823317fd48e1dc4f9f
|
|
| MD5 |
f5086dc5eff3c43c284e3259bc7087b4
|
|
| BLAKE2b-256 |
632b80941d42c555f5b42d1d58495ca9686dde05cbc3b2f5c41c58be61b0381c
|
File details
Details for the file mergeLines-2.1.4-py3-none-any.whl.
File metadata
- Download URL: mergeLines-2.1.4-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83c0be0612ce3c50b063eaff841d77dc9dd724c1446ae130a173e2cc198c0c7c
|
|
| MD5 |
e26a5f01c4fed9778619fad2b82d6019
|
|
| BLAKE2b-256 |
ec7a8c9de7ee5ed5ad28bf35f64d9c7cab696979ea8ae5be383d324b4b66ea14
|