How to use LUT in image processing?
Mostrar comentarios más antiguos
Hi,
I have two images:
- one binary image which can be used as a mask (BW) and
- a grayscale image (Image).
I'd like to create an array (or a LUT) so that:
For each blob from the binary image, I can put all the corresponding values from the gray scale image.
How do I initialize the LUT? What would be the size of the LUT?
% Read each blob
L = bwlabel(BW);
nbLabels = max(max(L));
for iBlob = 1:nbLabels
% find all coordinates of the current blob
[r, c] = find(L == iBlob);
rc = [r c];
values = Image(r,c); % rc may be Nx2
LUT(r, c) = values;
end
How to use this LUT later by indexing ?
Thank you very much.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Segmentation and Analysis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!