Merge pull request #21 from adrianiainlam/master
Add option to flip input frame like a mirror image
This commit is contained in:
commit
be86991e7a
1 changed files with 3 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ else:
|
|||
parser.add_argument("-W", "--width", type=int, help="Set raw RGB width", default=640)
|
||||
parser.add_argument("-H", "--height", type=int, help="Set raw RGB height", default=360)
|
||||
parser.add_argument("-c", "--capture", help="Set camera ID (0, 1...) or video file", default="0")
|
||||
parser.add_argument("-M", "--mirror-input", action="store_true", help="Process a mirror image of the input video")
|
||||
parser.add_argument("-m", "--max-threads", type=int, help="Set the maximum number of threads", default=1)
|
||||
parser.add_argument("-t", "--threshold", type=float, help="Set minimum confidence threshold for face tracking", default=None)
|
||||
parser.add_argument("-d", "--detection-threshold", type=float, help="Set minimum confidence threshold for face detection", default=0.6)
|
||||
|
|
@ -219,6 +220,8 @@ try:
|
|||
continue
|
||||
|
||||
ret, frame = input_reader.read()
|
||||
if ret and args.mirror_input:
|
||||
frame = cv2.flip(frame, 1)
|
||||
if not ret:
|
||||
if repeat:
|
||||
if need_reinit == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue