module Picture:sig..end
type picture = {
|
r : |
|
g : |
|
b : |
val dimx : picture -> intval dimy : picture -> intval read_pic : string -> pictureval fprint_ppm : Format.formatter -> picture -> unitval sprint_ppm : picture -> stringval flip : picture -> pictureval brightness : picture -> Matrix.F.t0..1.
Convert to Graphics-friendly format.
val image : picture -> int array arrayval monochrome : Matrix.F.t -> pictureval black_n_white : Matrix.B.t -> pictureval colorful : Matrix.I.t -> pictureval convolution : filter:Matrix.F.t -> image:Matrix.F.t -> Matrix.F.timage, sum all elements
of the product of filter and corresponding image elements.val normalize : Matrix.F.t -> Matrix.F.t
val sobel_x : Matrix.F.tval sobel_y : Matrix.F.tval scharr_x : Matrix.F.tval scharr_y : Matrix.F.tval gaussian : Matrix.F.tval canny : hi_thr:float -> lo_thr:float -> picture -> Matrix.B.thi_thr how insensitive to new edges,
lo_thr how insensitive to edge continuations,
extend how many pixels to prolong existing edge.val super_canny : extend:int -> hi_thr:float -> lo_thr:float -> picture -> Matrix.B.tval regions : Matrix.B.t -> Matrix.I.tval regcolors : picture -> Matrix.I.t -> int array * int array * int arrayval colorcode : Matrix.I.t -> int array * int array * int array -> picture