kevin преди 2 години
родител
ревизия
e6ce7b7e6f
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      take_picture_snn.py

+ 4 - 2
take_picture_snn.py

@@ -13,6 +13,8 @@ CAMERA_OFFSET_X = 750
 CAMERA_OFFSET_Y = 250
 CAMERA_SIZE = 500
 FEED_SIZE = 250
+
+NAME = "kevin"
 while cap.isOpened():
     ret, frame = cap.read()
 
@@ -22,7 +24,7 @@ while cap.isOpened():
     # Collect anchors
     if cv2.waitKey(1) & 0XFF == ord('a'):
         # Create the unique file path
-        imgname = os.path.join(ANC_PATH, '{}.jpg'.format(uuid.uuid1()))
+        imgname = os.path.join(ANC_PATH, '{}-{}.jpg'.format(NAME,uuid.uuid1()))
         # Resize image
         resized = cv2.resize(frame, (FEED_SIZE, FEED_SIZE))
         # Write out anchor image
@@ -31,7 +33,7 @@ while cap.isOpened():
     # Collect positives
     if cv2.waitKey(1) & 0XFF == ord('p'):
         # Create the unique file path
-        imgname = os.path.join(POS_PATH, '{}.jpg'.format(uuid.uuid1()))
+        imgname = os.path.join(POS_PATH, '{}-{}.jpg'.format(NAME,uuid.uuid1()))
         # Resize image
         resized = cv2.resize(frame, (FEED_SIZE, FEED_SIZE))
         # Write out positive image