Transform an image with a gray-value look-up-table
lut_trans transforms an image Image by using a gray value look-up-table Lut. This table acts as a transformation function.
|
Image (input_object) |
image(-array) -> object : byte |
| Image whose gray values are to be transformed. | |
|
ImageResult (output_object) |
image(-array) -> object : byte |
| Transformed image. | |
|
Lut (input_control) |
integer-array -> integer |
| Table containing the transformation. | |
/* To get the inverse of an image: */
read_image(:Image:'wald1':) >
def_tab(Tab,0) >
lut_trans(Image:Invers:Tab,1,1:) >
def_tab(Tab,I) :- I=255 >
Tab = 0 >
def_tab([Tk|Ts],I) :-
Tk is 255 - I >
Iw is I -1 >
def_tab(Ts,Iw) >
The operator lut_trans returns the value TRUE if the parameters are correct. Otherwise an exception is raised.