Page 959 - 3-3
P. 959

# 다음 번호판으로 이동


                                candList=sorted(candList,key=operator.itemgetter(0))
                                #x 좌표 기준으로 정렬


                                lenPlate=len(candList)
                                # 번호판의 길이를 구한다


                                if lenPlate<7:
                                #7 개보다 적다면
                                    print("plate: ",lenPlate)
                                    continue
                                    # 다시 시도


                                elif lenPlate is 8:
                                #8 개라면
                                    candList=defCap.addChar(candList).copy()
                                    # 한글 번호판을 1     개로 합침


                                elif lenPlate>=9:
                                #9 개라면
                                    print("too many plate!")
                                    continue
                                    # 다시시도
                                else:
                                #7 개라면
                                    candList[2][1]*=0.5
                                    candList[2][1]=int(candList[2][1])


                                    candList[2][3]*=2.2
                                    candList[2][3]=int(candList[2][3])
                                    # 한글 부분의 범위를 보정


                                if candList[1][3]*0.8>candList[2][3]:
                                    candList=defCap.addChar2(candList).copy()
                                    # 한글 부분의 범위를 보정


                                if candList[1][2]*0.8>candList[2][2]:
                                    candList=defCap.addChar3(candList).copy()
                                    # 한글 부분의 범위를 보정


                                for i in candList:
                                #candList 를 1 개씩 에 넣는다i
                                    startPos=(i[0],i[1])
                                    # 사각형의 왼쪽 위 좌표


                                                         - 959 -
   954   955   956   957   958   959   960   961   962   963   964