1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2019-10-24 18:17:40 +00:00
61 changed files with 1438 additions and 394 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ parser.add_argument('--median_filter', default=0, type=int, help='Kernel size of
args = parser.parse_args()
net = cv.dnn.readNetFromTorch(cv.samples.findFile(args.model))
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV);
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV)
if args.input:
cap = cv.VideoCapture(args.input)
+1 -1
View File
@@ -27,7 +27,7 @@ args = parser.parse_args()
### Get OpenCV predictions #####################################################
net = cv.dnn.readNetFromTensorflow(cv.samples.findFile(args.weights), cv.samples.findFile(args.prototxt))
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV);
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV)
detections = []
for imgName in os.listdir(args.images):
+1 -1
View File
@@ -134,7 +134,7 @@ def main():
for j in range(4):
p1 = (vertices[j][0], vertices[j][1])
p2 = (vertices[(j + 1) % 4][0], vertices[(j + 1) % 4][1])
cv.line(frame, p1, p2, (0, 255, 0), 1);
cv.line(frame, p1, p2, (0, 255, 0), 1)
# Put efficiency information
cv.putText(frame, label, (0, 15), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0))
+1 -1
View File
@@ -21,7 +21,7 @@ def tokenize(s):
elif token:
tokens.append(token)
token = ""
isString = (symbol == '\"' or symbol == '\'') ^ isString;
isString = (symbol == '\"' or symbol == '\'') ^ isString
elif symbol == '{' or symbol == '}' or symbol == '[' or symbol == ']':
if token:
+1 -1
View File
@@ -122,7 +122,7 @@ def createSSDGraph(modelPath, configPath, outputPath):
print('Input image size: %dx%d' % (image_width, image_height))
# Read the graph.
inpNames = ['image_tensor']
_inpNames = ['image_tensor']
outNames = ['num_detections', 'detection_scores', 'detection_boxes', 'detection_classes']
writeTextGraph(modelPath, outputPath, outNames)