PsiLAB Help Manual Page

Section: Image processing functions

Name: imatrix_of_image

Convert an image to a gray level integer matrix. The RGB values are equally weighted and converted to a gray value:

G <- (R+G+B)/3

The functions expect an abstract image of type Image.t :

imatrix_of_image img:Image.t -> (int, 'a, 'b) Matrix.t

Example:

[] let im = load "test.bmp" [] ;; 
[] let imm = imatrix_of_image im ;; 
- : (int, '_a, '_b) Matrix.t = <abstr> 

Printed by PsiLAB