Page 956 - 3-3
P. 956

if currentList is neiList:continue
                                        # 현재와 이웃 리스트 노드 가 같다면 비교하지 않고 패스(  )


                                        if (abs(currentList[3]-neiList[3])<0.2*currentList[2])and\
                                           (currentList[0]-(neiList[0]+neiList[2])<0.2*currentList[1])and\
                                           (currentList[0]>=neiList[0])
                                        # 과학지의 알고리즘대로 비교한다
                                            flag=True
                                            #flag  를 True 로 설정
                                            for plate in plateList:
                                            #plateList 를 1 개씩 plate 에 넣는다
                                                if neiList is plate:
                                                #plate 가 이웃 리스트와 같으면
                                                    flag=False
                                                    # 더 이상 비교x
                                            if flag is True:
                                            #True 로 유지되고 있으면
                                                plateList.append(neiList)
                                                #plateList 에 이웃 추가
                                                currentList=neiList
                                                # 이웃을 현재 리스트로 설정


                                        if len(plateList)>=4:break
                                        # 길이가 4  개 이상이면 더 이상 비교x
                                    if len(plateList)>=4:
                                    # 길이가 4  개 이상이면 더 이상 비교x
                                        i                                                                    f
            plateList[0][0]+plateList[0][2]-plateList[3][0]<plateList[0][2]*5.5:
                                        # 과학지의 알고리즘대로 비교한다
                                            break
                                            # 맞다면 더 이상 비교 x


                                if len(plateList)<4:
                                # 추출한 번호판의 길이가 4         보다 적다면
                                    print("Don't find plate!")
                                    continue
                                    # 다시 시도


                                for i in plateList:
                                # 추출한 번호판을 에i        1 개씩 넣는다
                                    startPos=(i[0],i[1])
                                    # 사각형의 왼쪽 위 꼭짓점 지정
                                    endPos=(i[0]+i[2],i[1]+i[3])
                                    # 사각형의 오른쪽 아래 꼭짓점 지정




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