to_binary Function

public pure function to_binary(img, threshold) result(rst)

Apply binarization

Arguments

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

Image array that has pixel values.

integer, intent(in) :: threshold

Threshold

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

Image array that applied binarization.