개정판 0d0dfc38
DTI_PID 내에서 사용하지 않는 메소드 제거
DTI_PID/DTI_PID/DTI_PID.py | ||
---|---|---|
656 | 656 |
|
657 | 657 |
except Exception as ex: |
658 | 658 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
659 |
|
|
660 |
|
|
661 |
#def drawTempLine(sym): |
|
662 |
# ADJUST = 8 |
|
663 |
# symPath = sym.getPath() |
|
664 |
# symSp = sym.getSp() |
|
665 |
# symWidth = sym.getWidth() |
|
666 |
# symHeight = sym.getHeight() |
|
667 |
# rotatedAngle = sym.getRotatedAngle() |
|
668 |
|
|
669 |
# symbol = cv2.imread(symPath, 1) |
|
670 |
# _chan, sow, soh = symbol.shape[::-1] |
|
671 |
|
|
672 |
# symCp = sym.getConnectionPoint() |
|
673 |
# if symCp is not None: |
|
674 |
# connectionPointList = symCp.split("/") # x,y string array |
|
675 |
# if connectionPointList is not None and len(connectionPointList) > 0: |
|
676 |
# symOpStr = sym.getOriginalPoint() |
|
677 |
# symOp = (int(symOpStr.split(',')[0]), int(symOpStr.split(',')[1])) |
|
678 |
|
|
679 |
# blank = np.zeros((symWidth, symHeight, 3), np.uint8) |
|
680 |
# blank[::] = (255, 255, 255) |
|
681 |
# blank = cvtGrayImage(blank) |
|
682 |
# bw, bh = blank.shape[::-1] |
|
683 |
# srcGray[symSp[1]:symSp[1]+bh, symSp[0]:symSp[0]+bw] = blank |
|
684 |
|
|
685 |
# for cp in connectionPointList: |
|
686 |
# pt = cp.split(",") |
|
687 |
# cpx = int(pt[0]) |
|
688 |
# cpy = int(pt[1]) |
|
689 |
# convertedCp = getCoordOnRotatedImage(rotatedAngle, cpx, cpy, sow, soh) |
|
690 |
# newSp = (symSp[0]+convertedCp[0], symSp[1]+convertedCp[1]) |
|
691 |
# newOp = (symSp[0]+symOp[0], symSp[1]+symOp[1]) |
|
692 |
# cv2.line(srcGray, newSp, newOp, (0, 0, 0), 3) |
|
693 |
|
|
694 |
|
|
659 |
|
|
695 | 660 |
#Generate target symbol data list |
696 | 661 |
''' |
697 | 662 |
@history 18.04.24 Jeongwoo Add isExceptDetect Field |
... | ... | |
855 | 820 |
#kernel2 = np.ones((4, 4), np.uint8) |
856 | 821 |
srcGray = cv2.erode(srcGray, kernel1) |
857 | 822 |
|
858 |
#for sym in searchedSymbolList: |
|
859 |
# drawTempLine(sym) |
|
860 |
|
|
861 | 823 |
removedSymbolImgPath = os.path.join(project.getTempPath(), os.path.basename(path)) |
862 | 824 |
cv2.imwrite(removedSymbolImgPath, srcGray) |
863 | 825 |
area = AppDocData.instance().getArea('Drawing') |
내보내기 Unified diff