public void meanRemovalComparison() { Bitmap image = imageModel.getBaseImage(); MeanRemoval3x3 mr3 = new MeanRemoval3x3(); MeanRemoval5x5 mr5 = new MeanRemoval5x5(); MeanRemoval7x7 mr7 = new MeanRemoval7x7(); Bitmap convImage3 = FilterController.ConvolutionFilter(image, mr3); Bitmap convImage5 = FilterController.ConvolutionFilter(image, mr5); Bitmap convImage7 = FilterController.ConvolutionFilter(image, mr7); channelView.setChannelImages(image, convImage3, convImage5, convImage7); }
public void applyMeanRemoval(int type) { Bitmap image; if (imageModel.getFilteredImage() != null) { image = imageModel.getFilteredImage(); } else { image = imageModel.getBaseImage(); } this.undoBuffer.push(image); switch (type) { case 1: MeanRemoval3x3 mr3 = new MeanRemoval3x3(); image = FilterController.ConvolutionFilter(image, mr3); break; case 2: MeanRemoval5x5 mr5 = new MeanRemoval5x5(); image = FilterController.ConvolutionFilter(image, mr5); break; case 3: MeanRemoval7x7 mr7 = new MeanRemoval7x7(); image = FilterController.ConvolutionFilter(image, mr7); break; } imageModel.setFilteredImage(image); baseView.setBaseImageFromBitmap(image); imageModel.setCIEImage(setCIEImage(image)); RGBModel[,] rgbImage = convertToRGB(imageModel.getCIEImage()); histogramView.setBaseImage(imageModel.getFilteredImage()); channelView.setFilteredChannelImages(image, setRedChannel(rgbImage), setGreenChannel(rgbImage), setBlueChannel(rgbImage)); this.redoBuffer.clearBuffer(); }