How to extract the value of image using LUT [closed]
Lets suppose the sample program like below
int q = 256/bins;
int res = 5;
Mat_<uchar> pal(1,256); // make a lookup table for intensities
for ( int c=0; c<256; c++ )
pal(c) = saturate_cast<uchar>((((c/q) * q) * bins)/(bins-1));
LUT(img,pal,res);
This program change the shape of the image using LUT
, but its very simple and clear , but anyhow what if I want to know the values of resultant image ? like so if I want to do it anything with LUT
with interface like line
and when I move the line it changes the shape of image , so when I move the line like below
Now this line changes the shape of the image and the program at the back of this image is using LUT
approach , How I can save the value of that shape of Image , so that next time I can enter that value directly without moving the line and it changes the image shape.
You can see the curve related example here
above code is not related to curves at all. you must be confusing something.
@berak yes , above code is just a simple code , that is a sample for what i want to ask and in which scenerio
"This program change the shape of the image using LUT" - plain wrong
yes , this program apply some type of posteriziting on image , and it will change from orignal to that shape
i check it here http://docs.opencv.org/modules/gpu/doc/operations_on_matrices.html#gpu-lut but the only thing i got is that
LUT
is use for mapping , nothing more then this , how it work , how we can deal with it etc