Mercurial > hg > nsaunier > traffic-intelligence
comparison python/cvutils.py @ 788:5b970a5bc233 dev
updated classifying code to OpenCV 3.x (bug in function to load classification models)
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 24 Mar 2016 16:37:37 -0400 |
| parents | b6d3bf350789 |
| children | 5b99b676265e |
comparison
equal
deleted
inserted
replaced
| 787:0a428b449b80 | 788:5b970a5bc233 |
|---|---|
| 600 img = imread(imageDirectory+filename) | 600 img = imread(imageDirectory+filename) |
| 601 features = HOG(img, rescaleSize, orientations, pixelsPerCell, cellsPerBlock, visualize, normalize) | 601 features = HOG(img, rescaleSize, orientations, pixelsPerCell, cellsPerBlock, visualize, normalize) |
| 602 inputData.append(features) | 602 inputData.append(features) |
| 603 | 603 |
| 604 nImages = len(inputData) | 604 nImages = len(inputData) |
| 605 return array(inputData, dtype = float32), array([classLabel]*nImages, dtype = float32) | 605 return array(inputData, dtype = float32), array([classLabel]*nImages) |
| 606 | 606 |
| 607 | 607 |
