Demosaicing is a process of interpolating the missing colors of color filter array. Recently, a quite good demosaicing method using directional filtering and a posteriori decision has been proposed. However, the window size of classifiers in the decision is fixed, which may not be suitable for different kinds of image area. To solve this problem, we present variable-size classifiers in this paper. The size of classifiers is varied according to the roughness measurement of neighbor pixels. In addition, a scheme of proportional weights is proposed to increase the interpolated image quality. Combined with a modified refining step, the proposed method increases a little computational cost but can elevate the peak-signal to noise ratio up to 1.09 dB on average.