lookup into array given a matrix (just replacing the values of matrix by vector)
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I have a very big matrix R of uint8. For every element (0-255) I have an other value in array A, where A is 256 length vector.
Now How can I replace each element in R by their lookup value in A. I want to do it as fast as it can.
0 个评论
采纳的回答
Image Analyst
2012-8-9
编辑:Image Analyst
2012-8-9
The function you want to use is called intlut() and it's in the Image Processing Toolbox. It's fast and is just a single line of code.
new_R = intlut(R, A);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!