12.07.2015 Views

Digital Image Processing (using Java)

Digital Image Processing (using Java)

Digital Image Processing (using Java)

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

(p.112)IntervalTimer timer = new IntervalTimer();Timer.start();//some code to be timedSystem.out.println(timer.elapsed()); //doesn’t stop the clock//more code to be timedSystem.out.println(timer.stop()); //stops clockMapTest1.javaimport java.util.Random;public class MapTest1 {public static void randomFill(short[] array) {Random random = new Random();for (int i = 0; i < array.length; ++i)array[i] = (short) random.nextInt(256);}public static void main(String[] argv) {int n = 512;if (argv.length > 0)n = Integer.parseInt(argv[0]);// Create image and fill it with random values- 20 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!