embeded cv Python module into cv2.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import time
|
||||
|
||||
cv.NamedWindow("camera", 1)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
def is_rect_nonzero(r):
|
||||
(_,_,w,h) = r
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
print "OpenCV Python version of contours"
|
||||
|
||||
# import the necessary things for OpenCV
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
# some default constants
|
||||
_SIZE = 500
|
||||
|
@@ -3,7 +3,7 @@
|
||||
print "OpenCV Python version of convexhull"
|
||||
|
||||
# import the necessary things for OpenCV
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
# to generate random values
|
||||
import random
|
||||
|
@@ -5,7 +5,7 @@ Find Squares in image by finding countours and filtering
|
||||
#otherwise ok
|
||||
|
||||
import math
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
def angle(pt1, pt2, pt0):
|
||||
"calculate angle contained by 3 points(x, y)"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import urllib2
|
||||
from sys import argv
|
||||
|
||||
|
@@ -6,7 +6,7 @@ delaunay triangulation and voronoi tesselation
|
||||
Original Author (C version): ?
|
||||
Converted to Python by: Roman Stanchak
|
||||
"""
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import random
|
||||
|
||||
def draw_subdiv_point( img, fp, color ):
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
import sys
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import urllib2
|
||||
|
||||
wndname = "Distance transform"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import time
|
||||
from pydmtx import DataMatrix
|
||||
import numpy
|
||||
|
@@ -4,7 +4,7 @@ import colorsys
|
||||
|
||||
print "OpenCV Python version of drawing"
|
||||
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
def random_color(random):
|
||||
"""
|
||||
|
@@ -4,7 +4,7 @@ print "OpenCV Python version of edge"
|
||||
|
||||
import sys
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
# some definitions
|
||||
win_name = "Edge"
|
||||
|
@@ -7,7 +7,7 @@ Original C implementation by: ?
|
||||
Python implementation by: Roman Stanchak, James Bowman
|
||||
"""
|
||||
import sys
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
from optparse import OptionParser
|
||||
|
||||
# Parameters for haar detection
|
||||
|
@@ -2,7 +2,7 @@
|
||||
import sys
|
||||
import random
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
im=None;
|
||||
mask=None;
|
||||
|
@@ -13,7 +13,7 @@ Python implementation by: Roman Stanchak, James Bowman
|
||||
import sys
|
||||
import urllib2
|
||||
import random
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
def contour_iterator(contour):
|
||||
while contour:
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
import sys
|
||||
from math import sin, cos, sqrt, pi
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import urllib2
|
||||
|
||||
# toggle between CV_HOUGH_STANDARD and CV_HOUGH_PROBILISTIC
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import urllib2
|
||||
import sys
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
class Sketcher:
|
||||
def __init__(self, windowname, dests):
|
||||
|
@@ -12,7 +12,7 @@
|
||||
Pressing ESC will stop the program.
|
||||
"""
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
from math import cos, sin, sqrt
|
||||
import sys
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
from random import randint
|
||||
MAX_CLUSTERS = 5
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@@ -5,7 +5,7 @@ print "OpenCV Python version of lkdemo"
|
||||
import sys
|
||||
|
||||
# import the necessary things for OpenCV
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
#############################################################################
|
||||
# some "constants"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import sys
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
src=None
|
||||
dst=None
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
from random import randint
|
||||
|
||||
def roundxy(pt):
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
cap = cv.CreateFileCapture("../c/tree.avi")
|
||||
img = cv.QueryFrame(cap)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import sys
|
||||
import urllib2
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
src = 0
|
||||
image = 0
|
||||
|
@@ -3,7 +3,7 @@ import urllib2
|
||||
import sys
|
||||
import time
|
||||
from math import cos, sin
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
CLOCKS_PER_SEC = 1.0
|
||||
MHI_DURATION = 1
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import urllib2
|
||||
import sys
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import numpy
|
||||
|
||||
# SRGB-linear conversions using NumPy - see http://en.wikipedia.org/wiki/SRGB
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import urllib2
|
||||
import sys
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
import numpy
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
class PyrSegmentation:
|
||||
def __init__(self, img0):
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
import urllib2
|
||||
from math import sqrt
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
thresh = 50
|
||||
img = None
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
import urllib2
|
||||
import sys
|
||||
import cv
|
||||
import cv2.cv as cv
|
||||
|
||||
class Sketcher:
|
||||
def __init__(self, windowname, dests):
|
||||
|
Reference in New Issue
Block a user