Research Article

Proving Reliability of Image Processing Techniques in Digital Forensics Applications

Listing 14

Run-length of 0’s.
Fixpoint runlenwhite (img: image) (l: list nat): list nat \coloneq
match img, l with
| nil, 0:tlʺ ⇒ rev tlʺ
| nil, _ ⇒ rev l
| Br,c,white:tlʹ, nil ⇒ runlenwhite tlʹ (1:nil)
| Br,c,white:tlʹ, h:tlʺ ⇒ runlenwhite tlʹ (S h:tlʺ)
| Br,c,black:tlʹ, 0:tlʺ ⇒ runlenwhite tlʹ l
| Br,c,black:tlʹ, _ ⇒ runlenwhite tlʹ (0:l)
end.