The automatic separation technology of coal gangues is studied.According to the difference between gray and texture of coal and gangue, the paper identify the basic characteristics of coal and gangue using image processing technique, get the gray and texture of coal and gangue'S images after image preprocessing and recognition, median filter principle, edge detection algorithm and SO on are used in the process of image analysis.Taking the mean and variance of gray probability distribution getting from histogram as the standard value to store in the computer, the paper compare it with the actual image processing result and realize automatic separation of coal and gangue combining with sin—gle chip microcomputer and control equipment.