@Override
	public Runnable getRunnableConvolve(final Division div)
	{
		return new Runnable(){
			int rsum_p=0, gsum_p=0,bsum_p=0;
			int p1_p,p2_p,p3_p,p4_p,p5_p,p6_p,p7_p,p8_p,p9_p;
			int offset_p;
			@Override
			public void run() 
			{	
				for (int y=div.yStart; y<div.yLimit; y++) {
					offset_p = div.xStart + y * width;
					p1_p = 0;
					p2_p = pixelsTemp[offset_p-rowOffset_p-1];
					p3_p = pixelsTemp[offset_p-rowOffset_p];
					p4_p = 0;
					p5_p = pixelsTemp[offset_p-1];
					p6_p = pixelsTemp[offset_p];
					p7_p = 0;
					p8_p = pixelsTemp[offset_p+rowOffset_p-1];
					p9_p = pixelsTemp[offset_p+rowOffset_p];

					for (int x=div.xStart; x<div.xEnd; x++) {
						p1_p = p2_p; p2_p = p3_p;
						p3_p = pixelsTemp[offset_p-rowOffset_p+1];
						p4_p = p5_p; p5_p = p6_p;
						p6_p = pixelsTemp[offset_p+1];
						p7_p = p8_p; p8_p = p9_p;
						
						p9_p = pixelsTemp[offset_p+rowOffset_p+1];
						//System.out.println(x+ "   "+y+ "   "+p9_p);

						rsum_p = k1_p*((p1_p & 0xff0000) >> 16)
						     + k2_p*((p2_p & 0xff0000) >> 16)
						     + k3_p*((p3_p & 0xff0000) >> 16)
						     + k4_p*((p4_p & 0xff0000) >> 16)
						     + k5_p*((p5_p & 0xff0000) >> 16)
						     + k6_p*((p6_p & 0xff0000) >> 16)
						     + k7_p*((p7_p & 0xff0000) >> 16)
						     + k8_p*((p8_p & 0xff0000) >> 16)
						     + k9_p*((p9_p & 0xff0000) >> 16);
						rsum_p /= scale_p;
						if(rsum_p>255) rsum_p = 255;
						if(rsum_p<0) rsum_p = 0;

						gsum_p = k1_p*((p1_p & 0xff00) >> 8)
						     + k2_p*((p2_p & 0xff00) >> 8)
						     + k3_p*((p3_p & 0xff00) >> 8)
						     + k4_p*((p4_p & 0xff00) >> 8)
						     + k5_p*((p5_p & 0xff00) >> 8)
						     + k6_p*((p6_p & 0xff00) >> 8)
						     + k7_p*((p7_p & 0xff00) >> 8)
						     + k8_p*((p8_p & 0xff00) >> 8)
						     + k9_p*((p9_p & 0xff00) >> 8);
						gsum_p /= scale_p;
						if(gsum_p>255) gsum_p = 255;
						else if(gsum_p<0) gsum_p = 0;

						bsum_p = k1_p*(p1_p & 0xff)
						     + k2_p*(p2_p & 0xff)
						     + k3_p*(p3_p & 0xff)
						     + k4_p*(p4_p & 0xff)
						     + k5_p*(p5_p & 0xff)
						     + k6_p*(p6_p & 0xff)
						     + k7_p*(p7_p & 0xff)
						     + k8_p*(p8_p& 0xff)
						     + k9_p*(p9_p & 0xff);
						bsum_p /= scale_p;
						if (bsum_p>255) bsum_p = 255;
						if (bsum_p<0) bsum_p = 0; 

						pixels[offset_p++] = 0xff000000
						                 | ((rsum_p << 16) & 0xff0000)
						                 | ((gsum_p << 8 ) & 0xff00)
						                 |  (bsum_p       & 0xff);
					}
					if (y%inc_p==0)
						showProgress((double)(y-roiY)/roiHeight);
				}
			}
		};
	}