Skip to content

Commit 77af5c0

Browse files
committed
remove unused reference to scipy
1 parent 6a03218 commit 77af5c0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/Util.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import cv
1616
import numpy
1717
from PIL import Image, ImageDraw
18-
from scipy import mat, linalg
18+
#from scipy import mat, linalg
1919
from math import sqrt, sin, cos, radians
2020

2121
def generateVideoClip(videoDir="./video/"):
@@ -228,6 +228,9 @@ def calculateBlobPCA(array):
228228
Given the 2D numpy array perform Principle Component Analysis
229229
on the pixels to find the center of gravity as well as the principle
230230
direction vectors to represent strongest rotation direction.
231+
NOTE: this method requires the scipy library but more to make for
232+
easier install requirements this mehtod is disabled and always returns
233+
None for now.
231234
"""
232235
S = numpy.sum(array)
233236

@@ -252,9 +255,11 @@ def calculateBlobPCA(array):
252255
oj *= (1.0/S)
253256
oij *= (1.0/S)
254257

255-
C = mat([[oi,oij],[oij,oj]]) #covarience matrix
256-
la,v = linalg.eig(C) #eigen vectors/values
257-
return (ui,uj), (v[:,0]*sqrt(la[0]), v[:,1]*sqrt(la[1]))
258+
#TODO: requires scipy dependency
259+
#C = mat([[oi,oij],[oij,oj]]) #covarience matrix
260+
#la,v = linalg.eig(C) #eigen vectors/values
261+
#return (ui,uj), (v[:,0]*sqrt(la[0]), v[:,1]*sqrt(la[1]))
262+
return None #return None until scipy required
258263

259264
def createMeanImage(image, radius=1):
260265
"""

0 commit comments

Comments
 (0)