On the basis of the gray-level distribution in the relative half-neighborhood of image pixels
refering to the method called "Gap statistic" proposed by Hastie and Tibshirani
a concept called inverse distribution function is brought forward
and a multi-scale edge detection model based on Gap of random variable was established.By analyzing consistency between a grayscale distribution Gap and random variable Gap
the edge detection algorithm for Gap statistic model is optimized.The paper analyzes the correlation between the Gap statistic model and two operators(Prewitt operator and Sobel operator)
discusses the anti-noise and multi-scale properties of the edge detection model
and an investigation is made to analyze the difference of edge detection at different scales.Finally
experimental examples verify the capacity of the model.