개정판 23e6ad3b
issue #000: fix xml save
Change-Id: I4782658c634b4dcef2c5591f53801c3b4a8c60ad
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1809 | 1809 |
# detection lines |
1810 | 1810 |
edged2 = cv2.Canny(out, 100, 200) |
1811 | 1811 |
lines = cv2.HoughLinesP(image=edged2, rho=1, theta=np.pi/180, threshold=60, minLineLength=100, maxLineGap=25) |
1812 |
# |
|
1813 |
# |
|
1814 |
# lines = cv2.HoughLines(edged2, 1, np.pi/180, 60) |
|
1812 | 1815 |
if lines is None: |
1813 | 1816 |
return ('Unknown', []) |
1814 | 1817 |
for line in lines: |
DTI_PID/DTI_PID/Shapes/EngineeringConnectorItem.py | ||
---|---|---|
398 | 398 |
if self.connectedItem is not None: |
399 | 399 |
cols.append('Connected_UID') |
400 | 400 |
values.append('?') |
401 |
param.append(self.connectedItem.uid)
|
|
401 |
param.append(str(self.connectedItem.uid))
|
|
402 | 402 |
|
403 | 403 |
sql = 'insert or replace into Ports({}) values({})'.format(','.join(cols), ','.join(values)) |
404 | 404 |
|
DTI_PID/DTI_PID/Shapes/EngineeringUnknownItem.py | ||
---|---|---|
192 | 192 |
if line_indicator_node is not None: |
193 | 193 |
lineIndicator = line_indicator_node.text.split('#') |
194 | 194 |
if lineIndicator[0] == 'True': |
195 |
item = QEngineeringUnknownItem(points, 'True', lineIndicator[1], [int(lineIndicator[2]), int(lineIndicator[3]), int(lineIndicator[4]), int(lineIndicator[5])])
|
|
195 |
item = QEngineeringUnknownItem(points, 'True', lineIndicator[1], [round(float(lineIndicator[2])), round(float(lineIndicator[3])), round(float(lineIndicator[4])), round(float(lineIndicator[5]))])
|
|
196 | 196 |
elif lineIndicator[0] == 'Match': |
197 |
item = QEngineeringUnknownItem(points, 'Match', lineIndicator[1], [int(lineIndicator[2]), int(lineIndicator[3]), int(lineIndicator[4]), int(lineIndicator[5])])
|
|
197 |
item = QEngineeringUnknownItem(points, 'Match', lineIndicator[1], [round(float(lineIndicator[2])), round(float(lineIndicator[3])), round(float(lineIndicator[4])), round(float(lineIndicator[5]))])
|
|
198 | 198 |
else: |
199 | 199 |
item = QEngineeringUnknownItem(points, 'False') |
200 | 200 |
else: |
내보내기 Unified diff