개정판 84143455
issue #663: scene remain, equipment package pre drawing test
Change-Id: I7643418ae9a6061c6b31a34b2e044426190ef1ab
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
821 | 821 |
app_doc_data.activeDrawing.set_pid_source(Image.open(mainRes)) |
822 | 822 |
|
823 | 823 |
# Load equipment package |
824 |
#worker.load_equipment_package(app_doc_data.activeDrawing)
|
|
824 |
worker.load_equipment_package(app_doc_data.activeDrawing) |
|
825 | 825 |
|
826 | 826 |
# remove not drawing area |
827 | 827 |
configs = app_doc_data.getConfigs('{} Equipment Desc Area'.format(app_doc_data.imgName)) |
... | ... | |
1328 | 1328 |
if issubclass(type(item), QEngineeringVendorItem) and item.pack_type =='Equipment Package': |
1329 | 1329 |
points = [] |
1330 | 1330 |
for conn in item.connectors: |
1331 |
points.append([conn.center()[0] - area.y, conn.center()[1] - area.y])
|
|
1331 |
points.append([conn.center()[0] - area.x, conn.center()[1] - area.y])
|
|
1332 | 1332 |
|
1333 | 1333 |
points = np.array(points, np.int32) |
1334 | 1334 |
cv2.fillConvexPoly(area.img, points, 255) |
1335 |
#cv2.imshow('aa', area.img) |
|
1336 |
#cv2.waitKey(0) |
|
1337 |
#cv2.destroyAllWindows() |
|
1338 | 1335 |
|
1339 | 1336 |
area.img = worker.remove_small_objects(area.img) |
1340 | 1337 |
detector = LineDetector(area.img) |
... | ... | |
2620 | 2617 |
try: |
2621 | 2618 |
for item in scene.items(): |
2622 | 2619 |
if issubclass(type(item), QEngineeringVendorItem): |
2623 |
app_doc_data.symbols.append(item) |
|
2620 |
#app_doc_data.symbols.append(item)
|
|
2624 | 2621 |
app_doc_data.allItems.append(item) |
2625 | 2622 |
|
2626 | 2623 |
# symbol need to be attached for scene position |
내보내기 Unified diff