|
@@ -13,6 +13,8 @@ CAMERA_OFFSET_X = 750
|
|
CAMERA_OFFSET_Y = 250
|
|
CAMERA_OFFSET_Y = 250
|
|
CAMERA_SIZE = 500
|
|
CAMERA_SIZE = 500
|
|
FEED_SIZE = 250
|
|
FEED_SIZE = 250
|
|
|
|
+
|
|
|
|
+NAME = "kevin"
|
|
while cap.isOpened():
|
|
while cap.isOpened():
|
|
ret, frame = cap.read()
|
|
ret, frame = cap.read()
|
|
|
|
|
|
@@ -22,7 +24,7 @@ while cap.isOpened():
|
|
# Collect anchors
|
|
# Collect anchors
|
|
if cv2.waitKey(1) & 0XFF == ord('a'):
|
|
if cv2.waitKey(1) & 0XFF == ord('a'):
|
|
# Create the unique file path
|
|
# 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
|
|
# Resize image
|
|
resized = cv2.resize(frame, (FEED_SIZE, FEED_SIZE))
|
|
resized = cv2.resize(frame, (FEED_SIZE, FEED_SIZE))
|
|
# Write out anchor image
|
|
# Write out anchor image
|
|
@@ -31,7 +33,7 @@ while cap.isOpened():
|
|
# Collect positives
|
|
# Collect positives
|
|
if cv2.waitKey(1) & 0XFF == ord('p'):
|
|
if cv2.waitKey(1) & 0XFF == ord('p'):
|
|
# Create the unique file path
|
|
# 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
|
|
# Resize image
|
|
resized = cv2.resize(frame, (FEED_SIZE, FEED_SIZE))
|
|
resized = cv2.resize(frame, (FEED_SIZE, FEED_SIZE))
|
|
# Write out positive image
|
|
# Write out positive image
|