[mlpack-git] [mlpack/mlpack] backported ind2sub and sub2ind. (#683)

stereomatchingkiss notifications at github.com
Thu Jun 9 12:02:54 EDT 2016


> +    table(i) = i / 1024.0;
> +    
> +    if (table(i) > y0)
> +      table(i) = 116 * pow(table(i), 1.0/3.0) - 16.0;
> +    else
> +      table(i) = table(i) * a;
> +
> +    table(i) = table(i) * maxi;
> +  }
> +
> +  MatType rgb2xyz(3,3);
> +  rgb2xyz(0,0) = 0.430574; rgb2xyz(0,1) = 0.430574; rgb2xyz(0,2) = 0.430574;
> +  rgb2xyz(1,0) = 0.430574; rgb2xyz(1,1) = 0.430574; rgb2xyz(1,2) = 0.430574;
> +  rgb2xyz(2,0) = 0.430574; rgb2xyz(2,1) = 0.430574; rgb2xyz(2,2) = 0.430574;
> +
> +  //see how to calculate this efficiently. numpy.dot does this.

Here is the implementation of [matlab](http://www.mathworks.com/matlabcentral/fileexchange/36433-stereo-testbed-v0-1/content/ALGORITHMS/3DStereoDisp/msseg/RGB2Luv.m), if we want speed, I think we better make use of the operations provided by armadillo, because armadillo do a lot of heavy optimization on matrix operations(matlab codes show us how to vectorize it)

---
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/683/files/9d85b64c6c6bdff608331195351d09abf56cfc96#r66470019
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160609/14193408/attachment.html>


More information about the mlpack-git mailing list