개정판 87ad2c1a
issue #537: add unrecognition ignore step
Change-Id: Ib9db296fdaab6624469907d81a4c81f544368895
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
83 | 83 |
|
84 | 84 |
configs = docData.getConfigs('Filter', 'MinimumSize') |
85 | 85 |
self.ui.spinBoxMinimumSize.setValue(int(configs[0].value)) if 1 == len(configs) else self.ui.spinBoxMinimumSize.setValue(30) |
86 |
configs = docData.getConfigs('Filter', 'ErodeSize') |
|
87 |
self.ui.spinBoxUnrecognitionIgnoreStep.setValue(int(configs[0].value)) if 1 == len(configs) else self.ui.spinBoxUnrecognitionIgnoreStep.setValue(3) |
|
86 | 88 |
configs = docData.getConfigs('Filter', 'DilateSize') |
87 | 89 |
self.ui.spinBoxDilateSize.setValue(int(configs[0].value)) if 1 == len(configs) else self.ui.spinBoxDilateSize.setValue(0) |
88 | 90 |
configs = docData.getConfigs('Filter', 'FlatSize') |
... | ... | |
663 | 665 |
configs.append(Config('Flow Mark', 'Position', self.ui.spinBoxFlowMarkPosition.value())) |
664 | 666 |
configs.append(Config('Flow Mark', 'Length', self.ui.spinBoxFlowMarkLength.value())) |
665 | 667 |
configs.append(Config('Filter', 'MinimumSize', self.ui.spinBoxMinimumSize.value())) |
668 |
configs.append(Config('Filter', 'ErodeSize', self.ui.spinBoxUnrecognitionIgnoreStep.value())) |
|
666 | 669 |
configs.append(Config('Filter', 'DilateSize', self.ui.spinBoxDilateSize.value())) |
667 | 670 |
configs.append(Config('Filter', 'FlatSize', self.ui.spinBoxFlatSize.value())) |
668 | 671 |
configs.append(Config('Small Object Size', 'Min Area', self.ui.spinBoxMinArea.value())) |
DTI_PID/DTI_PID/Configuration_UI.py | ||
---|---|---|
11 | 11 |
class Ui_ConfigurationDialog(object): |
12 | 12 |
def setupUi(self, ConfigurationDialog): |
13 | 13 |
ConfigurationDialog.setObjectName("ConfigurationDialog") |
14 |
ConfigurationDialog.resize(704, 840)
|
|
14 |
ConfigurationDialog.resize(704, 869)
|
|
15 | 15 |
font = QtGui.QFont() |
16 | 16 |
font.setFamily("맑은 고딕") |
17 | 17 |
ConfigurationDialog.setFont(font) |
... | ... | |
283 | 283 |
self.spinBoxMinimumSize.setObjectName("spinBoxMinimumSize") |
284 | 284 |
self.horizontalLayout_16.addWidget(self.spinBoxMinimumSize) |
285 | 285 |
self.verticalLayout_9.addLayout(self.horizontalLayout_16) |
286 |
self.horizontalLayout_20 = QtWidgets.QHBoxLayout() |
|
287 |
self.horizontalLayout_20.setObjectName("horizontalLayout_20") |
|
288 |
self.label_33 = QtWidgets.QLabel(self.groupBoxFilter) |
|
289 |
self.label_33.setMinimumSize(QtCore.QSize(230, 0)) |
|
290 |
self.label_33.setMaximumSize(QtCore.QSize(230, 16777215)) |
|
291 |
self.label_33.setObjectName("label_33") |
|
292 |
self.horizontalLayout_20.addWidget(self.label_33) |
|
293 |
self.spinBoxUnrecognitionIgnoreStep = QtWidgets.QSpinBox(self.groupBoxFilter) |
|
294 |
self.spinBoxUnrecognitionIgnoreStep.setMaximum(10) |
|
295 |
self.spinBoxUnrecognitionIgnoreStep.setObjectName("spinBoxUnrecognitionIgnoreStep") |
|
296 |
self.horizontalLayout_20.addWidget(self.spinBoxUnrecognitionIgnoreStep) |
|
297 |
self.verticalLayout_9.addLayout(self.horizontalLayout_20) |
|
286 | 298 |
self.horizontalLayout_6 = QtWidgets.QHBoxLayout() |
287 | 299 |
self.horizontalLayout_6.setObjectName("horizontalLayout_6") |
288 | 300 |
self.label_29 = QtWidgets.QLabel(self.groupBoxFilter) |
... | ... | |
629 | 641 |
self.label_22.setText(_translate("ConfigurationDialog", "Merge Size : ")) |
630 | 642 |
self.groupBoxFilter.setTitle(_translate("ConfigurationDialog", "Filter")) |
631 | 643 |
self.label_10.setText(_translate("ConfigurationDialog", "Minimum Detection Size : ")) |
632 |
self.label_29.setText(_translate("ConfigurationDialog", "Drawing Thickness Reinforcement Size : ")) |
|
633 |
self.label_32.setText(_translate("ConfigurationDialog", "Drawing Flattening Size : ")) |
|
644 |
self.label_33.setText(_translate("ConfigurationDialog", "Unrecognition Ignore Step : ")) |
|
645 |
self.label_29.setText(_translate("ConfigurationDialog", "Drawing Thickness Reinforcement Step : ")) |
|
646 |
self.label_32.setText(_translate("ConfigurationDialog", "Drawing Flattening Step : ")) |
|
634 | 647 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Recognition), _translate("ConfigurationDialog", "Recognition")) |
635 | 648 |
self.groupBox_4.setTitle(_translate("ConfigurationDialog", "Note No Tag Rule")) |
636 | 649 |
self.checkBoxNoteNoSymbolName.setText(_translate("ConfigurationDialog", "Note No Symbol Name : ")) |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
2308 | 2308 |
|
2309 | 2309 |
imgNot = np.ones(imgDiff.shape, np.uint8) |
2310 | 2310 |
cv2.bitwise_not(imgDiff, imgNot) |
2311 |
imgNot = cv2.erode(imgNot, np.ones((3, 3), np.uint8)) |
|
2312 |
imgNot = cv2.dilate(imgNot, np.ones((10, 10), np.uint8)) |
|
2311 |
configs = docData.getConfigs('Filter', 'ErodeSize') |
|
2312 |
kernel = int(configs[0].value) if 1 == len(configs) else 3 |
|
2313 |
imgNot = cv2.erode(imgNot, np.ones((kernel, kernel), np.uint8)) |
|
2314 |
imgNot = cv2.dilate(imgNot, np.ones((8 + kernel, 8 + kernel), np.uint8)) |
|
2313 | 2315 |
|
2314 | 2316 |
contours, hierarchy = cv2.findContours(imgNot, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) |
2315 | 2317 |
|
DTI_PID/DTI_PID/UI/Configuration.ui | ||
---|---|---|
7 | 7 |
<x>0</x> |
8 | 8 |
<y>0</y> |
9 | 9 |
<width>704</width> |
10 |
<height>840</height>
|
|
10 |
<height>869</height>
|
|
11 | 11 |
</rect> |
12 | 12 |
</property> |
13 | 13 |
<property name="font"> |
... | ... | |
628 | 628 |
</layout> |
629 | 629 |
</item> |
630 | 630 |
<item> |
631 |
<layout class="QHBoxLayout" name="horizontalLayout_20"> |
|
632 |
<item> |
|
633 |
<widget class="QLabel" name="label_33"> |
|
634 |
<property name="minimumSize"> |
|
635 |
<size> |
|
636 |
<width>230</width> |
|
637 |
<height>0</height> |
|
638 |
</size> |
|
639 |
</property> |
|
640 |
<property name="maximumSize"> |
|
641 |
<size> |
|
642 |
<width>230</width> |
|
643 |
<height>16777215</height> |
|
644 |
</size> |
|
645 |
</property> |
|
646 |
<property name="text"> |
|
647 |
<string>Unrecognition Ignore Step : </string> |
|
648 |
</property> |
|
649 |
</widget> |
|
650 |
</item> |
|
651 |
<item> |
|
652 |
<widget class="QSpinBox" name="spinBoxUnrecognitionIgnoreStep"> |
|
653 |
<property name="maximum"> |
|
654 |
<number>10</number> |
|
655 |
</property> |
|
656 |
</widget> |
|
657 |
</item> |
|
658 |
</layout> |
|
659 |
</item> |
|
660 |
<item> |
|
631 | 661 |
<layout class="QHBoxLayout" name="horizontalLayout_6"> |
632 | 662 |
<item> |
633 | 663 |
<widget class="QLabel" name="label_29"> |
... | ... | |
638 | 668 |
</size> |
639 | 669 |
</property> |
640 | 670 |
<property name="text"> |
641 |
<string>Drawing Thickness Reinforcement Size : </string>
|
|
671 |
<string>Drawing Thickness Reinforcement Step : </string>
|
|
642 | 672 |
</property> |
643 | 673 |
</widget> |
644 | 674 |
</item> |
... | ... | |
662 | 692 |
</size> |
663 | 693 |
</property> |
664 | 694 |
<property name="text"> |
665 |
<string>Drawing Flattening Size : </string>
|
|
695 |
<string>Drawing Flattening Step : </string>
|
|
666 | 696 |
</property> |
667 | 697 |
</widget> |
668 | 698 |
</item> |
내보내기 Unified diff