How to extract the value of image using LUT

asked 2014-04-08 05:05:31 -0500

FLY gravatar image

updated 2014-07-01 16:04:08 -0500

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

enter image description here

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

edit retag flag offensive close merge delete

Comments

above code is not related to curves at all. you must be confusing something.

berak gravatar imageberak ( 2014-07-02 01:21:10 -0500 )edit

@berak yes , above code is just a simple code , that is a sample for what i want to ask and in which scenerio

FLY gravatar imageFLY ( 2014-07-02 04:40:57 -0500 )edit

"This program change the shape of the image using LUT" - plain wrong

berak gravatar imageberak ( 2014-07-02 04:46:44 -0500 )edit

yes , this program apply some type of posteriziting on image , and it will change from orignal to that shape

FLY gravatar imageFLY ( 2014-07-02 04:53:10 -0500 )edit

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

FLY gravatar imageFLY ( 2014-07-02 05:07:33 -0500 )edit