프로젝트

일반

사용자정보

개정판 56b5f49f

ID56b5f49f09f6723feca0bfef52c52c54e465bf67
상위 ad0c5108
하위 ef93413b, ca6eee3a

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

issue #1366: og

Change-Id: I7d9326d0c222ccd2c063a95fc228986c478eace4

차이점 보기:

DTI_PID/DTI_PID/RecognitionDialog.py
2092 2092
        return tempChildInfo
2093 2093

  
2094 2094
    @staticmethod
2095
    def calculate_exact_position(img, symImg, symbol, rect):
2096
        pass
2095
    def calculate_exact_position(area, symImg, symbol, rect):
2096
        return ((rect[1] + area.x, rect[2] +area.y), 0, 0)
2097 2097

  
2098 2098
    @staticmethod
2099 2099
    def detect_symbol_using_server(targetSymbols, listWidget, updateProgressSignal):
......
2146 2146

  
2147 2147
            sym = cv2.imread(symbolPath, 1)
2148 2148
            symGray = Worker.cvtGrayImage(sym)
2149
            symGrayOri = copy.copy(symGray)
2149
            #symGrayOri = copy.copy(symGray)
2150 2150
            sow, soh = symGray.shape[::-1]  # symbol original w, h
2151 2151

  
2152
            symbolRotatedAngle = 0
2153 2152
            sw, sh = symGray.shape[::-1]
2154 2153

  
2155
            # get Rotated Original Point
2156
            originalPoint = Worker.getCalculatedOriginalPoint(additionalSymbol, symbolOriginalPoint,
2157
                                                                symbolRotatedAngle, sw, sh, sow, soh, 0)
2158
            connectionPoint = Worker.getCalculatedConnectionPoint(symbolConnectionPoint, symbolRotatedAngle, sw,
2159
                                                                sh, sow, soh, 0)
2160

  
2161 2154
            for symbol in symbols:
2162 2155
                if symbol[0] == symbolName:
2163
                    searchedItemSp = (symbol[1] + area.x, symbol[2] +area.y)
2156
                    searchedItemSp, symbolRotatedAngle, flipped = Worker.calculate_exact_position(area, symGray, targetSymbol, symbol)
2164 2157
                    hitRate = symbol[5]
2165 2158

  
2159
                    # get Rotated Original Point
2160
                    originalPoint = Worker.getCalculatedOriginalPoint(additionalSymbol, symbolOriginalPoint,
2161
                                                                symbolRotatedAngle, sw, sh, sow, soh, flipped)
2162
                    connectionPoint = Worker.getCalculatedConnectionPoint(symbolConnectionPoint, symbolRotatedAngle, sw,
2163
                                                                sh, sow, soh, 0)
2164

  
2166 2165
                    Worker.addSearchedSymbol(symbolName, symbolType,
2167 2166
                                    searchedItemSp, sw, sh, symbolThreshold, symbolMinMatchCount,
2168 2167
                                    hitRate, symbolRotatedAngle,

내보내기 Unified diff