[mlpack-git] [mlpack/mlpack] Added the discretize function. Design changes as discussed. (#703)

Tham notifications at github.com
Fri Jun 24 15:10:31 EDT 2016


> +        HistArr(r, c, o1) += Magnitude(i, j) * (1 + (int)o - o);
> +        HistArr(r, c, o2) += Magnitude(i, j) * (o - (int) o);
> +      }
> +      else
> +      {
> +        o1 = (size_t) (Orientation(i, j) / o_range + 0.5) % numOrient;
> +        HistArr(r, c, o1) += Magnitude(i, j);
> +      }
> +    }
> +  }
> +
> +  HistArr = HistArr / downscale;
> +
> +  for (size_t i = 0; i < HistArr.n_slices; ++i)
> +    HistArr.slice(i) = arma::square(HistArr.slice(i));
> +}

arma::square works for Cube<T> too, following should work

`HistArr = arma::square(HistArr);`

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/703/files/987f0790f745314a2117a87f28a346b05a8a2a2d#r68447737
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160624/9502916c/attachment.html>


More information about the mlpack-git mailing list