diff --git a/doc/check_docs.py b/doc/check_docs.py index 18df02685..2d8799341 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 a3606bd29..bf0375459 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 40b8e2713..35073e051 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 ba321928a..ce750933b 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 269174684..352c46cb5 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 455b3b6e8..45b45af2d 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 04aa25735..bf182a8b0 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 fb52075e9..00e4aae9e 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 54681afa9..71d773c01 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 7c1f21286..e8cc3e841 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 55118ca91..4cb80ff72 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 2287058a9..c60730fad 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 97eac702a..3c697277b 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 65e66f7f9..f4ef58190 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 2d4daf08b..4238d05f7 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 2ffb44544..65cafc990 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 e600a82f4..5381579ce 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 a18a4feb4..090ed6f64 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 c371e73ce..0a52258b2 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 989207c8a..488dd15c6 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 9cc19412c..8f11738cc 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 e4c4b0a6f..62907772a 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 49326dab5..dde560895 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 ca511a40e..af1cb0556 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 901d7be20..f72afbbf0 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 8d8ba8883..dcfc5cfdc 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 49c8e076d..29a6ca1ec 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 42dfab209..924708c48 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 e6cc62f37..533027f5b 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 aa6818059..1e756bcd8 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 6d6f19e5b..1f63bcef2 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 604b85048..39a60eb2e 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 3ce725276..4492ed479 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 af95bac20..afcb9cc89 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 edee85497..6da89e512 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 e1b275f32..de5796a95 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 45b4aac13..76c198427 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 be89794f0..598c9e924 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 7f14235d3..ce55b8b1d 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 747bb4575..5d1c63b04 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 ddeeebd3f..e472fa197 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 6e81a3a44..a2ef8ae32 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 6b3a6bd18..0ff2b43da 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 35c600c96..282429979 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 1fb8b17f0..1d0f0418b 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 1204ae65a..71c9faa7d 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 4f2b0cd40..09894dd4c 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 238d2a3ec..da2c98d1c 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 03a2a6f7a..54aba8aaf 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 0554e1ecd..43543dcfc 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 d3fe4daba..082a7c610 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 8e6747aac..c27744ed5 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 ccfbe5c72..4c6f800c4 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 13a3857d3..daa13b2a1 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 9463c4545..5e3becc64 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 fd988bc31..a9c107015 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 582e5fc0f..c84bc241c 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 d8e70f2ec..72805d3f0 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 a8b486f2a..ef62826fd 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 132263629..386ea8ab9 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 02276f2d2..9ce3457d3 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 94807b82a..27a78950a 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 aa19d45f5..4dd8ddf13 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 48b9d44ea..7a875ca4f 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 e4a5091f1..c19dbdc35 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 540e7ad8f..177e38025 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 962a50189..9582bdb04 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 63ee3adec..de714fa35 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 d7938958f..ea950c832 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 0070f5568..d2b8c849a 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 3b5583050..4418a4679 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 e1951ed63..232ec54b9 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 282b300d8..73eeff3bb 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 9e6d8a9e8..9996764c6 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 ea8b25d1b..f0d043962 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 2c81cd81e..098098138 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 1d5eb2938..aecb42345 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 08f310064..4f78ebad5 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 b979445c9..a9fa882ad 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 88773534a..73e0a4f8d 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 a70046a06..d0bc5c5c1 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 4cd7a8efd..f4bd46702 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 45e35603d..dc2d5d584 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 d588b94cd..189f50b36 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 7842bb18c..a247c3562 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 ef562225d..0e46c2661 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 5b095e63a..66eb58fe6 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 679bf9926..101f22c04 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 c4168f6b5..2cdcb2a60 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 98cdd8565..1ed06c4ad 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 7498d8360..6fce33418 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 711f940d0..d4ab22ad5 100755 --- a/samples/python2/watershed.py +++ b/samples/python2/watershed.py @@ -1,3 +1,5 @@ +#/usr/bin/env python + ''' Watershed segmentation =========