개정판 6c393d19
issue #663: fix line thickness
Change-Id: Ic408e544bd4a30759fc30a3e9b0c38b42b80207e
DTI_PID/DTI_PID/LineDetector.py | ||
---|---|---|
209 | 209 |
size = lhscount + rhscount |
210 | 210 |
offset = round((lhscount - rhscount)*0.5) if size < windowSize[1] else 0 |
211 | 211 |
#print(size) |
212 |
return ([pt[0] + norm[0]*offset, pt[1] + norm[1]*offset], size if size > windowSize[1] else windowSize[1]) |
|
212 |
return ([pt[0] + norm[0]*offset, pt[1] + norm[1]*offset], size)# if size > windowSize[1] else windowSize[1])
|
|
213 | 213 |
except Exception as ex: |
214 | 214 |
from App import App |
215 | 215 |
from AppDocData import MessageType |
216 | 216 |
|
217 | 217 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
218 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
218 |
App.mainWnd().addMessage.emit(MessageType.Error, message) if not 'is out of bounds for axis 1' in message else '' |
|
219 |
return (pt, -1) |
|
219 | 220 |
|
220 | 221 |
return (pt, windowSize[1]) |
221 | 222 |
|
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
580 | 580 |
connectedLines.extend(res) |
581 | 581 |
|
582 | 582 |
# line detection without symbol connection point info |
583 |
remainLines = []#detector.detectLineWithoutSymbol(area)
|
|
583 |
remainLines = detector.detectLineWithoutSymbol(area) |
|
584 | 584 |
windowSize = appDocData.getSlidingWindowSize() |
585 | 585 |
thickness = int(windowSize[1]) |
586 | 586 |
for line in remainLines: |
내보내기 Unified diff