We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59af189 commit 1c8d7b5Copy full SHA for 1c8d7b5
sobel.py
@@ -38,6 +38,12 @@
38
type=float,
39
help="rescale image by this factor",
40
default=1.0)
41
+parser.add_argument(
42
+ "-s",
43
+ "--set_resolution",
44
+ type=int,
45
+ nargs=2,
46
+ help='override default camera resolution as H W')
47
parser.add_argument(
48
'video_file',
49
metavar='video_file',
@@ -101,6 +107,12 @@ def nothing(x):
101
107
neighbourhood,
102
108
15,
103
109
nothing)
110
+
111
+ # override default camera resolution
112
113
+ if (args.set_resolution is not None):
114
+ cap.set(cv2.CAP_PROP_FRAME_HEIGHT, args.set_resolution[1])
115
+ cap.set(cv2.CAP_PROP_FRAME_WIDTH, args.set_resolution[0])
104
116
105
117
while (keep_processing):
106
118
0 commit comments