This does the following :
- opening a local image file, using
pixpipe.FileImageReader
- converting it into a
pixpipe.Image2D
object
- compute the dx and dy derivative with
pixpipe.ImageDerivativeFilter
- feed a
pixpipe.GradientImageFilter
with the derivative
- displaying gradient direction and magnitude with a
pixpipe.CanvasImageWriter
Select an image file:
Image desription:
- Original image
- Gradient direction interval [-π/2, π/2] → [0, 255]
- Gradient direction with a hue wheel [-π/2, π/2] → hue[0, 360]
- Gradient intensity mapped to [0, 255]
- Gradient direction scaled with intensity