Skip to main content

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


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.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mergeLines-2.1.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file mergeLines-2.1.3.tar.gz.

File metadata

  • Download URL: mergeLines-2.1.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.1

File hashes

Hashes for mergeLines-2.1.3.tar.gz
Algorithm Hash digest
SHA256 c4b5a9e3c9ce540190a7b545611c6c168e231e040858b671bf4d319f55e1664c
MD5 930c4ba83f82afbc6b7c46884b0716eb
BLAKE2b-256 be24a765b597ab162a7837cdc4853eba93c9be3e7e87d1bb111e06a97ac9039e

See more details on using hashes here.

File details

Details for the file mergeLines-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: mergeLines-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.1

File hashes

Hashes for mergeLines-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a01a13e70d1b0b49935d80b81fecf72a05d37a36495a40ff4826b173b4e763d5
MD5 53363349f13e37d9e61c1a416918f75d
BLAKE2b-256 83bc754b52eef3ed3e9738035584233c83605f63505794178748795796efa093

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page