lookup into array given a matrix (just replacing the values of matrix by vector)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Image Analyst
am 9 Aug. 2012
Bearbeitet: Image Analyst
am 9 Aug. 2012
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);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Approximate Functions with Lookup Tables finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!