Page 256 - MDP2022-2
P. 256

cv2.rectangle(img,  (x,y),  (x+w,y+h),  (0,255,0),  2)

                              id,  confidence  =  recognizer.predict(gray[y:y+h,x:x+w])

                              if  (confidence  <  100):
                                      id  =  names[id]



                                      led(23)

                                      db.close()

                                      if  id  =="jieun":

                                        flag1  =  flag1  +  1

                                        if  flag1  ==  1:
                                          if  seat1  ==  1:

                                            cv2.imshow("seat1",  s1)

                                          elif  seat1  ==  2:

                                            cv2.imshow("seat2",  s2)

                                          elif  seat1  ==  3:

                                            cv2.imshow("seat3",  s3)

                                          elif  seat1  ==  4:

                                            cv2.imshow("seat4",  s4)

                                          elif  seat1  ==  5:
                                            cv2.imshow("seat5",  s5)

                                          elif  seat1  ==  6:

                                            cv2.imshow("seat6",  s6)

                                          elif  seat1  ==  7:

                                            cv2.imshow("seat7",  s7)

                                          elif  seat1  ==  8:

                                            cv2.imshow("seat8",  s8)
                                          elif  seat1  ==  9:

                                            cv2.imshow("seat9",  s9)

                                          elif  seat1  ==  10:

                                            cv2.imshow("seat10",  s10)

                                          elif  seat1  ==  11:
   251   252   253   254   255   256   257   258   259   260   261