Lookup table for 2D matrix

2 visualizaciones (últimos 30 días)
manit chansuparp
manit chansuparp el 2 de En. de 2019
Comentada: Walter Roberson el 4 de En. de 2019
Let say i have large matrix (data) of size 103680x10 uint8 which stores value range of 0-255.
And lookup Table (LUT) is 256x255 double, i want to replace each element in data matrix with row vector of LUT.
In current i do this with following code : result = LUT(data'+1,:);
But it took 0.8 second to do this one operation, Can it be faster i have to do this for all frames in my video?
I really appreciate any help you can provide.
  3 comentarios
manit chansuparp
manit chansuparp el 4 de En. de 2019
Yes, Mr.Walter the result i get is 1036800 * 255. I ever tried the both case data 103680 x 10 and dataTranspose 10 x 103680(without ' ), it give me a same time(0.8 sec).
Maybe i'm going to deal with some LUT function such as intlut. it can replaces each element much faster than "result = LUT(data'+1); " when LUT is array of size 256. It took only 0.005 sec while LUT(data'+1) took 0.1 sec. Unfortunately, intlut supports only array not matrix. I have to find any other solution about LUT function.
Walter Roberson
Walter Roberson el 4 de En. de 2019
maybe loop doing 255 intlut, one for each column of your LUT ?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Lookup Tables en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by