Page 955 - 3-3
P. 955

cv2.CC_STAT_HEIGHT     경계 박스의 세로 크기
                                cv2.CC_STAT_AREA     연결된 컴포넌트의 총 영역 픽셀 단위(               ).
                                '''


                                candList=[]
                                #candList  선언 번호판인 사각형들만 저장하기 위해서(                )
                                for i in stats:
                                #stats 를 하나씩 에 저장한다i
                                    startPos=(i[0],i[1])
                                    # 사각형 왼쪽 모서리의 좌표
                                    endPos=(i[0]+i[2],i[1]+i[3])
                                    # 사각형 오른쪽 모서리의 좌표


                                    if i[2]/i[3]<0.9:
                                    # 사각형의 비율이 0.9      미만인 사각형을 찾는다
                                        candList.append(i)
                                        # 그 사각형을 candList    에 추가한다
                                candList=sorted(candList,key=operator.itemgetter(0))
                                # 사각형들을 x    좌표 기준으로 정렬한다
                                candList.reverse()
                                # 배열의 순서를 뒤집는다


                                plateList=[]
                                # 찾아낸 번호판들을 저장하기위한 변수 선언
                                currentList=[]
                                # 임시로 찾아낸 사각형을 저장하기위한 변수 선언
                                neiCount=0
                                # 이웃 사각형의 수 계산에 사용될 변수 선언


                                for fir in candList:
                                #candList  를 1 개씩 fir 에 넣는다
                                    plateList=[]
                                    #plateList  초기화
                                    neiList=[]
                                    #neiList  초기화
                                    currentList=fir
                                    #fir 를 현재 리스트로 설정


                                    plateList.append(currentList)
                                    #currentList 를 plateList 에 대입     #image 를 복사하여 ori2     에 저장
                                    for sec in candList:
                                    #candList 를 1 개씩 sec  변수에 넣는다
                                        neiList=sec
                                        #neiList 에 sec 를 넣는다




                                                         - 955 -
   950   951   952   953   954   955   956   957   958   959   960