프로젝트

일반

사용자정보

개정판 bbb9567e

IDbbb9567e14ddc03b6e3e2ae2f5ab0206ac76e2ea
상위 37f81ca5
하위 02bc2a5f

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

issue #1366: change filter

Change-Id: I3216b2121653f6248cfb35919026ed8664ca39d7

차이점 보기:

DTI_PID/DTI_PID/RecognitionDialog.py
2684 2684

  
2685 2685
            # symbol is bigger than roi -> detected symbol area is too big
2686 2686
            if rect[3] * rect[4] > sow * soh * 1.8:
2687
                return (None, None, None, None, None, None, None)
2687
                return (None, None, None, None, None, None, None, None)
2688 2688
            # detected symbol area is too small
2689 2689
            elif rect[3] * rect[4] * 1.8 < sow * soh:
2690
                return (None, None, None, None, None, None, None)
2690
                return (None, None, None, None, None, None, None, None)
2691 2691

  
2692 2692
            # get Rotated Original Point
2693 2693
            sow, soh = symGray.shape[::-1]
......
2767 2767
                    #colCount = len(tmRes[0])
2768 2768
                    #col, row = divmod(maxIndex, colCount)
2769 2769

  
2770
                    if max_val > 0.1:
2770
                    if max_val > 0.4:
2771 2771
                        searchedInfos.append([max_val, max_loc[0] + x_start, max_loc[1] + y_start, symbolRotatedAngle, flipped, originalPoint, connectionPoint, sw, sh])
2772 2772

  
2773 2773
                    if rc % 2 == 0:
......
2786 2786
                searchedInfos = sorted(searchedInfos, key=lambda param: param[0], reverse=True)
2787 2787
                searchedInfo = searchedInfos[0]
2788 2788
                return ((searchedInfo[1] + area.x, searchedInfo[2] + area.y), searchedInfo[3], searchedInfo[4], \
2789
                        searchedInfo[5], searchedInfo[6], searchedInfo[7], searchedInfo[8])
2789
                        searchedInfo[5], searchedInfo[6], searchedInfo[7], searchedInfo[8], searchedInfo[0])
2790 2790
            else:
2791
                return (None, None, None, None, None, None, None)
2791
                return (None, None, None, None, None, None, None, None)
2792 2792

  
2793 2793
        except Exception as ex:
2794 2794
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
2795 2795
                                                            sys.exc_info()[-1].tb_lineno)
2796 2796
            worker.displayLog.emit(MessageType.Error, message)
2797 2797

  
2798
            return (None, None, None, None, None, None, None)
2798
            return (None, None, None, None, None, None, None, None)
2799 2799

  
2800 2800
    @staticmethod
2801 2801
    def detect_symbol_using_server(targetSymbols, listWidget, worker):
......
2906 2906

  
2907 2907
            for symbol in symbols:
2908 2908
                if symbol[0] == symbolName:
2909
                    searchedItemSp, symbolRotatedAngle, flipped, originalPoint, connectionPoint, sw, sh = \
2909
                    searchedItemSp, symbolRotatedAngle, flipped, originalPoint, connectionPoint, sw, sh, score = \
2910 2910
                                Worker.calculate_exact_position(area, symGray, targetSymbol, symbol, worker)
2911 2911
                    if not searchedItemSp:
2912 2912
                        continue
2913 2913

  
2914
                    hitRate = symbol[5]
2914
                    #hitRate = symbol[5]
2915
                    hitRate = score
2915 2916

  
2916 2917
                    Worker.addSearchedSymbol(symbolName, symbolType,
2917 2918
                                    searchedItemSp, sw, sh, symbolThreshold, symbolMinMatchCount,

내보내기 Unified diff

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