simple functional library for image processing (morphological)