private ImageProcessor performWatershedding(List<Point> maximList, List<BoundaryBox> bbs, 
			int width, int height, double[] hMin, ImageProcessor origImg){
		ImageProcessor tempMask = new ByteProcessor(width, height);
		for(int i = 0; i < maximList.size(); i++){
			BoundaryBox bb = bbs.get(i);
			BoundaryBox boundBox = BoundaryBox.clip(new BoundaryBox(
					maximList.get(i).getX() - bb.getWidth() - 80, 
					maximList.get(i).getY() - bb.getHeight() - 80, 
					2*bb.getWidth()+160, 2*bb.getHeight()+160),
					0, 0, width - 1, height - 1);
			ImageProcessor window = new ByteProcessor(width, height);
			ImageProcessor im = origImg;
			im.setRoi(boundBox.getX(), boundBox.getY(), boundBox.getWidth(), boundBox.getHeight());
			ImageProcessor interest = im.crop();
			window.copyBits(regionTight(interest, .1, hMin[i], boundBox.getWidth(), boundBox.getHeight()), boundBox.getX(), boundBox.getY(), Blitter.COPY);
			if(window.get(maximList.get(i).getX(), maximList.get(i).getY()) != 0){
				float num = window.get(maximList.get(i).getX(), maximList.get(i).getY());
				for(int j = boundBox.getX(); j < boundBox.getX() + boundBox.getWidth(); j++){
					for(int k = boundBox.getY(); k < boundBox.getY() + boundBox.getHeight(); k++){
						if(window.get(j,k) == num){
							tempMask.putPixelValue(j,k,255);
						}
					}
				}
			}
//				for(int j = boundBox.getX(); j < boundBox.getX() + boundBox.getWidth(); j++){
//					for(int k = boundBox.getY(); k < boundBox.getY() + boundBox.getHeight(); k++){
//							tempMask.putPixelValue(j,k,window.get(j,k));
//					}
//				}
			im.resetRoi();
		}
		ImageProcessor mask = findConnectedComponents(tempMask);
		mask.threshold(0);
		ImageProcessor temp = origImg.duplicate();
		temp.threshold(25);
		mask.copyBits(temp, 0, 0, Blitter.AND);
		mask.copyBits(tempMask, 0, 0, Blitter.AND);
		mask.threshold(0);
		mask = setLabels(bwAreaOpen(mask, 800));
//		mask.threshold(0);
		return mask;
//		return tempMask;
	}