Image segmentation is a key part in image processing fields. The two-dimensional maximum entropy image segmentation method often gets ideal segmentation results for it not only considers the distribution of the gray information, but also takes advantage of the spatial neighbor information with using the two-dimensional histogram of the image. However it requires a large amount of computing time. The quantum-behaved particle swarm optimization (QPSO) algorithm, a new particle swarm optimization algorithm which can guarantee the global convergence, was proposed to solve this problem in the paper. The simulation was performed using QPSO algorithm to seek the optimal threshold value of an image adaptively in the two-dimensional gray space, where is the pixel intensity and is the average intensity of the pixel's neighborhood. The experiments of segmenting the vehicle brand images are illustrated to show that the proposed method can get ideal segmentation result with less computation cost.