// Path: desktop/src/main/java/com/cv4j/core/datamodel/ImageProcessor.java
// public interface ImageProcessor {
// 
// 	/** Returns the width of this image in pixels. */
// 	int getWidth();
// 
// 	/** Returns the height of this image in pixels. */
// 	int getHeight();
// 
// 	/** Returns the channels of this image. */
// 	int getChannels();
// 
// 	void getPixel(int row, int col, byte[] rgb);
// 
// 	/** get all pixels */
// 	int[] getPixels();
// 
// 	ImageData getImage();
// 
// 	/** Returns float array with one channel of image by index*/
// 	float[] toFloat(int index);
// 
// 	/** Returns int array with one channel of image by index*/
// 	int[] toInt(int index);
// 
// 	/** Returns byte array with one channel of image by index*/
// 	byte[] toByte(int index);
// 
// }
// 
// Path: desktop/src/main/java/com/cv4j/core/filters/BaseFilter.java
// public abstract class BaseFilter implements CommonFilter {
// 
//     protected int width;
//     protected int height;
//     protected byte[] R;
//     protected byte[] G;
//     protected byte[] B;
// 
//     @Override
//     public ImageProcessor filter(ImageProcessor src) {
// 
//         if (src == null) return null;
// 
//         if (!(src instanceof ColorProcessor)) return src;
// 
//         width = src.getWidth();
//         height = src.getHeight();
//         R = ((ColorProcessor)src).getRed();
//         G = ((ColorProcessor)src).getGreen();
//         B = ((ColorProcessor)src).getBlue();
// 
//         return doFilter(src);
//     }
// 
//     public abstract ImageProcessor doFilter(ImageProcessor src);
// }


import com.cv4j.core.datamodel.ImageProcessor;
import com.cv4j.core.filters.BaseFilter;
				r = sr / 3;
				g = sg / 3;
				b = sb / 3;
				output[0][offset+col]=(byte)r;
				output[1][offset+col]=(byte)g;
				output[2][offset+col]=(byte)b;
			}
		}
		
		// Y 方向
		for(int col=0; col<width; col++) {
			int coffset = col;
			for(int row=1; row<height-1; row++) {
				int sr=0, sg=0, sb=0; 
				for(int j=-1; j<=1; j++) {
					int roffset = j+row;
					sr += output[0][roffset*width+coffset]&0xff;
					sg += output[1][roffset*width+coffset]&0xff;
					sb += output[2][roffset*width+coffset]&0xff;
				}
				r = sr / 3;
				g = sg / 3;
				b = sb / 3;
				R[row*width+col]=(byte)r;
				G[row*width+col]=(byte)g;
				B[row*width+col]=(byte)b;
			}
		}
		output[0] = null;
		output[1] = null;
// Path: desktop/src/main/java/com/cv4j/core/datamodel/ImageProcessor.java
// public interface ImageProcessor {
// 
// 	/** Returns the width of this image in pixels. */
// 	int getWidth();
// 
// 	/** Returns the height of this image in pixels. */
// 	int getHeight();
// 
// 	/** Returns the channels of this image. */
// 	int getChannels();
// 
// 	void getPixel(int row, int col, byte[] rgb);
// 
// 	/** get all pixels */
// 	int[] getPixels();
// 
// 	ImageData getImage();
// 
// 	/** Returns float array with one channel of image by index*/
// 	float[] toFloat(int index);
// 
// 	/** Returns int array with one channel of image by index*/
// 	int[] toInt(int index);
// 
// 	/** Returns byte array with one channel of image by index*/
// 	byte[] toByte(int index);
// 
// }
// 
// Path: desktop/src/main/java/com/cv4j/core/filters/BaseFilter.java
// public abstract class BaseFilter implements CommonFilter {
// 
//     protected int width;
//     protected int height;
//     protected byte[] R;
//     protected byte[] G;
//     protected byte[] B;
// 
//     @Override
//     public ImageProcessor filter(ImageProcessor src) {
// 
//         if (src == null) return null;
// 
//         if (!(src instanceof ColorProcessor)) return src;
// 
//         width = src.getWidth();
//         height = src.getHeight();
//         R = ((ColorProcessor)src).getRed();
//         G = ((ColorProcessor)src).getGreen();
//         B = ((ColorProcessor)src).getBlue();
// 
//         return doFilter(src);
//     }
// 
//     public abstract ImageProcessor doFilter(ImageProcessor src);
// }


// Path: desktop/src/main/java/com/cv4j/core/spatial/conv/ConvolutionHVFilter.java
import com.cv4j.core.datamodel.ImageProcessor;
import com.cv4j.core.filters.BaseFilter;

				r = sr / 3;
				g = sg / 3;
				b = sb / 3;
				output[0][offset+col]=(byte)r;
				output[1][offset+col]=(byte)g;
				output[2][offset+col]=(byte)b;
			}
		}
		
		// Y 方向
		for(int col=0; col<width; col++) {
			int coffset = col;
			for(int row=1; row<height-1; row++) {
				int sr=0, sg=0, sb=0; 
				for(int j=-1; j<=1; j++) {
					int roffset = j+row;
					sr += output[0][roffset*width+coffset]&0xff;
					sg += output[1][roffset*width+coffset]&0xff;
					sb += output[2][roffset*width+coffset]&0xff;
				}
				r = sr / 3;
				g = sg / 3;
				b = sb / 3;
				R[row*width+col]=(byte)r;
				G[row*width+col]=(byte)g;
				B[row*width+col]=(byte)b;
			}
		}
		output[0] = null;
		output[1] = null;
		output[2] = null;