diff --git a/doc/check_docs.py b/doc/check_docs.py index 18df02685c..2d8799341d 100755 --- a/doc/check_docs.py +++ b/doc/check_docs.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys, glob sys.path.append("../modules/python/src2/") diff --git a/doc/check_docs2.py b/doc/check_docs2.py index a3606bd294..bf03754590 100755 --- a/doc/check_docs2.py +++ b/doc/check_docs2.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import os, sys, fnmatch, re sys.path.append("../modules/python/src2/") diff --git a/doc/conf.py b/doc/conf.py index 40b8e27137..35073e051f 100755 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + # -*- coding: utf-8 -*- # # opencvstd documentation build configuration file, created by diff --git a/doc/ocv.py b/doc/ocv.py index ba321928ab..ce750933b8 100755 --- a/doc/ocv.py +++ b/doc/ocv.py @@ -1,3 +1,4 @@ +#/usr/bin/env python # -*- coding: utf-8 -*- """ ocv domain, a modified copy of sphinx.domains.cpp + shpinx.domains.python. diff --git a/doc/patch_refman_latex.py b/doc/patch_refman_latex.py index 2691746845..352c46cb56 100755 --- a/doc/patch_refman_latex.py +++ b/doc/patch_refman_latex.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys f=open(sys.argv[1], "rt") diff --git a/doc/pattern_tools/gen_pattern.py b/doc/pattern_tools/gen_pattern.py index 455b3b6e8e..45b45af2db 100755 --- a/doc/pattern_tools/gen_pattern.py +++ b/doc/pattern_tools/gen_pattern.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + """gen_pattern.py To run: -c 10 -r 12 -o out.svg diff --git a/doc/pattern_tools/svgfig.py b/doc/pattern_tools/svgfig.py index 04aa257357..bf182a8b09 100755 --- a/doc/pattern_tools/svgfig.py +++ b/doc/pattern_tools/svgfig.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + # svgfig.py copyright (C) 2008 Jim Pivarski # # This program is free software; you can redistribute it and/or diff --git a/doc/reformat.py b/doc/reformat.py index fb52075e90..00e4aae9e0 100755 --- a/doc/reformat.py +++ b/doc/reformat.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import os, sys, re finput=open(sys.argv[1], "rt") diff --git a/modules/contrib/doc/facerec/src/create_csv.py b/modules/contrib/doc/facerec/src/create_csv.py index 54681afa99..71d773c017 100755 --- a/modules/contrib/doc/facerec/src/create_csv.py +++ b/modules/contrib/doc/facerec/src/create_csv.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys import os.path diff --git a/modules/gpu/misc/mark_nvidia.py b/modules/gpu/misc/mark_nvidia.py index 7c1f212869..e8cc3e8417 100755 --- a/modules/gpu/misc/mark_nvidia.py +++ b/modules/gpu/misc/mark_nvidia.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys, re spaces = '[\s]*' diff --git a/modules/java/check-tests.py b/modules/java/check-tests.py index 55118ca914..4cb80ff724 100755 --- a/modules/java/check-tests.py +++ b/modules/java/check-tests.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys, os, re classes_ignore_list = ( diff --git a/modules/java/generator/gen_java.py b/modules/java/generator/gen_java.py index 2287058a94..c60730fad3 100755 --- a/modules/java/generator/gen_java.py +++ b/modules/java/generator/gen_java.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys, re, os.path from string import Template diff --git a/modules/java/generator/gen_javadoc.py b/modules/java/generator/gen_javadoc.py index 97eac702ad..3c697277b5 100755 --- a/modules/java/generator/gen_javadoc.py +++ b/modules/java/generator/gen_javadoc.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import os, sys, re, string, glob from optparse import OptionParser diff --git a/modules/java/generator/rst_parser.py b/modules/java/generator/rst_parser.py index 65e66f7f9d..f4ef581904 100755 --- a/modules/java/generator/rst_parser.py +++ b/modules/java/generator/rst_parser.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import os, sys, re, string, fnmatch allmodules = ["core", "flann", "imgproc", "ml", "highgui", "video", "features2d", "calib3d", "objdetect", "legacy", "contrib", "gpu", "androidcamera", "java", "python", "stitching", "ts", "photo", "nonfree", "videostab", "ocl"] verbose = False diff --git a/modules/python/src2/cv.py b/modules/python/src2/cv.py index 2d4daf08b0..4238d05f7a 100755 --- a/modules/python/src2/cv.py +++ b/modules/python/src2/cv.py @@ -1 +1,3 @@ +#/usr/bin/env python + from cv2.cv import * diff --git a/modules/python/src2/gen.py b/modules/python/src2/gen.py index 2ffb445443..65cafc9900 100755 --- a/modules/python/src2/gen.py +++ b/modules/python/src2/gen.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys from string import Template diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index e600a82f45..5381579ce4 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import hdr_parser, sys, re, os, cStringIO from string import Template diff --git a/modules/python/src2/hdr_parser.py b/modules/python/src2/hdr_parser.py index a18a4feb42..090ed6f64a 100755 --- a/modules/python/src2/hdr_parser.py +++ b/modules/python/src2/hdr_parser.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import os, sys, re, string # the list only for debugging. The real list, used in the real OpenCV build, is specified in CMakeLists.txt diff --git a/modules/python/test/calchist.py b/modules/python/test/calchist.py index c371e73ce3..0a52258b20 100755 --- a/modules/python/test/calchist.py +++ b/modules/python/test/calchist.py @@ -1,5 +1,6 @@ -# Calculating and displaying 2D Hue-Saturation histogram of a color image +#/usr/bin/env python +# Calculating and displaying 2D Hue-Saturation histogram of a color image import sys import cv2.cv as cv diff --git a/modules/python/test/camera_calibration.py b/modules/python/test/camera_calibration.py index 989207c8a8..488dd15c62 100755 --- a/modules/python/test/camera_calibration.py +++ b/modules/python/test/camera_calibration.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys import math import time diff --git a/modules/python/test/findstereocorrespondence.py b/modules/python/test/findstereocorrespondence.py index 9cc19412c2..8f11738cce 100755 --- a/modules/python/test/findstereocorrespondence.py +++ b/modules/python/test/findstereocorrespondence.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys import cv2.cv as cv diff --git a/modules/python/test/goodfeatures.py b/modules/python/test/goodfeatures.py index e4c4b0a6fd..62907772ab 100755 --- a/modules/python/test/goodfeatures.py +++ b/modules/python/test/goodfeatures.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import cv2.cv as cv import unittest diff --git a/modules/python/test/leak1.py b/modules/python/test/leak1.py index 49326dab50..dde5608951 100755 --- a/modules/python/test/leak1.py +++ b/modules/python/test/leak1.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import cv2.cv as cv import numpy as np cv.NamedWindow('Leak') diff --git a/modules/python/test/leak2.py b/modules/python/test/leak2.py index ca511a40ec..af1cb0556c 100755 --- a/modules/python/test/leak2.py +++ b/modules/python/test/leak2.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import cv2.cv as cv import numpy as np import time diff --git a/modules/python/test/leak3.py b/modules/python/test/leak3.py index 901d7be20f..f72afbbf08 100755 --- a/modules/python/test/leak3.py +++ b/modules/python/test/leak3.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import cv2.cv as cv import math import time diff --git a/modules/python/test/leak4.py b/modules/python/test/leak4.py index 8d8ba8883a..dcfc5cfdc9 100755 --- a/modules/python/test/leak4.py +++ b/modules/python/test/leak4.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import cv2.cv as cv import math import time diff --git a/modules/python/test/precornerdetect.py b/modules/python/test/precornerdetect.py index 49c8e076d9..29a6ca1ecd 100755 --- a/modules/python/test/precornerdetect.py +++ b/modules/python/test/precornerdetect.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import cv2.cv as cv def precornerdetect(image): diff --git a/modules/python/test/test.py b/modules/python/test/test.py index 42dfab209e..924708c483 100755 --- a/modules/python/test/test.py +++ b/modules/python/test/test.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import unittest import random import time diff --git a/modules/python/test/ticket_6.py b/modules/python/test/ticket_6.py index e6cc62f378..533027f5b9 100755 --- a/modules/python/test/ticket_6.py +++ b/modules/python/test/ticket_6.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import urllib import cv2.cv as cv import Image diff --git a/modules/python/test/tickets.py b/modules/python/test/tickets.py index aa6818059a..1e756bcd82 100755 --- a/modules/python/test/tickets.py +++ b/modules/python/test/tickets.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import unittest import random import time diff --git a/modules/python/test/transformations.py b/modules/python/test/transformations.py index 6d6f19e5b9..1f63bcef22 100755 --- a/modules/python/test/transformations.py +++ b/modules/python/test/transformations.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + # -*- coding: utf-8 -*- # transformations.py diff --git a/modules/ts/misc/chart.py b/modules/ts/misc/chart.py index 604b85048a..39a60eb2e7 100755 --- a/modules/ts/misc/chart.py +++ b/modules/ts/misc/chart.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import testlog_parser, sys, os, xml, re from table_formatter import * from optparse import OptionParser diff --git a/modules/ts/misc/color.py b/modules/ts/misc/color.py index 3ce725276e..4492ed4798 100755 --- a/modules/ts/misc/color.py +++ b/modules/ts/misc/color.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import math, os, sys webcolors = { diff --git a/modules/ts/misc/concatlogs.py b/modules/ts/misc/concatlogs.py index af95bac20d..afcb9cc89f 100755 --- a/modules/ts/misc/concatlogs.py +++ b/modules/ts/misc/concatlogs.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from optparse import OptionParser import glob, sys, os, re diff --git a/modules/ts/misc/report.py b/modules/ts/misc/report.py index edee85497e..6da89e512b 100755 --- a/modules/ts/misc/report.py +++ b/modules/ts/misc/report.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import testlog_parser, sys, os, xml, re, glob from table_formatter import * from optparse import OptionParser diff --git a/modules/ts/misc/run.py b/modules/ts/misc/run.py index e1b275f321..de5796a95e 100755 --- a/modules/ts/misc/run.py +++ b/modules/ts/misc/run.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import sys, os, platform, xml, re, tempfile, glob, datetime, getpass, shutil from optparse import OptionParser from subprocess import Popen, PIPE diff --git a/modules/ts/misc/summary.py b/modules/ts/misc/summary.py index 45b4aac13a..76c198427d 100755 --- a/modules/ts/misc/summary.py +++ b/modules/ts/misc/summary.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import testlog_parser, sys, os, xml, glob, re from table_formatter import * from optparse import OptionParser diff --git a/modules/ts/misc/table_formatter.py b/modules/ts/misc/table_formatter.py index be89794f0e..598c9e924e 100755 --- a/modules/ts/misc/table_formatter.py +++ b/modules/ts/misc/table_formatter.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import sys, re, os.path, cgi, stat from optparse import OptionParser from color import getColorizer diff --git a/modules/ts/misc/testlog_parser.py b/modules/ts/misc/testlog_parser.py index 7f14235d38..ce55b8b1de 100755 --- a/modules/ts/misc/testlog_parser.py +++ b/modules/ts/misc/testlog_parser.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import sys, re, os.path from xml.dom.minidom import parse diff --git a/samples/python/camera.py b/samples/python/camera.py index 747bb4575c..5d1c63b047 100755 --- a/samples/python/camera.py +++ b/samples/python/camera.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + import cv2.cv as cv import time diff --git a/samples/python/cv20squares.py b/samples/python/cv20squares.py index ddeeebd3f9..e472fa1973 100755 --- a/samples/python/cv20squares.py +++ b/samples/python/cv20squares.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + """ Find Squares in image by finding countours and filtering """ diff --git a/samples/python/cvutils.py b/samples/python/cvutils.py index 6e81a3a44d..a2ef8ae325 100755 --- a/samples/python/cvutils.py +++ b/samples/python/cvutils.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + import cv2.cv as cv import urllib2 from sys import argv diff --git a/samples/python/dmtx.py b/samples/python/dmtx.py index 6b3a6bd180..0ff2b43da5 100755 --- a/samples/python/dmtx.py +++ b/samples/python/dmtx.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + import cv2.cv as cv import time from pydmtx import DataMatrix diff --git a/samples/python/peopledetect.py b/samples/python/peopledetect.py index 35c600c961..2824299791 100755 --- a/samples/python/peopledetect.py +++ b/samples/python/peopledetect.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + import sys from cv import * diff --git a/samples/python2/_coverage.py b/samples/python2/_coverage.py index 1fb8b17f0e..1d0f0418be 100755 --- a/samples/python2/_coverage.py +++ b/samples/python2/_coverage.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Utility for measuring python opencv API coverage by samples. ''' diff --git a/samples/python2/_doc.py b/samples/python2/_doc.py index 1204ae65a5..71c9faa7dd 100755 --- a/samples/python2/_doc.py +++ b/samples/python2/_doc.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Scans current directory for *.py files and reports ones with missing __doc__ string. diff --git a/samples/python2/asift.py b/samples/python2/asift.py index 4f2b0cd40a..09894dd4c2 100755 --- a/samples/python2/asift.py +++ b/samples/python2/asift.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Affine invariant feature-based image matching sample. diff --git a/samples/python2/browse.py b/samples/python2/browse.py index 238d2a3ec0..da2c98d1c7 100755 --- a/samples/python2/browse.py +++ b/samples/python2/browse.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' browse.py ========= diff --git a/samples/python2/calibrate.py b/samples/python2/calibrate.py index 03a2a6f7a6..54aba8aaf9 100755 --- a/samples/python2/calibrate.py +++ b/samples/python2/calibrate.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 import os diff --git a/samples/python2/camshift.py b/samples/python2/camshift.py index 0554e1ecd6..43543dcfc5 100755 --- a/samples/python2/camshift.py +++ b/samples/python2/camshift.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Camshift tracker ================ diff --git a/samples/python2/coherence.py b/samples/python2/coherence.py index d3fe4daba9..082a7c6101 100755 --- a/samples/python2/coherence.py +++ b/samples/python2/coherence.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Coherence-enhancing filtering example ===================================== diff --git a/samples/python2/color_histogram.py b/samples/python2/color_histogram.py index 8e6747aac7..c27744ed5a 100755 --- a/samples/python2/color_histogram.py +++ b/samples/python2/color_histogram.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 from time import clock diff --git a/samples/python2/common.py b/samples/python2/common.py index ccfbe5c722..4c6f800c44 100755 --- a/samples/python2/common.py +++ b/samples/python2/common.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' This module contais some common routines used by other samples. ''' diff --git a/samples/python2/contours.py b/samples/python2/contours.py index 13a3857d3d..daa13b2a11 100755 --- a/samples/python2/contours.py +++ b/samples/python2/contours.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' This program illustrates the use of findContours and drawContours. The original image is put up along with the image of drawn contours. diff --git a/samples/python2/deconvolution.py b/samples/python2/deconvolution.py index 9463c4545b..5e3becc645 100755 --- a/samples/python2/deconvolution.py +++ b/samples/python2/deconvolution.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Wiener deconvolution. diff --git a/samples/python2/demo.py b/samples/python2/demo.py index fd988bc31f..a9c1070154 100755 --- a/samples/python2/demo.py +++ b/samples/python2/demo.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Sample-launcher application. ''' diff --git a/samples/python2/digits.py b/samples/python2/digits.py index 582e5fc0ff..c84bc241cb 100755 --- a/samples/python2/digits.py +++ b/samples/python2/digits.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' SVM and KNearest digit recognition. diff --git a/samples/python2/digits_adjust.py b/samples/python2/digits_adjust.py index d8e70f2ec7..72805d3f00 100755 --- a/samples/python2/digits_adjust.py +++ b/samples/python2/digits_adjust.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Digit recognition adjustment. Grid search is used to find the best parameters for SVM and KNearest classifiers. diff --git a/samples/python2/digits_video.py b/samples/python2/digits_video.py index a8b486f2a8..ef62826fd1 100755 --- a/samples/python2/digits_video.py +++ b/samples/python2/digits_video.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 import os diff --git a/samples/python2/distrans.py b/samples/python2/distrans.py index 1322636290..386ea8ab99 100755 --- a/samples/python2/distrans.py +++ b/samples/python2/distrans.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Distance transform sample. diff --git a/samples/python2/edge.py b/samples/python2/edge.py index 02276f2d25..9ce3457d30 100755 --- a/samples/python2/edge.py +++ b/samples/python2/edge.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' This sample demonstrates Canny edge detection. diff --git a/samples/python2/facedetect.py b/samples/python2/facedetect.py index 94807b82a9..27a78950a9 100755 --- a/samples/python2/facedetect.py +++ b/samples/python2/facedetect.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 import cv2.cv as cv diff --git a/samples/python2/feature_homography.py b/samples/python2/feature_homography.py index aa19d45f57..4dd8ddf136 100755 --- a/samples/python2/feature_homography.py +++ b/samples/python2/feature_homography.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Feature homography ================== diff --git a/samples/python2/find_obj.py b/samples/python2/find_obj.py index 48b9d44ea2..7a875ca4f7 100755 --- a/samples/python2/find_obj.py +++ b/samples/python2/find_obj.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Feature-based image matching sample. diff --git a/samples/python2/fitline.py b/samples/python2/fitline.py index e4a5091f13..c19dbdc35b 100755 --- a/samples/python2/fitline.py +++ b/samples/python2/fitline.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Robust line fitting. ================== diff --git a/samples/python2/floodfill.py b/samples/python2/floodfill.py index 540e7ad8f0..177e380255 100755 --- a/samples/python2/floodfill.py +++ b/samples/python2/floodfill.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Floodfill sample. diff --git a/samples/python2/gabor_threads.py b/samples/python2/gabor_threads.py index 962a50189a..9582bdb04f 100755 --- a/samples/python2/gabor_threads.py +++ b/samples/python2/gabor_threads.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' gabor_threads.py ========= diff --git a/samples/python2/gaussian_mix.py b/samples/python2/gaussian_mix.py index 63ee3adece..de714fa353 100755 --- a/samples/python2/gaussian_mix.py +++ b/samples/python2/gaussian_mix.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np from numpy import random import cv2 diff --git a/samples/python2/hist.py b/samples/python2/hist.py index d7938958fc..ea950c8326 100755 --- a/samples/python2/hist.py +++ b/samples/python2/hist.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' This is a sample for histogram plotting for RGB images and grayscale images for better understanding of colour distribution Benefit : Learn how to draw histogram of images diff --git a/samples/python2/inpaint.py b/samples/python2/inpaint.py index 0070f55681..d2b8c849a7 100755 --- a/samples/python2/inpaint.py +++ b/samples/python2/inpaint.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Inpainting sample. diff --git a/samples/python2/kmeans.py b/samples/python2/kmeans.py index 3b55830508..4418a46792 100755 --- a/samples/python2/kmeans.py +++ b/samples/python2/kmeans.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' K-means clusterization sample. Usage: diff --git a/samples/python2/lappyr.py b/samples/python2/lappyr.py index e1951ed63a..232ec54b92 100755 --- a/samples/python2/lappyr.py +++ b/samples/python2/lappyr.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' An example of Laplacian Pyramid construction and merging. Level : Intermediate diff --git a/samples/python2/letter_recog.py b/samples/python2/letter_recog.py index 282b300d89..73eeff3bb7 100755 --- a/samples/python2/letter_recog.py +++ b/samples/python2/letter_recog.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' The sample demonstrates how to train Random Trees classifier (or Boosting classifier, or MLP, or Knearest, or Support Vector Machines) using the provided dataset. diff --git a/samples/python2/lk_homography.py b/samples/python2/lk_homography.py index 9e6d8a9e80..9996764c6f 100755 --- a/samples/python2/lk_homography.py +++ b/samples/python2/lk_homography.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Lucas-Kanade homography tracker =============================== diff --git a/samples/python2/lk_track.py b/samples/python2/lk_track.py index ea8b25d1b8..f0d0439622 100755 --- a/samples/python2/lk_track.py +++ b/samples/python2/lk_track.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Lucas-Kanade tracker ==================== diff --git a/samples/python2/morphology.py b/samples/python2/morphology.py index 2c81cd81e0..0980981380 100755 --- a/samples/python2/morphology.py +++ b/samples/python2/morphology.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Morphology operations. diff --git a/samples/python2/mosse.py b/samples/python2/mosse.py index 1d5eb29389..aecb423452 100755 --- a/samples/python2/mosse.py +++ b/samples/python2/mosse.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' MOSSE tracking sample diff --git a/samples/python2/motempl.py b/samples/python2/motempl.py index 08f3100643..4f78ebad57 100755 --- a/samples/python2/motempl.py +++ b/samples/python2/motempl.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 import video diff --git a/samples/python2/mouse_and_match.py b/samples/python2/mouse_and_match.py index b979445c9e..a9fa882adc 100755 --- a/samples/python2/mouse_and_match.py +++ b/samples/python2/mouse_and_match.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + #!/usr/bin/env python ''' mouse_and_match.py [-i path | --input path: default ./] diff --git a/samples/python2/mser.py b/samples/python2/mser.py index 88773534ab..73e0a4f8da 100755 --- a/samples/python2/mser.py +++ b/samples/python2/mser.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' MSER detector demo ================== diff --git a/samples/python2/opt_flow.py b/samples/python2/opt_flow.py index a70046a06e..d0bc5c5c11 100755 --- a/samples/python2/opt_flow.py +++ b/samples/python2/opt_flow.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 import video diff --git a/samples/python2/peopledetect.py b/samples/python2/peopledetect.py index 4cd7a8efd6..f4bd46702f 100755 --- a/samples/python2/peopledetect.py +++ b/samples/python2/peopledetect.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + import numpy as np import cv2 diff --git a/samples/python2/plane_ar.py b/samples/python2/plane_ar.py index 45e35603d3..dc2d5d584f 100755 --- a/samples/python2/plane_ar.py +++ b/samples/python2/plane_ar.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Planar augmented reality ================== diff --git a/samples/python2/plane_tracker.py b/samples/python2/plane_tracker.py index d588b94cde..189f50b362 100755 --- a/samples/python2/plane_tracker.py +++ b/samples/python2/plane_tracker.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Multitarget planar tracking ================== diff --git a/samples/python2/squares.py b/samples/python2/squares.py index 7842bb18c7..a247c35627 100755 --- a/samples/python2/squares.py +++ b/samples/python2/squares.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Simple "Square Detector" program. diff --git a/samples/python2/stereo_match.py b/samples/python2/stereo_match.py index ef562225d6..0e46c26617 100755 --- a/samples/python2/stereo_match.py +++ b/samples/python2/stereo_match.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Simple example of stereo image matching and point cloud generation. diff --git a/samples/python2/texture_flow.py b/samples/python2/texture_flow.py index 5b095e63ad..66eb58fe69 100755 --- a/samples/python2/texture_flow.py +++ b/samples/python2/texture_flow.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Texture flow direction estimation. diff --git a/samples/python2/turing.py b/samples/python2/turing.py index 679bf9926a..101f22c045 100755 --- a/samples/python2/turing.py +++ b/samples/python2/turing.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Multiscale Turing Patterns generator ==================================== diff --git a/samples/python2/video.py b/samples/python2/video.py index c4168f6b51..2cdcb2a600 100755 --- a/samples/python2/video.py +++ b/samples/python2/video.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Video capture sample. diff --git a/samples/python2/video_dmtx.py b/samples/python2/video_dmtx.py index 98cdd85652..1ed06c4adc 100755 --- a/samples/python2/video_dmtx.py +++ b/samples/python2/video_dmtx.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Data matrix detector sample. Usage: diff --git a/samples/python2/video_threaded.py b/samples/python2/video_threaded.py index 7498d83606..6fce334183 100755 --- a/samples/python2/video_threaded.py +++ b/samples/python2/video_threaded.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Multithreaded video processing sample. Usage: diff --git a/samples/python2/watershed.py b/samples/python2/watershed.py index 711f940d0e..d4ab22ad59 100755 --- a/samples/python2/watershed.py +++ b/samples/python2/watershed.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Watershed segmentation =========