Considerations that should come to mind:
Questions
Lab Results
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
In the sample JPEG image above, the following colors are being displayed in the cells.
0 (blue=255, green=0, red=0) | 1 (blue=0, green=255, red=0) | 2 (blue=0, green=0, red=255) | 3 (blue=255, green=255, red=255) |
4 (blue=100, green=100, red=100) | 5 (blue=200, green=100, red=200) | 6 (blue=100, green=200, red=200) | 7 (blue=0, green=0, red=0) |
As shown above, 0,0,0 is black and 255,255,255 is white. In the other version of the one-dimensional array used in the Java code, each pixel uses 3 consecutive cells in the array, rather than one. In this version, the first cell assigned to th pixel stores the integer value for blue, the second for green, and the third for red.
** This application achieves the single operation of producing a ** JPEG file whose pixel values are the color value average ** of the images appearing in the given directory. ** ** Usage: java JPGavg dirname avg.jpg
FTP these two images to your space on dataprivacylab.org. Examine how the average image compares with the original images.
** This application achieves the single operation of producing a ** an JPEG file whose pixel values are the standard deviation ** of the color values found in the images appearing in the ** given directory using the avg.jpg. ** ** Usage: java JPGstd avg.jpg dirname std.jpg
FTP these two images to your space on dataprivacylab.org. Examine how the image of standard deviations compares with the original images.
** This application displays the number and percentage of pixels ** for each JPEG file in dirname that is 1, 2, or 3 standard ** deviations from avg using std. ** ** Usage: java JPGstats avg.jpg std.jpg dirname
Examine the results and notice how similar they appear.
Using the
Java code,
generate corresponding matrix files for [CP1, ..., CP6],
and [AP1, ..., AP6], respectively, that report the pixel-wise difference of those
images from the average image, computed above.
Below is a copy of the header comment from the file.
** This application reads the JPEG files in the indir and ** writes a corresponding JPEG file in the outdir that has its ** pixel values reduced by those in a.jpg. The absolute value of ** the difference in the color values for each pixel is stored ** in the outdir image. Files not ending in .jpg are ignored. ** ** Usage: java JPGdiffAll a.jpg indir outdir
Questions
Lab Results
Technical observations