lookup into array given a matrix (just replacing the values of matrix by vector)
4 ビュー (過去 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 で Approximate Functions with Lookup Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!