프로젝트

일반

사용자정보

개정판 bb3bbe10

IDbb3bbe10520e43dfb53a89a4bf884bced50570d8
상위 13345412
하위 db5e99e4

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

issue #655: training merged img logic fix

차이점 보기:

DTI_PID/DTI_PID/TrainingImageListDialog.py
225 225
            for imageArea in listHasBoxImage:
226 226
                areaW = imageArea.width
227 227
                areaH = imageArea.height
228
                preMaxLineH = maxLineH
229

  
228 230
                if maxLineH < areaH:
229 231
                    maxLineH = areaH
230 232
                if lineW + areaW < totalBaseWidth:
231 233
                    lineW += areaW
232 234
                else:
235
                    maxLineH = preMaxLineH
233 236
                    lineW = areaW
234 237
                    totalHeight += maxLineH
238
                    maxLineH = areaH ##sung
235 239
            totalHeight += maxLineH
236 240
            #print('total area real : ' + str(totalBaseWidth * totalHeight) +', total width : ' + str(totalBaseWidth) + ', total height : ' + str(totalHeight) + ', ratio : ' + str(totalHeight / totalBaseWidth))
237 241

  
......
244 248
                areaH = listHasBoxImage[index].height
245 249
                
246 250
                boxes = listBoxes[index].split('\n')
247
            
251
                preMaxLineH = maxLineH
252

  
248 253
                if maxLineH < areaH:    
249 254
                    maxLineH = areaH
250 255
                if lineW + areaW < totalBaseWidth:
......
261 266
                    currentX = lineW
262 267

  
263 268
                else:
269
                    maxLineH = preMaxLineH
264 270
                    lineW = areaW
265 271
                    totalHeight += maxLineH
266 272
                    currentX = 0
......
275 281
                        boxComponent[4] = seedHeight - currentY - areaH + int(boxComponent[4])
276 282
                        outBox += boxComponent[0] + " " + str(boxComponent[1]) + " " + str(boxComponent[2]) + " " + str(boxComponent[3]) + " " + str(boxComponent[4]) + ' 0\n'
277 283
                    currentX = areaW
284
                    maxLineH = areaH ##sung
278 285

  
279 286
            trainingImgPath = os.path.join(project.getTrainingFilePath(), self.oCRLang + '.' + self.oCRLang + 'F.exp0.tif')
280 287
            trainingBoxPath = os.path.join(project.getTrainingFilePath(), self.oCRLang + '.' + self.oCRLang + 'F.exp0.box')

내보내기 Unified diff

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