1. An image processing apparatus comprising: a probability conversion unit that receives an initial pattern and converts the initial pattern into a probability distribution space indicating a probability of dotting; a processor that performs weighting on a density distribution space indicating a density of pixels determined to be dotted using the probability distribution space, determines pixels to be dotted and an order of dotting of the pixels to be dotted in the weighted density distribution space, updates the probability distribution space in accordance with respective positions of the pixels determined to be dotted until the order of dotting for all pixels in the initial pattern is determined, and repeats the determination of the pixels to be dotted and the order of dotting using the updated probability distribution space; and a threshold conversion unit that converts the order of dotting of the pixels determined by the processor into respective thresholds to obtain a threshold matrix, wherein the probability conversion unit uses a threshold matrix preliminarily created to form a halftone dot as the initial pattern.