Page 972 - 3-3
P. 972

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()
                                # 한글 부분의 범위를 보정


                            indexNum=[]
                            count=0


                            plateStr=[]
                            # 추출된 번호를 저장할 리스트
                            plateNumber=[]
                            # 번호판들을 저장할 리스트


                            for i in candList:
                            #candList 를 1 개씩 에 넣는다i
                                plateNumber=[]
                                #plateNumber  초기화


                                crop3=crop2[i[1]:i[1]+i[3],i[0]:i[0]+i[2]]
                                #crop2 에서 다음 사각형 부분을 추출하여 crop3              에 대입
                                crop3=cv2.cvtColor(crop3,cv2.COLOR_RGB2GRAY)
                                #crop3 에 gray 필터를 씌운다
                                nor=defCNN.imgScaling(crop3)
                                #crop3 의 크기를 28*28    로 바꾼다
                                nor=nor[:,:,np.newaxis]
                                # 차원의 수를 1    개 증가시킨다
                                plateNumber.append(nor)
                                #plateNumber 에 추가


                                with tf.Session() as sess:
                                #Session 을 열어 sess   로 명명
                                    save_path="plateModel/plate_model.ckpt"
                                    # 저장된 모델을 불러옴
                                    saver.restore(sess,save_path)
                                    #sess 에 저장


                                                         - 972 -
   967   968   969   970   971   972   973   974   975   976   977