Objective: Process raster images using simple pixelwise operations and add interactivity. Setup a page with at least two canvases. Draw the original input image in the first one, process its data using pixelwise operations, and put the content of the output images in the other canvases.
Keep only the R component, setting the G and B components to zero.
Convert the image to grey-level by averaging the R, G, B components. Threshold the grey-level image at grey level threshold=120.
Apply a linear correction on the pixel values R, G, B: - Increase the contrast of the image by a scale=1.2, leaving intensity value center=128 unchanged - then lighten the image by offset=+30 intensity levels.
Add controls to modify interactively offset, scale, center and threshold.
Double click
where you want to start your cropone click
where you want to finish your cropcrop();