Title: Mosaic creator Algorithm
Description: creates a mosaic
| Constructor Detail |
public MosaicAlgorithm(String FileNameToOriginal,
File[] filesOfPieces,
int detailLevel,
int divwide,
int divheight,
boolean isReplacement1,
MainWindow f,
JProgressBar jProgressBar,
JLabel label)
FileNameToOriginal - String the path to the mosaic image to be mappedfilesOfPieces - File[] all the files for the mosaic piece to be useddetailLevel - int amount of detail wanted to match the pictures the hight the beter matchdivwide - int the amount of division wide of the mosaicdivheight - int the amount of division high of the mosaicisReplacement1 - boolean if the mosaic is to be created with duplcatesf - MainWindow the window that called the classjProgressBar - JProgressBar the progress bar to show the user progresslabel - JLabel the label to write to the user what is going on| Method Detail |
public PicPixels[] CreatePicWithReplacement()
public PicPixels[] CreatePicWithOutReplacement()
private PicPixels CreatePictureToCopy(String originalPicturePath,
int MaxDimension)
originalPicturePath - StringMaxDimension - int
public PicPixels[] ReadPictures(int subPicWidth,
int subPicHeight)
subPicWidth - intsubPicHeight - int
public Vector ReadPicturesIntoVector(int subPicWidth,
int subPicHeight)
subPicWidth - intsubPicHeight - int
private PicPixels FindMatch(int w,
int h,
Vector pictures)
w - inth - intpictures - Vector
private PicPixels FindMatch(int w,
int h,
PicPixels[] pictures)
w - inth - intpictures - PicPixels[]
private int Compare(int w,
int h,
PicPixels mosaicPiece)
w - inth - intp - PicPixels
private int differenceInColor(Color color1,
Color color2)
color1 - Colorcolor2 - Color