프로젝트

일반

사용자정보

개정판 e2573363

IDe25733635b486672640d432bd4e409d8a49a7d07
상위 2f13b3fb
하위 3da613fe, 3bdd3c3c

함의성이(가) 약 5년 전에 추가함

issue #641: add default drawing preprocessing

Change-Id: I5972bb69b5075eb27cdd76bfc4566320e3284538

차이점 보기:

DTI_PID/DTI_PID/ConfigurationDialog.py
125 125
                self.ui.radioButtonBinary.setChecked(True)
126 126
                self.ui.lineEditBinaryValue.setText(tokens[1] if tokens[1] else '0')
127 127
        else:
128
            self.ui.radioButtonNoThreshold.setChecked(True)
128
            self.ui.radioButtonOTSU.setChecked(True)
129
            self.ui.lineEditOTSUValue.setText('0')
129 130

  
130 131
        configs = docData.getConfigs('Filter', 'Mode')
131 132
        if configs:
DTI_PID/DTI_PID/Drawing.py
135 135
                    self._image = cv2.threshold(self._image, int(tokens[1]), 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1]
136 136
                elif tokens[0] == 'Binary':
137 137
                    self._image = cv2.threshold(self._image, int(tokens[1]), 255, cv2.THRESH_BINARY)[1]
138
            else:
139
                self._image = cv2.threshold(self._image, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1]
138 140

  
139 141
            configs = app_doc_data.getConfigs('Filter', 'Mode')
140 142
            if 1 == len(configs) and int(configs[0].value) is not 0:
DTI_PID/DTI_PID/Shapes/EngineeringConnectorItem.py
176 176
                dx = self.center()[0] - self.parentItem().origin[0]
177 177
                dy = self.center()[1] - self.parentItem().origin[1]
178 178
                length = math.sqrt(dx*dx + dy*dy)
179
                if length - 0 < 0.01:
180
                    return 0, 1
179 181
                return dx/length, dy/length
180 182

  
181 183
        return None

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)