CS 276 Lab #1
purpose of this lab is to get used to working with the basic
patterns of image processing algorithms and measure the performance of the image
code run in
the Processing development environment (and review programming
- How can we determine how long it takes to execute a
- How can we determine how long it takes to process just one pixel?
- What is the effect if draw()
function runs continuously when processing an image pixel-by-pixel? Does
it help, hurt, or not matter?
- Copy the code Invert Image
class wiki to the Processing IDE. Use Sketch
-> Add File... to import your own image file. Modify
function to use your new image file. Run to test that it works.
- Wrap the function call to negativize
with calls to the Processing function millis()
so that you can measure the amount of time, in milliseconds,
takes to process the pixels array. Output
the results of the measurement using println.
Also output the average processing time per pixel by dividing
the total time by the number of pixels in your image.