프로젝트

일반

사용자정보

개정판 a3339226

IDa333922646b30fa7dc83421326c4dcf46b387a31
상위 81d7b9b1
하위 cca1ea73

함의성이(가) 4년 이상 전에 추가함

issue #1366: fix ui

Change-Id: I8ec8794127d6207ecee5824d71da3518b60fd399

차이점 보기:

DTI_PID/DTI_PID/RecognitionDialog.py
1381 1381

  
1382 1382
            line_names = app_doc_data.getSymbolListByType('type', 'Line')
1383 1383
            if len(line_names) != 0:
1384
                max_avg_area = 0
1384 1385
                for line_name in line_names:
1385 1386
                    line = line_name
1386 1387
                    line_path = line.getPath()
......
1414 1415

  
1415 1416
                    avg_area = sum([cv2.contourArea(contour) for contour in contours]) / len(contours)
1416 1417
                    ratio_area = [cv2.contourArea(contour) / avg_area for contour in contours]
1418
                    if avg_area > max_avg_area:
1419
                        max_avg_area = avg_area
1417 1420

  
1418 1421
                    line_patterns[line.getBaseSymbol()] = [avg_area, ratio_area, sys.maxsize]
1419 1422
            else:
......
1429 1432
                contours, _ = cv2.findContours(image_line, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
1430 1433

  
1431 1434
                # skip piping line
1432
                if len(contours) < 3:
1435
                if len(contours) < 3 or (sum([cv2.contourArea(contour) for contour in contours]) / len(contours)) > max_avg_area * 1.3:
1433 1436
                    max_x, max_y, min_x, min_y = 0, 0, sys.maxsize, sys.maxsize
1434 1437
                    for rect in [cv2.boundingRect(contour) for contour in contours]:
1435 1438
                        if rect[0] < min_x:
......
2795 2798
                    #colCount = len(tmRes[0])
2796 2799
                    #col, row = divmod(maxIndex, colCount)
2797 2800

  
2798
                    if max_val > 0.4:
2801
                    if max_val > 0.25:
2799 2802
                        searchedInfos.append([max_val, max_loc[0] + x_start, max_loc[1] + y_start, symbolRotatedAngle, flipped, originalPoint, connectionPoint, sw, sh])
2800 2803

  
2801 2804
                    if rc % 2 == 0:
DTI_PID/DTI_PID/TrainingSymbolImageListDialog.py
67 67
        self.ui.pushButtonDeleteBatchLabel.setHidden(True)
68 68
        self.ui.lineEditTargetLabel.setEnabled(False)
69 69
        self.ui.lineEditTargetLabel.setHidden(True)
70
        self.ui.pushButtonDeleteBatchLabel.setEnabled(True)
71
        self.ui.pushButtonDeleteBatchLabel.setHidden(False)
72
        self.ui.lineEditTargetLabel.setEnabled(True)
73
        self.ui.lineEditTargetLabel.setHidden(False)
70
        #self.ui.pushButtonDeleteBatchLabel.setEnabled(True)
71
        #self.ui.pushButtonDeleteBatchLabel.setHidden(False)
72
        #self.ui.lineEditTargetLabel.setEnabled(True)
73
        #self.ui.lineEditTargetLabel.setHidden(False)
74 74

  
75 75
        # for reset chart
76 76
        self.makeChart()

내보내기 Unified diff

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