error_diffusion Function

public pure function error_diffusion(img, maximum) result(rst)

Apply error diffusion

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: img(:,:,:)

Image array that has pixel values.

integer, intent(in) :: maximum

Max value of pixels.

Return Value integer, allocatable, (:,:,:)

Image array that applied error diffusion.