Permalink
Browse files

default cell size to 4 pixels

  • Loading branch information...
1 parent fd53d0c commit b4a0ad5e65f67bb86c9a21055e9b21609eb37a6c @harthur committed May 31, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 README.md
  2. +1 −1 hog.js
View
@@ -19,15 +19,15 @@ npm install hog-descriptor
# API
-`extractHOG()` takes options for the cell size (default is `6` pixels), block size (default is `2` cells), block stride (default is `blockSize / 2`), number of bins per orientation histogram (default is `6`), and block normalization method (one of `"L1"`, `"L1-sqrt"`, and default `"L2"`):
+`extractHOG()` takes options for the cell size (default is `4` pixels), block size (default is `2` cells), block stride (default is `blockSize / 2`), number of bins per orientation histogram (default is `6`), and block normalization method (one of `"L1"`, `"L1-sqrt"`, and default `"L2"`):
```javascript
var options = {
- cellSize: 6, // length of cell in px
+ cellSize: 4, // length of cell in px
blockSize: 2, // length of block in number of cells
blockStride: 1, // number of cells to slide block window by (block overlap)
bins: 6, // bins per histogram
- norm: 'L1' // block normalization method
+ norm: 'L2' // block normalization method
}
var descriptor = hog.extractHOG(canvas, options);
View
2 hog.js
@@ -8,7 +8,7 @@ for (var func in processing) {
exports.extractHOG = function(canvas, options) {
options = options || {};
- var cellSize = options.cellSize || 6;
+ var cellSize = options.cellSize || 4;
var blockSize = options.blockSize || 2;
var bins = options.bins || 6;
var blockStride = options.blockStride || (blockSize / 2);

0 comments on commit b4a0ad5

Please sign in to comment.