tvaLib
Classes | Namespaces | Functions | Variables
tools_obj.py File Reference

Go to the source code of this file.

Classes

class  lib.tools_obj.NullWriter
 Internal. More...
 

Namespaces

 lib.tools_obj
 

Functions

def lib.tools_obj.undistortImage (fileName, outputName, camera_matrix=[[377.42, dist_coeffs=[-0.11759321, frames=0, display=False, fourcc='MJPG', imageOutOffset=0, aceptableImageExtensions=('.png', '.jpg', '.jpeg'), freeScalingParameter=1.31, imageScalingFactor=1.31, maxWindowSize=800, verbose=0)
 Computer vision. More...
 
def lib.tools_obj.cameraCalibration (path, checkerBoardSize=[6, secondPassSearch=False, display=False, maxFramesToUse=40, verbose=0)
 
def lib.tools_obj.bruteVideoLengthSeconds (filename, fps=15.0)
 
def lib.tools_obj.bruteFrameCount (filename)
 
def lib.tools_obj.dumpFrameCrawler (path, frameNum=0, allowed_extensions=['.mp4', avi)
 
def lib.tools_obj.dumpFrame (videoFilename, frameNum=0)
 
def lib.tools_obj.checkCameraRejection (commands, siteIx, camIx)
 
def lib.tools_obj.imageBox (img, obj, frameNum, homography, width=20, height=20, px=0.2, py=0.2, minNPixels=800)
 
def lib.tools_obj.imageBoxTI (img, obj, frameNum, width, height, minNPixels=800, kwargs)
 
def lib.tools_obj.imageBoxSizeTI (obj, frameNum, width, height, homography=None, px=0.2, py=0.2)
 
def lib.tools_obj.homographyProject (points, homography)
 Homography functions (ported from TI to prevent future breaking due to changes in TI) More...
 
def lib.tools_obj.trajectoryProject (obj, homography)
 
def lib.tools_obj.invHomography (homography)
 
def lib.tools_obj.pointsToTrajectoryTI (points)
 
def lib.tools_obj.getHomography (homoSrcFrame='', orthoSrcPath='', savePath='homography.txt', tsaiCameraSrcPath='', nPoints=4, unitsPerPixel=0.1, videoPts=None, worldPts=None, pointDrawSize=3, pointTargetDrawSize=7, pointTargetDrawThickness=2, maxDisplayResolutionX=900, fig_name='', verbose=0)
 
def lib.tools_obj.loadObjects (sequencepath, max_obj=None, max_obj_features=999, suppress_features=False, legacy=False, legacy_features_path='')
 The following functions are used for manipulating object data from Traffic-Intelligence. More...
 
def lib.tools_obj.boundThis (obj, relFrame, homography, width, height)
 
def lib.tools_obj.boundFromExtrema (width, height, xmin, xmax, ymin, ymax, px=0.2, py=0.2, minNPixels=800)
 
def lib.tools_obj.contourThis (obj, relFrame)
 
def lib.tools_obj.contourClassified (obj, x, y, vx, vy)
 
def lib.tools_obj.contour (x, y, vx, vy, size=[5.0)
 
def lib.tools_obj.true_lane_xy (objects, alignments)
 
def lib.tools_obj.trimObject (obj, nframes, fromEnd=False)
 
def lib.tools_obj.num2ind (objects, num)
 
def lib.tools_obj.ixsAsObjects (objects, ixs)
 
def lib.tools_obj.numsAsObjects (objects, nums)
 
def lib.tools_obj.genXY_bounds (objects)
 
def lib.tools_obj.interpolateTrajBetTwoObjects (pos1, pos2, nframes)
 
def lib.tools_obj.interpolateNewObjectFramerate (obj, sourceFramerate, targetFramerate)
 
def lib.tools_obj.join (obj1, obj2, postSmoothing=True)
 
def lib.tools_obj.computeClassCorrespondance (matches, annotations, objects, maxClasses=7)
 
def lib.tools_obj.computeClassInstantCorrespondance (matches, annotations, objects, maxClasses=7)
 
def lib.tools_obj.matches (self, obj, instant, matchingDistance)
 Add-on obj methods. More...
 
def lib.tools_obj.classifyUserTypeHoGSVM (self, candidates=[1, baseSVM=None, width=0, height=0, homography=None, images=None, minSpeedEquiprobable=-1, speedProbabilities=None, alignmentProbabilities=None, aggregationFunc=np.median, maxPercentUnknown=0.5, px=0.2, py=0.2, minNPixels=800, rescaleSize=(64, 64), orientations=9, pixelsPerCell=(8, 8), cellsPerBlock=(2, 2), verbose=0, kwargs)
 

Variables

 lib.tools_obj.oldstdout = NullWriter()
 
 lib.tools_obj.stdout