lookup into array given a matrix (just replacing the values of matrix by vector)
조회 수: 2 (최근 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!