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.6.tar.gz
(8.2 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.6.tar.gz.
File metadata
- Download URL: mergeLines-2.1.6.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a52ae9ba6f3d9d9cd74bc40ea5106c36d9aeb1b7c536966394f539e94f99cb
|
|
| MD5 |
ed1487dc3533dfc633c7010c182dbcfd
|
|
| BLAKE2b-256 |
fc365626aab0c9acb4bf90d5f8911a165e807ee776209b3e7c32c791bd924e1a
|
File details
Details for the file mergeLines-2.1.6-py3-none-any.whl.
File metadata
- Download URL: mergeLines-2.1.6-py3-none-any.whl
- Upload date:
- Size: 8.2 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 |
eafa0ce8ff291e299835b9cd6b6dbbebda73961f6f13c2ff996f396ae1d1af79
|
|
| MD5 |
089a19889c4bbaa00537f85610bd2bb6
|
|
| BLAKE2b-256 |
9d7b6d6a8f88b2577905fbd24d5c0ab4a2dcffb68ec2b58b9344f0962f230171
|