1. A method for processing an image in Bayer format using an image processing device, the method comprising: performing a binning process in a horizontal and/or vertical direction on an image which is to be processed, so that an arrangement mode of pixels in a processed image after binning is the same with that in the image to be processed, wherein the binning process comprises: determining a position of an output pixel; determining whether a pixel in the image to be processed, which has the same position as the output pixel, has a color component that is the same or different than that of the output pixel; selecting, from the image to be processed, a plurality of pixels which have the same color component with that of the output pixel based at least in part on whether the color component of the pixel is the same or different than that of the output pixel; and calculating a weighted average of the plurality of pixels, so as to obtain a pixel value of the output pixel, wherein the plurality of pixels are selected from particular positions, so that the weighted average of the plurality of pixels can be calculated for processing the image in Bayer format.